5 gg = salome.ImportComponentGUI("GEOM")
7 # import initial topology with bad tolerances (more than 1e-07)
8 shape1 = geompy.ImportBREP("my_shape_1.brep")
9 shape2 = geompy.ImportBREP("my_shape_2.brep")
11 geompy.addToStudy(shape1, "Shape 1")
12 geompy.addToStudy(shape2, "Shape 2")
16 part = geompy.MakePartition([shape1, shape2])
20 shape1_lt = geompy.LimitTolerance(shape1, tolerance)
21 shape2_lt = geompy.LimitTolerance(shape2, tolerance)
24 good_shape1 = geompy.ProcessShape(shape1_lt, ["FixShape"], ["FixShape.Tolerance3d"], ["1e-7"])
25 good_shape2 = geompy.ProcessShape(shape2_lt, ["FixShape"], ["FixShape.Tolerance3d"], ["1e-7"])
27 geompy.addToStudy(good_shape1, "Shape 1 corrected")
28 geompy.addToStudy(good_shape2, "Shape 2 corrected")
30 # perform partition on corrected shapes
31 part = geompy.MakePartition([good_shape1, good_shape2])
34 geompy.addToStudy(part, "Partition")