]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Tests adjustment.
authormzn <mzn@opencascade.com>
Tue, 24 Jul 2018 11:17:24 +0000 (14:17 +0300)
committermzn <mzn@opencascade.com>
Tue, 24 Jul 2018 11:17:24 +0000 (14:17 +0300)
test.models/bearing_puller.py
test.models/bobine_film_reel.py
test.models/flange.py
test.models/piece_12.py

index 393843543a7127c23fcbae3abeb37b5fd2f3a98d..c6e7f6c47e2c0f797a5877a3cfbc95f308b0e9d1 100644 (file)
@@ -228,9 +228,9 @@ SketchConstraintDistance_9 = Sketch_2.setDistance(SketchArc_9.center(), SketchPo
 SketchConstraintDistance_9.setName("SketchConstraintDistance_8")
 model.do()
 Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_2/Wire-SketchLine_10r-SketchLine_11r-SketchArc_3_2f-SketchArc_4_2f"), model.selection("WIRE", "Sketch_2/Wire-SketchLine_14r-SketchArc_7_2f-SketchLine_15r-SketchArc_8_2f"), model.selection("FACE", "Sketch_2/Face-SketchLine_12r-SketchArc_5_2f-SketchLine_13r-SketchArc_6_2f"), model.selection("FACE", "Sketch_2/Face-SketchLine_19f-SketchLine_20f-SketchLine_21f-SketchArc_10_2f"), model.selection("FACE", "Sketch_2/Face-SketchLine_16f-SketchLine_17f-SketchLine_18f-SketchArc_9_2f"), model.selection("WIRE", "Sketch_2/Wire-SketchLine_22f-SketchLine_23f-SketchLine_24f-SketchArc_11_2f")], model.selection(), model.selection(), 10, model.selection("FACE", "Revolution_1_1/Generated_Face_5"), 10)
-Boolean_1 = model.addCut(Part_1_doc, [model.selection("SOLID", "Revolution_1_1")], [model.selection("SOLID", "Extrusion_1_1"), model.selection("SOLID", "Extrusion_1_4"), model.selection("SOLID", "Extrusion_1_5")])
-Boolean_2 = model.addCut(Part_1_doc, [model.selection("SOLID", "Boolean_1_1")], [model.selection("SOLID", "Extrusion_1_2"), model.selection("SOLID", "Extrusion_1_3"), model.selection("SOLID", "Extrusion_1_6")])
-Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Boolean_2_1/Modified_Face_7"), model.selection("FACE", "Boolean_2_1/Modified_Face_9"))
+Cut_1 = model.addCut(Part_1_doc, [model.selection("SOLID", "Revolution_1_1")], [model.selection("SOLID", "Extrusion_1_1"), model.selection("SOLID", "Extrusion_1_4"), model.selection("SOLID", "Extrusion_1_5")])
+Cut_2 = model.addCut(Part_1_doc, [model.selection("SOLID", "Cut_1_1")], [model.selection("SOLID", "Extrusion_1_2"), model.selection("SOLID", "Extrusion_1_3"), model.selection("SOLID", "Extrusion_1_6")])
+Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Cut_2_1/Modified_Face_7"), model.selection("FACE", "Cut_2_1/Modified_Face_9"))
 Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_1"))
 SketchCircle_3 = Sketch_3.addCircle(25, -10, 4)
 SketchCircle_4 = Sketch_3.addCircle(40, -10, 4)
@@ -243,7 +243,7 @@ SketchConstraintDistance_10 = Sketch_3.setDistance(SketchCircle_3.center(), Sket
 SketchConstraintDistance_10.setName("SketchConstraintDistance_9")
 SketchConstraintDistance_11 = Sketch_3.setDistance(SketchCircle_4.center(), SketchLine_28.result(), 40)
 SketchConstraintDistance_11.setName("SketchConstraintDistance_10")
-SketchProjection_1 = Sketch_3.addProjection(model.selection("EDGE", "Boolean_2_1/Modified_Face_17&Boolean_2_1/Modified_Face_7"))
+SketchProjection_1 = Sketch_3.addProjection(model.selection("EDGE", "Cut_2_1/Modified_Face_17&Cut_2_1/Modified_Face_7"))
 SketchLine_29 = SketchProjection_1.createdFeature()
 SketchLine_29.setName("SketchLine_26")
 SketchLine_29.result().setName("SketchLine_26")
@@ -252,14 +252,14 @@ SketchConstraintDistance_12.setName("SketchConstraintDistance_11")
 SketchConstraintDistance_13 = Sketch_3.setDistance(SketchCircle_3.center(), SketchLine_29.result(), 10)
 SketchConstraintDistance_13.setName("SketchConstraintDistance_12")
 model.do()
-Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_3/Face-SketchCircle_3_2f"), model.selection("WIRE", "Sketch_3/Wire-SketchCircle_4_2f")], model.selection(), model.selection("FACE", "Boolean_1_1/Modified_Face_6"), 5, model.selection("FACE", "Boolean_1_1/Modified_Face_8"), 5)
-Boolean_3 = model.addCut(Part_1_doc, [model.selection("SOLID", "Boolean_2_1")], [model.selection("SOLID", "Extrusion_2_1"), model.selection("SOLID", "Extrusion_2_2")])
-Recover_1 = model.addRecover(Part_1_doc, Boolean_3, [Extrusion_2.results()[1], Extrusion_2.result()])
+Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_3/Face-SketchCircle_3_2f"), model.selection("WIRE", "Sketch_3/Wire-SketchCircle_4_2f")], model.selection(), model.selection("FACE", "Cut_1_1/Modified_Face_6"), 5, model.selection("FACE", "Cut_1_1/Modified_Face_8"), 5)
+Cut_3 = model.addCut(Part_1_doc, [model.selection("SOLID", "Cut_2_1")], [model.selection("SOLID", "Extrusion_2_1"), model.selection("SOLID", "Extrusion_2_2")])
+Recover_1 = model.addRecover(Part_1_doc, Cut_3, [Extrusion_2.results()[1], Extrusion_2.result()])
 Rotation_1 = model.addRotation(Part_1_doc, [model.selection("SOLID", "Recover_1_1"), model.selection("SOLID", "Recover_1_2")], model.selection("EDGE", "PartSet/OZ"), 120)
-Boolean_4 = model.addCut(Part_1_doc, [model.selection("SOLID", "Boolean_3_1")], [model.selection("SOLID", "Rotation_1_1"), model.selection("SOLID", "Rotation_1_2")])
-Recover_2 = model.addRecover(Part_1_doc, Boolean_4, [Rotation_1.results()[1], Rotation_1.result()])
+Cut_4 = model.addCut(Part_1_doc, [model.selection("SOLID", "Cut_3_1")], [model.selection("SOLID", "Rotation_1_1"), model.selection("SOLID", "Rotation_1_2")])
+Recover_2 = model.addRecover(Part_1_doc, Cut_4, [Rotation_1.results()[1], Rotation_1.result()])
 Rotation_2 = model.addRotation(Part_1_doc, [model.selection("SOLID", "Recover_2_1"), model.selection("SOLID", "Recover_2_2")], model.selection("EDGE", "PartSet/OZ"), 120)
-Boolean_5 = model.addCut(Part_1_doc, [model.selection("SOLID", "Boolean_4_1")], [model.selection("SOLID", "Rotation_2_2"), model.selection("SOLID", "Rotation_2_1")])
+Cut_5 = model.addCut(Part_1_doc, [model.selection("SOLID", "Cut_4_1")], [model.selection("SOLID", "Rotation_2_2"), model.selection("SOLID", "Rotation_2_1")])
 model.do()
 Part_2 = model.addPart(partSet)
 Part_2.setName("Arm 1")
@@ -499,10 +499,10 @@ Axis_4 = model.addAxis(Part_2_doc, model.selection("FACE", "PartSet/XOZ"), model
 Rotation_3 = model.addRotation(Part_2_doc, [model.selection("FACE", "Face_1_1")], model.selection("EDGE", "Axis_1"), -43.8752)
 Pipe_1 = model.addPipe(Part_2_doc, [model.selection("FACE", "Rotation_1_1")], model.selection("EDGE", "Sketch_2/Edge-SketchArc_3_2"))
 Extrusion_3 = model.addExtrusion(Part_2_doc, [model.selection("WIRE", "Sketch_2/Wire-SketchCircle_2_2f"), model.selection("WIRE", "Sketch_2/Wire-SketchLine_14r-SketchLine_15r-SketchLine_16r-SketchLine_17r")], model.selection(), "Gap/2", "Gap/2")
-Boolean_6 = model.addFuse(Part_2_doc, [model.selection("SOLID", "Pipe_1_1")], [model.selection("SOLID", "Extrusion_1_1"), model.selection("SOLID", "Extrusion_1_2")])
+Fuse_1 = model.addFuse(Part_2_doc, [model.selection("SOLID", "Pipe_1_1")], [model.selection("SOLID", "Extrusion_1_1"), model.selection("SOLID", "Extrusion_1_2")])
 Extrusion_4 = model.addExtrusion(Part_2_doc, [model.selection("FACE", "Sketch_2/Face-SketchCircle_3_2f")], model.selection(), "Gap", "Gap")
-Boolean_7 = model.addCut(Part_2_doc, [model.selection("SOLID", "Boolean_1_1")], [model.selection("SOLID", "Extrusion_2_1")])
-Translation_1 = model.addTranslation(Part_2_doc, [model.selection("SOLID", "Boolean_2_1")], model.selection("VERTEX", "Sketch_2/Vertex-SketchArc_3_2s"), model.selection("VERTEX", "Sketch_2/Vertex-SketchLine_21e"))
+Cut_1 = model.addCut(Part_2_doc, [model.selection("SOLID", "Fuse_1_1")], [model.selection("SOLID", "Extrusion_2_1")])
+Translation_1 = model.addTranslation(Part_2_doc, [model.selection("SOLID", "Cut_1_1")], model.selection("VERTEX", "Sketch_2/Vertex-SketchArc_3_2s"), model.selection("VERTEX", "Sketch_2/Vertex-SketchLine_21e"))
 model.do()
 Part_3 = model.duplicatePart(Part_2)
 Part_3.setName("Arm 2")
@@ -597,8 +597,8 @@ SketchLine_111 = Sketch_12.addLine(model.selection("EDGE", "PartSet/OZ"))
 SketchConstraintDistance_37 = Sketch_12.setDistance(SketchLine_108.startPoint(), SketchLine_111.result(), 4)
 model.do()
 Revolution_3 = model.addRevolution(Part_5_doc, [model.selection("FACE", "Sketch_3/Face-SketchLine_14f-SketchLine_15f-SketchLine_16f")], model.selection("EDGE", "PartSet/OZ"), 360, 0)
-Boolean_12 = model.addCut(Part_5_doc, [model.selection("SOLID", "Extrusion_1_1")], [model.selection("SOLID", "Revolution_2_1")])
-Boolean_13 = model.addFuse(Part_5_doc, [model.selection("SOLID", "Boolean_1_1"), model.selection("SOLID", "Revolution_1_1")], [])
+Cut_12 = model.addCut(Part_5_doc, [model.selection("SOLID", "Extrusion_1_1")], [model.selection("SOLID", "Revolution_2_1")])
+Cut_13 = model.addFuse(Part_5_doc, [model.selection("SOLID", "Cut_1_1"), model.selection("SOLID", "Revolution_1_1")], [])
 
 # Test reexecution after parameter change
 Parameter_H.setValue(120)
index f4dad732873f43c5e917f3599c56d040ad4e209b..1fade828ad5129607a1e9c72efa72e487c634b93 100644 (file)
@@ -78,8 +78,8 @@ SketchConstraintRadius_5 = Sketch_5.setRadius(SketchCircle_5.results()[1], 8)
 SketchConstraintCoincidence_8 = Sketch_5.setCoincident(SketchAPI_Line(SketchLine_5).startPoint(), SketchCircle_5.center())
 SketchConstraintCoincidence_8.setName("SketchConstraintCoincidence_16")
 Extrusion_5.setNestedSketch(Sketch_5)
-Boolean_1 = model.addFuse(Part_1_doc, [model.selection("SOLID", "Extrusion_4_1"), model.selection("SOLID", "Extrusion_5_1"), model.selection("SOLID", "Extrusion_1_1"), model.selection("SOLID", "Extrusion_2_1"), model.selection("SOLID", "Extrusion_3_1")], [])
-ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [], model.selection(), model.selection("FACE", "Extrusion_5_1/To_Face_1"), 0, model.selection(), 0, [model.selection("SOLID", "Boolean_1_1")])
+Fuse_1 = model.addFuse(Part_1_doc, [model.selection("SOLID", "Extrusion_4_1"), model.selection("SOLID", "Extrusion_5_1"), model.selection("SOLID", "Extrusion_1_1"), model.selection("SOLID", "Extrusion_2_1"), model.selection("SOLID", "Extrusion_3_1")], [])
+ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [], model.selection(), model.selection("FACE", "Extrusion_5_1/To_Face_1"), 0, model.selection(), 0, [model.selection("SOLID", "Fuse_1_1")])
 Sketch_6 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/From_Face_1"))
 SketchCircle_6 = Sketch_6.addCircle(0, 0, 4.2)
 SketchConstraintRadius_6 = Sketch_6.setRadius(SketchCircle_6.results()[1], 4.2)
index 1015b0598f62d748b332a0d5730675c45e1e7d5c..e3f64e294a49fa65c41f3d8499f3e96b47d13211 100644 (file)
@@ -80,7 +80,7 @@ SketchConstraintCoincidence_16 = Sketch_2.setCoincident(SketchArc_9.startPoint()
 SketchConstraintCoincidence_17 = Sketch_2.setCoincident(SketchArc_9.endPoint(), SketchLine_11.endPoint())
 model.do()
 Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchArc_9_2f-SketchLine_11f")], model.selection("EDGE", "PartSet/OZ"), 360, 0)
-Boolean_1 = model.addCut(Part_1_doc, [model.selection("SOLID", "Extrusion_1_1")], [model.selection("SOLID", "Revolution_1_1")])
+Cut_1 = model.addCut(Part_1_doc, [model.selection("SOLID", "Extrusion_1_1")], [model.selection("SOLID", "Revolution_1_1")])
 Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "PartSet/YOZ"))
 SketchLine_12 = Sketch_3.addLine(0, 106, -4, 106)
 SketchLine_13 = Sketch_3.addLine(-4, 106, -4, 67.34428877022477)
