Jump to content
Assiouras Nikolas

EXPORT BREP GEOMETRY BATCH MODE (fsc script)

Recommended Posts

Hello, 

I am working on an axial hydro-turbine optimization case. I have build a geometry on the existing sample of CAESES with name "axialfan"  just for beginning. So, I want to use CAESES software as CAD generator and solve and optimize via TCFD and TOPT. I have connect and have use CAESES software as CAD generator into another simpler case. 
The problem which I face up is that I don't know how to define into .fsc file of my case, to exports 3 different .stl files from one BRep function. For example I can export manually 3 .stl files for my shroud geometry (inlet, outlet and wall). Do you have any ideas how can I manage this via script file so as to automatically generate my .stl files for my optimization loop.
Thank you in advance.


Best Regards,

Nikolas.

image.png.6a4d7f8d5462bd20ac25d66602c711a7.png

Share this post


Link to post
Share on other sites

Hi Nicolas,

The Export type you require is "STL (Extract Colors)"

In CAESES, please create a scope, let's say "02_Export". Then please locate the BRep/s you want to be exported. Please be sure that, the geometrical entities you want to be seperated do have separate colors assigned.

Then select the folder, change the file type to "exportStlExtractColors" and provide a file name.

Using this procedure, whenever you create an fsc file, the export information will be written automatically.

screen1.thumb.png.0daed7c31daac612abbbe2b17801ae37.png

screen2.png.20b94ed79695711703ea46bfd7fecb17.png

Please let me know if you have further questions.

Cheers

Ceyhan

  • Upvote 1

Share this post


Link to post
Share on other sites

Hi Erdem,

I would like to thank you a lot about your answer, I solved my problem. 
Just one more step from this, do you know how can I rename the exported .stl files from the .fsc file? 
This is not really important, but if I can do it with some way it really will help a lot as I must remember for too many files the colour of each.

Thanks a lot for your time.
Nikolas.

Share this post


Link to post
Share on other sites

Hi Nikolas,

The naming for the "STL (Extract Colors)" export should be as follows;

<base name provided for exported stl>+"_"+<color name>+".stl"

In the example provided, I gave a name "fanExported.stl". So the base name would be "fanExported"

For the blades, during the blade creation process I have assigned a user created color with a name "w_blades"

As a result the stl file for the blades ends up being "fanExported_w_blades.stl"

To conclude, if you would like to change the stl file names for the exported geometry, one has to modify the assigned color names.

I think the Tutorial;

Geometry Modelling > BRep and Solids

refers to color assignment to operations.

Please let me know if you have further questions.

Cheers

Ceyhan

  • Upvote 1

Share this post


Link to post
Share on other sites

Hello, 


I have another 2 questions about exporting files via .fsc. So firstly there is a way to manipulate the exporting destination, for example I want to have 3 directories with .stl files of component 1,2,3 , can I use a function inside .fsc file so as to achieve this ?

Secondly as I can see on your screenshot and simultaneously due to my small experience of exporting a scope with extractcolourSTL function, I observed that a file of 1KB always is exported, that creates me a problem with the final directory of .stl files. The geometry source of CFD is directory with stl files and exactly because this file seems to be a "cracked" file an error is occured in CFD, is there any way so as to this file  not to be exported ? 

 

Thanks a lot in advance,

Nikolas.

Share this post


Link to post
Share on other sites

Hi Nikolas,

1) I can suggest you a work-around;

Please check the attached pictures and project;

What I have performed is creating a BRep out of the entire exported geometry and then to each BRep I have added an "Remove Faces" operation where I kept only the specified colored surfaces.

I have disabled the scope export line inside the fsc file and then included a few lines for the export of the specific surfaces.

secreen2.thumb.png.9e7f309b0520269c744025ce4571dbd6.png

 

 

secreen3.thumb.png.bc3f8ad0a0ade7ff27b4a1a84eb6a91b.png

Please let me know if this resolves your problem.

2) Can you please be more specific about the  "cracked" file?

Do you refer to the main stl file within which exists the data of the other extracted stl files?

Cheers

Ceyhan

 

axialfan_sample.cdb

  • Upvote 1

Share this post


Link to post
Share on other sites

Hi Ceyhan,

Excuse me for the delay but my time was limited this time interval.
Thanks a lot about your advice, it works perfectly. As far as the 2nd question, I found the answer via documentation.

Have a nice day,
Nikolas. 

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...