From: azv Date: Tue, 24 Jan 2017 11:30:07 +0000 (+0300) Subject: Adjust unit tests to new behavior of SketchBuilder X-Git-Tag: V_2.7.0~311 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=117bb273f57f265f131624287d2d15d7e396d226;p=modules%2Fshaper.git Adjust unit tests to new behavior of SketchBuilder --- diff --git a/src/FeaturesPlugin/Test/TestRecover1798.py b/src/FeaturesPlugin/Test/TestRecover1798.py index 2e9a23b3d..6d81692fc 100644 --- a/src/FeaturesPlugin/Test/TestRecover1798.py +++ b/src/FeaturesPlugin/Test/TestRecover1798.py @@ -185,7 +185,7 @@ SketchConstraintRadius_3 = Sketch_2.setRadius(SketchArc_2.results()[1], 10) SketchConstraintRadius_4 = Sketch_2.setRadius(SketchArc_1.results()[1], 10) model.do() Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchLine_24f-SketchLine_28f-SketchLine_26f-SketchLine_27f-SketchArc_1_2f-SketchArc_2_2f-SketchArc_3_2f-SketchArc_4_2f")], model.selection(), model.selection("FACE", "Revolution_1_1/To_Face_1"), -30, model.selection(), 0) -Rotation_1 = model.addRotation(Part_1_doc, [model.selection("SOLID", "Extrusion_1_1")], model.selection("EDGE", "Extrusion_1_1/From_Face_1&Extrusion_1_1/Generated_Face_1"), "inclinaison") +Rotation_1 = model.addRotation(Part_1_doc, [model.selection("SOLID", "Extrusion_1_1")], model.selection("EDGE", "Extrusion_1_1/From_Face_1&Extrusion_1_1/Generated_Face_8"), "inclinaison") Rotation_2 = model.addRotation(Part_1_doc, [model.selection("SOLID", "Rotation_1_1")], model.selection("EDGE", "PartSet/OZ"), "angle1") Recover_1 = model.addRecover(Part_1_doc, Rotation_2, [Rotation_1.result()]) Rotation_3 = model.addRotation(Part_1_doc, [model.selection("SOLID", "Recover_1_1")], model.selection("EDGE", "PartSet/OZ"), "angle2") diff --git a/src/ModelAPI/Test/Test1064.py b/src/ModelAPI/Test/Test1064.py index f0af7ad98..14ad14b44 100644 --- a/src/ModelAPI/Test/Test1064.py +++ b/src/ModelAPI/Test/Test1064.py @@ -73,7 +73,7 @@ aSession.setActiveDocument(aPartSet) aPlane = aPartSet.addFeature("Plane") aPlane.string("creation_method").setValue("by_other_plane") aPlane.string("by_other_plane_option").setValue("by_distance_from_other") -aPlane.selection("plane").selectSubShape("face", "Part_1/Extrusion_1_1/Generated_Face_3") +aPlane.selection("plane").selectSubShape("face", "Part_1/Extrusion_1_1/Generated_Face_1") aPlane.real("distance").setValue(0.001) aPlane.boolean("reverse").setValue(False) aSession.finishOperation() diff --git a/src/PythonAPI/examples/Platine.py b/src/PythonAPI/examples/Platine.py index 4813fa702..c2b01fa0c 100644 --- a/src/PythonAPI/examples/Platine.py +++ b/src/PythonAPI/examples/Platine.py @@ -58,7 +58,7 @@ def vertical_body(): def bottom_body(): # Create XOY sketch - sketch = model.addSketch(part, "Extrusion_1_1/Generated_Face_3") + sketch = model.addSketch(part, "Extrusion_1_1/Generated_Face_5") # Create base polygon points = [(0, 0), (0, L), (P, L), (P, 16 + 16), (P - 20, 16 + 16), (P - 20, 16), (P, 16), (P, 0)] @@ -91,7 +91,7 @@ def bottom_body(): sketch.setCoincident(arc.endPoint(), h1.startPoint()) # Binding - left_e = sketch.addLine("Extrusion_1_1/Generated_Face_3&Extrusion_1_1/To_Face_1_1") + left_e = sketch.addLine("Extrusion_1_1/Generated_Face_5&Extrusion_1_1/To_Face_1_1") sketch.setCoincident(left_e.startPoint(), left.endPoint()) sketch.setCoincident(left_e.endPoint(), left.startPoint()) @@ -112,7 +112,7 @@ def bottom_body(): def body_3(): # Create XOZ sketch - sketch = model.addSketch(part, "Boolean_1_1/Modified_4") + sketch = model.addSketch(part, "Boolean_1_1/Modified_2") # Create base polygon H, L, l, r = 28, 40, 8, 12 @@ -150,7 +150,7 @@ def body_3(): sketch.setRadius(arc, r) # Binding - bottom_e = sketch.addLine("Boolean_1_1/Modified_5&Boolean_1_1/Modified_8") + bottom_e = sketch.addLine("Boolean_1_1/Modified_7&Boolean_1_1/Modified_5") sketch.setCoincident(bottom_e, bottom.startPoint()) sketch.setCoincident(bottom_e.startPoint(), bottom.endPoint())