]> SALOME platform Git repositories - modules/shaper.git/blob - test.models/CSWA.py
Salome HOME
Sort alphabetically unit tests for SketchPlugin module
[modules/shaper.git] / test.models / CSWA.py
1 ## Copyright (C) 2014-2017  CEA/DEN, EDF R&D
2 ##
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.
7 ##
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.
12 ##
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
16 ##
17 ## See http:##www.salome-platform.org/ or
18 ## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
19 ##
20
21 from SketchAPI import *
22
23 from salome.shaper import model
24
25 model.begin()
26 partSet = model.moduleDocument()
27 Part_1 = model.addPart(partSet)
28 Part_1_doc = Part_1.document()
29 Parameter_A = model.addParameter(Part_1_doc, "a", "63")
30 model.addParameter(Part_1_doc, "b", "50")
31 model.addParameter(Part_1_doc, "c", "100")
32 Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOZ"))
33 SketchLine_1 = Sketch_1.addLine(-45, 0, 0, 0)
34 SketchLine_2 = Sketch_1.addLine(0, 0, 23.33965093306752, 8.494938217797719)
35 SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint())
36 SketchLine_3 = Sketch_1.addLine(33.83092017818969, 6.16907982180411, 40, 0)
37 SketchLine_4 = Sketch_1.addLine(40, 0, 55, 0)
38 SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint())
39 SketchConstraintCoincidence_2.setName("SketchConstraintCoincidence_3")
40 SketchLine_5 = Sketch_1.addLine(55, 0, 55, 48)
41 SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_5.startPoint())
42 SketchConstraintCoincidence_3.setName("SketchConstraintCoincidence_4")
43 SketchLine_6 = Sketch_1.addLine(55, 48, 15, 48)
44 SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_6.startPoint())
45 SketchConstraintCoincidence_4.setName("SketchConstraintCoincidence_5")
46 SketchLine_7 = Sketch_1.addLine(15, 48, 15, 63)
47 SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_6.endPoint(), SketchLine_7.startPoint())
48 SketchConstraintCoincidence_5.setName("SketchConstraintCoincidence_6")
49 SketchLine_8 = Sketch_1.addLine(15, 63, -15, 63)
50 SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_7.endPoint(), SketchLine_8.startPoint())
51 SketchConstraintCoincidence_6.setName("SketchConstraintCoincidence_7")
52 SketchLine_9 = Sketch_1.addLine(-15, 63, -15, 35.00000000000001)
53 SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchLine_8.endPoint(), SketchLine_9.startPoint())
54 SketchConstraintCoincidence_7.setName("SketchConstraintCoincidence_8")
55 SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_1.result())
56 SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_6.result())
57 SketchConstraintHorizontal_3 = Sketch_1.setHorizontal(SketchLine_8.result())
58 SketchConstraintCollinear_1 = Sketch_1.setCollinear(SketchLine_1.result(), SketchLine_4.result())
59 SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_5.result())
60 SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_9.result())
61 SketchConstraintVertical_3 = Sketch_1.setVertical(SketchLine_7.result())
62 SketchConstraintDistance_1 = Sketch_1.setDistance(SketchLine_3.endPoint(), SketchLine_4.endPoint(), 15)
63 SketchConstraintDistance_2 = Sketch_1.setDistance(SketchLine_3.endPoint(), SketchLine_1.endPoint(), 40)
64 SketchConstraintDistance_3 = Sketch_1.setDistance(SketchLine_1.startPoint(), SketchLine_4.endPoint(), "c")
65 SketchConstraintDistance_4 = Sketch_1.setDistance(SketchLine_8.startPoint(), SketchLine_6.result(), 15)
66 SketchConstraintDistance_5 = Sketch_1.setDistance(SketchLine_8.startPoint(), SketchLine_5.result(), 40)
67 SketchLine_10 = Sketch_1.addLine(-45, 4.999999999999999, -45, 0)
68 SketchConstraintCoincidence_8 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchLine_10.endPoint())
69 SketchConstraintCoincidence_8.setName("SketchConstraintCoincidence_9")
70 SketchConstraintVertical_4 = Sketch_1.setVertical(SketchLine_10.result())
71 SketchConstraintDistance_6 = Sketch_1.setDistance(SketchLine_9.startPoint(), SketchLine_1.result(), "a")
72 SketchArc_1 = Sketch_1.addArc(-45, 35, -45, 4.999999999999999, -15, 35.00000000000001, False)
73 SketchConstraintCoincidence_9 = Sketch_1.setCoincident(SketchArc_1.center(), SketchLine_10.result())
74 SketchConstraintCoincidence_9.setName("SketchConstraintCoincidence_10")
75 SketchConstraintCoincidence_10 = Sketch_1.setCoincident(SketchArc_1.startPoint(), SketchLine_10.startPoint())
76 SketchConstraintCoincidence_10.setName("SketchConstraintCoincidence_11")
77 SketchConstraintAngle_1 = Sketch_1.setAngle(SketchLine_3.result(), SketchLine_1.result(), 45)
78 SketchConstraintAngle_2 = Sketch_1.setAngleBackward(SketchLine_2.result(), SketchLine_4.result(), 20)
79 SketchConstraintCoincidence_11 = Sketch_1.setCoincident(SketchArc_1.endPoint(), SketchLine_9.endPoint())
80 SketchConstraintCoincidence_11.setName("SketchConstraintCoincidence_12")
81 SketchConstraintTangent_1 = Sketch_1.setTangent(SketchArc_1.results()[1], SketchLine_9.result())
82 SketchConstraintDistance_7 = Sketch_1.setDistance(SketchArc_1.center(), SketchLine_1.result(), 35)
83 SketchConstraintRadius_1 = Sketch_1.setRadius(SketchArc_1.results()[1], 30)
84 SketchArc_2 = Sketch_1.addArc(26.75985236632421, -0.9019879900613652, 33.83092017818969, 6.16907982180411, 23.33965093306752, 8.494938217797719, False)
85 SketchConstraintCoincidence_12 = Sketch_1.setCoincident(SketchArc_2.startPoint(), SketchLine_3.startPoint())
86 SketchConstraintCoincidence_12.setName("SketchConstraintCoincidence_13")
87 SketchConstraintCoincidence_13 = Sketch_1.setCoincident(SketchArc_2.endPoint(), SketchLine_2.endPoint())
88 SketchConstraintCoincidence_13.setName("SketchConstraintCoincidence_14")
89 SketchConstraintTangent_2 = Sketch_1.setTangent(SketchArc_2.results()[1], SketchLine_2.result())
90 SketchConstraintTangent_3 = Sketch_1.setTangent(SketchArc_2.results()[1], SketchLine_3.result())
91 SketchConstraintRadius_2 = Sketch_1.setRadius(SketchArc_2.results()[1], 10)
92 SketchPoint_1 = Sketch_1.addPoint(model.selection("VERTEX", "PartSet/Origin"))
93 SketchConstraintCoincidence_14 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchPoint_1.coordinates())
94 SketchConstraintCoincidence_14.setName("SketchConstraintCoincidence_15")
95 model.do()
96 Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_2f-SketchLine_3f-SketchLine_4f-SketchLine_5f-SketchLine_6f-SketchLine_7f-SketchLine_8f-SketchLine_9f-SketchLine_10f-SketchArc_1_2r-SketchArc_2_2r")], model.selection(), "b/2", "b/2")
97 Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/To_Face_1"))
98 SketchPoint_2 = Sketch_2.addPoint(model.selection("VERTEX", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/Generated_Face_2&Extrusion_1_1/To_Face_1"))
99 SketchCircle_1 = Sketch_2.addCircle(-15, 35.00000000000001, 25)
100 SketchConstraintCoincidence_15 = Sketch_2.setCoincident(SketchPoint_2.result(), SketchCircle_1.center())
101 SketchConstraintCoincidence_15.setName("SketchConstraintCoincidence_16")
102 SketchConstraintRadius_3 = Sketch_2.setRadius(SketchCircle_1.results()[1], "50/2")
103 model.do()
104 ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", "Sketch_2/Wire-SketchCircle_1_2f")], model.selection(), 0, 13, [model.selection("SOLID", "Extrusion_1_1")])
105 Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_1_1/Modfied_4"))
106 SketchPoint_3 = Sketch_3.addPoint(model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_2&ExtrusionCut_1_1/Modfied_3&ExtrusionCut_1_1/Modfied_4"))
107 SketchLine_11 = Sketch_3.addLine(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_3&ExtrusionCut_1_1/Modfied_4"))
108 SketchArc_3 = Sketch_3.addArc(-15, 35.00000000000001, -15, 46.0103340429751, -17.02045759563166, 24.17663606626138, True)
109 SketchConstraintCoincidence_16 = Sketch_3.setCoincident(SketchPoint_3.result(), SketchArc_3.center())
110 SketchConstraintCoincidence_16.setName("SketchConstraintCoincidence_17")
111 SketchConstraintCoincidence_17 = Sketch_3.setCoincident(SketchLine_11.result(), SketchArc_3.startPoint())
112 SketchConstraintCoincidence_17.setName("SketchConstraintCoincidence_18")
113 SketchArc_4 = Sketch_3.addArc(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_2&ExtrusionCut_1_1/Modfied_4"))
114 SketchConstraintCoincidence_18 = Sketch_3.setCoincident(SketchArc_3.endPoint(), SketchArc_4.results()[1])
115 SketchConstraintCoincidence_18.setName("SketchConstraintCoincidence_19")
116 SketchLine_12 = Sketch_3.addLine(-15, 46.0103340429751, -15, 35.00000000000001)
117 SketchConstraintCoincidence_19 = Sketch_3.setCoincident(SketchArc_3.startPoint(), SketchLine_12.startPoint())
118 SketchConstraintCoincidence_19.setName("SketchConstraintCoincidence_20")
119 SketchConstraintCoincidence_20 = Sketch_3.setCoincident(SketchPoint_3.coordinates(), SketchLine_12.endPoint())
120 SketchConstraintCoincidence_20.setName("SketchConstraintCoincidence_21")
121 SketchArc_5 = Sketch_3.addArc(-45, 35, -15, 35.00000000000001, -17.02045759563121, 24.17663606626137, True)
122 SketchConstraintCoincidence_21 = Sketch_3.setCoincident(SketchArc_4.result(), SketchArc_5.center())
123 SketchConstraintCoincidence_21.setName("SketchConstraintCoincidence_22")
124 SketchConstraintCoincidence_22 = Sketch_3.setCoincident(SketchPoint_3.coordinates(), SketchArc_5.startPoint())
125 SketchConstraintCoincidence_22.setName("SketchConstraintCoincidence_23")
126 SketchConstraintCoincidence_23 = Sketch_3.setCoincident(SketchArc_3.results()[1], SketchArc_5.endPoint())
127 SketchConstraintCoincidence_23.setName("SketchConstraintCoincidence_24")
128 model.do()
129 ExtrusionFuse_1 = model.addExtrusionFuse(Part_1_doc, [model.selection("FACE", "Sketch_3/Face-SketchArc_3_2f-SketchLine_12f-SketchArc_5_2r")], model.selection(), 5, 0, [model.selection("SOLID", "ExtrusionCut_1_1")])
130 Sketch_4 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionFuse_1_1/To_Face_1"))
131 SketchPoint_4 = Sketch_4.addPoint(model.selection("VERTEX", "ExtrusionFuse_1_1/Modfied_4&ExtrusionFuse_1_1/Modfied_5&ExtrusionFuse_1_1/To_Face_1"))
132 SketchCircle_2 = Sketch_4.addCircle(-15, 35.00000000000001, 5)
133 SketchConstraintCoincidence_24 = Sketch_4.setCoincident(SketchPoint_4.result(), SketchCircle_2.center())
134 SketchConstraintCoincidence_24.setName("SketchConstraintCoincidence_25")
135 SketchConstraintRadius_4 = Sketch_4.setRadius(SketchCircle_2.results()[1], "10/2")
136 model.do()
137 ExtrusionFuse_2 = model.addExtrusionFuse(Part_1_doc, [model.selection("FACE", "Sketch_4/Face-SketchCircle_2_2f")], model.selection(), 8, 0, [model.selection("SOLID", "ExtrusionFuse_1_1")])
138 Sketch_5 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_1_1/Modfied_1"))
139 SketchArc_6 = Sketch_5.addArc(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_1&ExtrusionFuse_1_1/Modfied_3"))
140 SketchArc_7 = Sketch_5.addArc(-45, 35, -45, 5, -25.41666666666737, 12.27351642784166, False)
141 SketchConstraintCoincidence_25 = Sketch_5.setCoincident(SketchArc_6.result(), SketchArc_7.center())
142 SketchConstraintCoincidence_25.setName("SketchConstraintCoincidence_26")
143 SketchCircle_3 = Sketch_5.addCircle(model.selection("EDGE", "ExtrusionFuse_2_1/Modfied_5&ExtrusionFuse_2_1/To_Face_1"))
144 SketchArc_8 = Sketch_5.addArc(-15, 35.00000000000001, -25.41666666666737, 12.27351642784166, -30.00000000000075, 14.99999999999944, True)
145 SketchConstraintCoincidence_26 = Sketch_5.setCoincident(SketchCircle_3.result(), SketchArc_8.center())
146 SketchConstraintCoincidence_26.setName("SketchConstraintCoincidence_27")
147 SketchConstraintCoincidence_27 = Sketch_5.setCoincident(SketchArc_6.endPoint(), SketchArc_8.startPoint())
148 SketchConstraintCoincidence_27.setName("SketchConstraintCoincidence_28")
149 SketchConstraintCoincidence_28 = Sketch_5.setCoincident(SketchArc_7.endPoint(), SketchArc_8.results()[1])
150 SketchConstraintCoincidence_28.setName("SketchConstraintCoincidence_29")
151 SketchConstraintCoincidence_29 = Sketch_5.setCoincident(SketchArc_7.startPoint(), SketchArc_6.startPoint())
152 SketchConstraintCoincidence_29.setName("SketchConstraintCoincidence_30")
153 SketchLine_13 = Sketch_5.addLine(-45, 5, -45, 10)
154 SketchConstraintCoincidence_30 = Sketch_5.setCoincident(SketchArc_6.startPoint(), SketchLine_13.startPoint())
155 SketchConstraintCoincidence_30.setName("SketchConstraintCoincidence_31")
156 SketchConstraintVertical_5 = Sketch_5.setVertical(SketchLine_13.result())
157 SketchConstraintLength_1 = Sketch_5.setLength(SketchLine_13.result(), 5)
158 SketchArc_9 = Sketch_5.addArc(-45, 35, -45, 10, -30.00000000000075, 14.99999999999944, False)
159 SketchConstraintCoincidence_31 = Sketch_5.setCoincident(SketchArc_6.center(), SketchArc_9.center())
160 SketchConstraintCoincidence_31.setName("SketchConstraintCoincidence_32")
161 SketchConstraintCoincidence_32 = Sketch_5.setCoincident(SketchArc_8.endPoint(), SketchArc_9.endPoint())
162 SketchConstraintCoincidence_32.setName("SketchConstraintCoincidence_33")
163 SketchConstraintCoincidence_33 = Sketch_5.setCoincident(SketchArc_9.startPoint(), SketchLine_13.endPoint())
164 SketchConstraintCoincidence_33.setName("SketchConstraintCoincidence_34")
165 model.do()
166 ExtrusionFuse_3 = model.addExtrusionFuse(Part_1_doc, [model.selection("FACE", "Sketch_5/Face-SketchArc_7_2f-SketchArc_8_2r-SketchLine_13r-SketchArc_9_2r")], model.selection(), 0, 8, [model.selection("SOLID", "ExtrusionFuse_2_1")])
167 Sketch_6 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionFuse_3_1/Modfied_3"))
168 SketchLine_14 = Sketch_6.addLine(model.selection("EDGE", "ExtrusionFuse_3_1/Modfied_3&Extrusion_1_1/Generated_Face_7"))
169 SketchArc_10 = Sketch_6.addArc(55, 35, 55, 15, 35, 35, True)
170 SketchConstraintCoincidence_34 = Sketch_6.setCoincident(SketchLine_14.result(), SketchArc_10.center())
171 SketchConstraintCoincidence_34.setName("SketchConstraintCoincidence_35")
172 SketchConstraintCoincidence_35 = Sketch_6.setCoincident(SketchLine_14.result(), SketchArc_10.startPoint())
173 SketchConstraintCoincidence_35.setName("SketchConstraintCoincidence_36")
174 SketchLine_15 = Sketch_6.addLine(model.selection("EDGE", "ExtrusionFuse_3_1/Modfied_3&Extrusion_1_1/Generated_Face_8"))
175 SketchConstraintDistance_8 = Sketch_6.setDistance(SketchArc_10.center(), SketchLine_15.result(), 35)
176 SketchLine_16 = Sketch_6.addLine(35, 35, 35, 48)
177 SketchConstraintCoincidence_36 = Sketch_6.setCoincident(SketchArc_10.endPoint(), SketchLine_16.startPoint())
178 SketchConstraintCoincidence_36.setName("SketchConstraintCoincidence_37")
179 SketchLine_17 = Sketch_6.addLine(model.selection("EDGE", "ExtrusionFuse_3_1/Modfied_3&Extrusion_1_1/Generated_Face_6"))
180 SketchConstraintCoincidence_37 = Sketch_6.setCoincident(SketchLine_16.endPoint(), SketchLine_17.result())
181 SketchConstraintCoincidence_37.setName("SketchConstraintCoincidence_38")
182 SketchConstraintVertical_6 = Sketch_6.setVertical(SketchLine_16.result())
183 SketchConstraintTangent_4 = Sketch_6.setTangent(SketchLine_16.result(), SketchArc_10.results()[1])
184 SketchConstraintRadius_5 = Sketch_6.setRadius(SketchArc_10.results()[1], 20)
185 SketchLine_18 = Sketch_6.addLine(55, 15, 55, 48)
186 SketchConstraintCoincidence_38 = Sketch_6.setCoincident(SketchArc_10.startPoint(), SketchLine_18.startPoint())
187 SketchConstraintCoincidence_38.setName("SketchConstraintCoincidence_39")
188 SketchConstraintCoincidence_39 = Sketch_6.setCoincident(SketchLine_14.endPoint(), SketchLine_18.endPoint())
189 SketchConstraintCoincidence_39.setName("SketchConstraintCoincidence_40")
190 SketchLine_19 = Sketch_6.addLine(35, 48, 55, 48)
191 SketchConstraintCoincidence_40 = Sketch_6.setCoincident(SketchLine_16.endPoint(), SketchLine_19.startPoint())
192 SketchConstraintCoincidence_40.setName("SketchConstraintCoincidence_41")
193 SketchConstraintCoincidence_41 = Sketch_6.setCoincident(SketchLine_14.endPoint(), SketchLine_19.endPoint())
194 SketchConstraintCoincidence_41.setName("SketchConstraintCoincidence_42")
195 model.do()
196 ExtrusionCut_2 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", "Sketch_6/Wire-SketchArc_10_2f-SketchLine_16r-SketchLine_18f-SketchLine_19r")], model.selection(), 0, 9, [model.selection("SOLID", "ExtrusionFuse_3_1")])
197 Sketch_7 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_2_1/From_Face_1"))
198 SketchCircle_4 = Sketch_7.addCircle(45, -35, 5)
199 SketchLine_20 = Sketch_7.addLine(model.selection("EDGE", "ExtrusionCut_2_1/Modfied_2&ExtrusionCut_2_1/From_Face_1"))
200 SketchConstraintDistance_9 = Sketch_7.setDistance(SketchCircle_4.center(), SketchLine_20.result(), 10)
201 SketchConstraintRadius_6 = Sketch_7.setRadius(SketchCircle_4.results()[1], "10/2")
202 SketchLine_21 = Sketch_7.addLine(35, -35, 45, -35)
203 SketchLine_21.setAuxiliary(True)
204 SketchPoint_5 = Sketch_7.addPoint(model.selection("VERTEX", "ExtrusionCut_2_1/Generated_Face_1&ExtrusionCut_2_1/Generated_Face_4&ExtrusionCut_2_1/From_Face_1"))
205 SketchConstraintCoincidence_42 = Sketch_7.setCoincident(SketchLine_21.startPoint(), SketchPoint_5.result())
206 SketchConstraintCoincidence_42.setName("SketchConstraintCoincidence_43")
207 SketchConstraintCoincidence_43 = Sketch_7.setCoincident(SketchCircle_4.center(), SketchLine_21.endPoint())
208 SketchConstraintCoincidence_43.setName("SketchConstraintCoincidence_44")
209 SketchConstraintHorizontal_4 = Sketch_7.setHorizontal(SketchLine_21.result())
210 model.do()
211 ExtrusionCut_3 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_7/Face-SketchCircle_4_2f")], model.selection(), model.selection(), 0, model.selection("FACE", "Extrusion_1_1/From_Face_1"), 0, [model.selection("SOLID", "ExtrusionCut_2_1")])
212 Sketch_8 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_4"))
213 SketchLine_22 = Sketch_8.addLine(55, 25, 5.000000000000002, 25)
214 SketchLine_23 = Sketch_8.addLine(5.000000000000002, 25, 5.000000000000002, 13)
215 SketchLine_24 = Sketch_8.addLine(5.000000000000002, 13, 55, 13)
216 SketchLine_25 = Sketch_8.addLine(55, 13, 55, 25)
217 SketchConstraintCoincidence_44 = Sketch_8.setCoincident(SketchLine_25.endPoint(), SketchLine_22.startPoint())
218 SketchConstraintCoincidence_44.setName("SketchConstraintCoincidence_45")
219 SketchConstraintCoincidence_45 = Sketch_8.setCoincident(SketchLine_22.endPoint(), SketchLine_23.startPoint())
220 SketchConstraintCoincidence_45.setName("SketchConstraintCoincidence_46")
221 SketchConstraintCoincidence_46 = Sketch_8.setCoincident(SketchLine_23.endPoint(), SketchLine_24.startPoint())
222 SketchConstraintCoincidence_46.setName("SketchConstraintCoincidence_47")
223 SketchConstraintCoincidence_47 = Sketch_8.setCoincident(SketchLine_24.endPoint(), SketchLine_25.startPoint())
224 SketchConstraintCoincidence_47.setName("SketchConstraintCoincidence_48")
225 SketchConstraintHorizontal_5 = Sketch_8.setHorizontal(SketchLine_22.result())
226 SketchConstraintVertical_7 = Sketch_8.setVertical(SketchLine_23.result())
227 SketchConstraintHorizontal_6 = Sketch_8.setHorizontal(SketchLine_24.result())
228 SketchConstraintVertical_8 = Sketch_8.setVertical(SketchLine_25.result())
229 SketchConstraintLength_2 = Sketch_8.setLength(SketchLine_22.result(), 50)
230 SketchConstraintLength_3 = Sketch_8.setLength(SketchLine_25.result(), 12)
231 SketchProjection_1 = Sketch_8.addProjection(model.selection("EDGE", "ExtrusionCut_2_1/Modfied_2&ExtrusionCut_2_1/Modfied_1"))
232 SketchLine_26 = SketchProjection_1.createdFeature()
233 SketchConstraintCoincidence_48 = Sketch_8.setCoincident(SketchLine_22.startPoint(), SketchLine_26.result())
234 SketchConstraintCoincidence_48.setName("SketchConstraintCoincidence_49")
235 SketchLine_27 = Sketch_8.addLine(model.selection("EDGE", "ExtrusionCut_3_1/Modfied_2&Extrusion_1_1/Generated_Face_4"))
236 SketchConstraintCoincidence_49 = Sketch_8.setCoincident(SketchLine_22.startPoint(), SketchLine_27.result())
237 SketchConstraintCoincidence_49.setName("SketchConstraintCoincidence_50")
238 model.do()
239 ExtrusionCut_4 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_8/Face-SketchLine_22f-SketchLine_23f-SketchLine_24f-SketchLine_25f")], model.selection(), model.selection(), 0, model.selection("FACE", "Extrusion_1_1/Generated_Face_8"), 0, [model.selection("SOLID", "ExtrusionCut_3_1")])
240 Sketch_9 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionFuse_1_1/Modfied_2"))
241 SketchLine_28 = Sketch_9.addLine(25, -45, 18.44853578320836, -63)
242 SketchLine_29 = Sketch_9.addLine(model.selection("EDGE", "ExtrusionFuse_1_1/Modfied_2&ExtrusionCut_4_1/Modfied_6"))
243 SketchConstraintCoincidence_50 = Sketch_9.setCoincident(SketchLine_28.endPoint(), SketchLine_29.result())
244 SketchConstraintCoincidence_50.setName("SketchConstraintCoincidence_51")
245 SketchLine_30 = Sketch_9.addLine(model.selection("EDGE", "ExtrusionCut_4_1/Modfied_9&ExtrusionFuse_1_1/Modfied_2"))
246 SketchConstraintCoincidence_51 = Sketch_9.setCoincident(SketchLine_28.startPoint(), SketchLine_30.result())
247 SketchConstraintCoincidence_51.setName("SketchConstraintCoincidence_52")
248 SketchConstraintAngle_3 = Sketch_9.setAngle(SketchLine_28.result(), SketchLine_30.result(), 20)
249 SketchConstraintDistance_10 = Sketch_9.setDistance(SketchLine_28.startPoint(), SketchLine_29.result(), 18)
250 SketchLine_31 = Sketch_9.addLine(18.44853578320836, -63, 25, -63)
251 SketchConstraintCoincidence_52 = Sketch_9.setCoincident(SketchLine_28.endPoint(), SketchLine_31.startPoint())
252 SketchConstraintCoincidence_52.setName("SketchConstraintCoincidence_53")
253 SketchConstraintCoincidence_53 = Sketch_9.setCoincident(SketchLine_29.startPoint(), SketchLine_31.endPoint())
254 SketchConstraintCoincidence_53.setName("SketchConstraintCoincidence_54")
255 SketchLine_32 = Sketch_9.addLine(25, -63, 25, -45)
256 SketchConstraintCoincidence_54 = Sketch_9.setCoincident(SketchLine_29.startPoint(), SketchLine_32.startPoint())
257 SketchConstraintCoincidence_54.setName("SketchConstraintCoincidence_55")
258 SketchConstraintCoincidence_55 = Sketch_9.setCoincident(SketchLine_28.startPoint(), SketchLine_32.endPoint())
259 SketchConstraintCoincidence_55.setName("SketchConstraintCoincidence_56")
260 model.do()
261 ExtrusionCut_5 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_9/Face-SketchLine_28f-SketchLine_31f-SketchLine_32f")], model.selection(), model.selection(), 0, model.selection("FACE", "ExtrusionCut_4_1/Modfied_3"), 0, [model.selection("SOLID", "ExtrusionCut_4_1")])
262 Sketch_10 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_5_1/Modfied_1"))
263 SketchCircle_5 = Sketch_10.addCircle(-6.000000000000002, 4.999999999999997, 5)
264 SketchLine_33 = Sketch_10.addLine(model.selection("EDGE", "ExtrusionCut_2_1/Modfied_3&ExtrusionCut_5_1/Modfied_1"))
265 SketchConstraintDistance_11 = Sketch_10.setDistance(SketchCircle_5.center(), SketchLine_33.result(), 30)
266 SketchLine_34 = Sketch_10.addLine(model.selection("EDGE", "ExtrusionCut_5_1/Modfied_2&ExtrusionCut_5_1/Modfied_1"))
267 SketchConstraintDistance_12 = Sketch_10.setDistance(SketchCircle_5.result(), SketchLine_34.result(), 9)
268 SketchConstraintRadius_7 = Sketch_10.setRadius(SketchCircle_5.results()[1], "10/2")
269 model.do()
270 ExtrusionCut_6 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_10/Face-SketchCircle_5_2f")], model.selection(), model.selection(), 0, model.selection("FACE", "Extrusion_1_1/Generated_Face_12"), 0, [model.selection("SOLID", "ExtrusionCut_5_1")])
271 model.do()
272
273 # Test reexecution after parameter change
274 Parameter_A.setValue(62)
275 model.do()
276 model.testResultsVolumes(ExtrusionCut_6, [141392.1882461419])
277 Parameter_A.setValue(63)
278 model.do()
279
280 from GeomAPI import GeomAPI_Shape
281
282 model.testNbResults(ExtrusionCut_6, 1)
283 model.testNbSubResults(ExtrusionCut_6, [0])
284 model.testNbSubShapes(ExtrusionCut_6, GeomAPI_Shape.SOLID, [1])
285 model.testNbSubShapes(ExtrusionCut_6, GeomAPI_Shape.FACE, [37])
286 model.testNbSubShapes(ExtrusionCut_6, GeomAPI_Shape.EDGE, [192])
287 model.testNbSubShapes(ExtrusionCut_6, GeomAPI_Shape.VERTEX, [384])
288 model.testResultsVolumes(ExtrusionCut_6, [144033.64842978157685])
289
290 model.end()
291
292 assert(model.checkPythonDump())