]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Update "plug" model to avoid instability in subshapes quantity produced by OCCT algor...
authorazv <azv@opencascade.com>
Thu, 28 Dec 2017 11:57:45 +0000 (14:57 +0300)
committerazv <azv@opencascade.com>
Thu, 28 Dec 2017 11:57:45 +0000 (14:57 +0300)
test.models/plug.py

index d8998625f7fea7b7024f6bc81bec45cd090d8774..5c7c8fab297b4853679fdca02771437b1364c136 100644 (file)
@@ -325,7 +325,7 @@ model.testResultsVolumes(ExtrusionCut_2, [28317.789547563083033310249447823])
 Folder_1 = model.addFolder(Part_1_doc, Fillet_1, Fillet_5)
 
 Sketch_4 = model.addSketch(Part_1_doc, model.standardPlane("XOY"))
-SketchLine_52 = Sketch_4.addLine(28.5, -19, 28.5, 0)
+SketchLine_52 = Sketch_4.addLine(28.5, -19.5, 28.5, 0)
 SketchProjection_12 = Sketch_4.addProjection(model.selection("EDGE", "PartSet/OX"), False)
 SketchLine_53 = SketchProjection_12.createdFeature()
 SketchConstraintCoincidence_47 = Sketch_4.setCoincident(SketchLine_52.endPoint(), SketchLine_53.result())
