Open shimwell opened 3 years ago
This is now built into the utils which makes things a little simpler
import paramak
solid, wires = paramak.utils.load_stp_file('original_stp_files/FirstWall.stp', scale_factor=0.1)
But I think a nicer option would be a ShapeFromFile
class
@Shimwell if we'd want to cut a shape with this imported solid would something like this work ? ping @jhdark
import paramak
# import the cad file
solid, wires = paramak.utils.load_stp_file('my_file.stp', scale_factor=0.1)
my_imported_shape = paramak.Shape()
my_imported_shape.solid = solid
# create a blanket and cut it with the imported shape
blanket = paramak.BlanketFP(......)
blanket.cut = my_imported_shape
if so then a ShapeFromFile
class could simply inherit from Shape
I think that will work and if it doesn't then we can add some code to the cut logic. Sometimes we need code to handel solids a little differently (cad query sometimes needs .val or not .val for different types of solids)
I have found a few cases where stp files provided are difficult to reproduce with the paramak and are already clean enough to be used in the neutronics simulations.
When this is the case it could be useful to import the stp file and combine it with a paramak generated geometry.
I've done this with cadquery code for now but perhaps we could wrap this and add it to the paramak as another method of generating Shapes