3 \page tui_free_boundaries_page Check Free Boundaries
9 gg = salome.ImportComponentGUI("GEOM")
12 box1 = geompy.MakeBox(0,0,0,100,50,100)
13 box2 = geompy.MakeBox(100,0,0,250,50,100)
16 compound = geompy.MakeCompound([box1, box2])
19 ImportFromBREP = geompy.ImportBREP(os.getenv("DATA_DIR")+"/Shapes/Brep/flight_solid.brep")
22 faces = geompy.SubShapeAllSortedCentres(ImportFromBREP, geompy.ShapeType["FACE"])
24 # get the free boundary for face 32
25 Res = geompy.GetFreeBoundary(faces[32])
31 print "Checking free boudaries is OK."
33 print "Checking free boudaries is KO!"
34 print "len(ClosedWires) = ", len(ClosedWires)
37 for wire in ClosedWires :
38 wire_name = "Face 32 -> Close wires : WIRE %d"%(i+1)
39 geompy.addToStudy(ClosedWires[i], wire_name)
40 if i < len(ClosedWires) :
43 print "len(OpenWires) = ", len(OpenWires)
46 for wire in OpenWires :
47 wire_name = "Face 32 -> Open wires : WIRE %d"%(i+1)
48 geompy.addToStudy(OpenWires[i], wire_name)
49 if i < len(OpenWires) :
52 # get the free boundary for face 41
53 Res = geompy.GetFreeBoundary(faces[41])
59 print "Checking free boudaries is OK."
61 print "Checking free boudaries is KO!"
62 print "len(ClosedWires) = ", len(ClosedWires)
65 for wire in ClosedWires :
66 wire_name = "Face 41 -> Close wires : WIRE %d"%(i+1)
67 geompy.addToStudy(ClosedWires[i], wire_name)
68 if i < len(ClosedWires) :
71 print "len(OpenWires) = ", len(OpenWires)
74 for wire in OpenWires :
75 wire_name = "Face 41 -> Open wires : WIRE %d"%(i+1)
76 geompy.addToStudy(OpenWires[i], wire_name)
77 if i < len(OpenWires) :
80 # add the imported object to the study
81 id_ImportFromBREP = geompy.addToStudy(ImportFromBREP, "ImportFromBREP")
82 salome.sg.updateObjBrowser(1)