1 # Copyright (C) 2020 CEA/DEN, EDF R&D
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 from SketchAPI import *
23 from salome.shaper import model
26 partSet = model.moduleDocument()
27 Part_1 = model.addPart(partSet)
28 Part_1_doc = Part_1.document()
30 model.addParameter(Part_1_doc, "size_x", "150")
31 ParamSize = model.addParameter(Part_1_doc, "size_y", "180")
32 model.addParameter(Part_1_doc, "size_z", "5")
33 model.addParameter(Part_1_doc, "chamfer", "0.8")
34 model.addParameter(Part_1_doc, "thickness", "4")
36 Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
37 SketchProjection_1 = Sketch_1.addProjection(model.selection("EDGE", "PartSet/OY"), False)
38 SketchLine_1 = SketchProjection_1.createdFeature()
39 SketchArc_1 = Sketch_1.addArc(0, -145, 0, 30, 50, 22.70509831248424, True)
40 SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.result(), SketchArc_1.startPoint())
41 SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchArc_1.center(), SketchLine_1.result())
42 SketchConstraintDistance_1 = Sketch_1.setDistance(SketchArc_1.center(), SketchAPI_Line(SketchLine_1).startPoint(), "size_y-35", True)
43 SketchConstraintRadius_1 = Sketch_1.setRadius(SketchArc_1.results()[1], "size_y-5")
44 SketchArc_2 = Sketch_1.addArc(47.42857142857143, 14.08026468498505, 50, 22.70509831248424, 56.4024789026646, 13.39544014803082, True)
45 SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchArc_1.endPoint(), SketchArc_2.startPoint())
46 SketchConstraintTangent_1 = Sketch_1.setTangent(SketchArc_1.results()[1], SketchArc_2.results()[1])
47 SketchConstraintRadius_2 = Sketch_1.setRadius(SketchArc_2.results()[1], 9)
48 SketchArc_3 = Sketch_1.addArc(66.37348720721259, 12.63452399585945, 56.4024789026646, 13.39544014803082, 65.54400934016748, 2.668985050670266, False)
49 SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchArc_2.endPoint(), SketchArc_3.startPoint())
50 SketchConstraintTangent_2 = Sketch_1.setTangent(SketchArc_2.results()[1], SketchArc_3.results()[1])
51 SketchConstraintRadius_3 = Sketch_1.setRadius(SketchArc_3.results()[1], 10)
52 SketchArc_4 = Sketch_1.addArc(64.79747925982687, -6.3, 65.54400934016748, 2.668985050670266, 73.72335126899428, -5.147260273972602, True)
53 SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchArc_3.endPoint(), SketchArc_4.startPoint())
54 SketchConstraintTangent_3 = Sketch_1.setTangent(SketchArc_3.results()[1], SketchArc_4.results()[1])
55 SketchConstraintRadius_4 = Sketch_1.setRadius(SketchArc_4.results()[1], 9)
56 SketchArc_5 = Sketch_1.addArc(-80, -25, 73.72335126899428, -5.147260273972602, 28.47740289468357, -135.7142857142857, True)
57 SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchArc_4.endPoint(), SketchArc_5.startPoint())
58 SketchConstraintTangent_4 = Sketch_1.setTangent(SketchArc_4.results()[1], SketchArc_5.results()[1])
59 SketchConstraintRadius_5 = Sketch_1.setRadius(SketchArc_5.results()[1], "size_x+5")
60 SketchArc_6 = Sketch_1.addArc(32.67652816802617, -140, 28.47740289468357, -135.7142857142857, 36.96224245374191, -135.8008747266572, False)
61 SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchArc_5.endPoint(), SketchArc_6.startPoint())
62 SketchConstraintTangent_5 = Sketch_1.setTangent(SketchArc_5.results()[1], SketchArc_6.results()[1])
63 SketchConstraintRadius_6 = Sketch_1.setRadius(SketchArc_6.results()[1], 6)
64 SketchArc_7 = Sketch_1.addArc(38.39081388227633, -134.4011663021575, 36.96224245374191, -135.8008747266572, 39.81938531083141, -133.0014578776889, True)
65 SketchConstraintCoincidence_8 = Sketch_1.setCoincident(SketchArc_6.endPoint(), SketchArc_7.startPoint())
66 SketchConstraintTangent_6 = Sketch_1.setTangent(SketchArc_6.results()[1], SketchArc_7.results()[1])
67 SketchConstraintRadius_7 = Sketch_1.setRadius(SketchArc_7.results()[1], "thickness/2")
68 SketchArc_8 = Sketch_1.addArc(32.67652816802617, -140, 39.81938531083141, -133.0014578776889, 25.67798604578851, -132.8571428571429, True)
69 SketchConstraintCoincidence_9 = Sketch_1.setCoincident(SketchArc_7.endPoint(), SketchArc_8.startPoint())
70 SketchConstraintTangent_7 = Sketch_1.setTangent(SketchArc_7.results()[1], SketchArc_8.results()[1])
71 SketchConstraintCoincidence_10 = Sketch_1.setCoincident(SketchArc_8.center(), SketchArc_6.center())
72 SketchArc_9 = Sketch_1.addArc(-80, -25, 25.67798604578851, -132.8571428571429, 69.75629704269767, -5.659589041095889, False)
73 SketchConstraintCoincidence_11 = Sketch_1.setCoincident(SketchArc_8.endPoint(), SketchArc_9.startPoint())
74 SketchConstraintTangent_8 = Sketch_1.setTangent(SketchArc_8.results()[1], SketchArc_9.results()[1])
75 SketchConstraintCoincidence_12 = Sketch_1.setCoincident(SketchArc_9.center(), SketchArc_5.center())
76 SketchArc_10 = Sketch_1.addArc(64.79747925982687, -6.3, 69.75629704269767, -5.659589041095889, 65.21221819334943, -1.317230527405396, False)
77 SketchConstraintCoincidence_13 = Sketch_1.setCoincident(SketchArc_9.endPoint(), SketchArc_10.startPoint())
78 SketchConstraintTangent_9 = Sketch_1.setTangent(SketchArc_9.results()[1], SketchArc_10.results()[1])
79 SketchConstraintCoincidence_14 = Sketch_1.setCoincident(SketchArc_4.center(), SketchArc_10.center())
80 SketchArc_11 = Sketch_1.addArc(66.37348720721259, 12.63452399585945, 65.21221819334943, -1.317230527405396, 52.41407558084543, 13.69980660889937, True)
81 SketchConstraintCoincidence_15 = Sketch_1.setCoincident(SketchArc_10.endPoint(), SketchArc_11.startPoint())
82 SketchConstraintTangent_10 = Sketch_1.setTangent(SketchArc_10.results()[1], SketchArc_11.results()[1])
83 SketchConstraintCoincidence_16 = Sketch_1.setCoincident(SketchArc_11.center(), SketchArc_3.center())
84 SketchArc_12 = Sketch_1.addArc(47.42857142857143, 14.08026468498505, 52.41407558084543, 13.69980660889937, 52.31556879671711, 15.13726833859206, False)
85 SketchConstraintCoincidence_17 = Sketch_1.setCoincident(SketchArc_11.endPoint(), SketchArc_12.startPoint())
86 SketchConstraintTangent_11 = Sketch_1.setTangent(SketchArc_11.results()[1], SketchArc_12.results()[1])
87 SketchConstraintCoincidence_18 = Sketch_1.setCoincident(SketchArc_12.center(), SketchArc_2.center())
88 SketchArc_13 = Sketch_1.addArc(51.92460900726545, 15.0527080463035, 52.31556879671711, 15.13726833859206, 51.52598744945789, 15.0858871609853, False)
89 SketchConstraintCoincidence_19 = Sketch_1.setCoincident(SketchArc_12.endPoint(), SketchArc_13.startPoint())
90 SketchConstraintTangent_12 = Sketch_1.setTangent(SketchArc_12.results()[1], SketchArc_13.results()[1])
91 SketchConstraintRadius_8 = Sketch_1.setRadius(SketchArc_13.results()[1], 0.4)
92 SketchLine_2 = Sketch_1.addLine(51.52598744945789, 15.0858871609853, 50.80630122186367, 6.439410365943716)
93 SketchConstraintCoincidence_20 = Sketch_1.setCoincident(SketchArc_13.endPoint(), SketchLine_2.startPoint())
94 SketchConstraintTangent_13 = Sketch_1.setTangent(SketchLine_2.result(), SketchArc_13.results()[1])
95 SketchArc_14 = Sketch_1.addArc(47.81663953830692, 6.68825372605725, 50.80630122186367, 6.439410365943716, 47.56779617819338, 3.698592042500495, True)
96 SketchConstraintCoincidence_21 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchArc_14.startPoint())
97 SketchConstraintTangent_14 = Sketch_1.setTangent(SketchLine_2.result(), SketchArc_14.results()[1])
98 SketchConstraintRadius_9 = Sketch_1.setRadius(SketchArc_14.results()[1], 3)
99 SketchArc_15 = Sketch_1.addArc(47.73369175160241, 5.691699831538332, 47.56779617819338, 3.698592042500495, 46.66684983267853, 4, True)
100 SketchConstraintCoincidence_22 = Sketch_1.setCoincident(SketchArc_14.endPoint(), SketchArc_15.startPoint())
101 SketchConstraintTangent_15 = Sketch_1.setTangent(SketchArc_14.results()[1], SketchArc_15.results()[1])
102 SketchConstraintRadius_10 = Sketch_1.setRadius(SketchArc_15.results()[1], 2)
103 SketchArc_16 = Sketch_1.addArc(0, -70, 46.66684983267853, 4, 0, 17.48596957973185, False)
104 SketchConstraintCoincidence_23 = Sketch_1.setCoincident(SketchArc_15.endPoint(), SketchArc_16.startPoint())
105 SketchConstraintTangent_16 = Sketch_1.setTangent(SketchArc_15.results()[1], SketchArc_16.results()[1])
106 SketchConstraintCoincidence_24 = Sketch_1.setCoincident(SketchArc_16.endPoint(), SketchLine_1.result())
107 SketchConstraintCoincidence_25 = Sketch_1.setCoincident(SketchArc_16.center(), SketchLine_1.result())
108 SketchConstraintDistance_2 = Sketch_1.setDistance(SketchArc_16.center(), SketchAPI_Line(SketchLine_1).startPoint(), "size_y/2-20", True)
109 SketchLine_3 = Sketch_1.addLine(64.79747925982687, -6.3, 66.37348720721259, 12.63452399585945)
110 SketchLine_3.setAuxiliary(True)
111 SketchConstraintCoincidence_26 = Sketch_1.setCoincident(SketchArc_4.center(), SketchLine_3.startPoint())
112 SketchConstraintCoincidence_27 = Sketch_1.setCoincident(SketchArc_3.center(), SketchLine_3.endPoint())
113 SketchLine_4 = Sketch_1.addLine(47.73369175160241, 5.691699831538332, 47.81663953830692, 6.68825372605725)
114 SketchLine_4.setAuxiliary(True)
115 SketchConstraintCoincidence_28 = Sketch_1.setCoincident(SketchArc_15.center(), SketchLine_4.startPoint())
116 SketchConstraintCoincidence_29 = Sketch_1.setCoincident(SketchArc_14.center(), SketchLine_4.endPoint())
117 SketchConstraintParallel_1 = Sketch_1.setParallel(SketchLine_2.result(), SketchLine_3.result())
118 SketchConstraintParallel_2 = Sketch_1.setParallel(SketchLine_2.result(), SketchLine_4.result())
119 SketchConstraintDistanceHorizontal_1 = Sketch_1.setHorizontalDistance(SketchArc_5.center(), SketchAPI_Line(SketchLine_1).startPoint(), "size_x/2+5")
120 SketchConstraintDistanceVertical_1 = Sketch_1.setVerticalDistance(SketchArc_5.center(), SketchAPI_Line(SketchLine_1).startPoint(), 25)
121 SketchConstraintDistance_3 = Sketch_1.setDistance(SketchArc_11.endPoint(), SketchLine_2.result(), 1, True)
122 SketchConstraintDistanceVertical_2 = Sketch_1.setVerticalDistance(SketchArc_8.center(), SketchAPI_Line(SketchLine_1).startPoint(), "size_y-40")
123 SketchConstraintDistance_4 = Sketch_1.setDistance(SketchArc_1.endPoint(), SketchLine_1.result(), 50, True)
124 SketchLine_5 = Sketch_1.addLine(28.47740289468357, -135.7142857142857, 32.67652816802617, -140)
125 SketchLine_5.setAuxiliary(True)
126 SketchConstraintCoincidence_30 = Sketch_1.setCoincident(SketchArc_5.endPoint(), SketchLine_5.startPoint())
127 SketchConstraintCoincidence_31 = Sketch_1.setCoincident(SketchArc_6.center(), SketchLine_5.endPoint())
128 SketchLine_6 = Sketch_1.addLine(32.67652816802617, -140, 36.96224245374191, -135.8008747266572)
129 SketchLine_6.setAuxiliary(True)
130 SketchConstraintCoincidence_32 = Sketch_1.setCoincident(SketchArc_6.center(), SketchLine_6.startPoint())
131 SketchConstraintCoincidence_33 = Sketch_1.setCoincident(SketchArc_6.endPoint(), SketchLine_6.endPoint())
132 SketchConstraintPerpendicular_1 = Sketch_1.setPerpendicular(SketchLine_5.result(), SketchLine_6.result())
133 SketchConstraintDistanceVertical_3 = Sketch_1.setVerticalDistance(SketchAPI_Line(SketchLine_1).startPoint(), SketchArc_16.startPoint(), 4)
134 SketchConstraintDistanceVertical_4 = Sketch_1.setVerticalDistance(SketchArc_4.center(), SketchAPI_Line(SketchLine_1).startPoint(), 6.3)
135 SketchConstraintMirror_1_objects = [SketchArc_1.results()[1], SketchArc_2.results()[1], SketchArc_3.results()[1], SketchArc_4.results()[1], SketchArc_5.results()[1], SketchArc_6.results()[1], SketchArc_7.results()[1], SketchArc_8.results()[1], SketchArc_9.results()[1], SketchArc_10.results()[1], SketchArc_11.results()[1], SketchArc_12.results()[1], SketchArc_13.results()[1], SketchLine_2.result(), SketchArc_14.results()[1], SketchArc_15.results()[1], SketchArc_16.results()[1]]
136 SketchConstraintMirror_1 = Sketch_1.addMirror(SketchLine_1.result(), SketchConstraintMirror_1_objects)
137 [SketchArc_17, SketchArc_18, SketchArc_19, SketchArc_20, SketchArc_21, SketchArc_22, SketchArc_23, SketchArc_24, SketchArc_25, SketchArc_26, SketchArc_27, SketchArc_28, SketchArc_29, SketchLine_7, SketchArc_30, SketchArc_31, SketchArc_32] = SketchConstraintMirror_1.mirrored()
138 SketchLine_8 = Sketch_1.addLine(0, -145, 31.89121696112821, 27.06960882369163)
139 SketchLine_8.setName("SketchLine_43")
140 SketchLine_8.result().setName("SketchLine_43")
141 SketchLine_8.setAuxiliary(True)
142 SketchConstraintCoincidence_34 = Sketch_1.setCoincident(SketchArc_1.center(), SketchLine_8.startPoint())
143 SketchConstraintCoincidence_35 = Sketch_1.setCoincident(SketchLine_8.endPoint(), SketchArc_1.results()[1])
144 SketchConstraintAngle_1 = Sketch_1.setAngle(SketchLine_8.result(), SketchLine_1.result(), 10.5, type = "Direct")
146 Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_1")], model.selection(), "size_z", 0)
148 model.testNbResults(Extrusion_1, 1)
149 model.testNbSubResults(Extrusion_1, [0])
150 model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.SOLID, [1])
151 model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.FACE, [36])
152 model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.EDGE, [204])
153 model.testNbSubShapes(Extrusion_1, GeomAPI_Shape.VERTEX, [408])
154 model.testResultsVolumes(Extrusion_1, [16403.0029])
156 Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
157 SketchProjection_2 = Sketch_2.addProjection(model.selection("EDGE", "PartSet/OY"), False)
158 SketchLine_9 = SketchProjection_2.createdFeature()
159 SketchLine_9.setName("SketchLine_8")
160 SketchLine_9.result().setName("SketchLine_8")
161 SketchArc_33 = Sketch_2.addArc(0, -145, 0, 26, 48.1858267258401, 19.0704912613701, True)
162 SketchConstraintCoincidence_36 = Sketch_2.setCoincident(SketchLine_9.result(), SketchArc_33.startPoint())
163 SketchProjection_3 = Sketch_2.addProjection(model.selection("VERTEX", "Sketch_1/SketchArc_1_2__cc"), False)
164 SketchPoint_1 = SketchProjection_3.createdFeature()
165 SketchConstraintCoincidence_37 = Sketch_2.setCoincident(SketchAPI_Point(SketchPoint_1).coordinates(), SketchArc_33.center())
166 SketchProjection_4 = Sketch_2.addProjection(model.selection("VERTEX", "Sketch_1/SketchArc_17_2_StartVertex"), False)
167 SketchPoint_2 = SketchProjection_4.createdFeature()
168 SketchConstraintDistance_5 = Sketch_2.setDistance(SketchArc_33.startPoint(), SketchAPI_Point(SketchPoint_2).coordinates(), 4, True)
169 SketchLine_10 = Sketch_2.addLine(48.1858267258401, 19.0704912613701, 49.7056919497355, 16.28668032699112)
170 SketchLine_10.setName("SketchLine_9")
171 SketchLine_10.result().setName("SketchLine_9")
172 SketchConstraintCoincidence_38 = Sketch_2.setCoincident(SketchArc_33.endPoint(), SketchLine_10.startPoint())
173 SketchArc_34 = Sketch_2.addArc(48.03804881864168, 15.3762044144511, 49.7056919497355, 16.28668032699112, 49.93150121822762, 15.21860361971252, True)
174 SketchConstraintCoincidence_39 = Sketch_2.setCoincident(SketchLine_10.endPoint(), SketchArc_34.startPoint())
175 SketchConstraintTangent_17 = Sketch_2.setTangent(SketchLine_10.result(), SketchArc_34.results()[1])
176 SketchLine_11 = Sketch_2.addLine(49.93150121822762, 15.21860361971252, 49.21181499063341, 6.57212682467093)
177 SketchLine_11.setName("SketchLine_10")
178 SketchLine_11.result().setName("SketchLine_10")
179 SketchConstraintCoincidence_40 = Sketch_2.setCoincident(SketchArc_34.endPoint(), SketchLine_11.startPoint())
180 SketchConstraintTangent_18 = Sketch_2.setTangent(SketchLine_11.result(), SketchArc_34.results()[1])
181 SketchProjection_5 = Sketch_2.addProjection(model.selection("EDGE", "Sketch_1/SketchLine_2"), False)
182 SketchLine_12 = SketchProjection_5.createdFeature()
183 SketchLine_12.setName("SketchLine_11")
184 SketchLine_12.result().setName("SketchLine_11")
185 SketchConstraintParallel_3 = Sketch_2.setParallel(SketchLine_12.result(), SketchLine_11.result())
186 SketchConstraintDistance_6 = Sketch_2.setDistance(SketchLine_11.startPoint(), SketchLine_12.result(), 1.6, True)
187 SketchArc_35 = Sketch_2.addArc(47.81663953830692, 6.68825372605725, 49.21181499063341, 6.57212682467093, 47.07590600961045, 5.500266419952984, True)
188 SketchConstraintCoincidence_41 = Sketch_2.setCoincident(SketchLine_11.endPoint(), SketchArc_35.startPoint())
189 SketchConstraintTangent_19 = Sketch_2.setTangent(SketchLine_11.result(), SketchArc_35.results()[1])
190 SketchProjection_6 = Sketch_2.addProjection(model.selection("VERTEX", "Sketch_1/SketchArc_14_2__cc"), False)
191 SketchPoint_3 = SketchProjection_6.createdFeature()
192 SketchConstraintCoincidence_42 = Sketch_2.setCoincident(SketchAPI_Point(SketchPoint_3).coordinates(), SketchArc_35.center())
193 SketchArc_36 = Sketch_2.addArc(0, -70, 47.07590600961045, 5.500266419952984, 0, 18.97432863534041, False)
194 SketchConstraintCoincidence_43 = Sketch_2.setCoincident(SketchArc_35.endPoint(), SketchArc_36.startPoint())
195 SketchConstraintTangent_20 = Sketch_2.setTangent(SketchArc_35.results()[1], SketchArc_36.results()[1])
196 SketchConstraintCoincidence_44 = Sketch_2.setCoincident(SketchArc_36.endPoint(), SketchLine_9.result())
197 SketchProjection_7 = Sketch_2.addProjection(model.selection("VERTEX", "Sketch_1/SketchArc_32_2__cc"), False)
198 SketchPoint_4 = SketchProjection_7.createdFeature()
199 SketchConstraintCoincidence_45 = Sketch_2.setCoincident(SketchAPI_Point(SketchPoint_4).coordinates(), SketchArc_36.center())
200 SketchLine_13 = Sketch_2.addLine(51.52598744945789, 15.0858871609853, 49.93150121822762, 15.21860361971252)
201 SketchLine_13.setName("SketchLine_12")
202 SketchLine_13.result().setName("SketchLine_12")
203 SketchLine_13.setAuxiliary(True)
204 SketchConstraintCoincidence_46 = Sketch_2.setCoincident(SketchAPI_Line(SketchLine_12).startPoint(), SketchLine_13.startPoint())
205 SketchConstraintCoincidence_47 = Sketch_2.setCoincident(SketchArc_34.endPoint(), SketchLine_13.endPoint())
206 SketchConstraintPerpendicular_2 = Sketch_2.setPerpendicular(SketchLine_11.result(), SketchLine_13.result())
207 SketchLine_14 = Sketch_2.addLine(0, 33.22217618290702, 48.1858267258401, 19.0704912613701)
208 SketchLine_14.setName("SketchLine_13")
209 SketchLine_14.result().setName("SketchLine_13")
210 SketchLine_14.setAuxiliary(True)
211 SketchConstraintCoincidence_48 = Sketch_2.setCoincident(SketchLine_14.startPoint(), SketchLine_9.result())
212 SketchConstraintCoincidence_49 = Sketch_2.setCoincident(SketchArc_33.endPoint(), SketchLine_14.endPoint())
213 SketchConstraintTangent_21 = Sketch_2.setTangent(SketchArc_33.results()[1], SketchLine_14.result())
214 SketchConstraintAngle_2 = Sketch_2.setAngle(SketchLine_14.result(), SketchLine_10.result(), 135, type = "Direct")
215 SketchConstraintRadius_11 = Sketch_2.setRadius(SketchArc_34.results()[1], 1.9)
216 SketchConstraintMirror_2_objects = [SketchArc_33.results()[1], SketchLine_10.result(), SketchArc_34.results()[1], SketchLine_11.result(), SketchArc_35.results()[1], SketchArc_36.results()[1]]
217 SketchConstraintMirror_2 = Sketch_2.addMirror(SketchLine_9.result(), SketchConstraintMirror_2_objects)
218 [SketchArc_37, SketchLine_15, SketchArc_38, SketchLine_16, SketchArc_39, SketchArc_40] = SketchConstraintMirror_2.mirrored()
219 SketchLine_16.setName("SketchLine_15")
220 SketchLine_16.result().setName("SketchLine_15")
221 SketchLine_15.setName("SketchLine_14")
222 SketchLine_15.result().setName("SketchLine_14")
224 ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("COMPOUND", "Sketch_2")], model.selection(), model.selection("FACE", "Extrusion_1_1/To_Face"), 0, model.selection("FACE", "Extrusion_1_1/To_Face"), 4.4, [model.selection("SOLID", "Extrusion_1_1")])
226 model.testNbResults(ExtrusionCut_1, 1)
227 model.testNbSubResults(ExtrusionCut_1, [0])
228 model.testNbSubShapes(ExtrusionCut_1, GeomAPI_Shape.SOLID, [1])
229 model.testNbSubShapes(ExtrusionCut_1, GeomAPI_Shape.FACE, [49])
230 model.testNbSubShapes(ExtrusionCut_1, GeomAPI_Shape.EDGE, [276])
231 model.testNbSubShapes(ExtrusionCut_1, GeomAPI_Shape.VERTEX, [552])
232 model.testResultsVolumes(ExtrusionCut_1, [12313.7939])
234 Chamfer_1 = model.addChamfer(Part_1_doc, [model.selection("FACE", "Extrusion_1_1/From_Face")], True, "chamfer", "chamfer", keepSubResults = True)
236 model.testNbResults(Chamfer_1, 1)
237 model.testNbSubResults(Chamfer_1, [0])
238 model.testNbSubShapes(Chamfer_1, GeomAPI_Shape.SOLID, [1])
239 model.testNbSubShapes(Chamfer_1, GeomAPI_Shape.FACE, [83])
240 model.testNbSubShapes(Chamfer_1, GeomAPI_Shape.EDGE, [412])
241 model.testNbSubShapes(Chamfer_1, GeomAPI_Shape.VERTEX, [824])
242 model.testResultsVolumes(Chamfer_1, [11962.2801])
244 Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/XOY"), "chamfer", True)
245 Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_1"))
246 SketchProjection_8 = Sketch_3.addProjection(model.selection("EDGE", "Sketch_1/SketchArc_12_2"), False)
247 SketchArc_41 = SketchProjection_8.createdFeature()
248 SketchArc_42 = Sketch_3.addArc(47.42857142857143, 14.08026468498505, 53.87940795452356, 15.47550950774626, 42.38734178332437, 18.34007731747046, False)
249 SketchConstraintCoincidence_50 = Sketch_3.setCoincident(SketchAPI_Arc(SketchArc_41).center(), SketchArc_42.center())
250 SketchConstraintCoincidence_50.setName("SketchConstraintCoincidence_48")
251 SketchLine_17 = Sketch_3.addLine(47.42857142857143, 14.08026468498505, 52.31556879671699, 15.13726833859203)
252 SketchLine_17.setName("SketchLine_16")
253 SketchLine_17.result().setName("SketchLine_16")
254 SketchLine_17.setAuxiliary(True)
255 SketchConstraintCoincidence_51 = Sketch_3.setCoincident(SketchAPI_Arc(SketchArc_41).center(), SketchLine_17.startPoint())
256 SketchConstraintCoincidence_52 = Sketch_3.setCoincident(SketchAPI_Arc(SketchArc_41).endPoint(), SketchLine_17.endPoint())
257 SketchConstraintCoincidence_53 = Sketch_3.setCoincident(SketchArc_42.startPoint(), SketchLine_17.result())
258 SketchConstraintDistance_7 = Sketch_3.setDistance(SketchLine_17.endPoint(), SketchArc_42.startPoint(), "2*chamfer", True)
259 SketchProjection_9 = Sketch_3.addProjection(model.selection("EDGE", "Sketch_2/SketchArc_34_2"), False)
260 SketchArc_43 = SketchProjection_9.createdFeature()
261 SketchArc_44 = Sketch_3.addArc(45.66073233717504, 15.57407945314024, 49.93150121822762, 15.21860361971246, 42.38734178332437, 18.34007731747046, False)
262 SketchProjection_10 = Sketch_3.addProjection(model.selection("EDGE", "Sketch_2/SketchLine_12"), False)
263 SketchLine_18 = SketchProjection_10.createdFeature()
264 SketchLine_18.setName("SketchLine_17")
265 SketchLine_18.result().setName("SketchLine_17")
266 SketchConstraintCoincidence_54 = Sketch_3.setCoincident(SketchArc_44.startPoint(), SketchLine_18.result())
267 SketchConstraintDistance_8 = Sketch_3.setDistance(SketchArc_44.startPoint(), SketchAPI_Line(SketchLine_18).startPoint(), "2*chamfer", True)
268 SketchLine_19 = Sketch_3.addLine(47.42857142857143, 14.08026468498505, 42.38734178332437, 18.34007731747046)
269 SketchLine_19.setName("SketchLine_18")
270 SketchLine_19.result().setName("SketchLine_18")
271 SketchLine_19.setAuxiliary(True)
272 SketchConstraintCoincidence_55 = Sketch_3.setCoincident(SketchAPI_Arc(SketchArc_41).center(), SketchLine_19.startPoint())
273 SketchConstraintCoincidence_56 = Sketch_3.setCoincident(SketchArc_42.endPoint(), SketchLine_19.endPoint())
274 SketchConstraintPerpendicular_3 = Sketch_3.setPerpendicular(SketchArc_44.results()[1], SketchLine_18.result())
275 SketchConstraintCoincidence_57 = Sketch_3.setCoincident(SketchArc_44.endPoint(), SketchLine_19.endPoint())
276 SketchLine_20 = Sketch_3.addLine(49.93150121822762, 15.21860361971252, 53.87940795452356, 15.47550950774626)
277 SketchLine_20.setName("SketchLine_22")
278 SketchLine_20.result().setName("SketchLine_22")
279 SketchConstraintCoincidence_58 = Sketch_3.setCoincident(SketchAPI_Arc(SketchArc_43).startPoint(), SketchLine_20.startPoint())
280 SketchConstraintCoincidence_59 = Sketch_3.setCoincident(SketchArc_42.startPoint(), SketchLine_20.endPoint())
281 SketchConstraintCoincidence_60 = Sketch_3.setCoincident(SketchArc_44.center(), SketchLine_19.result())
284 Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/XOY"), "2*chamfer", False)
285 Sketch_4 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_2"))
286 SketchProjection_11 = Sketch_4.addProjection(model.selection("EDGE", "Sketch_3/SketchArc_42_2"), False)
287 SketchArc_45 = SketchProjection_11.createdFeature()
288 SketchArc_46 = Sketch_4.addArc(47.42857142857143, 14.08026468498505, 51.5336492178137, 14.96814775401492, 44.22051619977783, 16.79105454202122, False)
289 SketchConstraintCoincidence_61 = Sketch_4.setCoincident(SketchAPI_Arc(SketchArc_45).center(), SketchArc_46.center())
290 SketchProjection_12 = Sketch_4.addProjection(model.selection("EDGE", "Sketch_3/SketchLine_16"), False)
291 SketchLine_21 = SketchProjection_12.createdFeature()
292 SketchLine_21.setName("SketchLine_19")
293 SketchLine_21.result().setName("SketchLine_19")
294 SketchProjection_13 = Sketch_4.addProjection(model.selection("EDGE", "Sketch_3/SketchLine_18"), False)
295 SketchLine_22 = SketchProjection_13.createdFeature()
296 SketchLine_22.setName("SketchLine_20")
297 SketchLine_22.result().setName("SketchLine_20")
298 SketchConstraintCoincidence_62 = Sketch_4.setCoincident(SketchArc_46.startPoint(), SketchLine_21.result())
299 SketchConstraintCoincidence_63 = Sketch_4.setCoincident(SketchArc_46.endPoint(), SketchLine_22.result())
300 SketchConstraintDistance_9 = Sketch_4.setDistance(SketchArc_46.startPoint(), SketchAPI_Arc(SketchArc_45).startPoint(), "3*chamfer", True)
301 SketchProjection_14 = Sketch_4.addProjection(model.selection("EDGE", "Sketch_3/SketchArc_44_2"), False)
302 SketchArc_47 = SketchProjection_14.createdFeature()
303 SketchArc_48 = Sketch_4.addArc(45.66073233717504, 15.57407945314024, 52.32323056507302, 15.01952893162158, 40.55416736687089, 19.8891000929197, False)
304 SketchConstraintCoincidence_64 = Sketch_4.setCoincident(SketchAPI_Arc(SketchArc_47).center(), SketchArc_48.center())
305 SketchLine_23 = Sketch_4.addLine(45.66073233717504, 15.57407945314024, 49.93150121822762, 15.21860361971246)
306 SketchLine_23.setName("SketchLine_21")
307 SketchLine_23.result().setName("SketchLine_21")
308 SketchLine_23.setAuxiliary(True)
309 SketchConstraintCoincidence_65 = Sketch_4.setCoincident(SketchAPI_Arc(SketchArc_47).center(), SketchLine_23.startPoint())
310 SketchConstraintCoincidence_66 = Sketch_4.setCoincident(SketchAPI_Arc(SketchArc_47).startPoint(), SketchLine_23.endPoint())
311 SketchConstraintCoincidence_67 = Sketch_4.setCoincident(SketchArc_48.startPoint(), SketchLine_23.result())
312 SketchConstraintCoincidence_68 = Sketch_4.setCoincident(SketchArc_48.endPoint(), SketchLine_22.result())
313 SketchConstraintDistance_10 = Sketch_4.setDistance(SketchLine_23.endPoint(), SketchArc_48.startPoint(), "3*chamfer", True)
316 Filling_1 = model.addFilling(Part_1_doc, [model.selection("EDGE", "Sketch_3/SketchArc_42_2"), model.selection("EDGE", "Sketch_4/SketchArc_46_2")])
317 Filling_2 = model.addFilling(Part_1_doc, [model.selection("EDGE", "Sketch_3/SketchArc_44_2"), model.selection("EDGE", "Sketch_4/SketchArc_48_2")])
318 Face_1 = model.addFace(Part_1_doc, [model.selection("FACE", "Sketch_3/Face-SketchArc_42_2f-SketchArc_44_2r-SketchLine_22f")])
320 Plane_6 = model.addPlane(Part_1_doc, model.selection("EDGE", "Sketch_3/SketchLine_22"), model.selection("VERTEX", "[Filling_2_1/Edge_0_1]e[Filling_2_1/Edge_0_4]e"), False)
321 Sketch_5 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_3"))
322 SketchProjection_15 = Sketch_5.addProjection(model.selection("EDGE", "Sketch_3/SketchLine_22"), True)
323 SketchLine_24 = SketchProjection_15.createdFeature()
324 SketchLine_24.setName("SketchLine_23")
325 SketchLine_24.result().setName("SketchLine_23")
326 SketchProjection_16 = Sketch_5.addProjection(model.selection("EDGE", "Filling_1_1/Edge_0_1"), False)
327 SketchBSpline_1 = SketchProjection_16.createdFeature()
328 SketchProjection_17 = Sketch_5.addProjection(model.selection("EDGE", "Filling_2_1/Edge_0_1"), False)
329 SketchBSpline_2 = SketchProjection_17.createdFeature()
330 SketchLine_25 = Sketch_5.addLine(54.7440877920758, -3.054064947639794, 52.78524259618538, -1.013740096412265)
331 SketchLine_25.setName("SketchLine_24")
332 SketchLine_25.result().setName("SketchLine_24")
333 SketchConstraintCoincidence_69 = Sketch_5.setCoincident(SketchAPI_Line(SketchLine_24).endPoint(), SketchLine_25.startPoint())
334 SketchLine_26 = Sketch_5.addLine(52.78524259618538, -1.013740096412265, 50.78800926284204, -3.016502941130004)
335 SketchLine_26.setName("SketchLine_25")
336 SketchLine_26.result().setName("SketchLine_25")
337 SketchConstraintCoincidence_70 = Sketch_5.setCoincident(SketchLine_25.endPoint(), SketchLine_26.startPoint())
338 SketchConstraintCoincidence_71 = Sketch_5.setCoincident(SketchAPI_Line(SketchLine_24).startPoint(), SketchLine_26.endPoint())
339 SketchConstraintCoincidence_72 = Sketch_5.setCoincident(SketchLine_26.startPoint(), SketchBSpline_1.result())
340 SketchConstraintCoincidence_73 = Sketch_5.setCoincident(SketchLine_26.startPoint(), SketchBSpline_2.result())
342 Face_2 = model.addFace(Part_1_doc, [model.selection("FACE", "Sketch_5/Face-SketchProjection_15r-SketchLine_24f-SketchLine_25f")])
344 Solid_1_objects = [model.selection("FACE", "Filling_1_1"), model.selection("FACE", "Filling_2_1"), model.selection("FACE", "Face_1_1"), model.selection("FACE", "Face_2_1")]
345 Solid_1 = model.addSolid(Part_1_doc, Solid_1_objects)
347 model.testNbResults(Solid_1, 1)
348 model.testNbSubResults(Solid_1, [0])
349 model.testNbSubShapes(Solid_1, GeomAPI_Shape.SOLID, [1])
350 model.testNbSubShapes(Solid_1, GeomAPI_Shape.FACE, [4])
351 model.testNbSubShapes(Solid_1, GeomAPI_Shape.EDGE, [12])
352 model.testNbSubShapes(Solid_1, GeomAPI_Shape.VERTEX, [24])
353 model.testResultsVolumes(Solid_1, [13.6834876])
355 Fillet_1 = model.addFillet(Part_1_doc, [model.selection("EDGE", "[Solid_1_1/Modified_Face&Filling_1_1/Filling_1_1][Solid_1_1/Modified_Face&Filling_2_1/Filling_2_1]")], 0.4, keepSubResults = True)
357 model.testNbResults(Fillet_1, 1)
358 model.testNbSubResults(Fillet_1, [0])
359 model.testNbSubShapes(Fillet_1, GeomAPI_Shape.SOLID, [1])
360 model.testNbSubShapes(Fillet_1, GeomAPI_Shape.FACE, [5])
361 model.testNbSubShapes(Fillet_1, GeomAPI_Shape.EDGE, [18])
362 model.testNbSubShapes(Fillet_1, GeomAPI_Shape.VERTEX, [36])
363 model.testResultsVolumes(Fillet_1, [13.34526088678])
365 Symmetry_1 = model.addSymmetry(Part_1_doc, [model.selection("SOLID", "Fillet_1_1")], model.selection("FACE", "PartSet/YOZ"), keepOriginal = True, keepSubResults = True)
366 Cut_1 = model.addCut(Part_1_doc, [model.selection("SOLID", "Chamfer_1_1")], [model.selection("COMPOUND", "Symmetry_1_1")], keepSubResults = True)
368 model.testNbResults(Cut_1, 1)
369 model.testNbSubResults(Cut_1, [0])
370 model.testNbSubShapes(Cut_1, GeomAPI_Shape.SOLID, [1])
371 model.testNbSubShapes(Cut_1, GeomAPI_Shape.FACE, [87])
372 model.testNbSubShapes(Cut_1, GeomAPI_Shape.EDGE, [436])
373 model.testNbSubShapes(Cut_1, GeomAPI_Shape.VERTEX, [872])
374 model.testResultsVolumes(Cut_1, [11957.973])
376 Sketch_6 = model.addSketch(Part_1_doc, model.standardPlane("YOZ"))
377 SketchLine_27 = Sketch_6.addLine(-32, 0, -29, 0)
378 SketchLine_27.setName("SketchLine_26")
379 SketchLine_27.result().setName("SketchLine_26")
380 SketchLine_28 = Sketch_6.addLine(-29, 0, -28, 1)
381 SketchLine_28.setName("SketchLine_27")
382 SketchLine_28.result().setName("SketchLine_27")
383 SketchConstraintCoincidence_74 = Sketch_6.setCoincident(SketchLine_27.endPoint(), SketchLine_28.startPoint())
384 SketchLine_29 = Sketch_6.addLine(-28, 1, -28, 4)
385 SketchLine_29.setName("SketchLine_28")
386 SketchLine_29.result().setName("SketchLine_28")
387 SketchConstraintCoincidence_75 = Sketch_6.setCoincident(SketchLine_28.endPoint(), SketchLine_29.startPoint())
388 SketchConstraintVertical_1 = Sketch_6.setVertical(SketchLine_29.result())
389 SketchLine_30 = Sketch_6.addLine(-28, 4, -29, 5)
390 SketchLine_30.setName("SketchLine_29")
391 SketchLine_30.result().setName("SketchLine_29")
392 SketchConstraintCoincidence_76 = Sketch_6.setCoincident(SketchLine_29.endPoint(), SketchLine_30.startPoint())
393 SketchLine_31 = Sketch_6.addLine(-29, 5, -32, 5)
394 SketchLine_31.setName("SketchLine_30")
395 SketchLine_31.result().setName("SketchLine_30")
396 SketchConstraintCoincidence_77 = Sketch_6.setCoincident(SketchLine_30.endPoint(), SketchLine_31.startPoint())
397 SketchConstraintHorizontal_1 = Sketch_6.setHorizontal(SketchLine_31.result())
398 SketchLine_32 = Sketch_6.addLine(-32, 5, -33, 4)
399 SketchLine_32.setName("SketchLine_31")
400 SketchLine_32.result().setName("SketchLine_31")
401 SketchConstraintCoincidence_78 = Sketch_6.setCoincident(SketchLine_31.endPoint(), SketchLine_32.startPoint())
402 SketchLine_33 = Sketch_6.addLine(-33, 4, -33, 1)
403 SketchLine_33.setName("SketchLine_32")
404 SketchLine_33.result().setName("SketchLine_32")
405 SketchConstraintCoincidence_79 = Sketch_6.setCoincident(SketchLine_32.endPoint(), SketchLine_33.startPoint())
406 SketchConstraintVertical_2 = Sketch_6.setVertical(SketchLine_33.result())
407 SketchLine_34 = Sketch_6.addLine(-33, 1, -32, 0)
408 SketchLine_34.setName("SketchLine_33")
409 SketchLine_34.result().setName("SketchLine_33")
410 SketchConstraintCoincidence_80 = Sketch_6.setCoincident(SketchLine_33.endPoint(), SketchLine_34.startPoint())
411 SketchConstraintCoincidence_81 = Sketch_6.setCoincident(SketchLine_27.startPoint(), SketchLine_34.endPoint())
412 SketchProjection_18 = Sketch_6.addProjection(model.selection("EDGE", "PartSet/OY"), False)
413 SketchLine_35 = SketchProjection_18.createdFeature()
414 SketchLine_35.setName("SketchLine_34")
415 SketchLine_35.result().setName("SketchLine_34")
416 SketchConstraintCollinear_1 = Sketch_6.setCollinear(SketchLine_35.result(), SketchLine_27.result())
417 SketchConstraintLength_1 = Sketch_6.setLength(SketchLine_27.result(), "size_z-2")
418 SketchConstraintEqual_1 = Sketch_6.setEqual(SketchLine_27.result(), SketchLine_29.result())
419 SketchConstraintEqual_2 = Sketch_6.setEqual(SketchLine_29.result(), SketchLine_31.result())
420 SketchConstraintEqual_3 = Sketch_6.setEqual(SketchLine_31.result(), SketchLine_33.result())
421 SketchConstraintEqual_4 = Sketch_6.setEqual(SketchLine_28.result(), SketchLine_30.result())
422 SketchConstraintEqual_5 = Sketch_6.setEqual(SketchLine_30.result(), SketchLine_32.result())
423 SketchConstraintEqual_6 = Sketch_6.setEqual(SketchLine_32.result(), SketchLine_34.result())
424 SketchConstraintDistanceHorizontal_2 = Sketch_6.setHorizontalDistance(SketchLine_27.endPoint(), SketchLine_28.endPoint(), 1)
425 SketchConstraintDistanceHorizontal_3 = Sketch_6.setHorizontalDistance(SketchLine_31.startPoint(), SketchLine_29.endPoint(), 1)
426 SketchConstraintDistanceVertical_5 = Sketch_6.setVerticalDistance(SketchLine_27.endPoint(), SketchLine_28.endPoint(), 1)
427 SketchConstraintDistance_11 = Sketch_6.setDistance(SketchAPI_Line(SketchLine_35).startPoint(), SketchLine_29.result(), 28, True)
429 Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_6")], model.selection(), 79, -76.5)
431 Sketch_7 = model.addSketch(Part_1_doc, model.selection("FACE", "Sketch_6/Face-SketchLine_26r-SketchLine_27f-SketchLine_28f-SketchLine_29f-SketchLine_30f-SketchLine_31f-SketchLine_32f-SketchLine_33f"))
432 SketchProjection_19 = Sketch_7.addProjection(model.selection("EDGE", "Sketch_6/SketchLine_27"), True)
433 SketchLine_36 = SketchProjection_19.createdFeature()
434 SketchLine_36.setName("SketchLine_35")
435 SketchLine_36.result().setName("SketchLine_35")
436 SketchProjection_20 = Sketch_7.addProjection(model.selection("EDGE", "Sketch_6/SketchLine_28"), True)
437 SketchLine_37 = SketchProjection_20.createdFeature()
438 SketchLine_37.setName("SketchLine_36")
439 SketchLine_37.result().setName("SketchLine_36")
440 SketchProjection_21 = Sketch_7.addProjection(model.selection("EDGE", "Sketch_6/SketchLine_29"), True)
441 SketchLine_38 = SketchProjection_21.createdFeature()
442 SketchLine_38.setName("SketchLine_37")
443 SketchLine_38.result().setName("SketchLine_37")
444 SketchLine_39 = Sketch_7.addLine(-29, 5, -31, 5)
445 SketchLine_39.setName("SketchLine_38")
446 SketchLine_39.result().setName("SketchLine_38")
447 SketchConstraintCoincidence_82 = Sketch_7.setCoincident(SketchAPI_Line(SketchLine_38).endPoint(), SketchLine_39.startPoint())
448 SketchLine_40 = Sketch_7.addLine(-31, 5, -32, 4)
449 SketchLine_40.setName("SketchLine_39")
450 SketchLine_40.result().setName("SketchLine_39")
451 SketchConstraintCoincidence_83 = Sketch_7.setCoincident(SketchLine_39.endPoint(), SketchLine_40.startPoint())
452 SketchLine_41 = Sketch_7.addLine(-32, 4, -32, 1)
453 SketchLine_41.setName("SketchLine_40")
454 SketchLine_41.result().setName("SketchLine_40")
455 SketchConstraintCoincidence_84 = Sketch_7.setCoincident(SketchLine_40.endPoint(), SketchLine_41.startPoint())
456 SketchConstraintVertical_3 = Sketch_7.setVertical(SketchLine_41.result())
457 SketchLine_42 = Sketch_7.addLine(-32, 1, -31, 0)
458 SketchLine_42.setName("SketchLine_41")
459 SketchLine_42.result().setName("SketchLine_41")
460 SketchConstraintCoincidence_85 = Sketch_7.setCoincident(SketchLine_41.endPoint(), SketchLine_42.startPoint())
461 SketchLine_43 = Sketch_7.addLine(-31, 0, -29, 0)
462 SketchLine_43.setName("SketchLine_42")
463 SketchLine_43.result().setName("SketchLine_42")
464 SketchConstraintCoincidence_86 = Sketch_7.setCoincident(SketchLine_42.endPoint(), SketchLine_43.startPoint())
465 SketchConstraintCoincidence_87 = Sketch_7.setCoincident(SketchAPI_Line(SketchLine_36).startPoint(), SketchLine_43.endPoint())
466 SketchConstraintHorizontal_2 = Sketch_7.setHorizontal(SketchLine_43.result())
467 SketchConstraintHorizontal_3 = Sketch_7.setHorizontal(SketchLine_39.result())
468 SketchConstraintEqual_7 = Sketch_7.setEqual(SketchLine_40.result(), SketchLine_42.result())
469 SketchConstraintEqual_8 = Sketch_7.setEqual(SketchLine_42.result(), SketchLine_36.result())
470 SketchConstraintEqual_9 = Sketch_7.setEqual(SketchLine_37.result(), SketchLine_41.result())
471 SketchConstraintEqual_10 = Sketch_7.setEqual(SketchLine_39.result(), SketchLine_43.result())
472 SketchConstraintLength_2 = Sketch_7.setLength(SketchLine_39.result(), 2)
474 ExtrusionFuse_1 = model.addExtrusionFuse(Part_1_doc, [model.selection("COMPOUND", "Sketch_7")], model.selection(), model.selection("FACE", "Extrusion_2_1/From_Face"), 0, model.selection("FACE", "Extrusion_2_1/From_Face"), "1.6+2*chamfer", [model.selection("SOLID", "Extrusion_2_1")])
476 model.testNbResults(ExtrusionFuse_1, 1)
477 model.testNbSubResults(ExtrusionFuse_1, [0])
478 model.testNbSubShapes(ExtrusionFuse_1, GeomAPI_Shape.SOLID, [1])
479 model.testNbSubShapes(ExtrusionFuse_1, GeomAPI_Shape.FACE, [19])
480 model.testNbSubShapes(ExtrusionFuse_1, GeomAPI_Shape.EDGE, [90])
481 model.testNbSubShapes(ExtrusionFuse_1, GeomAPI_Shape.VERTEX, [180])
482 model.testResultsVolumes(ExtrusionFuse_1, [115.1])
484 Plane_7 = model.addPlane(Part_1_doc, model.selection("EDGE", "Sketch_1/SketchLine_43"), model.selection("VERTEX", "Sketch_1/SketchArc_1"), True)
485 Sketch_8 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_4"))
486 SketchLine_44 = Sketch_8.addLine(30.42415119636338, 0, 27.42415119636338, 0)
487 SketchConstraintHorizontal_4 = Sketch_8.setHorizontal(SketchLine_44.result())
488 SketchLine_45 = Sketch_8.addLine(27.42415119636338, 0, 26.42415119636338, -1)
489 SketchConstraintCoincidence_88 = Sketch_8.setCoincident(SketchLine_44.endPoint(), SketchLine_45.startPoint())
490 SketchLine_46 = Sketch_8.addLine(26.42415119636338, -1, 26.42415119636338, -4)
491 SketchConstraintCoincidence_89 = Sketch_8.setCoincident(SketchLine_45.endPoint(), SketchLine_46.startPoint())
492 SketchConstraintVertical_4 = Sketch_8.setVertical(SketchLine_46.result())
493 SketchLine_47 = Sketch_8.addLine(26.42415119636338, -4, 27.42415119636338, -5)
494 SketchConstraintCoincidence_90 = Sketch_8.setCoincident(SketchLine_46.endPoint(), SketchLine_47.startPoint())
495 SketchLine_48 = Sketch_8.addLine(27.42415119636338, -5, 30.42415119636338, -5)
496 SketchConstraintCoincidence_91 = Sketch_8.setCoincident(SketchLine_47.endPoint(), SketchLine_48.startPoint())
497 SketchConstraintHorizontal_5 = Sketch_8.setHorizontal(SketchLine_48.result())
498 SketchLine_49 = Sketch_8.addLine(30.42415119636338, -5, 31.4241511964612, -4)
499 SketchConstraintCoincidence_92 = Sketch_8.setCoincident(SketchLine_48.endPoint(), SketchLine_49.startPoint())
500 SketchLine_50 = Sketch_8.addLine(31.4241511964612, -4, 31.4241511964612, -1)
501 SketchConstraintCoincidence_93 = Sketch_8.setCoincident(SketchLine_49.endPoint(), SketchLine_50.startPoint())
502 SketchConstraintVertical_5 = Sketch_8.setVertical(SketchLine_50.result())
503 SketchLine_51 = Sketch_8.addLine(31.4241511964612, -1, 30.42415119636338, 0)
504 SketchConstraintCoincidence_94 = Sketch_8.setCoincident(SketchLine_50.endPoint(), SketchLine_51.startPoint())
505 SketchConstraintCoincidence_95 = Sketch_8.setCoincident(SketchLine_44.startPoint(), SketchLine_51.endPoint())
506 SketchProjection_22 = Sketch_8.addProjection(model.selection("VERTEX", "Sketch_1/SketchArc_1"), False)
507 SketchPoint_5 = SketchProjection_22.createdFeature()
508 SketchConstraintLength_3 = Sketch_8.setLength(SketchLine_44.result(), "size_z-2")
509 SketchConstraintEqual_11 = Sketch_8.setEqual(SketchLine_44.result(), SketchLine_46.result())
510 SketchConstraintEqual_12 = Sketch_8.setEqual(SketchLine_46.result(), SketchLine_48.result())
511 SketchConstraintEqual_13 = Sketch_8.setEqual(SketchLine_48.result(), SketchLine_50.result())
512 SketchConstraintEqual_14 = Sketch_8.setEqual(SketchLine_45.result(), SketchLine_47.result())
513 SketchConstraintEqual_15 = Sketch_8.setEqual(SketchLine_47.result(), SketchLine_49.result())
514 SketchConstraintEqual_16 = Sketch_8.setEqual(SketchLine_49.result(), SketchLine_51.result())
515 SketchConstraintDistanceHorizontal_4 = Sketch_8.setHorizontalDistance(SketchLine_45.startPoint(), SketchLine_45.endPoint(), 1)
516 SketchConstraintDistanceHorizontal_5 = Sketch_8.setHorizontalDistance(SketchLine_47.endPoint(), SketchLine_46.endPoint(), 1)
517 SketchConstraintDistanceVertical_6 = Sketch_8.setVerticalDistance(SketchLine_44.endPoint(), SketchLine_46.startPoint(), 1)
518 SketchConstraintCoincidence_96 = Sketch_8.setCoincident(SketchAPI_Point(SketchPoint_5).coordinates(), SketchLine_44.result())
519 SketchConstraintCoincidence_97 = Sketch_8.setCoincident(SketchAPI_Point(SketchPoint_5).coordinates(), SketchLine_46.result())
521 Extrusion_3 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_8/Face-SketchLine_44r-SketchLine_45f-SketchLine_46f-SketchLine_47f-SketchLine_48f-SketchLine_49f-SketchLine_50f-SketchLine_51f")], model.selection(), "size_y-5+3.8", "-size_y+5+2*chamfer")
523 model.testNbResults(Extrusion_3, 1)
524 model.testNbSubResults(Extrusion_3, [0])
525 model.testNbSubShapes(Extrusion_3, GeomAPI_Shape.SOLID, [1])
526 model.testNbSubShapes(Extrusion_3, GeomAPI_Shape.FACE, [10])
527 model.testNbSubShapes(Extrusion_3, GeomAPI_Shape.EDGE, [48])
528 model.testNbSubShapes(Extrusion_3, GeomAPI_Shape.VERTEX, [96])
529 model.testResultsVolumes(Extrusion_3, [124.2])
531 Symmetry_2 = model.addSymmetry(Part_1_doc, [model.selection("SOLID", "ExtrusionFuse_1_1"), model.selection("SOLID", "Extrusion_3_1")], model.selection("FACE", "PartSet/YOZ"), keepOriginal = True, keepSubResults = True)
532 Fuse_1_objects_1 = [model.selection("SOLID", "Cut_1_1"), model.selection("COMPOUND", "Symmetry_2_1"), model.selection("COMPOUND", "Symmetry_2_2")]
533 Fuse_1 = model.addFuse(Part_1_doc, Fuse_1_objects_1, removeEdges = True, keepSubResults = True)
534 Fuse_1.result().setName("Visor")
536 model.testNbResults(Fuse_1, 1)
537 model.testNbSubResults(Fuse_1, [0])
538 model.testNbSubShapes(Fuse_1, GeomAPI_Shape.SOLID, [1])
539 model.testNbSubShapes(Fuse_1, GeomAPI_Shape.FACE, [125])
540 model.testNbSubShapes(Fuse_1, GeomAPI_Shape.EDGE, [668])
541 model.testNbSubShapes(Fuse_1, GeomAPI_Shape.VERTEX, [1336])
542 model.testResultsVolumes(Fuse_1, [12309.7614])
544 model.testHaveNamingSubshapes(Fuse_1, model, Part_1_doc)
549 ParamSize.setValue(160)
552 model.testNbResults(Fuse_1, 1)
553 model.testNbSubResults(Fuse_1, [0])
554 model.testNbSubShapes(Fuse_1, GeomAPI_Shape.SOLID, [1])
555 model.testNbSubShapes(Fuse_1, GeomAPI_Shape.FACE, [125])
556 model.testNbSubShapes(Fuse_1, GeomAPI_Shape.EDGE, [668])
557 model.testNbSubShapes(Fuse_1, GeomAPI_Shape.VERTEX, [1336])
558 model.testResultsVolumes(Fuse_1, [10224.4774])
562 model.testNbResults(Fuse_1, 1)
563 model.testNbSubResults(Fuse_1, [0])
564 model.testNbSubShapes(Fuse_1, GeomAPI_Shape.SOLID, [1])
565 model.testNbSubShapes(Fuse_1, GeomAPI_Shape.FACE, [125])
566 model.testNbSubShapes(Fuse_1, GeomAPI_Shape.EDGE, [668])
567 model.testNbSubShapes(Fuse_1, GeomAPI_Shape.VERTEX, [1336])
568 model.testResultsVolumes(Fuse_1, [12309.7614])