ukaea / paramak

Create parametric 3D fusion reactor CAD models
https://paramak.readthedocs.io/en/main/
36 stars 12 forks source link

reactor.export_stp() to allow single stp file creation #818

Closed shimwell closed 3 years ago

shimwell commented 3 years ago

Currently the reactor.export_stp() will export separate stp files for each shape. This is done for preserving the material identity of each volume. However not every user cares about the material identity so it would be useful if the stp export can export a single stp file containing all the volumes / shapes.

Perhaps this should even be the default behavior?

reactor.export_stp(single_file=True)
RemDelaporteMathurin commented 3 years ago

That is a brilliant idea. perhaps instead of "single_file" we could have something like "merge"?

shimwell commented 3 years ago

Perhaps we can just use the arg filename. If a filename is provided then export to one file else export to separate files each named with the shape.stp_filename attrobutes

RemDelaporteMathurin commented 3 years ago

Even better. Can one sets a folder but still have seperate files?

shimwell commented 3 years ago

yes, output_folder can be set and the separate stp files will be saved there.

output_folder can be ignored if filename is set as the filename can contain the full path

shimwell commented 3 years ago

solve in #819