1 # GEOM GEOM_SWIG : binding of C++ implementaion with Python
3 # Copyright (C) 2003 CEA
5 # This library is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU Lesser General Public
7 # License as published by the Free Software Foundation; either
8 # version 2.1 of the License.
10 # This library is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # Lesser General Public License for more details.
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with this library; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 # File : GEOM_TestOthers.py
23 # Author : Julia DOROVSKIKH
29 def TestExportImport (geompy, shape):
31 print "Test Export/Import ...",
33 # Files for Export/Import testing
34 fileExportImport = "/tmp/testExportImport.brep"
35 fileExportImportBREP = "/tmp/testExportImportBREP.brep"
36 fileExportImportIGES = "/tmp/testExportImportIGES.iges"
37 fileExportImportSTEP = "/tmp/testExportImportSTEP.step"
39 if os.access(fileExportImport, os.F_OK):
40 if os.access(fileExportImport, os.W_OK):
41 os.remove(fileExportImport)
43 fileExportImport = "/tmp/testExportImport1.brep"
45 if os.access(fileExportImportBREP, os.W_OK):
46 os.remove(fileExportImportBREP)
48 fileExportImportBREP = "/tmp/testExportImportBREP1.brep"
50 if os.access(fileExportImportIGES, os.W_OK):
51 os.remove(fileExportImportIGES)
53 fileExportImportIGES = "/tmp/testExportImportIGES1.iges"
55 if os.access(fileExportImportSTEP, os.W_OK):
56 os.remove(fileExportImportSTEP)
58 fileExportImportSTEP = "/tmp/testExportImportSTEP1.step"
61 geompy.Export(shape, fileExportImport, "BREP")
63 # ExportBREP, ExportIGES, ExportSTEP
64 geompy.ExportBREP(shape, fileExportImportBREP)
65 geompy.ExportIGES(shape, fileExportImportIGES)
66 geompy.ExportSTEP(shape, fileExportImportSTEP)
69 Import = geompy.Import(fileExportImport, "BREP")
71 id_Import = geompy.addToStudy(Import, "Import")
73 # ImportBREP, ImportIGES, ImportSTEP
74 ImportBREP = geompy.ImportBREP(fileExportImportBREP)
75 ImportIGES = geompy.ImportIGES(fileExportImportIGES)
76 ImportSTEP = geompy.ImportSTEP(fileExportImportSTEP)
78 id_ImportBREP = geompy.addToStudy(ImportBREP, "ImportBREP")
79 id_ImportIGES = geompy.addToStudy(ImportIGES, "ImportIGES")
80 id_ImportSTEP = geompy.addToStudy(ImportSTEP, "ImportSTEP")
82 # Remove files for Export/Import testing
83 os.remove(fileExportImport)
84 os.remove(fileExportImportBREP)
85 os.remove(fileExportImportIGES)
86 os.remove(fileExportImportSTEP)
91 def TestOtherOperations (geompy, math):
94 p11 = geompy.MakeVertex( 0, 0, 0)
95 p12 = geompy.MakeVertex(30, 0, 0)
96 p13 = geompy.MakeVertex(30, 30, 0)
97 p14 = geompy.MakeVertex( 0, 30, 0)
99 p21 = geompy.MakeVertex(10, 10, 0)
100 p22 = geompy.MakeVertex(20, 10, 0)
101 p23 = geompy.MakeVertex(20, 20, 0)
102 p24 = geompy.MakeVertex(10, 20, 0)
104 e11 = geompy.MakeEdge(p11, p12)
105 e12 = geompy.MakeEdge(p12, p13)
106 e13 = geompy.MakeEdge(p13, p14)
107 e14 = geompy.MakeEdge(p14, p11)
109 e21 = geompy.MakeEdge(p21, p22)
110 e22 = geompy.MakeEdge(p22, p23)
111 e23 = geompy.MakeEdge(p23, p24)
112 e24 = geompy.MakeEdge(p24, p21)
114 w1 = geompy.MakeWire([e11, e12, e13, e14])
115 w2 = geompy.MakeWire([e21, e22, e23, e24])
116 w3 = geompy.MakeTranslation(w2, 0, 0, 10)
118 id_w1 = geompy.addToStudy(w1, "Outside Wire")
119 id_w2 = geompy.addToStudy(w2, "Inside Wire")
120 id_w3 = geompy.addToStudy(w3, "Inside Wire, translated along OZ")
122 f12 = geompy.MakeFaces([w1, w2], 0)
123 id_f12 = geompy.addToStudy(f12, "MakeFaces WO + WI")
126 TestExportImport(geompy, f12)
129 Box = geompy.MakeBoxDXDYDZ(200, 200, 200)
130 Orientation = geompy.OrientationChange(Box)
131 id_Orientation = geompy.addToStudy(Orientation, "OrientationChange")
133 # MakeCommon, MakeCut, MakeFuse, MakeSection
134 Sphere = geompy.MakeSphereR(100)
136 Common = geompy.MakeCommon (Box, Sphere)
137 Cut = geompy.MakeCut (Box, Sphere)
138 Fuse = geompy.MakeFuse (Box, Sphere)
139 Section = geompy.MakeSection(Box, Sphere)
141 id_Common = geompy.addToStudy(Common, "Common")
142 id_Cut = geompy.addToStudy(Cut, "Cut")
143 id_Fuse = geompy.addToStudy(Fuse, "Fuse")
144 id_Section = geompy.addToStudy(Section, "Section")
147 p100 = geompy.MakeVertex(100, 100, 100)
148 p300 = geompy.MakeVertex(300, 300, 300)
149 Box1 = geompy.MakeBoxTwoPnt(p100, p300)
150 Partition = geompy.Partition([Box], [Box1], [], [Box])
151 id_Partition = geompy.addToStudy(Partition, "Partition of Box by Box1")
153 # MakeMultiRotation1D, MakeMultiRotation2D
154 pz = geompy.MakeVertex(0, 0, 100)
155 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
157 MultiRot1D = geompy.MakeMultiRotation1D(f12, vy, pz, 6)
158 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
160 id_MultiRot1D = geompy.addToStudy(MultiRot1D, "MakeMultiRotation1D")
161 id_MultiRot2D = geompy.addToStudy(MultiRot2D, "MakeMultiRotation2D")
165 face5 = geompy.SubShapeSorted(Box, geompy.ShapeType["FACE"], [5])
166 f_glob_id = geompy.GetSubShapeID(Box, face5)
167 SuppFace = geompy.SuppressFaces(Box, [f_glob_id])
169 MakeFilletAll = geompy.MakeFilletAll(SuppFace, radius_fillet)
170 id_MakeFilletAll = geompy.addToStudy(MakeFilletAll, "MakeFilletAll")
173 dimension_chamfer = 10.
174 MakeChamferAll = geompy.MakeChamferAll(SuppFace, dimension_chamfer)
175 id_MakeChamferAll = geompy.addToStudy(MakeChamferAll, "MakeChamferAll")
180 box_faces = geompy.SubShapeAllSorted(Box, geompy.ShapeType["FACE"])
181 f_ind_1 = geompy.GetSubShapeID(Box, box_faces[0])
182 f_ind_2 = geompy.GetSubShapeID(Box, box_faces[1])
183 f_ind_3 = geompy.GetSubShapeID(Box, box_faces[2])
185 MakeChamfer = geompy.MakeChamfer(Box, d1, d2, geompy.ShapeType["FACE"],
186 [f_ind_1, f_ind_2, f_ind_3])
187 id_MakeChamfer = geompy.addToStudy(MakeChamfer, "MakeChamfer")
190 NumberOfFaces = geompy.NumberOfFaces(Box)
191 if NumberOfFaces != 6:
192 print "Bad number of faces in BOX!"
195 NumberOfEdges = geompy.NumberOfEdges(Box)
196 if NumberOfEdges != 12:
197 print "Bad number of edges in BOX!"
200 Compound = geompy.MakeCompound([Box, Sphere])
201 MakeBlockExplode = geompy.MakeBlockExplode(Compound, 6, 6)
203 id_MakeBlockExplode = geompy.addToStudy(MakeBlockExplode[0], "MakeBlockExplode")
205 # CheckCompoundOfBlocks
206 p1 = geompy.MakeVertex(200, 0, 0)
207 p2 = geompy.MakeVertex(400, 200, 200)
208 p3 = geompy.MakeVertex(400, 50, 50)
209 p4 = geompy.MakeVertex(600, 250, 250)
211 Box2 = geompy.MakeBoxTwoPnt(p1, p2)
212 Box3 = geompy.MakeBoxTwoPnt(p3, p4)
213 Cyl = geompy.MakeCylinderRH(50, 300)
214 Cone = geompy.MakeConeR1R2H(150, 10, 400)
216 Compound1 = geompy.MakeCompound([Box, Cyl, Cone, Box3, Box2])
218 IsValid = geompy.CheckCompoundOfBlocks(Compound1)
220 print "The Blocks Compound is NOT VALID"
222 print "The Blocks Compound is VALID"
224 IsValid = geompy.CheckCompoundOfBlocks(Box)
226 print "The Box is NOT VALID"
228 print "The Box is VALID"
230 # test geometrical groups
233 CreateGroup = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
235 id_CreateGroup = geompy.addToStudy(CreateGroup, "CreateGroup")
238 f_ind_4 = geompy.GetSubShapeID(Box, box_faces[3])
239 f_ind_5 = geompy.GetSubShapeID(Box, box_faces[4])
240 f_ind_6 = geompy.GetSubShapeID(Box, box_faces[5])
242 geompy.AddObject(CreateGroup, f_ind_6) # box_faces[5]
243 geompy.AddObject(CreateGroup, f_ind_1) # box_faces[0]
244 geompy.AddObject(CreateGroup, f_ind_4) # box_faces[3]
245 # Now contains f_ind_6, f_ind_1, f_ind_4
248 geompy.UnionList(CreateGroup, [box_faces[2], box_faces[4], box_faces[5]])
249 # Now contains f_ind_6, f_ind_1, f_ind_4, f_ind_3, f_ind_5
251 # RemoveObject(theGroup, theSubShapeID)
252 geompy.RemoveObject(CreateGroup, f_ind_1) # box_faces[0]
253 # Now contains f_ind_6, f_ind_4, f_ind_3, f_ind_5
256 geompy.DifferenceList(CreateGroup, [box_faces[1], box_faces[0], box_faces[3]])
257 # Now contains f_ind_6, f_ind_3, f_ind_5
260 GetObjectIDs = geompy.GetObjectIDs(CreateGroup)
262 print "Group of Box's faces includes the following IDs:"
263 print "(must be ", f_ind_6, ", ", f_ind_3, " and ", f_ind_5, ")"
264 for ObjectID in GetObjectIDs:
267 BoxCopy = geompy.GetMainShape(CreateGroup)
270 geompy.DifferenceIDs(CreateGroup, [f_ind_3, f_ind_5])
271 # Now contains f_ind_6
274 geompy.UnionIDs(CreateGroup, [f_ind_1, f_ind_2, f_ind_6])
275 # Now contains f_ind_6, f_ind_1, f_ind_2
278 GetObjectIDs = geompy.GetObjectIDs(CreateGroup)
279 print "Group of Box's faces includes the following IDs:"
280 print "(must be ", f_ind_6, ", ", f_ind_1, " and ", f_ind_2, ")"
281 for ObjectID in GetObjectIDs:
284 # -----------------------------------------------------------------------------
285 # enumeration ShapeTypeString as a dictionary
286 # -----------------------------------------------------------------------------
287 ShapeTypeString = {'0':"COMPOUND", '1':"COMPSOLID", '2':"SOLID", '3':"SHELL", '4':"FACE", '5':"WIRE", '6':"EDGE", '7':"VERTEX", '8':"SHAPE"}
289 GroupType = geompy.GetType(CreateGroup)
290 print "Type of elements of the created group is ", ShapeTypeString[`GroupType`]
292 # Prepare data for the following operations
293 p0 = geompy.MakeVertex(0, 0, 0)
294 b0 = geompy.MakeBox(-50, -50, -50, 50, 50, 50)
295 s0 = geompy.MakeSphereR(100)
297 id_b0 = geompy.addToStudy(b0, "b0")
298 id_s0 = geompy.addToStudy(s0, "s0")
300 v_0pp = geompy.MakeVectorDXDYDZ( 0, 1, 1)
301 v_0np = geompy.MakeVectorDXDYDZ( 0, -1, 1)
302 v_p0p = geompy.MakeVectorDXDYDZ( 1, 0, 1)
303 v_n0p = geompy.MakeVectorDXDYDZ(-1, 0, 1)
304 v_pp0 = geompy.MakeVectorDXDYDZ( 1, 1, 0)
305 v_np0 = geompy.MakeVectorDXDYDZ(-1, 1, 0)
306 v_0n0 = geompy.MakeVectorDXDYDZ( 0, -1, 0)
308 pln_0pp = geompy.MakePlane(p0, v_0pp, 300)
309 pln_0np = geompy.MakePlane(p0, v_0np, 300)
310 pln_p0p = geompy.MakePlane(p0, v_p0p, 300)
311 pln_n0p = geompy.MakePlane(p0, v_n0p, 300)
312 pln_pp0 = geompy.MakePlane(p0, v_pp0, 300)
313 pln_np0 = geompy.MakePlane(p0, v_np0, 300)
315 part_tool_1 = geompy.MakePartition([b0, pln_0pp, pln_0np, pln_p0p, pln_n0p, pln_pp0, pln_np0],
320 pt_pnt_1 = geompy.MakeVertex( 55, 0, 55)
321 pt_pnt_2 = geompy.MakeVertex( 0, 55, 55)
322 pt_pnt_3 = geompy.MakeVertex(-55, 0, 55)
323 pt_pnt_4 = geompy.MakeVertex( 0, -55, 55)
324 pt_pnt_5 = geompy.MakeVertex( 55, 55, 0)
325 pt_pnt_6 = geompy.MakeVertex( 55, -55, 0)
326 pt_pnt_7 = geompy.MakeVertex(-55, 55, 0)
327 pt_pnt_8 = geompy.MakeVertex(-55, -55, 0)
328 pt_pnt_9 = geompy.MakeVertex( 55, 0, -55)
329 pt_pnt_10 = geompy.MakeVertex( 0, 55, -55)
330 pt_pnt_11 = geompy.MakeVertex(-55, 0, -55)
331 pt_pnt_12 = geompy.MakeVertex( 0, -55, -55)
333 pt_face_1 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_1)
334 pt_face_2 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_2)
335 pt_face_3 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_3)
336 pt_face_4 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_4)
337 pt_face_5 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_5)
338 pt_face_6 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_6)
339 pt_face_7 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_7)
340 pt_face_8 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_8)
341 pt_face_9 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_9)
342 pt_face_10 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_10)
343 pt_face_11 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_11)
344 pt_face_12 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_12)
346 pt_box = geompy.GetBlockNearPoint(part_tool_1, p0)
348 part_tool = geompy.MakeCompound([pt_face_1, pt_face_4, pt_face_7, pt_face_10,
349 pt_face_2, pt_face_5, pt_face_8, pt_face_11,
350 pt_face_3, pt_face_6, pt_face_9, pt_face_12, pt_box])
351 id_part_tool = geompy.addToStudy(part_tool, "part_tool")
353 part = geompy.MakePartition([s0], [part_tool])
354 geompy.addToStudy(part, "part")
357 anIDs = geompy.GetFreeFacesIDs(part)
358 freeFaces = geompy.GetSubShape(part, anIDs)
360 geompy.addToStudy(freeFaces, "freeFaces")
363 freeFacesWithoutExtra = geompy.RemoveExtraEdges(freeFaces)
365 geompy.addToStudy(freeFacesWithoutExtra, "freeFacesWithoutExtra")
368 sharedFaces = geompy.GetSharedShapes(part, freeFacesWithoutExtra, geompy.ShapeType["FACE"])
370 for shFace in sharedFaces:
371 geompy.addToStudy(shFace, "sharedFace")
374 blocksComp = geompy.CheckAndImprove(part)
376 geompy.addToStudy(blocksComp, "blocksComp")
379 listChains = geompy.Propagate(blocksComp)
381 for chain in listChains:
382 geompy.addToStudyInFather(blocksComp, chain, "propagation chain")
384 # GetPoint(theShape, theX, theY, theZ, theEpsilon)
386 # (-50, 50, 50) .-----. (50, 50, 50)
390 # (-50, -50, 50) '-----' (50, -50, 50)
392 pb0_top_1 = geompy.GetPoint(blocksComp, -50, 50, 50, 0.01)
393 pb0_bot_1 = geompy.GetPoint(blocksComp, -50, -50, -50, 0.01)
395 geompy.addToStudyInFather(blocksComp, pb0_top_1, "point from blocksComp (-50, 50, 50)")
396 geompy.addToStudyInFather(blocksComp, pb0_bot_1, "point from blocksComp (-50, -50, -50)")
398 # GetEdgeNearPoint(theShape, thePoint)
399 pmidle = geompy.MakeVertex(50, 0, 50)
400 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
402 geompy.addToStudyInFather(blocksComp, edge1, "edge near point (50, 0, 50)")
404 # GetBlockByParts(theCompound, theParts)
405 b0_image = geompy.GetBlockByParts(blocksComp, [pb0_top_1, pb0_bot_1, edge1])
407 geompy.addToStudyInFather(blocksComp, b0_image, "b0 image")
410 faces_on_pln = geompy.GetShapesOnPlane(blocksComp, geompy.ShapeType["FACE"],
411 v_0pp, geompy.GEOM.ST_ONIN)
412 for face_i in faces_on_pln:
413 geompy.addToStudy(face_i, "Face on Plane (N = (0, 1, 1)) or below it")
415 # GetShapesOnPlaneIDs
416 faces_above_pln_ids = geompy.GetShapesOnPlaneIDs(blocksComp, geompy.ShapeType["FACE"],
417 v_0pp, geompy.GEOM.ST_OUT)
418 faces_above = geompy.CreateGroup(blocksComp, geompy.ShapeType["FACE"])
419 geompy.UnionIDs(faces_above, faces_above_pln_ids)
420 geompy.addToStudy(faces_above, "Group of faces above Plane (N = (0, 1, 1))")
422 # GetShapesOnPlaneWithLocation
423 Loc = geompy.MakeVertex(0, -50, 0)
424 edges_on_pln = geompy.GetShapesOnPlaneWithLocation(blocksComp, geompy.ShapeType["EDGE"],
425 v_0n0, Loc, geompy.GEOM.ST_ON)
426 for edge_i in edges_on_pln:
427 geompy.addToStudy(edge_i, "Edge on Plane (N = (0, -1, 0) & Location = (0, -50, 0)")
429 # GetShapesOnPlaneWithLocationIDs
430 edges_on_pln_ids = geompy.GetShapesOnPlaneWithLocationIDs(blocksComp, geompy.ShapeType["EDGE"],
431 v_0n0, Loc, geompy.GEOM.ST_ON)
432 group_edges_on_pln = geompy.CreateGroup(blocksComp, geompy.ShapeType["EDGE"])
433 geompy.UnionIDs(group_edges_on_pln, edges_on_pln_ids)
434 geompy.addToStudy(group_edges_on_pln, "Group of edges on Plane (N = (0, -1, 0) & Location = (0, -50, 0))")
436 # GetShapesOnCylinder
437 edges_out_cyl = geompy.GetShapesOnCylinder(blocksComp, geompy.ShapeType["EDGE"],
438 vy, 55, geompy.GEOM.ST_OUT)
439 for edge_i in edges_out_cyl:
440 geompy.addToStudy(edge_i, "Edge out of Cylinder (axis = (0, 1, 0), r = 55)")
442 # GetShapesOnCylinderIDs
443 edges_in_cyl_ids = geompy.GetShapesOnCylinderIDs(blocksComp, geompy.ShapeType["EDGE"],
444 vy, 80, geompy.GEOM.ST_IN)
445 edges_in = geompy.CreateGroup(blocksComp, geompy.ShapeType["EDGE"])
446 geompy.UnionIDs(edges_in, edges_in_cyl_ids)
447 geompy.addToStudy(edges_in, "Group of edges inside Cylinder (axis = (0, 1, 0), r = 55)")
450 vertices_on_sph = geompy.GetShapesOnSphere(blocksComp, geompy.ShapeType["VERTEX"],
451 p0, 100, geompy.GEOM.ST_ON)
452 for vertex_i in vertices_on_sph:
453 geompy.addToStudy(vertex_i, "Vertex on Sphere (center = (0, 0, 0), r = 100)")
456 # GetShapesOnSphereIDs
457 vertices_on_sph_ids = geompy.GetShapesOnSphereIDs(blocksComp, geompy.ShapeType["VERTEX"],
458 p0, 100, geompy.GEOM.ST_ON)
459 vertices_on = geompy.CreateGroup(blocksComp, geompy.ShapeType["VERTEX"])
460 geompy.UnionIDs(vertices_on, vertices_on_sph_ids)
461 geompy.addToStudy(vertices_on, "Group of vertices on Sphere (center = (0, 0, 0), r = 100)")
463 # GetShapesOnQuadrangle
465 geompy.addToStudy(f12, "F12" )
467 bl = geompy.MakeVertex(10,-10, 0)
468 br = geompy.MakeVertex(40,-10, 0)
469 tr = geompy.MakeVertex(40, 20, 0)
470 tl = geompy.MakeVertex(10, 20, 0)
471 qe1 = geompy.MakeEdge(bl, br)
472 qe2 = geompy.MakeEdge(br, tr)
473 qe3 = geompy.MakeEdge(tr, tl)
474 qe4 = geompy.MakeEdge(tl, bl)
475 quadrangle = geompy.MakeWire([qe1, qe2, qe3, qe4])
476 geompy.addToStudy(quadrangle, "Quadrangle")
478 edges_onin_quad = geompy.GetShapesOnQuadrangle( f12, geompy.ShapeType["EDGE"],
479 tl, tr, bl, br, geompy.GEOM.ST_ONIN)
480 comp = geompy.MakeCompound(edges_onin_quad)
481 geompy.addToStudy(comp, "Edges of F12 ONIN Quadrangle")
482 if len( edges_onin_quad ) != 4:
483 print "Error in GetShapesOnQuadrangle()"
486 # GetShapesOnQuadrangleIDs
487 vertices_on_quad_ids = geompy.GetShapesOnQuadrangleIDs(f12, geompy.ShapeType["VERTEX"],
488 tl, tr, bl, br, geompy.GEOM.ST_ON)
489 vertices_on_quad = geompy.CreateGroup(f12, geompy.ShapeType["VERTEX"])
490 geompy.UnionIDs(vertices_on_quad, vertices_on_quad_ids)
491 geompy.addToStudy(vertices_on_quad, "Group of vertices on Quadrangle F12")
493 # GetInPlace(theShapeWhere, theShapeWhat)
494 box5 = geompy.MakeBoxDXDYDZ(100, 100, 100)
495 box6 = geompy.MakeTranslation(box5, 50, 50, 0)
497 part = geompy.MakePartition([box5], [box6])
498 geompy.addToStudy(part, "Partitioned")
501 box_list = [box5, box6]
502 for abox in box_list:
503 geompy.addToStudy(abox, "Box " + `ibb`)
504 box_faces = geompy.SubShapeAll(abox, geompy.ShapeType["FACE"])
506 for aface in box_faces:
507 geompy.addToStudyInFather(abox, aface, "Face" + `ifa`)
508 refl_box_face = geompy.GetInPlace(part, aface)
509 if refl_box_face is not None:
510 geompy.addToStudyInFather(part, refl_box_face,
511 "Reflection of Face " + `ifa` + " of box " + `ibb`)