]> SALOME platform Git repositories - modules/shaper.git/blob - test.models/plug.py
Salome HOME
Issue #2577: EDF 2018-2 Fusion of connected faces.
[modules/shaper.git] / test.models / plug.py
1 from SketchAPI import *
2 from GeomAPI import GeomAPI_Shape
3
4 from salome.shaper import model
5
6 model.begin()
7 partSet = model.moduleDocument()
8 Part_1 = model.addPart(partSet)
9 Part_1_doc = Part_1.document()
10
11 Param_Width = model.addParameter(Part_1_doc, "Width", "64")
12 Param_Depth = model.addParameter(Part_1_doc, "Depth", "33")
13 Param_D1out = model.addParameter(Part_1_doc, "D1_out", "38")
14 Param_D2out = model.addParameter(Part_1_doc, "D2_out", "33")
15 Param_D3out = model.addParameter(Part_1_doc, "D3_out", "30")
16 Param_D4out = model.addParameter(Part_1_doc, "D4_out", "20")
17 Param_D1in = model.addParameter(Part_1_doc, "D1_in", "21")
18 Param_D2in = model.addParameter(Part_1_doc, "D2_in", "5")
19 Param_ChannelDepth = model.addParameter(Part_1_doc, "Channel_Depth", "1.3")
20 Param_ChannelWidth = model.addParameter(Part_1_doc, "Channel_Width", "1.5")
21 Param_Drill1Loc = model.addParameter(Part_1_doc, "Drill1_Loc", "7.5")
22 Param_Drill1Radius = model.addParameter(Part_1_doc, "Drill1_Radius", "2.25")
23 Param_Drill1Holder = model.addParameter(Part_1_doc, "Drill1Holder_Width", "8")
24 Param_Drill2Loc = model.addParameter(Part_1_doc, "Drill2_Loc", "6.5")
25 Param_Drill2Radius = model.addParameter(Part_1_doc, "Drill2_Radius", "1.4")
26 Param_Drill2InnerRadius = model.addParameter(Part_1_doc, "Drill2_InnerRadius", "0.5")
27 Param_Drill2DepthMin = model.addParameter(Part_1_doc, "Drill2_DepthMin", "6.5")
28 Param_Drill2DepthMax = model.addParameter(Part_1_doc, "Drill2_DepthMax", "7.5")
29 Param_Chamfer = model.addParameter(Part_1_doc, "Chamfer", "0.5")
30 Param_Fillet1 = model.addParameter(Part_1_doc, "Fillet1", "5")
31 Param_Fillet2 = model.addParameter(Part_1_doc, "Fillet2", "0.3")
32 Param_Fillet3 = model.addParameter(Part_1_doc, "Fillet3", "0.5")
33 Param_SlotWidth = model.addParameter(Part_1_doc, "Slot_Width", "8")
34
35 Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
36 SketchLine_1 = Sketch_1.addLine(0, 3, 0.5, 2.5)
37 SketchLine_2 = Sketch_1.addLine(0.5, 2.5, 9.5, 2.5)
38 SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint())
39 SketchLine_3 = Sketch_1.addLine(9.5, 2.5, 9.5, 3.1)
40 SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint())
41 SketchLine_4 = Sketch_1.addLine(9.5, 3.1, 24.86574363608673, 3.1)
42 SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint())
43 SketchLine_5 = Sketch_1.addLine(24.86574363608673, 3.1, 26, 3.3)
44 SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_5.startPoint())
45 SketchLine_6 = Sketch_1.addLine(26, 3.3, 26, 5.5)
46 SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_6.startPoint())
47 SketchLine_7 = Sketch_1.addLine(31, 10.5, 64, 10.5)
48 SketchLine_8 = Sketch_1.addLine(64, 10.5, 64, 15)
49 SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_7.endPoint(), SketchLine_8.startPoint())
50 SketchLine_9 = Sketch_1.addLine(64, 15, 61, 15)
51 SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchLine_8.endPoint(), SketchLine_9.startPoint())
52 SketchLine_10 = Sketch_1.addLine(61, 15, 61, 12.75)
53 SketchConstraintCoincidence_8 = Sketch_1.setCoincident(SketchLine_9.endPoint(), SketchLine_10.startPoint())
54 SketchLine_11 = Sketch_1.addLine(61, 12.75, 58, 12.75)
55 SketchConstraintCoincidence_9 = Sketch_1.setCoincident(SketchLine_10.endPoint(), SketchLine_11.startPoint())
56 SketchLine_12 = Sketch_1.addLine(58, 12.75, 58, 14)
57 SketchConstraintCoincidence_10 = Sketch_1.setCoincident(SketchLine_11.endPoint(), SketchLine_12.startPoint())
58 SketchLine_13 = Sketch_1.addLine(58, 14, 57, 15)
59 SketchConstraintCoincidence_11 = Sketch_1.setCoincident(SketchLine_12.endPoint(), SketchLine_13.startPoint())
60 SketchLine_14 = Sketch_1.addLine(57, 15, 54, 15)
61 SketchConstraintCoincidence_12 = Sketch_1.setCoincident(SketchLine_13.endPoint(), SketchLine_14.startPoint())
62 SketchLine_15 = Sketch_1.addLine(54, 15, 52.5, 16.5)
63 SketchConstraintCoincidence_13 = Sketch_1.setCoincident(SketchLine_14.endPoint(), SketchLine_15.startPoint())
64 SketchLine_16 = Sketch_1.addLine(52.5, 16.5, 35, 16.5)
65 SketchConstraintCoincidence_14 = Sketch_1.setCoincident(SketchLine_15.endPoint(), SketchLine_16.startPoint())
66 SketchLine_17 = Sketch_1.addLine(35, 16.5, 34, 15.5)
67 SketchConstraintCoincidence_15 = Sketch_1.setCoincident(SketchLine_16.endPoint(), SketchLine_17.startPoint())
68 SketchLine_18 = Sketch_1.addLine(34, 15.5, 32, 15.5)
69 SketchConstraintCoincidence_16 = Sketch_1.setCoincident(SketchLine_17.endPoint(), SketchLine_18.startPoint())
70 SketchLine_19 = Sketch_1.addLine(32, 15.5, 32, 19)
71 SketchConstraintCoincidence_17 = Sketch_1.setCoincident(SketchLine_18.endPoint(), SketchLine_19.startPoint())
72 SketchLine_20 = Sketch_1.addLine(32, 19, 22.5, 19)
73 SketchConstraintCoincidence_18 = Sketch_1.setCoincident(SketchLine_19.endPoint(), SketchLine_20.startPoint())
74 SketchLine_21 = Sketch_1.addLine(22.5, 19, 22.5, 13)
75 SketchConstraintCoincidence_19 = Sketch_1.setCoincident(SketchLine_20.endPoint(), SketchLine_21.startPoint())
76 SketchLine_22 = Sketch_1.addLine(22.5, 13, 22, 12.5)
77 SketchConstraintCoincidence_20 = Sketch_1.setCoincident(SketchLine_21.endPoint(), SketchLine_22.startPoint())
78 SketchLine_23 = Sketch_1.addLine(22, 12.5, 22, 10)
79 SketchConstraintCoincidence_21 = Sketch_1.setCoincident(SketchLine_22.endPoint(), SketchLine_23.startPoint())
80 SketchLine_24 = Sketch_1.addLine(22, 10, 20, 10)
81 SketchConstraintCoincidence_22 = Sketch_1.setCoincident(SketchLine_23.endPoint(), SketchLine_24.startPoint())
82 SketchLine_25 = Sketch_1.addLine(20, 10, 20, 8.7)
83 SketchConstraintCoincidence_23 = Sketch_1.setCoincident(SketchLine_24.endPoint(), SketchLine_25.startPoint())
84 SketchLine_26 = Sketch_1.addLine(20, 8.7, 18.5, 8.7)
85 SketchConstraintCoincidence_24 = Sketch_1.setCoincident(SketchLine_25.endPoint(), SketchLine_26.startPoint())
86 SketchLine_27 = Sketch_1.addLine(18.5, 8.7, 18.5, 10)
87 SketchConstraintCoincidence_25 = Sketch_1.setCoincident(SketchLine_26.endPoint(), SketchLine_27.startPoint())
88 SketchLine_28 = Sketch_1.addLine(18.5, 10, 10.5, 10)
89 SketchConstraintCoincidence_26 = Sketch_1.setCoincident(SketchLine_27.endPoint(), SketchLine_28.startPoint())
90 SketchLine_29 = Sketch_1.addLine(10.5, 10, 10.5, 8.7)
91 SketchConstraintCoincidence_27 = Sketch_1.setCoincident(SketchLine_28.endPoint(), SketchLine_29.startPoint())
92 SketchLine_30 = Sketch_1.addLine(10.5, 8.7, 9, 8.7)
93 SketchConstraintCoincidence_28 = Sketch_1.setCoincident(SketchLine_29.endPoint(), SketchLine_30.startPoint())
94 SketchLine_31 = Sketch_1.addLine(9, 8.7, 9, 10)
95 SketchConstraintCoincidence_29 = Sketch_1.setCoincident(SketchLine_30.endPoint(), SketchLine_31.startPoint())
96 SketchLine_32 = Sketch_1.addLine(9, 10, 0.5, 10)
97 SketchConstraintCoincidence_30 = Sketch_1.setCoincident(SketchLine_31.endPoint(), SketchLine_32.startPoint())
98 SketchLine_33 = Sketch_1.addLine(0.5, 10, 0, 9.5)
99 SketchConstraintCoincidence_31 = Sketch_1.setCoincident(SketchLine_32.endPoint(), SketchLine_33.startPoint())
100 SketchLine_34 = Sketch_1.addLine(0, 9.5, 0, 3)
101 SketchConstraintCoincidence_32 = Sketch_1.setCoincident(SketchLine_33.endPoint(), SketchLine_34.startPoint())
102 SketchConstraintCoincidence_33 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchLine_34.endPoint())
103 SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_2.result())
104 SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_3.result())
105 SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_4.result())
106 SketchConstraintAngle_1 = Sketch_1.setAngleComplementary(SketchLine_4.result(), SketchLine_5.result(), 10)
107 SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_6.result())
108 SketchConstraintHorizontal_3 = Sketch_1.setHorizontal(SketchLine_7.result())
109 SketchProjection_1 = Sketch_1.addProjection(model.selection("VERTEX", "PartSet/Origin"), False)
110 SketchPoint_1 = SketchProjection_1.createdFeature()
111 SketchConstraintDistanceVertical_1 = Sketch_1.setVerticalDistance(SketchAPI_Point(SketchPoint_1).coordinates(), SketchLine_1.endPoint(), "D2_in/2")
112 SketchConstraintVertical_3 = Sketch_1.setVertical(SketchLine_8.result())
113 SketchConstraintHorizontal_4 = Sketch_1.setHorizontal(SketchLine_9.result())
114 SketchConstraintParallel_1 = Sketch_1.setParallel(SketchLine_16.result(), SketchLine_7.result())
115 SketchConstraintAngle_2 = Sketch_1.setAngleComplementary(SketchLine_15.result(), SketchLine_16.result(), 45)
116 SketchConstraintAngle_3 = Sketch_1.setAngleComplementary(SketchLine_13.result(), SketchLine_14.result(), 45)
117 SketchConstraintVertical_4 = Sketch_1.setVertical(SketchLine_12.result())
118 SketchConstraintVertical_5 = Sketch_1.setVertical(SketchLine_10.result())
119 SketchConstraintHorizontal_5 = Sketch_1.setHorizontal(SketchLine_11.result())
120 SketchConstraintPerpendicular_1 = Sketch_1.setPerpendicular(SketchLine_17.result(), SketchLine_15.result())
121 SketchConstraintVertical_6 = Sketch_1.setVertical(SketchLine_19.result())
122 SketchConstraintHorizontal_6 = Sketch_1.setHorizontal(SketchLine_18.result())
123 SketchConstraintParallel_2 = Sketch_1.setParallel(SketchLine_20.result(), SketchLine_7.result())
124 SketchConstraintParallel_3 = Sketch_1.setParallel(SketchLine_21.result(), SketchLine_19.result())
125 SketchConstraintVertical_7 = Sketch_1.setVertical(SketchLine_23.result())
126 SketchConstraintHorizontal_7 = Sketch_1.setHorizontal(SketchLine_24.result())
127 SketchConstraintCollinear_1 = Sketch_1.setCollinear(SketchLine_28.result(), SketchLine_24.result())
128 SketchConstraintCollinear_2 = Sketch_1.setCollinear(SketchLine_32.result(), SketchLine_28.result())
129 SketchConstraintVertical_8 = Sketch_1.setVertical(SketchLine_34.result())
130 SketchConstraintHorizontal_8 = Sketch_1.setHorizontal(SketchLine_30.result())
131 SketchConstraintCollinear_3 = Sketch_1.setCollinear(SketchLine_26.result(), SketchLine_30.result())
132 SketchConstraintVertical_9 = Sketch_1.setVertical(SketchLine_31.result())
133 SketchConstraintVertical_10 = Sketch_1.setVertical(SketchLine_29.result())
134 SketchConstraintVertical_11 = Sketch_1.setVertical(SketchLine_27.result())
135 SketchConstraintVertical_12 = Sketch_1.setVertical(SketchLine_25.result())
136 SketchConstraintDistance_1 = Sketch_1.setDistance(SketchAPI_Point(SketchPoint_1).coordinates(), SketchLine_24.result(), "D4_out/2", True)
137 SketchConstraintDistance_2 = Sketch_1.setDistance(SketchAPI_Point(SketchPoint_1).coordinates(), SketchLine_30.result(), "D4_out/2-Channel_Depth", True)
138 SketchConstraintDistanceHorizontal_1 = Sketch_1.setHorizontalDistance(SketchLine_34.endPoint(), SketchLine_1.endPoint(), "Chamfer")
139 SketchConstraintDistanceVertical_2 = Sketch_1.setVerticalDistance(SketchLine_1.endPoint(), SketchLine_1.startPoint(), "Chamfer")
140 SketchConstraintDistanceHorizontal_2 = Sketch_1.setHorizontalDistance(SketchLine_34.startPoint(), SketchLine_33.startPoint(), "Chamfer")
141 SketchConstraintDistanceVertical_3 = Sketch_1.setVerticalDistance(SketchLine_34.startPoint(), SketchLine_33.startPoint(), "Chamfer")
142 SketchProjection_2 = Sketch_1.addProjection(model.selection("EDGE", "PartSet/OX"), False)
143 SketchLine_35 = SketchProjection_2.createdFeature()
144 SketchConstraintDistance_3 = Sketch_1.setDistance(SketchLine_3.endPoint(), SketchLine_35.result(), "D2_in/2+0.6", True)
145 SketchConstraintDistanceHorizontal_3 = Sketch_1.setHorizontalDistance(SketchLine_3.endPoint(), SketchLine_5.endPoint(), "Depth/2")
146 SketchConstraintDistance_4 = Sketch_1.setDistance(SketchLine_5.endPoint(), SketchLine_35.result(), "D2_in/2+0.8", True)
147 SketchArc_1 = Sketch_1.addArc(31, 5.5, 31, 10.5, 26, 5.5, False)
148 SketchConstraintCoincidence_34 = Sketch_1.setCoincident(SketchArc_1.startPoint(), SketchLine_7.startPoint())
149 SketchConstraintCoincidence_35 = Sketch_1.setCoincident(SketchArc_1.endPoint(), SketchLine_6.endPoint())
150 SketchConstraintTangent_1 = Sketch_1.setTangent(SketchArc_1.results()[1], SketchLine_7.result())
151 SketchConstraintTangent_2 = Sketch_1.setTangent(SketchArc_1.results()[1], SketchLine_6.result())
152 SketchConstraintRadius_1 = Sketch_1.setRadius(SketchArc_1.results()[1], "Fillet1")
153 SketchConstraintDistance_5 = Sketch_1.setDistance(SketchLine_7.endPoint(), SketchLine_35.result(), "D1_in/2", True)
154 SketchConstraintAngle_4 = Sketch_1.setAngleComplementary(SketchLine_23.result(), SketchLine_22.result(), 45)
155 SketchConstraintCollinear_4 = Sketch_1.setCollinear(SketchLine_14.result(), SketchLine_9.result())
156 SketchConstraintDistanceHorizontal_4 = Sketch_1.setHorizontalDistance(SketchLine_34.startPoint(), SketchLine_23.startPoint(), "Width/32*11")
157 SketchConstraintDistanceHorizontal_5 = Sketch_1.setHorizontalDistance(SketchLine_23.startPoint(), SketchLine_22.startPoint(), "Chamfer")
158 SketchConstraintDistanceHorizontal_6 = Sketch_1.setHorizontalDistance(SketchLine_15.startPoint(), SketchLine_8.endPoint(), 10)
159 SketchConstraintDistance_6 = Sketch_1.setDistance(SketchLine_8.endPoint(), SketchLine_35.result(), "D3_out/2", True)
160 SketchConstraintDistance_7 = Sketch_1.setDistance(SketchLine_11.startPoint(), SketchLine_35.result(), "(D3_out+D1_in)/4", True)
161 SketchConstraintDistanceHorizontal_7 = Sketch_1.setHorizontalDistance(SketchLine_10.startPoint(), SketchLine_8.endPoint(), 3)
162 SketchConstraintDistanceHorizontal_8 = Sketch_1.setHorizontalDistance(SketchLine_12.endPoint(), SketchLine_10.startPoint(), 3)
163 SketchConstraintEqual_1 = Sketch_1.setEqual(SketchLine_30.result(), SketchLine_26.result())
164 SketchConstraintLength_1 = Sketch_1.setLength(SketchLine_26.result(), "Channel_Width")
165 SketchConstraintLength_2 = Sketch_1.setLength(SketchLine_28.result(), "Drill1Holder_Width")
166 SketchConstraintDistanceHorizontal_9 = Sketch_1.setHorizontalDistance(SketchArc_1.center(), SketchLine_7.endPoint(), "Depth")
167 SketchConstraintDistance_8 = Sketch_1.setDistance(SketchLine_16.startPoint(), SketchLine_35.result(), "D2_out/2", True)
168 SketchConstraintDistanceHorizontal_10 = Sketch_1.setHorizontalDistance(SketchLine_20.startPoint(), SketchLine_8.endPoint(), "Width/2")
169 SketchConstraintDistance_9 = Sketch_1.setDistance(SketchLine_17.endPoint(), SketchLine_35.result(), "D2_out/2-1", True)
170 SketchConstraintDistanceHorizontal_11 = Sketch_1.setHorizontalDistance(SketchLine_20.startPoint(), SketchLine_17.endPoint(), 2)
171 SketchConstraintCoincidence_36 = Sketch_1.setCoincident(SketchAPI_Line(SketchLine_35).startPoint(), SketchLine_34.result())
172 SketchConstraintDistance_10 = Sketch_1.setDistance(SketchAPI_Line(SketchLine_35).startPoint(), SketchLine_20.result(), "D1_out/2", True)
173 SketchPoint_2 = Sketch_1.addPoint(14.5, 10)
174 SketchConstraintCoincidence_37 = Sketch_1.setCoincident(SketchPoint_2.coordinates(), SketchLine_28.result())
175 SketchConstraintMiddle_1 = Sketch_1.setMiddlePoint(SketchPoint_2.coordinates(), SketchLine_28.result())
176 SketchConstraintDistanceHorizontal_12 = Sketch_1.setHorizontalDistance(SketchPoint_2.coordinates(), SketchLine_24.startPoint(), "Drill1_Loc")
177 SketchConstraintDistanceHorizontal_13 = Sketch_1.setHorizontalDistance(SketchLine_34.startPoint(), SketchLine_9.startPoint(), "Width")
178 SketchConstraintDistanceHorizontal_14 = Sketch_1.setHorizontalDistance(SketchLine_14.startPoint(), SketchLine_12.endPoint(), 1)
179 SketchConstraintDistance_11 = Sketch_1.setDistance(SketchLine_23.startPoint(), SketchLine_35.result(), "(D4_out+D2_in)/2", True)
180 model.do()
181 # check Sketch_1
182 model.checkSketch(Sketch_1, 0)
183
184 Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("COMPOUND", "Sketch_1")], model.selection("EDGE", "PartSet/OX"), 360, 0)
185 # check Revolution_1
186 model.testNbResults(Revolution_1, 1)
187 model.testNbSubResults(Revolution_1, [0])
188 model.testNbSubShapes(Revolution_1, GeomAPI_Shape.SOLID, [1])
189 model.testNbSubShapes(Revolution_1, GeomAPI_Shape.FACE, [35])
190 model.testNbSubShapes(Revolution_1, GeomAPI_Shape.EDGE, [114])
191 model.testNbSubShapes(Revolution_1, GeomAPI_Shape.VERTEX, [228])
192 model.testResultsVolumes(Revolution_1, [29055.346994571114919381216168404])
193
194 Plane_4 = model.addPlane(Part_1_doc, model.selection("EDGE", "PartSet/OY"), model.selection("VERTEX", "Sketch_1/Vertex-SketchPoint_2"), True)
195
196 Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_1"))
197 SketchProjection_3 = Sketch_2.addProjection(model.selection("VERTEX", "Sketch_1/Vertex-SketchPoint_2"), False)
198 SketchPoint_3 = SketchProjection_3.createdFeature()
199 SketchProjection_4 = Sketch_2.addProjection(model.selection("EDGE", "Revolution_1_1/Generated_Face_28"), False)
200 SketchLine_36 = SketchProjection_4.createdFeature()
201 SketchCircle_1 = Sketch_2.addCircle(14.5, 0, 2.25)
202 SketchConstraintCoincidence_38 = Sketch_2.setCoincident(SketchPoint_3.result(), SketchCircle_1.center())
203 SketchConstraintRadius_2 = Sketch_2.setRadius(SketchCircle_1.results()[1], "Drill1_Radius")
204 model.do()
205 # check Sketch_2
206 model.checkSketch(Sketch_2, 0)
207
208 ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchCircle_1_2f")], model.selection(), model.selection("FACE", "PartSet/XOZ"), 0, model.selection(), 0, [model.selection("SOLID", "Revolution_1_1")])
209 # check ExtrusionCut_1
210 model.testNbResults(ExtrusionCut_1, 1)
211 model.testNbSubResults(ExtrusionCut_1, [0])
212 model.testNbSubShapes(ExtrusionCut_1, GeomAPI_Shape.SOLID, [1])
213 model.testNbSubShapes(ExtrusionCut_1, GeomAPI_Shape.FACE, [36])
214 model.testNbSubShapes(ExtrusionCut_1, GeomAPI_Shape.EDGE, [132])
215 model.testNbSubShapes(ExtrusionCut_1, GeomAPI_Shape.VERTEX, [264])
216 model.testResultsVolumes(ExtrusionCut_1, [28943.115000463178148493170738220])
217
218 Fillet_1 = model.addFillet(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Generated_Face_14&Revolution_1_1/Generated_Face_15")], "Fillet1")
219 # check Fillet_1
220 model.testNbResults(Fillet_1, 1)
221 model.testNbSubResults(Fillet_1, [0])
222 model.testNbSubShapes(Fillet_1, GeomAPI_Shape.SOLID, [1])
223 model.testNbSubShapes(Fillet_1, GeomAPI_Shape.FACE, [37])
224 model.testNbSubShapes(Fillet_1, GeomAPI_Shape.EDGE, [136])
225 model.testNbSubShapes(Fillet_1, GeomAPI_Shape.VERTEX, [272])
226 model.testResultsVolumes(Fillet_1, [28340.280766451105591841042041779])
227
228 Fillet_2 = model.addFillet(Part_1_doc, [model.selection("FACE", "Revolution_1_1/Generated_Face_4"), model.selection("FACE", "Revolution_1_1/Generated_Face_6"), model.selection("FACE", "Revolution_1_1/Generated_Face_8"), model.selection("FACE", "Revolution_1_1/Generated_Face_10")], "Fillet2")
229 # check Fillet_2
230 model.testNbResults(Fillet_2, 1)
231 model.testNbSubResults(Fillet_2, [0])
232 model.testNbSubShapes(Fillet_2, GeomAPI_Shape.SOLID, [1])
233 model.testNbSubShapes(Fillet_2, GeomAPI_Shape.FACE, [45])
234 model.testNbSubShapes(Fillet_2, GeomAPI_Shape.EDGE, [168])
235 model.testNbSubShapes(Fillet_2, GeomAPI_Shape.VERTEX, [336])
236 model.testResultsVolumes(Fillet_2, [28339.715350479829794494435191154])
237
238 Fillet_3 = model.addFillet(Part_1_doc, [model.selection("FACE", "Revolution_1_1/Generated_Face_16")], "Fillet3")
239 # check Fillet_3
240 model.testNbResults(Fillet_3, 1)
241 model.testNbSubResults(Fillet_3, [0])
242 model.testNbSubShapes(Fillet_3, GeomAPI_Shape.SOLID, [1])
243 model.testNbSubShapes(Fillet_3, GeomAPI_Shape.FACE, [47])
244 model.testNbSubShapes(Fillet_3, GeomAPI_Shape.EDGE, [176])
245 model.testNbSubShapes(Fillet_3, GeomAPI_Shape.VERTEX, [352])
246 model.testResultsVolumes(Fillet_3, [28338.609830057110229972749948502])
247
248 Fillet_4 = model.addFillet(Part_1_doc, [model.selection("FACE", "Revolution_1_1/Generated_Face_24")], "Fillet3")
249 # check Fillet_4
250 model.testNbResults(Fillet_4, 1)
251 model.testNbSubResults(Fillet_4, [0])
252 model.testNbSubShapes(Fillet_4, GeomAPI_Shape.SOLID, [1])
253 model.testNbSubShapes(Fillet_4, GeomAPI_Shape.FACE, [49])
254 model.testNbSubShapes(Fillet_4, GeomAPI_Shape.EDGE, [184])
255 model.testNbSubShapes(Fillet_4, GeomAPI_Shape.VERTEX, [368])
256 model.testResultsVolumes(Fillet_4, [28347.280717884430487174540758133])
257
258 Fillet_5 = model.addFillet(Part_1_doc, [model.selection("FACE", "Revolution_1_1/Generated_Face_26")], "Fillet2")
259 # check Fillet_5
260 model.testNbResults(Fillet_5, 1)
261 model.testNbSubResults(Fillet_5, [0])
262 model.testNbSubShapes(Fillet_5, GeomAPI_Shape.SOLID, [1])
263 model.testNbSubShapes(Fillet_5, GeomAPI_Shape.FACE, [51])
264 model.testNbSubShapes(Fillet_5, GeomAPI_Shape.EDGE, [192])
265 model.testNbSubShapes(Fillet_5, GeomAPI_Shape.VERTEX, [384])
266 model.testResultsVolumes(Fillet_5, [28343.655816829603281803429126740])
267
268 ExtrusionCut_2 = model.addExtrusionCut(Part_1_doc, [], model.selection(), "D4_out/2", "D4_out/2", [model.selection("SOLID", "Fillet_5_1")])
269 Sketch_3 = model.addSketch(Part_1_doc, model.standardPlane("XOY"))
270 SketchLine_37 = Sketch_3.addLine(9, -9.914857089637437, 9, -18.52898094212539)
271 SketchLine_38 = Sketch_3.addLine(9, -18.52898094212539, -2.5, -18.52898094212539)
272 SketchConstraintCoincidence_39 = Sketch_3.setCoincident(SketchLine_37.endPoint(), SketchLine_38.startPoint())
273 SketchLine_39 = Sketch_3.addLine(-2.5, -18.52898094212539, -2.5, -10.52898094212539)
274 SketchConstraintCoincidence_40 = Sketch_3.setCoincident(SketchLine_38.endPoint(), SketchLine_39.startPoint())
275 SketchLine_40 = Sketch_3.addLine(-2.5, -10.52898094212539, 7.788407623149843, -8.714857089637437)
276 SketchConstraintCoincidence_41 = Sketch_3.setCoincident(SketchLine_39.endPoint(), SketchLine_40.startPoint())
277 SketchLine_41 = Sketch_3.addLine(7.788407623149843, -8.714857089637437, 8, -9.914857089637437)
278 SketchConstraintCoincidence_42 = Sketch_3.setCoincident(SketchLine_40.endPoint(), SketchLine_41.startPoint())
279 SketchLine_42 = Sketch_3.addLine(8, -9.914857089637437, 9, -9.914857089637437)
280 SketchConstraintCoincidence_43 = Sketch_3.setCoincident(SketchLine_41.endPoint(), SketchLine_42.startPoint())
281 SketchConstraintCoincidence_44 = Sketch_3.setCoincident(SketchLine_42.endPoint(), SketchLine_37.startPoint())
282 SketchProjection_5 = Sketch_3.addProjection(model.selection("EDGE", "PartSet/OX"), False)
283 SketchLine_43 = SketchProjection_5.createdFeature()
284 SketchProjection_6 = Sketch_3.addProjection(model.selection("EDGE", "Sketch_1/Edge-SketchLine_33"), False)
285 SketchLine_44 = SketchProjection_6.createdFeature()
286 SketchProjection_7 = Sketch_3.addProjection(model.selection("EDGE", "Sketch_1/Edge-SketchLine_33"), False)
287 SketchLine_45 = SketchProjection_7.createdFeature()
288 SketchProjection_8 = Sketch_3.addProjection(model.selection("EDGE", "Sketch_1/Edge-SketchLine_33"), False)
289 SketchLine_46 = SketchProjection_8.createdFeature()
290 SketchProjection_9 = Sketch_3.addProjection(model.selection("EDGE", "Sketch_1/Edge-SketchLine_32"), False)
291 SketchLine_47 = SketchProjection_9.createdFeature()
292 SketchProjection_10 = Sketch_3.addProjection(model.selection("EDGE", "Sketch_1/Edge-SketchLine_32"), False)
293 SketchLine_48 = SketchProjection_10.createdFeature()
294 SketchProjection_11 = Sketch_3.addProjection(model.selection("EDGE", "Sketch_1/Edge-SketchLine_32"), False)
295 SketchLine_49 = SketchProjection_11.createdFeature()
296 SketchConstraintVertical_13 = Sketch_3.setVertical(SketchLine_37.result())
297 SketchConstraintVertical_14 = Sketch_3.setVertical(SketchLine_39.result())
298 SketchConstraintHorizontal_9 = Sketch_3.setHorizontal(SketchLine_38.result())
299 SketchConstraintHorizontal_10 = Sketch_3.setHorizontal(SketchLine_42.result())
300 SketchConstraintPerpendicular_2 = Sketch_3.setPerpendicular(SketchLine_40.result(), SketchLine_41.result())
301 SketchConstraintDistanceVertical_4 = Sketch_3.setVerticalDistance(SketchLine_42.startPoint(), SketchLine_40.endPoint(), 1.2)
302 SketchConstraintMirror_1 = Sketch_3.addMirror(SketchLine_43.result(), [SketchLine_46.result(), SketchLine_49.result()])
303 [SketchLine_50, SketchLine_51] = SketchConstraintMirror_1.mirrored()
304 SketchLine_50.setAuxiliary(True)
305 SketchLine_51.setAuxiliary(True)
306 SketchConstraintCoincidence_45 = Sketch_3.setCoincident(SketchAPI_Line(SketchLine_51).startPoint(), SketchLine_37.result())
307 SketchConstraintCoincidence_46 = Sketch_3.setCoincident(SketchAPI_Line(SketchLine_50).startPoint(), SketchLine_40.result())
308 SketchConstraintAngle_5 = Sketch_3.setAngle(SketchLine_51.result(), SketchLine_40.result(), 10)
309 SketchConstraintDistanceHorizontal_15 = Sketch_3.setHorizontalDistance(SketchAPI_Line(SketchLine_50).endPoint(), SketchLine_42.startPoint(), "Slot_Width")
310 SketchConstraintDistanceVertical_5 = Sketch_3.setVerticalDistance(SketchLine_39.startPoint(), SketchLine_39.endPoint(), 8)
311 SketchConstraintDistanceHorizontal_16 = Sketch_3.setHorizontalDistance(SketchLine_39.endPoint(), SketchAPI_Line(SketchLine_50).startPoint(), 3)
312 model.do()
313 ExtrusionCut_2.setNestedSketch(Sketch_3)
314 # check Sketch_3
315 model.checkSketch(Sketch_3, 0)
316 # check ExtrusionCut_2
317 model.testNbResults(ExtrusionCut_2, 1)
318 model.testNbSubResults(ExtrusionCut_2, [0])
319 model.testNbSubShapes(ExtrusionCut_2, GeomAPI_Shape.SOLID, [1])
320 model.testNbSubShapes(ExtrusionCut_2, GeomAPI_Shape.FACE, [55])
321 model.testNbSubShapes(ExtrusionCut_2, GeomAPI_Shape.EDGE, [214])
322 model.testNbSubShapes(ExtrusionCut_2, GeomAPI_Shape.VERTEX, [428])
323 model.testResultsVolumes(ExtrusionCut_2, [28317.789547563083033310249447823])
324
325 Folder_1 = model.addFolder(Part_1_doc, Fillet_1, Fillet_5)
326
327 Sketch_4 = model.addSketch(Part_1_doc, model.standardPlane("XOY"))
328 SketchLine_52 = Sketch_4.addLine(28.5, -19.5, 28.5, 0)
329 SketchProjection_12 = Sketch_4.addProjection(model.selection("EDGE", "PartSet/OX"), False)
330 SketchLine_53 = SketchProjection_12.createdFeature()
331 SketchConstraintCoincidence_47 = Sketch_4.setCoincident(SketchLine_52.endPoint(), SketchLine_53.result())
332 SketchLine_54 = Sketch_4.addLine(28.5, 0, 29, 0)
333 SketchConstraintCoincidence_48 = Sketch_4.setCoincident(SketchLine_52.endPoint(), SketchLine_54.startPoint())
334 SketchConstraintCoincidence_49 = Sketch_4.setCoincident(SketchLine_54.endPoint(), SketchLine_53.result())
335 SketchLine_55 = Sketch_4.addLine(29, 0, 29, -11.5)
336 SketchConstraintCoincidence_50 = Sketch_4.setCoincident(SketchLine_54.endPoint(), SketchLine_55.startPoint())
337 SketchLine_56 = Sketch_4.addLine(28.5, -19.5, 30.4, -19.5)
338 SketchConstraintCoincidence_51 = Sketch_4.setCoincident(SketchLine_52.startPoint(), SketchLine_56.startPoint())
339 SketchLine_57 = Sketch_4.addLine(30.4, -19.5, 29.4, -18.5)
340 SketchConstraintCoincidence_52 = Sketch_4.setCoincident(SketchLine_56.endPoint(), SketchLine_57.startPoint())
341 SketchLine_58 = Sketch_4.addLine(29.4, -18.5, 29.4, -12.5)
342 SketchConstraintCoincidence_53 = Sketch_4.setCoincident(SketchLine_57.endPoint(), SketchLine_58.startPoint())
343 SketchArc_2 = Sketch_4.addArc(27.95, -12.5, 29.4, -12.5, 29, -11.5, False)
344 SketchConstraintCoincidence_54 = Sketch_4.setCoincident(SketchLine_58.endPoint(), SketchArc_2.startPoint())
345 SketchConstraintCoincidence_55 = Sketch_4.setCoincident(SketchLine_55.endPoint(), SketchArc_2.endPoint())
346 SketchConstraintVertical_15 = Sketch_4.setVertical(SketchLine_52.result())
347 SketchConstraintVertical_16 = Sketch_4.setVertical(SketchLine_55.result())
348 SketchConstraintVertical_17 = Sketch_4.setVertical(SketchLine_58.result())
349 SketchConstraintHorizontal_11 = Sketch_4.setHorizontal(SketchLine_56.result())
350 SketchProjection_13 = Sketch_4.addProjection(model.selection("VERTEX", "Sketch_1/Vertex-SketchLine_24s-SketchLine_23e"), False)
351 SketchPoint_4 = SketchProjection_13.createdFeature()
352 SketchConstraintDistanceHorizontal_17 = Sketch_4.setHorizontalDistance(SketchAPI_Point(SketchPoint_4).coordinates(), SketchLine_52.endPoint(), "Drill2_Loc")
353 SketchConstraintDistanceHorizontal_18 = Sketch_4.setHorizontalDistance(SketchLine_54.startPoint(), SketchLine_54.endPoint(), "Drill2_InnerRadius")
354 SketchProjection_14 = Sketch_4.addProjection(model.selection("EDGE", "Sketch_1/Edge-SketchLine_20"), False)
355 SketchLine_59 = SketchProjection_14.createdFeature()
356 SketchConstraintAngle_6 = Sketch_4.setAngle(SketchLine_57.result(), SketchLine_56.result(), 45)
357 SketchConstraintMirror_2 = Sketch_4.addMirror(SketchLine_53.result(), [SketchLine_59.result()])
358 [SketchLine_60] = SketchConstraintMirror_2.mirrored()
359 SketchLine_60.setAuxiliary(True)
360 SketchConstraintDistance_12 = Sketch_4.setDistance(SketchArc_2.endPoint(), SketchLine_60.result(), "Drill2_DepthMax", True)
361 SketchConstraintDistance_13 = Sketch_4.setDistance(SketchLine_58.endPoint(), SketchLine_60.result(), "Drill2_DepthMin", True)
362 SketchConstraintDistance_14 = Sketch_4.setDistance(SketchLine_57.endPoint(), SketchLine_60.result(), 0.5, True)
363 SketchConstraintTangent_3 = Sketch_4.setTangent(SketchLine_58.result(), SketchArc_2.results()[1])
364 SketchPoint_5 = Sketch_4.addPoint(29.9, -19)
365 SketchConstraintCoincidence_56 = Sketch_4.setCoincident(SketchPoint_5.coordinates(), SketchLine_60.result())
366 SketchConstraintCoincidence_57 = Sketch_4.setCoincident(SketchPoint_5.coordinates(), SketchLine_57.result())
367 SketchConstraintDistance_15 = Sketch_4.setDistance(SketchPoint_5.coordinates(), SketchLine_52.result(), "Drill2_Radius", True)
368 SketchConstraintDistanceVertical_6 = Sketch_4.setVerticalDistance(SketchLine_56.endPoint(), SketchPoint_5.coordinates(), 0.5)
369 model.do()
370 # check Sketch_4
371 model.checkSketch(Sketch_4, 0)
372
373 RevolutionCut_1 = model.addRevolutionCut(Part_1_doc, [model.selection("FACE", "Sketch_4/Face-SketchLine_52r-SketchLine_54r-SketchLine_55r-SketchLine_56f-SketchLine_57f-SketchLine_58f-SketchArc_2_2f")], model.selection("EDGE", "Sketch_4/Edge-SketchLine_52"), 360, 0, [model.selection("SOLID", "ExtrusionCut_2_1")])
374 # check RevolutionCut_1
375 model.testNbResults(RevolutionCut_1, 1)
376 model.testNbSubResults(RevolutionCut_1, [0])
377 model.testNbSubShapes(RevolutionCut_1, GeomAPI_Shape.SOLID, [1])
378 model.testNbSubShapes(RevolutionCut_1, GeomAPI_Shape.FACE, [59])
379 model.testNbSubShapes(RevolutionCut_1, GeomAPI_Shape.EDGE, [242])
380 model.testNbSubShapes(RevolutionCut_1, GeomAPI_Shape.VERTEX, [484])
381 model.testResultsVolumes(RevolutionCut_1, [28297.246041844206047244369983673])
382
383 RevolutionCut_2 = model.addRevolutionCut(Part_1_doc, [], model.selection("EDGE", "PartSet/OX"), 360, 0, [model.selection("SOLID", "RevolutionCut_1_1")])
384 Sketch_5 = model.addSketch(Part_1_doc, model.standardPlane("XOY"))
385 SketchLine_61 = Sketch_5.addLine(63.5, 10.5, 64, 10.5)
386 SketchLine_61.setAuxiliary(True)
387 SketchProjection_15 = Sketch_5.addProjection(model.selection("EDGE", "Sketch_1/Edge-SketchLine_7"), False)
388 SketchLine_62 = SketchProjection_15.createdFeature()
389 SketchConstraintCoincidence_58 = Sketch_5.setCoincident(SketchLine_61.startPoint(), SketchLine_62.result())
390 SketchConstraintCoincidence_59 = Sketch_5.setCoincident(SketchAPI_Line(SketchLine_62).endPoint(), SketchLine_61.endPoint())
391 SketchLine_63 = Sketch_5.addLine(64.25, 10.25, 64.25, 11.25)
392 SketchLine_64 = Sketch_5.addLine(64.25, 11.25, 63.25, 10.25)
393 SketchConstraintCoincidence_60 = Sketch_5.setCoincident(SketchLine_63.endPoint(), SketchLine_64.startPoint())
394 SketchConstraintLength_3 = Sketch_5.setLength(SketchLine_61.result(), "Chamfer")
395 SketchConstraintCoincidence_61 = Sketch_5.setCoincident(SketchLine_61.startPoint(), SketchLine_64.result())
396 SketchLine_65 = Sketch_5.addLine(63.25, 10.25, 64.25, 10.25)
397 SketchConstraintCoincidence_62 = Sketch_5.setCoincident(SketchLine_64.endPoint(), SketchLine_65.startPoint())
398 SketchConstraintCoincidence_63 = Sketch_5.setCoincident(SketchLine_63.startPoint(), SketchLine_65.endPoint())
399 SketchConstraintEqual_2 = Sketch_5.setEqual(SketchLine_65.result(), SketchLine_63.result())
400 SketchConstraintVertical_18 = Sketch_5.setVertical(SketchLine_63.result())
401 SketchConstraintHorizontal_12 = Sketch_5.setHorizontal(SketchLine_65.result())
402 SketchConstraintDistanceVertical_7 = Sketch_5.setVerticalDistance(SketchLine_65.startPoint(), SketchLine_61.startPoint(), "Chamfer/2")
403 SketchConstraintDistanceVertical_8 = Sketch_5.setVerticalDistance(SketchLine_61.startPoint(), SketchLine_63.endPoint(), "Chamfer*1.5")
404 model.do()
405 RevolutionCut_2.setNestedSketch(Sketch_5)
406 # check Sketch_5
407 model.checkSketch(Sketch_5, 0)
408 # check RevolutionCut_2
409 model.testNbResults(RevolutionCut_2, 1)
410 model.testNbSubResults(RevolutionCut_2, [0])
411 model.testNbSubShapes(RevolutionCut_2, GeomAPI_Shape.SOLID, [1])
412 model.testNbSubShapes(RevolutionCut_2, GeomAPI_Shape.FACE, [60])
413 model.testNbSubShapes(RevolutionCut_2, GeomAPI_Shape.EDGE, [246])
414 model.testNbSubShapes(RevolutionCut_2, GeomAPI_Shape.VERTEX, [492])
415 model.testResultsVolumes(RevolutionCut_2, [28288.868184623894194373860955238])
416
417 Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/XOY"), 0, False)
418 Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "RevolutionCut_2_1"), model.selection("FACE", "Plane_2")])
419 # check Partition_1
420 model.testNbResults(Partition_1, 1)
421 model.testNbSubResults(Partition_1, [2])
422 model.testNbSubShapes(Partition_1, GeomAPI_Shape.SOLID, [2])
423 model.testNbSubShapes(Partition_1, GeomAPI_Shape.FACE, [127])
424 model.testNbSubShapes(Partition_1, GeomAPI_Shape.EDGE, [738])
425 model.testNbSubShapes(Partition_1, GeomAPI_Shape.VERTEX, [1476])
426 model.testResultsVolumes(Partition_1, [28288.886256640704232268035411835])
427
428 Result = model.addRemoveSubShapes(Part_1_doc, model.selection("COMPSOLID", "Partition_1_1"))
429 Result.setSubShapesToRemove([model.selection("SOLID", "Partition_1_1_2")])
430 Result.result().setName("Plug")
431 # check Remove_SubShapes_1
432 model.testNbResults(Result, 1)
433 model.testNbSubResults(Result, [0])
434 model.testNbSubShapes(Result, GeomAPI_Shape.SOLID, [1])
435 model.testNbSubShapes(Result, GeomAPI_Shape.FACE, [63])
436 model.testNbSubShapes(Result, GeomAPI_Shape.EDGE, [366])
437 model.testNbSubShapes(Result, GeomAPI_Shape.VERTEX, [732])
438 model.testResultsVolumes(Result, [14144.443128843522572424262762070])
439
440 Group_1 = model.addGroup(Part_1_doc, [model.selection("FACE", "Plug/Modified_Face_3_1"), model.selection("FACE", "Plug/Modified_Face_5_1"), model.selection("FACE", "Plug/Modified_Face_46_1"), model.selection("FACE", "Plug/Modified_Face_48_1")])
441 Group_1.result().setColor(68, 68, 68)
442 # check Group_1
443 model.checkGroup(Group_1, GeomAPI_Shape.FACE)
444
445 model.do()
446
447 # change parameters of the model
448 Param_Width.setValue(100)
449 model.do()
450 model.testNbResults(Result, 1)
451 model.testNbSubResults(Result, [0])
452 model.testNbSubShapes(Result, GeomAPI_Shape.SOLID, [1])
453 model.testNbSubShapes(Result, GeomAPI_Shape.FACE, [63])
454 model.testNbSubShapes(Result, GeomAPI_Shape.EDGE, [364])
455 model.testNbSubShapes(Result, GeomAPI_Shape.VERTEX, [728])
456 model.testResultsVolumes(Result, [26613.145838412528974004089832306])
457
458 # do small steps in parameter here to avoid "conflicting constraints" message coming from PlaneGCS
459 Param_Depth.setValue(40)
460 model.do()
461 Param_Depth.setValue(50)
462 model.do()
463 Param_Depth.setValue(55)
464 model.do()
465 model.testNbResults(Result, 1)
466 model.testNbSubResults(Result, [0])
467 model.testNbSubShapes(Result, GeomAPI_Shape.SOLID, [1])
468 model.testNbSubShapes(Result, GeomAPI_Shape.FACE, [63])
469 model.testNbSubShapes(Result, GeomAPI_Shape.EDGE, [364])
470 model.testNbSubShapes(Result, GeomAPI_Shape.VERTEX, [728])
471 model.testResultsVolumes(Result, [22968.704503291784931207075715065])
472
473 Param_Drill1Loc.setValue(15)
474 model.do()
475 model.testNbResults(Result, 1)
476 model.testNbSubResults(Result, [0])
477 model.testNbSubShapes(Result, GeomAPI_Shape.SOLID, [1])
478 model.testNbSubShapes(Result, GeomAPI_Shape.FACE, [63])
479 model.testNbSubShapes(Result, GeomAPI_Shape.EDGE, [364])
480 model.testNbSubShapes(Result, GeomAPI_Shape.VERTEX, [728])
481 model.testResultsVolumes(Result, [22969.259323538735770853236317635])
482
483 Param_Drill1Holder.setValue(16)
484 model.do()
485 model.testNbSubResults(Result, [0])
486 model.testNbSubShapes(Result, GeomAPI_Shape.SOLID, [1])
487 model.testNbSubShapes(Result, GeomAPI_Shape.FACE, [63])
488 model.testNbSubShapes(Result, GeomAPI_Shape.EDGE, [364])
489 model.testNbSubShapes(Result, GeomAPI_Shape.VERTEX, [728])
490 model.testResultsVolumes(Result, [22969.553506208951148437336087227])
491
492 Param_Drill2Loc.setValue(7.5)
493 model.do()
494 model.testNbResults(Result, 1)
495 model.testNbSubResults(Result, [0])
496 model.testNbSubShapes(Result, GeomAPI_Shape.SOLID, [1])
497 model.testNbSubShapes(Result, GeomAPI_Shape.FACE, [63])
498 model.testNbSubShapes(Result, GeomAPI_Shape.EDGE, [364])
499 model.testNbSubShapes(Result, GeomAPI_Shape.VERTEX, [728])
500 model.testResultsVolumes(Result, [22969.986144881491782143712043762])
501
502 Param_Drill2Radius.setValue(1.9)
503 model.do()
504 model.testNbResults(Result, 1)
505 model.testNbSubResults(Result, [0])
506 model.testNbSubShapes(Result, GeomAPI_Shape.SOLID, [1])
507 model.testNbSubShapes(Result, GeomAPI_Shape.FACE, [63])
508 model.testNbSubShapes(Result, GeomAPI_Shape.EDGE, [364])
509 model.testNbSubShapes(Result, GeomAPI_Shape.VERTEX, [728])
510 model.testResultsVolumes(Result, [22956.808010807682876475155353546])
511
512 Param_Fillet1.setValue(3)
513 model.do()
514 model.testNbResults(Result, 1)
515 model.testNbSubResults(Result, [0])
516 model.testNbSubShapes(Result, GeomAPI_Shape.SOLID, [1])
517 model.testNbSubShapes(Result, GeomAPI_Shape.FACE, [63])
518 model.testNbSubShapes(Result, GeomAPI_Shape.EDGE, [364])
519 model.testNbSubShapes(Result, GeomAPI_Shape.VERTEX, [728])
520 model.testResultsVolumes(Result, [23373.503259112552768783643841743])
521
522 model.checkGroup(Group_1, GeomAPI_Shape.FACE)
523
524 model.end()
525
526 assert(model.checkPythonDump())