@@ -334,9 +334,9 @@ SketchConstraintCoincidence_48 = Sketch_4.setCoincident(SketchLine_52.endPoint()
 SketchConstraintCoincidence_49 = Sketch_4.setCoincident(SketchLine_54.endPoint(), SketchLine_53.result())
 SketchLine_55 = Sketch_4.addLine(29, 0, 29, -11.5)
 SketchConstraintCoincidence_50 = Sketch_4.setCoincident(SketchLine_54.endPoint(), SketchLine_55.startPoint())
-SketchLine_56 = Sketch_4.addLine(28.5, -19, 29.9, -19)
+SketchLine_56 = Sketch_4.addLine(28.5, -19.5, 30.4, -19.5)
 SketchConstraintCoincidence_51 = Sketch_4.setCoincident(SketchLine_52.startPoint(), SketchLine_56.startPoint())
-SketchLine_57 = Sketch_4.addLine(29.9, -19, 29.4, -18.5)
+SketchLine_57 = Sketch_4.addLine(30.4, -19.5, 29.4, -18.5)
 SketchConstraintCoincidence_52 = Sketch_4.setCoincident(SketchLine_56.endPoint(), SketchLine_57.startPoint())
 SketchLine_58 = Sketch_4.addLine(29.4, -18.5, 29.4, -12.5)
 SketchConstraintCoincidence_53 = Sketch_4.setCoincident(SketchLine_57.endPoint(), SketchLine_58.startPoint())
@@ -354,15 +354,18 @@ SketchConstraintDistanceHorizontal_18 = Sketch_4.setHorizontalDistance(SketchLin
 SketchProjection_14 = Sketch_4.addProjection(model.selection("EDGE", "Sketch_1/Edge-SketchLine_20"), False)
 SketchLine_59 = SketchProjection_14.createdFeature()
 SketchConstraintAngle_6 = Sketch_4.setAngle(SketchLine_57.result(), SketchLine_56.result(), 45)
-SketchConstraintLength_4 = Sketch_4.setLength(SketchLine_56.result(), "Drill2_Radius")
 SketchConstraintMirror_2 = Sketch_4.addMirror(SketchLine_53.result(), [SketchLine_59.result()])
 [SketchLine_60] = SketchConstraintMirror_2.mirrored()
 SketchLine_60.setAuxiliary(True)
-SketchConstraintCoincidence_56 = Sketch_4.setCoincident(SketchLine_56.startPoint(), SketchLine_60.result())
 SketchConstraintDistance_12 = Sketch_4.setDistance(SketchArc_2.endPoint(), SketchLine_60.result(), "Drill2_DepthMax", True)
 SketchConstraintDistance_13 = Sketch_4.setDistance(SketchLine_58.endPoint(), SketchLine_60.result(), "Drill2_DepthMin", True)
 SketchConstraintDistance_14 = Sketch_4.setDistance(SketchLine_57.endPoint(), SketchLine_60.result(), 0.5, True)
 SketchConstraintTangent_3 = Sketch_4.setTangent(SketchLine_58.result(), SketchArc_2.results()[1])
+SketchPoint_5 = Sketch_4.addPoint(29.9, -19)
+SketchConstraintCoincidence_56 = Sketch_4.setCoincident(SketchPoint_5.coordinates(), SketchLine_60.result())
+SketchConstraintCoincidence_57 = Sketch_4.setCoincident(SketchPoint_5.coordinates(), SketchLine_57.result())
+SketchConstraintDistance_15 = Sketch_4.setDistance(SketchPoint_5.coordinates(), SketchLine_52.result(), "Drill2_Radius", True)
+SketchConstraintDistanceVertical_6 = Sketch_4.setVerticalDistance(SketchLine_56.endPoint(), SketchPoint_5.coordinates(), 0.5)
 model.do()
 # check Sketch_4
 model.checkSketch(Sketch_4, 0)
@@ -382,18 +385,18 @@ Sketch_5 = model.addSketch(Part_1_doc, model.standardPlane("XOY"))
 SketchLine_61 = Sketch_5.addLine(63.5, 10.5, 64, 10.5)
 SketchProjection_15 = Sketch_5.addProjection(model.selection("EDGE", "Sketch_1/Edge-SketchLine_7"), False)
 SketchLine_62 = SketchProjection_15.createdFeature()
-SketchConstraintCoincidence_57 = Sketch_5.setCoincident(SketchLine_61.startPoint(), SketchLine_62.result())
-SketchConstraintCoincidence_58 = Sketch_5.setCoincident(SketchAPI_Line(SketchLine_62).endPoint(), SketchLine_61.endPoint())
+SketchConstraintCoincidence_58 = Sketch_5.setCoincident(SketchLine_61.startPoint(), SketchLine_62.result())
+SketchConstraintCoincidence_59 = Sketch_5.setCoincident(SketchAPI_Line(SketchLine_62).endPoint(), SketchLine_61.endPoint())
 SketchLine_63 = Sketch_5.addLine(64, 10.5, 64, 11)
-SketchConstraintCoincidence_59 = Sketch_5.setCoincident(SketchLine_61.endPoint(), SketchLine_63.startPoint())
+SketchConstraintCoincidence_60 = Sketch_5.setCoincident(SketchLine_61.endPoint(), SketchLine_63.startPoint())
 SketchProjection_16 = Sketch_5.addProjection(model.selection("EDGE", "Sketch_1/Edge-SketchLine_8"), False)
 SketchLine_64 = SketchProjection_16.createdFeature()
-SketchConstraintCoincidence_60 = Sketch_5.setCoincident(SketchLine_63.endPoint(), SketchLine_64.result())
+SketchConstraintCoincidence_61 = Sketch_5.setCoincident(SketchLine_63.endPoint(), SketchLine_64.result())
 SketchLine_65 = Sketch_5.addLine(64, 11, 63.5, 10.5)
-SketchConstraintCoincidence_61 = Sketch_5.setCoincident(SketchLine_63.endPoint(), SketchLine_65.startPoint())
+SketchConstraintCoincidence_62 = Sketch_5.setCoincident(SketchLine_63.endPoint(), SketchLine_65.startPoint())
 SketchConstraintCoincidence_62 = Sketch_5.setCoincident(SketchLine_65.endPoint(), SketchLine_61.startPoint())
 SketchConstraintEqual_2 = Sketch_5.setEqual(SketchLine_61.result(), SketchLine_63.result())
-SketchConstraintLength_5 = Sketch_5.setLength(SketchLine_61.result(), "Chamfer")
+SketchConstraintLength_3 = Sketch_5.setLength(SketchLine_61.result(), "Chamfer")
 model.do()
 RevolutionCut_2.setNestedSketch(Sketch_5)
 # check Sketch_5
@@ -482,25 +485,25 @@ model.testNbSubShapes(Result, GeomAPI_Shape.EDGE, [364])
 model.testNbSubShapes(Result, GeomAPI_Shape.VERTEX, [728])
 model.testResultsVolumes(Result, [22969.553506208951148437336087227])
 
-Param_Drill2Loc.setValue(9)
+Param_Drill2Loc.setValue(7.5)
 model.do()
 model.testNbResults(Result, 1)
 model.testNbSubResults(Result, [0])
 model.testNbSubShapes(Result, GeomAPI_Shape.SOLID, [1])
 model.testNbSubShapes(Result, GeomAPI_Shape.FACE, [63])
-model.testNbSubShapes(Result, GeomAPI_Shape.EDGE, [366])
-model.testNbSubShapes(Result, GeomAPI_Shape.VERTEX, [732])
-model.testResultsVolumes(Result, [22970.312703100276848999783396721])
+model.testNbSubShapes(Result, GeomAPI_Shape.EDGE, [364])
+model.testNbSubShapes(Result, GeomAPI_Shape.VERTEX, [728])
+model.testResultsVolumes(Result, [22969.986144881491782143712043762])
 
-Param_Drill2Radius.setValue(2)
+Param_Drill2Radius.setValue(1.9)
 model.do()
 model.testNbResults(Result, 1)
 model.testNbSubResults(Result, [0])
 model.testNbSubShapes(Result, GeomAPI_Shape.SOLID, [1])
 model.testNbSubShapes(Result, GeomAPI_Shape.FACE, [63])
-model.testNbSubShapes(Result, GeomAPI_Shape.EDGE, [366])
-model.testNbSubShapes(Result, GeomAPI_Shape.VERTEX, [732])
-model.testResultsVolumes(Result, [22953.781532584092929027974605560])
+model.testNbSubShapes(Result, GeomAPI_Shape.EDGE, [364])
+model.testNbSubShapes(Result, GeomAPI_Shape.VERTEX, [728])
+model.testResultsVolumes(Result, [22956.808010807682876475155353546])
 
 Param_Fillet1.setValue(3)
 model.do()
@@ -508,12 +511,12 @@ model.testNbResults(Result, 1)
 model.testNbSubResults(Result, [0])
 model.testNbSubShapes(Result, GeomAPI_Shape.SOLID, [1])
 model.testNbSubShapes(Result, GeomAPI_Shape.FACE, [63])
-model.testNbSubShapes(Result, GeomAPI_Shape.EDGE, [366])
-model.testNbSubShapes(Result, GeomAPI_Shape.VERTEX, [732])
-model.testResultsVolumes(Result, [23372.112422200712899211794137955])
+model.testNbSubShapes(Result, GeomAPI_Shape.EDGE, [364])
+model.testNbSubShapes(Result, GeomAPI_Shape.VERTEX, [728])
+model.testResultsVolumes(Result, [23373.503259112552768783643841743])
 
 model.checkGroup(Group_1, GeomAPI_Shape.FACE)
 
 model.end()
 
-assert(model.checkPythonDump())
\ No newline at end of file
+assert(model.checkPythonDump())