@@ -111,7 +111,7 @@ SketchLine_16.result().setName("SketchLine_17")
 SketchConstraintCoincidence_22 = Sketch_3.setCoincident(SketchArc_10.endPoint(), SketchLine_16.result())
 model.do()
 Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_3/Wire-SketchLine_12f-SketchLine_13f-SketchLine_17r-SketchLine_18r-SketchArc_10_2f")], model.selection(), "172/2", "172/2")
-Boolean_2 = model.addCut(Part_1_doc, [model.selection("SOLID", "Boolean_1_1")], [model.selection("SOLID", "Extrusion_2_1")])
+Cut_2 = model.addCut(Part_1_doc, [model.selection("SOLID", "Cut_1_1")], [model.selection("SOLID", "Extrusion_2_1")])
 Sketch_4 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_10"))
 SketchLine_18 = Sketch_4.addLine(-65, 16, -65, -16)
 SketchLine_18.setName("SketchLine_19")
@@ -151,7 +151,7 @@ SketchConstraintTangent_7 = Sketch_4.setTangent(SketchArc_12.results()[1], Sketc
 model.do()
 Extrusion_3 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_4/Wire-SketchArc_11_2f-SketchArc_12_2f-SketchLine_21f-SketchLine_22r")], model.selection(), model.selection(), 0, model.selection("FACE", "Extrusion_1_1/Generated_Face_12"), 0)
 MultiTranslation_1 = model.addMultiTranslation(Part_1_doc, [model.selection("SOLID", "Extrusion_3_1")], model.selection("EDGE", "Extrusion_1_1/To_Face_1&Extrusion_1_1/Generated_Face_12"), -130, 2)
-Boolean_3 = model.addCut(Part_1_doc, [model.selection("SOLID", "Boolean_2_1")], [model.selection("COMPOUND", "LinearCopy_1_1")])
+Cut_3 = model.addCut(Part_1_doc, [model.selection("SOLID", "Cut_2_1")], [model.selection("COMPOUND", "LinearCopy_1_1")])
 model.do()
 
 # Test reexecution after parameter change
@@ -159,7 +159,7 @@ Parameter_dint.setValue(62)
 Parameter_thick.setValue(20)
 Parameter_length.setValue(200)
 model.do()
-model.testResultsVolumes(Boolean_3, [409550.515091864974237978458404541])
+model.testResultsVolumes(Cut_3, [409550.515091864974237978458404541])
 Parameter_dint.setValue(58)
 Parameter_thick.setValue(16)
 Parameter_length.setValue(172)
@@ -168,12 +168,12 @@ model.end()
 
 from GeomAPI import GeomAPI_Shape
 
-model.testNbResults(Boolean_3, 1)
-model.testNbSubResults(Boolean_3, [0])
-model.testNbSubShapes(Boolean_3, GeomAPI_Shape.SOLID, [1])
-model.testNbSubShapes(Boolean_3, GeomAPI_Shape.FACE, [32])
-model.testNbSubShapes(Boolean_3, GeomAPI_Shape.EDGE, [192])
-model.testNbSubShapes(Boolean_3, GeomAPI_Shape.VERTEX, [384])
-model.testResultsVolumes(Boolean_3, [307084.534467286430299282073974609])
+model.testNbResults(Cut_3, 1)
+model.testNbSubResults(Cut_3, [0])
+model.testNbSubShapes(Cut_3, GeomAPI_Shape.SOLID, [1])
+model.testNbSubShapes(Cut_3, GeomAPI_Shape.FACE, [32])
+model.testNbSubShapes(Cut_3, GeomAPI_Shape.EDGE, [192])
+model.testNbSubShapes(Cut_3, GeomAPI_Shape.VERTEX, [384])
+model.testResultsVolumes(Cut_3, [307084.534467286430299282073974609])
 
 assert(model.checkPythonDump())
index 1868b2b2d68a1e1c09335b5efdd99339a53d7847..391436d0459db8db1e5e5b6d2706b78ca3cfbe9a 100644 (file)
@@ -431,10 +431,9 @@ SketchConstraintDistance_14 = Sketch_3.setDistance(SketchLine_23.result(), Sketc
 SketchConstraintDistance_14.setName("SketchConstraintDistance_12")
 model.do()
 Extrusion_3 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_3/Wire-SketchLine_9r-SketchLine_12r-SketchLine_14r-SketchLine_26r-SketchLine_27r-SketchLine_28r")], model.selection(), model.selection("FACE", "Extrusion_1_1/Generated_Face_3"), 0, model.selection(), 0)
-Boolean_1 = model.addSmash(Part_1_doc, [model.selection("SOLID", "Extrusion_3_1")], [model.selection("SOLID", "ExtrusionCut_4_1")])
-ExtrusionCut_5 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", "Sketch_3/Wire-SketchCircle_8_2f")], model.selection(), 10, 0, [model.selection("SOLID", "Boolean_1_1_1")])
+Smash_1 = model.addSmash(Part_1_doc, [model.selection("SOLID", "Extrusion_3_1")], [model.selection("SOLID", "ExtrusionCut_4_1")])
+ExtrusionCut_5 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", "Sketch_3/Wire-SketchCircle_8_2f")], model.selection(), 10, 0, [model.selection("SOLID", "Smash_1_1_1")])
 ExtrusionCut_6 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_3/Face-SketchCircle_8_2f")], model.selection(), 10, 0, [model.selection("SOLID", "ExtrusionCut_5_1_1")])
-Axis_4 = model.addAxis(Part_1_doc, model.selection("FACE", "ExtrusionCut_6_1_2/Modfied_1"))
 Sketch_4 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_1"))
 SketchProjection_7 = Sketch_4.addProjection(model.selection("EDGE", "PartSet/OY"))
 SketchLine_28 = SketchProjection_7.createdFeature()
@@ -519,10 +518,10 @@ SketchConstraintLength_10 = Sketch_4.setLength(SketchLine_36.result(), 12.975642
 SketchConstraintLength_10.setName("SketchConstraintLength_7")
 model.do()
 Extrusion_4 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_4/Wire-SketchLine_19f-SketchLine_20f-SketchLine_24f-SketchLine_21f-SketchLine_22f-SketchLine_23f")], model.selection(), model.selection("FACE", "Extrusion_1_1/Generated_Face_1"), 0, model.selection(), 0)
-Boolean_2 = model.addSmash(Part_1_doc, [model.selection("SOLID", "ExtrusionCut_6_1_1"), model.selection("SOLID", "Extrusion_4_1")], [model.selection("SOLID", "ExtrusionCut_6_1_2")])
-ExtrusionCut_7 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_4/Face-SketchCircle_9_2f")], model.selection(), 0, 10, [model.selection("SOLID", "Boolean_2_1_1")])
+Smash_2 = model.addSmash(Part_1_doc, [model.selection("SOLID", "ExtrusionCut_6_1_1"), model.selection("SOLID", "Extrusion_4_1")], [model.selection("SOLID", "ExtrusionCut_6_1_2")])
+ExtrusionCut_7 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_4/Face-SketchCircle_9_2f")], model.selection(), 0, 10, [model.selection("SOLID", "Smash_2_1_1")])
 ExtrusionCut_8 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_4/Face-SketchCircle_9_2f")], model.selection(), 0, 10, [model.selection("SOLID", "ExtrusionCut_7_1_1")])
-Sketch_5 = model.addSketch(Part_1_doc, model.selection("FACE", "Boolean_2_1_1/Modified_Face_1"))
+Sketch_5 = model.addSketch(Part_1_doc, model.selection("FACE", "Smash_2_1_1/Modified_Face_1"))
 SketchPoint_3 = Sketch_5.addPoint(model.selection("VERTEX", "PartSet/Origin"))
 SketchPoint_3.setName("SketchPoint_2")
 SketchPoint_3.result().setName("SketchPoint_2")