Salome HOME
CEA : Lot2 - Bounding box
[modules/shaper.git] / src / FeaturesPlugin / doc / examples / create_bounding_box.py
1 from salome.shaper import model
2 import os
3
4 model.begin()
5 file_path = os.path.join(os.getenv("DATA_DIR"),"Shapes","Step","screw.step")
6 partSet = model.moduleDocument()
7 Part_1 = model.addPart(partSet)
8 Part_1_doc = Part_1.document()
9 Import_1 = model.addImport(Part_1_doc,file_path)
10 model.do()
11 ### Create BoundingBox
12 BoundingBox_1 = model.getBoundingBox(Part_1_doc, model.selection("SOLID", "screw_1"))
13 model.end()