Jump to content
Stanley Gabriel

Export Equidistant points

Recommended Posts

Hi Stanley,

So you have a section profile. You would like to locate 200 equidistant points on the profile, created in clock-wise direction. And then export those creted points as point data on a file, am I correct?

Cheers

Ceyhan

Share this post


Link to post
Share on other sites

Yes. When I use FOR i=0 TO 199
    u = i/199
    Point = EvaluateCurveAt(u)
    ExportPoint(Point)
END FOR

It doesnt give anything on the console. I tried different export methods, I'm not able to get any output

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Hi,

I have a foil section defined by 6 variables. I now have a feature that gives me equidistant points on the  profile, however, I need to sample by design variables and get atleast 3500 different geometries, and run the feature on each of them. Is there a way I can do it from Command Line or an external C++/Java. Also there's an additional check that needs to be done based on the thickness of the profile at a certain position. Could we connect externally as the geometry is confidential. Is there a mail I can send it to instead.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Hi Heinrich,

Sorry for the confusion and adding something more.

I have generated my section with the origin at a different point than I intended. Instead, keeping everything else the same, the curves and everything, I need to only translate my coordinate system.

The next one is in the operation trim by curve, I only want a curve that is towards the left hand side. But depending on a design variable I have, the curvature is changing based on "curve to keep". Is there a way to only preserve the left side of the curve always.

 

Regards,

Stan

1.png

2.png

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...