1 # Remove internal(shared) faces from a compound
6 from salome.geom import geomBuilder
7 geompy = geomBuilder.New(salome.myStudy)
9 # create solids with some coincident faces
10 Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
11 Translation_1 = geompy.MakeTranslation(Box_1, 200, 0, 0)
12 Translation_2 = geompy.MakeTranslation(Box_1, 200, 200, 0)
14 geompy.addToStudy(Box_1, 'Box_1')
15 geompy.addToStudy(Translation_1, 'Translation_1')
16 geompy.addToStudy(Translation_2, 'Translation_2')
18 # partition three solids to obtain shared faces
19 Partition_1 = geompy.MakePartition([Box_1, Translation_1, Translation_2])
20 geompy.addToStudy(Partition_1, 'Partition_1')
22 # remove shared faces to obtain one solid instead of three
23 Joined_1 = geompy.RemoveInternalFaces(Partition_1)
24 geompy.addToStudy(Joined_1, 'Joined_1')
26 salome.sg.updateObjBrowser(True)