Salome HOME
Implementation of shared faces inspection, bos #29568
[modules/shaper.git] / src / FeaturesPlugin / doc / examples / check_shared_faces.py
1 from salome.shaper import model
2 import os
3
4 model.begin()
5 partSet = model.moduleDocument()
6 Part_1 = model.addPart(partSet)
7 Part_1_doc = Part_1.document()
8 ### Create Box
9 Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
10 ### Create Point
11 Point_2 = model.addPoint(Part_1_doc, 20, 10, 10)
12 ### Create Box
13 Box_2 = model.addBox(Part_1_doc, model.selection("VERTEX", "[Box_1_1/Front][Box_1_1/Left][Box_1_1/Bottom]"), model.selection("VERTEX", "Point_1"))
14 ### Create CompSolid
15 CompSolid_1 = model.addCompSolid(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("SOLID", "Box_2_1")])
16
17 ### Create Shared_faces
18 Shared_faces_1 = model.getSharedFaces(Part_1_doc, model.selection("COMPSOLID", "CompSolid_1_1"), "mygroup")
19
20 model.do()
21 model.end()