]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Adjust unit tests to new behavior of SketchBuilder
authorazv <azv@opencascade.com>
Tue, 24 Jan 2017 11:30:07 +0000 (14:30 +0300)
committerazv <azv@opencascade.com>
Tue, 24 Jan 2017 11:30:39 +0000 (14:30 +0300)
src/FeaturesPlugin/Test/TestRecover1798.py
src/ModelAPI/Test/Test1064.py
src/PythonAPI/examples/Platine.py

index 2e9a23b3de89adbb8927e4ac647d469c271f3a7e..6d81692fc2d852933a83f89f28e0d82c75e71e60 100644 (file)
@@ -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")
index f0af7ad980d981f0e51351c9eb70dede2c992d1e..14ad14b444bf8036e8c0e32f934e9951acac4710 100644 (file)
@@ -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()
index 4813fa70254646f5c56552869b6b100222f3d7a0..c2b01fa0c205e8b9f4f47cbf97154cb930db99eb 100644 (file)
@@ -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())