Jump to content

Mr. Heinrich von Zadow

Moderators
  • Content Count

    199
  • Joined

  • Last visited

  • Days Won

    9

Posts posted by Mr. Heinrich von Zadow


  1. Hi Gustaf (sorry for misspelling your name repeatedly!),

    with .getmax(2,true) you can return the max value along the z-axis of a curve (the "true" will return the parameter position of that max value, instead of the value itself). This parameter can now be used again, to acces the position of the curve at that parameter with .getPos() 

    This should be what you need -- see attached project again for your specific example.

     

    planing_hull_v03.cdb


  2. Hi Yukai,

    generally, during an optimization CAESES automatically changes Design Variables to create different shapes. Hence, you should see a change in the evaluations/objectives from your external computation. You can also create screen shots of the different variants and look at them (as well as post processing data) in the Design Viewer to compare different shapes. I recommend the Tutorial Basics/Geometry Variation and Asessment to get a good first insight.

    Best regards,
    Heinrich


  3. Hi Yukai,

    you can set the sub folder by adding it to the file name of your template like this:

    image.png.89f26f3b1188143dd97d9b347a09a43c.png

    If you have an allrun script which you execute for each design this would normally be executed in the same location as your STL file is exported to. Hence, typically referring to it by its name instead of full path works. Alternatively, you could add an entry an specify a path with getResultsDir() to have it adjust dynamically...

    Cheers,
    Heinrich

    • Like 1

  4. Hi CJ,

    you can simply create a parameter in your project and set it to

    myCurve.getArea(0,2)

    As you said, 0 corresponds to the x-axis (along which you want to integrate) and 2 is the z-plane (looking at the deck curve from the top of the hull).

    Cheers,
    Heinrich


  5. Hi Stanley,

    there will probably be a robust way to trim consistently but it is a bit hard to suggest without looking at the project. Maybe you can attach a simplified project to show the problem?

    About the translation: there is also an option to add a transformation as a curve operation...

    I also recommend you take the time to take a closer look at some of the samples and tutorials to get up to speed.

    Cheers,
    Heinrich


  6. Hi Carlos,

    without being able to look at the geometry its hard to tell. One option you might want to try is the knot spacing of the BRep you are transforming:

    image.png.eadf7ceb9c4888b9ace3c782318381a2.png

    Try and increase the density of the control polygon of your hull. A value of around 1 or 0.5 might be enough (assuming the hull is around 100-250 m or something in that...). What this will do is, insert additional control points to ensure a maximum distance of 1 or 0.5 between adjacent CPs. You can verify your choice by looking at them in the display options of your BRep:

    image.png.bbe3a4388359488b090ad5fb01fe7081.png

    You will need enough points on both adjacent patches so that they have a chance to be within tolerances even after you have applied the transformation. In short: you need enough points to get things to work, but not too many so it doesn't get too "expensive".

    Hope this helps. Cheers,
    Heinrich


  7. Hi Stanley,

    sure, this is what CAESES is about (automatically creating lots and lots of variants -- typically you would have them analyzed (e.g. via CFD) and then use an optimization algorithm inside CAESES to converge your shape towards an optimum. Something like maximum lift/drag for example in the case of a profile definition...)

    I'll send you a PM so you can share the file...

    Cheers,
    Heinrich


  8. Hi Stanley,

    if you want to write a custom export, a Feature is the right way to do this. The code is pretty straight forward:

    FVector3Series toExport()
    
    FUnsigned n(100)
    loop (n)
      FDouble pos($$i/(n-1))
      FVector3 onProfile(profile.getPosAtArcLength(pos)) // using arc length (instead of just .getPos() ) ensures the points are geometrically equi-distant.
      toExport.add(onProfile)
    endloop
    
    if (!file.openWrite())
      echo("Failed to open file \"" + file.getAbsolutePath() + "\" for writing")
      break()
    endif
    
    file.writeLine("profile data:")
    file.writeVector3s(toExport)
    file.writeLine("eof")
    
    //close file when done with it
    file.close()

    Attached you find an example project.

    Best regards,
    Heinrich

    exportDemo.cdb


  9. Hi Katherine,

    I don't think there is a command to set just the path, not the name. In that case you would simply have to set the full name and path but keep using the same name. 

    The commands available in fsc scripts are basically the same as in CAESES with the exception of things that require a GUI (e.g. screenshots are not available in batch mode). You can learn about most types and available commands through the Type documentation:

    image.thumb.png.b6706e39543a876e4fe8cd0649111e65.png

    Also, if you start typing a command (even if it is just a "." behin a certain object) you can always use ctrl + space in CAESES and see what the auto-completion has to offer:

    image.png.f0f9dcf4e203015b56a09e3d063cbf59.png

    A third option many newcomers like to use is, to set things up in the GUI and then select a certain object or a whole bunch and right-click > Create Feature Definition:

    image.png.97fc80454666683055f67be28cd28d64.png

    This will give you a new feature definition containing everything you had selected.

    BR,
    Heinrich


  10. Hi Katherine,

    maybe it is easier if you just run the fsc script in a unique directory for each design you want to generate -- this way also any other files generated by CAESES are taken care of.

    However, you can also adjust the name trough the fsc script. I'm guessing you set up your export by providing a scope (folder) in CAESES which contains the geometry you want to export and for which you have set a custom file name like this:

    image.png.125bdd043fe4ff4f7122100dec7202c4.png

    Inside your fsc script you should be able to just change that name if you add a line like this:

    19_export.setExportFileName("changeThisNameAsYouLike")

    You can also provide a fullName (incl. absolute path) if you want.

    BR,
    Heinrich


  11. Hi Katherine,

    of course, you can remove a face. In case of you model I would just recommend to this after joining the parts via boolean sum. You can choose any method to remove the face. Personally, for this case I would probably reference the face by color or via reference point.

    BR,
    Heinrich


  12. Hi there,

    this is most likely a rendering issue and not related to the actual shape of the curve. Is there a particular reason why you are still using the CAESES4? If not, I strongly recommend you to upgrade. Apart from many many great new functionalities and a big difference in performance, also the rendering has improved significantly.

    Best regards,
    Heinrich

×
×
  • Create New...