Salome HOME
updated copyright message
[modules/shaper.git] / src / FeaturesPlugin / Test / Test2971.py
1 # Copyright (C) 2019-2023  CEA, EDF
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 email : webmaster.salome@opencascade.com
18 #
19
20 from SketchAPI import *
21
22 from salome.shaper import model
23
24 model.begin()
25 partSet = model.moduleDocument()
26 Part_1 = model.addPart(partSet)
27 Part_1_doc = Part_1.document()
28
29 toto=model.addParameter(Part_1_doc, "r_fond_ext", "1950")
30 model.addParameter(Part_1_doc, "r_fond_int", "1724")
31 model.addParameter(Part_1_doc, "r_fillet_38", "38")
32 model.addParameter(Part_1_doc, "r_fillet_40", "40")
33 model.addParameter(Part_1_doc, "ep_fond", "170")
34 model.addParameter(Part_1_doc, "ep_support", "254")
35 model.addParameter(Part_1_doc, "dist_1", "89.6")
36 model.addParameter(Part_1_doc, "ep_homo", "603.4")
37 model.addParameter(Part_1_doc, "ep_virole", "98.6")
38 model.addParameter(Part_1_doc, "h_virole", "1720")
39 model.addParameter(Part_1_doc, "r_ext_virole", "1897")
40 model.addParameter(Part_1_doc, "dist_cer_1", "3")
41 model.addParameter(Part_1_doc, "dist_cer_2", "55")
42 model.addParameter(Part_1_doc, "r_homo", "1653")
43 model.addParameter(Part_1_doc, "half_pp", "30")
44 model.addParameter(Part_1_doc, "pitch", "27.43")
45 model.addParameter(Part_1_doc, "rue_eau", "150")
46 model.addParameter(Part_1_doc, "dist_rue", "rue_eau/2 - pitch/2")
47 Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOZ"))
48 SketchLine_1 = Sketch_1.addLine(1897, 693, 1897, 2413)
49 SketchConstraintLength_1 = Sketch_1.setLength(SketchLine_1.result(), "h_virole")
50 SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_1.result())
51 SketchLine_2 = Sketch_1.addLine(1897, 2413, 1798.4, 2413)
52 SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint())
53 SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_2.result())
54 SketchConstraintLength_2 = Sketch_1.setLength(SketchLine_2.result(), "ep_virole")
55 SketchLine_3 = Sketch_1.addLine(1798.4, 2413, 1798.4, 641.4)
56 SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint())
57 SketchProjection_1 = Sketch_1.addProjection(model.selection("VERTEX", "PartSet/Origin"), False)
58 SketchPoint_1 = SketchProjection_1.createdFeature()
59 SketchConstraintDistanceHorizontal_1 = Sketch_1.setHorizontalDistance(SketchAPI_Point(SketchPoint_1).coordinates(), SketchLine_1.endPoint(), "r_ext_virole")
60 SketchLine_4 = Sketch_1.addLine(1760.4, 603.4, 1653, 603.4)
61 SketchLine_5 = Sketch_1.addLine(1653, 603.4, 1653, 0)
62 SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_5.startPoint())
63 SketchLine_6 = Sketch_1.addLine(1653, 0, 1683.450919985492, 0)
64 SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_6.startPoint())
65 SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_3.result())
66 SketchConstraintVertical_3 = Sketch_1.setVertical(SketchLine_5.result())
67 SketchConstraintLength_3 = Sketch_1.setLength(SketchLine_5.result(), "ep_homo")
68 SketchArc_1 = Sketch_1.addArc(1760.4, 641.4, 1760.4, 603.4, 1798.4, 641.4, False)
69 SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchArc_1.startPoint(), SketchLine_4.startPoint())
70 SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchArc_1.endPoint(), SketchLine_3.endPoint())
71 SketchConstraintTangent_1 = Sketch_1.setTangent(SketchArc_1.results()[1], SketchLine_3.result())
72 SketchConstraintTangent_2 = Sketch_1.setTangent(SketchArc_1.results()[1], SketchLine_4.result())
73 SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_4.result())
74 SketchConstraintDistanceVertical_1 = Sketch_1.setVerticalDistance(SketchLine_5.startPoint(), SketchLine_1.startPoint(), "dist_1 ")
75 SketchLine_7 = Sketch_1.addLine(1897, 693, 1897, -214)
76 SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchLine_7.startPoint())
77 SketchLine_8 = Sketch_1.addLine(1937, -254, 2151, -254)
78 SketchLine_9 = Sketch_1.addLine(2151, -254, 2151, -508)
79 SketchConstraintCoincidence_8 = Sketch_1.setCoincident(SketchLine_8.endPoint(), SketchLine_9.startPoint())
80 SketchLine_10 = Sketch_1.addLine(2151, -508, 1892.243906054397, -508)
81 SketchConstraintCoincidence_9 = Sketch_1.setCoincident(SketchLine_9.endPoint(), SketchLine_10.startPoint())
82 SketchConstraintParallel_1 = Sketch_1.setParallel(SketchLine_10.result(), SketchLine_8.result())
83 SketchConstraintLength_4 = Sketch_1.setLength(SketchLine_9.result(), "ep_support")
84 SketchConstraintHorizontal_3 = Sketch_1.setHorizontal(SketchLine_8.result())
85 SketchProjection_2 = Sketch_1.addProjection(model.selection("EDGE", "PartSet/OZ"), False)
86 SketchLine_11 = SketchProjection_2.createdFeature()
87 SketchArc_2 = Sketch_1.addArc(0, 3, 1723.437877704862, -41.02137767220898, 0, -1721, True)
88 SketchConstraintCoincidence_10 = Sketch_1.setCoincident(SketchLine_11.result(), SketchArc_2.center())
89 SketchLine_12 = Sketch_1.addLine(0, -1721, 0, -1891)
90 SketchConstraintCoincidence_11 = Sketch_1.setCoincident(SketchArc_2.endPoint(), SketchLine_12.startPoint())
91 SketchConstraintVertical_4 = Sketch_1.setVertical(SketchLine_12.result())
92 SketchConstraintDistanceVertical_2 = Sketch_1.setVerticalDistance(SketchArc_2.center(), SketchAPI_Line(SketchLine_11).startPoint(), "dist_cer_1")
93 SketchConstraintLength_5 = Sketch_1.setLength(SketchLine_12.result(), "ep_fond")
94 SketchArc_3 = Sketch_1.addArc(1683.450919985492, -40, 1723.437877704862, -41.02137767220898, 1683.450919985492, 0, False)
95 SketchConstraintCoincidence_12 = Sketch_1.setCoincident(SketchArc_3.startPoint(), SketchArc_2.startPoint())
96 SketchConstraintCoincidence_13 = Sketch_1.setCoincident(SketchArc_3.endPoint(), SketchLine_6.endPoint())
97 SketchConstraintTangent_3 = Sketch_1.setTangent(SketchArc_3.results()[1], SketchLine_6.result())
98 SketchConstraintTangent_4 = Sketch_1.setTangent(SketchArc_3.results()[1], SketchArc_2.results()[1])
99 SketchArc_4 = Sketch_1.addArc(1937, -214, 1897, -214, 1937, -254, False)
100 SketchConstraintCoincidence_14 = Sketch_1.setCoincident(SketchArc_4.startPoint(), SketchLine_7.endPoint())
101 SketchConstraintCoincidence_15 = Sketch_1.setCoincident(SketchArc_4.endPoint(), SketchLine_8.startPoint())
102 SketchConstraintTangent_5 = Sketch_1.setTangent(SketchArc_4.results()[1], SketchLine_7.result())
103 SketchConstraintTangent_6 = Sketch_1.setTangent(SketchArc_4.results()[1], SketchLine_8.result())
104 SketchConstraintHorizontal_4 = Sketch_1.setHorizontal(SketchLine_6.result())
105 SketchArc_5 = Sketch_1.addArc(0, 55, 0, -1891, 1854.132246315134, -535.8549848942598, False)
106 SketchConstraintCoincidence_16 = Sketch_1.setCoincident(SketchLine_11.result(), SketchArc_5.center())
107 SketchConstraintCoincidence_17 = Sketch_1.setCoincident(SketchLine_12.endPoint(), SketchArc_5.startPoint())
108 SketchConstraintDistanceVertical_3 = Sketch_1.setVerticalDistance(SketchArc_5.center(), SketchAPI_Line(SketchLine_11).startPoint(), "dist_cer_2")
109 SketchArc_6 = Sketch_1.addArc(1892.243906054397, -548, 1892.243906054397, -508, 1854.132246315134, -535.8549848942598, False)
110 SketchConstraintCoincidence_18 = Sketch_1.setCoincident(SketchArc_6.startPoint(), SketchLine_10.endPoint())
111 SketchConstraintCoincidence_19 = Sketch_1.setCoincident(SketchArc_6.endPoint(), SketchArc_5.endPoint())
112 SketchConstraintTangent_7 = Sketch_1.setTangent(SketchArc_6.results()[1], SketchLine_10.result())
113 SketchConstraintTangent_8 = Sketch_1.setTangent(SketchArc_6.results()[1], SketchArc_5.results()[1])
114 SketchConstraintRadius_1 = Sketch_1.setRadius(SketchArc_6.results()[1], "r_fillet_40")
115 SketchConstraintRadius_2 = Sketch_1.setRadius(SketchArc_4.results()[1], "r_fillet_40")
116 SketchConstraintRadius_3 = Sketch_1.setRadius(SketchArc_3.results()[1], "r_fillet_40")
117 SketchConstraintRadius_4 = Sketch_1.setRadius(SketchArc_1.results()[1], "r_fillet_38")
118 SketchConstraintRadius_5 = Sketch_1.setRadius(SketchArc_2.results()[1], "r_fond_int")
119 SketchConstraintVertical_5 = Sketch_1.setVertical(SketchLine_7.result())
120 SketchConstraintVertical_6 = Sketch_1.setVertical(SketchLine_9.result())
121 SketchConstraintDistanceHorizontal_2 = Sketch_1.setHorizontalDistance(SketchLine_12.startPoint(), SketchLine_7.startPoint(), "r_ext_virole")
122 SketchConstraintDistanceHorizontal_3 = Sketch_1.setHorizontalDistance(SketchAPI_Line(SketchLine_11).startPoint(), SketchLine_6.startPoint(), "r_homo")
123 SketchConstraintDistanceVertical_4 = Sketch_1.setVerticalDistance(SketchAPI_Line(SketchLine_11).startPoint(), SketchLine_5.startPoint(), "ep_homo")
124 SketchConstraintDistanceHorizontal_4 = Sketch_1.setHorizontalDistance(SketchArc_4.startPoint(), SketchLine_9.startPoint(), "ep_support")
125 SketchConstraintDistanceVertical_5 = Sketch_1.setVerticalDistance(SketchAPI_Line(SketchLine_11).startPoint(), SketchLine_9.startPoint(), "ep_support")
126 SketchLine_13 = Sketch_1.addLine(1723.437877704863, -41.02137767220899, 1897, -41.02137767220221)
127 SketchLine_13.setName("SketchLine_23")
128 SketchLine_13.result().setName("SketchLine_23")
129 SketchConstraintCoincidence_20 = Sketch_1.setCoincident(SketchArc_2.startPoint(), SketchLine_13.startPoint())
130 SketchConstraintCoincidence_21 = Sketch_1.setCoincident(SketchLine_13.endPoint(), SketchLine_7.result())
131 SketchConstraintHorizontal_5 = Sketch_1.setHorizontal(SketchLine_13.result())
132 SketchLine_14 = Sketch_1.addLine(1897, 693, 1798.4, 693)
133 SketchLine_14.setName("SketchLine_24")
134 SketchLine_14.result().setName("SketchLine_24")
135 SketchConstraintCoincidence_22 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchLine_14.startPoint())
136 SketchConstraintCoincidence_23 = Sketch_1.setCoincident(SketchLine_14.endPoint(), SketchLine_3.result())
137 SketchConstraintHorizontal_6 = Sketch_1.setHorizontal(SketchLine_14.result())
138 model.do()
139 Sketch_1.setName("GVProfile")
140 Sketch_1.result().setName("GVProfile")
141 Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("COMPOUND", "all-in-GVProfile")], model.selection("EDGE", "PartSet/OZ"), 180, 0)
142 Revolution_1.setName("GVBody")
143 Revolution_1.result().setName("Revolution_1_1")
144 Revolution_1.result().subResult(0).setName("GVBody_1_1")
145 Revolution_1.result().subResult(1).setName("GVBody_1_2")
146 Revolution_1.result().subResult(2).setName("GVBody_1_3")
147 Sketch_2 = model.addSketch(Part_1_doc, model.standardPlane("XOZ"))
148 SketchProjection_3 = Sketch_2.addProjection(model.selection("VERTEX", "PartSet/Origin"), False)
149 SketchPoint_2 = SketchProjection_3.createdFeature()
150 SketchProjection_4 = Sketch_2.addProjection(model.selection("EDGE", "PartSet/OX"), False)
151 SketchLine_15 = SketchProjection_4.createdFeature()
152 SketchLine_15.setName("SketchLine_14")
153 SketchLine_15.result().setName("SketchLine_14")
154 SketchLine_16 = Sketch_2.addLine(30, -40, 30, -1806)
155 SketchLine_16.setName("SketchLine_15")
156 SketchLine_16.result().setName("SketchLine_15")
157 SketchLine_17 = Sketch_2.addLine(30, -1806, 0, -1806)
158 SketchLine_17.setName("SketchLine_16")
159 SketchLine_17.result().setName("SketchLine_16")
160 SketchConstraintCoincidence_24 = Sketch_2.setCoincident(SketchLine_16.endPoint(), SketchLine_17.startPoint())
161 SketchLine_18 = Sketch_2.addLine(0, 0, 70, 0)
162 SketchLine_18.setName("SketchLine_18")
163 SketchLine_18.result().setName("SketchLine_18")
164 SketchConstraintCoincidence_25 = Sketch_2.setCoincident(SketchAPI_Point(SketchPoint_2).coordinates(), SketchLine_18.startPoint())
165 SketchArc_7 = Sketch_2.addArc(70, -40, 70, 0, 30, -40, False)
166 SketchConstraintCoincidence_26 = Sketch_2.setCoincident(SketchLine_18.endPoint(), SketchArc_7.startPoint())
167 SketchConstraintTangent_9 = Sketch_2.setTangent(SketchLine_18.result(), SketchArc_7.results()[1])
168 SketchConstraintCoincidence_27 = Sketch_2.setCoincident(SketchLine_16.result(), SketchArc_7.endPoint())
169 SketchConstraintRadius_6 = Sketch_2.setRadius(SketchArc_7.results()[1], "r_fillet_40")
170 SketchConstraintHorizontal_7 = Sketch_2.setHorizontal(SketchLine_18.result())
171 SketchConstraintVertical_7 = Sketch_2.setVertical(SketchLine_16.result())
172 SketchConstraintCoincidence_28 = Sketch_2.setCoincident(SketchLine_16.startPoint(), SketchArc_7.endPoint())
173 SketchConstraintDistanceHorizontal_5 = Sketch_2.setHorizontalDistance(SketchLine_18.startPoint(), SketchLine_16.startPoint(), "half_pp")
174 SketchConstraintHorizontal_8 = Sketch_2.setHorizontal(SketchLine_17.result())
175 SketchConstraintTangent_10 = Sketch_2.setTangent(SketchArc_7.results()[1], SketchLine_16.result())
176 SketchProjection_5 = Sketch_2.addProjection(model.selection("EDGE", "PartSet/OZ"), False)
177 SketchProjection_5.setName("SketchProjection_6")
178 SketchProjection_5.result().setName("SketchProjection_6")
179 SketchLine_19 = SketchProjection_5.createdFeature()
180 SketchLine_19.setName("SketchLine_19")
181 SketchLine_19.result().setName("SketchLine_19")
182 SketchProjection_6 = Sketch_2.addProjection(model.selection("EDGE", "[GVBody_1_3/From_Face][GVBody_1_3/To_Face]"), False)
183 SketchProjection_6.setName("SketchProjection_7")
184 SketchProjection_6.result().setName("SketchProjection_7")
185 SketchLine_20 = SketchProjection_6.createdFeature()
186 SketchLine_20.setName("SketchLine_25")
187 SketchLine_20.result().setName("SketchLine_25")
188 SketchConstraintMiddle_1 = Sketch_2.setMiddlePoint(SketchLine_20.result(), SketchLine_17.endPoint())
189 SketchProjection_7 = Sketch_2.addProjection(model.selection("EDGE", "PartSet/OZ"), False)
190 SketchProjection_7.setName("SketchProjection_8")
191 SketchProjection_7.result().setName("SketchProjection_8")
192 SketchLine_21 = SketchProjection_7.createdFeature()
193 SketchLine_21.setName("SketchLine_21")
194 SketchLine_21.result().setName("SketchLine_21")
195 SketchConstraintMirror_1_objects = [SketchLine_18.result(), SketchArc_7.results()[1], SketchLine_16.result(), SketchLine_17.result()]
196 SketchConstraintMirror_1 = Sketch_2.addMirror(SketchLine_21.result(), SketchConstraintMirror_1_objects)
197 [SketchLine_22, SketchArc_8, SketchLine_23, SketchLine_24] = SketchConstraintMirror_1.mirrored()
198 SketchLine_24.setName("SketchLine_27")
199 SketchLine_24.result().setName("SketchLine_27")
200 SketchLine_23.setName("SketchLine_26")
201 SketchLine_23.result().setName("SketchLine_26")
202 SketchLine_22.setName("SketchLine_22")
203 SketchLine_22.result().setName("SketchLine_22")
204 model.do()
205 Sketch_2.setName("PPProfile")
206 Sketch_2.result().setName("PPProfile")
207 Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "all-in-PPProfile")], model.selection(), 0, 2300)
208 Cut_1 = model.addCut(Part_1_doc, [model.selection("COMPOUND", "all-in-Extrusion_1")], [model.selection("COMPSOLID", "Revolution_1_1")])
209 Recover_1 = model.addRecover(Part_1_doc, Cut_1, [Revolution_1.result()])
210 Remove_SubShapes_1 = model.addRemoveSubShapes(Part_1_doc, model.selection("COMPOUND", "Cut_1_1"))
211 Remove_SubShapes_1.setSubShapesToRemove([model.selection("SOLID", "Cut_1_1_2")])
212 Sketch_3 = model.addSketch(Part_1_doc, model.standardPlane("XOY"))
213 SketchLine_25 = Sketch_3.addLine(0, 0, 0, 1653)
214 SketchLine_25.setName("SketchLine_28")
215 SketchLine_25.result().setName("SketchLine_28")
216 SketchProjection_8 = Sketch_3.addProjection(model.selection("VERTEX", "[Recover_1_1_2/Modified_Face&GVProfile/SketchLine_6][Recover_1_1_2/Modified_Face&GVProfile/SketchArc_3_2]__cc"), False)
217 SketchProjection_8.setName("SketchProjection_9")
218 SketchProjection_8.result().setName("SketchProjection_9")
219 SketchPoint_3 = SketchProjection_8.createdFeature()
220 SketchConstraintCoincidence_29 = Sketch_3.setCoincident(SketchLine_25.startPoint(), SketchPoint_3.result())
221 SketchProjection_9 = Sketch_3.addProjection(model.selection("VERTEX", "[(Remove_SubShapes_1_1/Modified_Face&PPProfile/SketchArc_7_2)(Remove_SubShapes_1_1/Modified_Face&Extrusion_1_1/To_Face)(Remove_SubShapes_1_1/Modified_Face&GVProfile/SketchLine_6&PPProfile/SketchLine_18)][Remove_SubShapes_1_1/Modified_Face&GVProfile/SketchLine_6&PPProfile/SketchLine_18][Remove_SubShapes_1_1/Modified_Face&GVProfile/SketchLine_6&PPProfile/SketchLine_22][(Remove_SubShapes_1_1/Modified_Face&Extrusion_1_1/To_Face)(Remove_SubShapes_1_1/Modified_Face&GVProfile/SketchLine_6&PPProfile/SketchLine_22)(Remove_SubShapes_1_1/Modified_Face&PPProfile/SketchArc_8_2)]"), False)
222 SketchProjection_9.setName("SketchProjection_10")
223 SketchProjection_9.result().setName("SketchProjection_10")
224 SketchPoint_4 = SketchProjection_9.createdFeature()
225 SketchConstraintCoincidence_30 = Sketch_3.setCoincident(SketchLine_25.endPoint(), SketchPoint_4.result())
226 SketchLine_26 = Sketch_3.addLine(0, 0, -1653, 0)
227 SketchLine_26.setName("SketchLine_29")
228 SketchLine_26.result().setName("SketchLine_29")
229 SketchConstraintCoincidence_31 = Sketch_3.setCoincident(SketchLine_25.startPoint(), SketchLine_26.startPoint())
230 SketchProjection_10 = Sketch_3.addProjection(model.selection("VERTEX", "Recover_1_1_2/Modified_Vertex&weak_name_8"), False)
231 SketchProjection_10.setName("SketchProjection_11")
232 SketchProjection_10.result().setName("SketchProjection_11")
233 SketchPoint_5 = SketchProjection_10.createdFeature()
234 SketchConstraintCoincidence_32 = Sketch_3.setCoincident(SketchLine_26.endPoint(), SketchPoint_5.result())
235 SketchArc_9 = Sketch_3.addArc(0, 0, -1653, 0, 0, 1653, True)
236 SketchConstraintCoincidence_33 = Sketch_3.setCoincident(SketchLine_25.startPoint(), SketchArc_9.center())
237 SketchConstraintCoincidence_34 = Sketch_3.setCoincident(SketchLine_26.endPoint(), SketchArc_9.startPoint())
238 SketchConstraintCoincidence_35 = Sketch_3.setCoincident(SketchLine_25.result(), SketchArc_9.endPoint())
239 SketchLine_27 = Sketch_3.addLine(-75, 0, -75, 1651.297671529879)
240 SketchLine_27.setName("SketchLine_30")
241 SketchLine_27.result().setName("SketchLine_30")
242 SketchConstraintCoincidence_36 = Sketch_3.setCoincident(SketchLine_27.startPoint(), SketchLine_26.result())
243 SketchConstraintCoincidence_37 = Sketch_3.setCoincident(SketchLine_27.endPoint(), SketchArc_9.results()[1])
244 SketchConstraintVertical_8 = Sketch_3.setVertical(SketchLine_27.result())
245 SketchConstraintDistanceHorizontal_6 = Sketch_3.setHorizontalDistance(SketchLine_27.startPoint(), SketchArc_9.center(), "rue_eau/2")
246 SketchLine_28 = Sketch_3.addLine(-75, 0, -1205.745800334843, 1130.745800334845)
247 SketchLine_28.setName("SketchLine_31")
248 SketchLine_28.result().setName("SketchLine_31")
249 SketchLine_28.setAuxiliary(True)
250 SketchConstraintCoincidence_38 = Sketch_3.setCoincident(SketchLine_27.startPoint(), SketchLine_28.startPoint())
251 SketchConstraintCoincidence_39 = Sketch_3.setCoincident(SketchLine_28.endPoint(), SketchArc_9.results()[1])
252 SketchConstraintAngle_1 = Sketch_3.setAngle(SketchLine_28.result(), SketchLine_26.result(), 45)
253 SketchLine_29 = Sketch_3.addLine(-743.85, 0, -743.85, 825.6488357649396)
254 SketchLine_29.setName("SketchLine_32")
255 SketchLine_29.result().setName("SketchLine_32")
256 SketchConstraintCoincidence_40 = Sketch_3.setCoincident(SketchLine_29.startPoint(), SketchLine_26.result())
257 SketchLine_30 = Sketch_3.addLine(-743.85, 825.6488357649396, -75, 825.6488357649395)
258 SketchLine_30.setName("SketchLine_33")
259 SketchLine_30.result().setName("SketchLine_33")
260 SketchConstraintCoincidence_41 = Sketch_3.setCoincident(SketchLine_29.endPoint(), SketchLine_30.startPoint())
261 SketchConstraintCoincidence_42 = Sketch_3.setCoincident(SketchLine_30.endPoint(), SketchLine_27.result())
262 SketchLine_31 = Sketch_3.addLine(-743.85, 825.6488357649396, -1127.232311682702, 1209.031147447615)
263 SketchLine_31.setName("SketchLine_34")
264 SketchLine_31.result().setName("SketchLine_34")
265 SketchConstraintCoincidence_43 = Sketch_3.setCoincident(SketchLine_29.endPoint(), SketchLine_31.startPoint())
266 SketchConstraintCoincidence_44 = Sketch_3.setCoincident(SketchLine_31.endPoint(), SketchArc_9.results()[1])
267 SketchConstraintParallel_2 = Sketch_3.setParallel(SketchLine_31.result(), SketchLine_28.result())
268 SketchConstraintMiddle_2 = Sketch_3.setMiddlePoint(SketchLine_30.endPoint(), SketchLine_27.result())
269 SketchConstraintHorizontal_9 = Sketch_3.setHorizontal(SketchLine_30.result())
270 SketchConstraintVertical_9 = Sketch_3.setVertical(SketchLine_29.result())
271 SketchConstraintDistanceHorizontal_7 = Sketch_3.setHorizontalDistance(SketchLine_25.startPoint(), SketchLine_29.startPoint(), "r_homo*0.5*0.9")
272 SketchProjection_11 = Sketch_3.addProjection(model.selection("EDGE", "PartSet/OY"), False)
273 SketchProjection_11.setName("SketchProjection_12")
274 SketchProjection_11.result().setName("SketchProjection_12")
275 SketchLine_32 = SketchProjection_11.createdFeature()
276 SketchLine_32.setName("SketchLine_35")
277 SketchLine_32.result().setName("SketchLine_35")
278 SketchConstraintMirror_2_objects = [SketchLine_26.result(), SketchLine_29.result(), SketchArc_9.results()[1], SketchLine_31.result(), SketchLine_30.result(), SketchLine_27.result()]
279 SketchConstraintMirror_2 = Sketch_3.addMirror(SketchLine_32.result(), SketchConstraintMirror_2_objects)
280 [SketchLine_33, SketchLine_34, SketchArc_10, SketchLine_35, SketchLine_36, SketchLine_37] = SketchConstraintMirror_2.mirrored()
281 SketchLine_37.setName("SketchLine_40")
282 SketchLine_37.result().setName("SketchLine_40")
283 SketchLine_36.setName("SketchLine_39")
284 SketchLine_36.result().setName("SketchLine_39")
285 SketchLine_35.setName("SketchLine_38")
286 SketchLine_35.result().setName("SketchLine_38")
287 SketchLine_34.setName("SketchLine_37")
288 SketchLine_34.result().setName("SketchLine_37")
289 SketchLine_33.setName("SketchLine_36")
290 SketchLine_33.result().setName("SketchLine_36")
291 model.do()
292 Sketch_3.setName("PHomoProfile")
293 Sketch_3.result().setName("PHomoProfile")
294 Sketch_3.changeFacesOrder([[SketchLine_25.result(), SketchArc_9.results()[1], SketchLine_27.result(), SketchLine_27.result(), SketchLine_26.result()],
295                            [SketchLine_29.result(), SketchLine_31.result(), SketchArc_9.results()[1], SketchLine_26.result()],
296                            [SketchLine_27.result(), SketchLine_30.result(), SketchLine_29.result(), SketchLine_26.result()],
297                            [SketchArc_9.results()[1], SketchLine_31.result(), SketchLine_30.result(), SketchLine_27.result()],
298                            [SketchLine_33.result(), SketchLine_37.result(), SketchLine_37.result(), SketchArc_10.results()[1], SketchLine_25.result()],
299                            [SketchLine_33.result(), SketchArc_10.results()[1], SketchLine_35.result(), SketchLine_34.result()],
300                            [SketchLine_33.result(), SketchLine_34.result(), SketchLine_36.result(), SketchLine_37.result()],
301                            [SketchArc_10.results()[1], SketchLine_37.result(), SketchLine_36.result(), SketchLine_35.result()]
302                           ])
303 Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "all-in-PHomoProfile")], model.selection(), "ep_homo", 0)
304 Partition_1_objects = [model.selection("SOLID", "Remove_SubShapes_1_1"), model.selection("COMPSOLID", "Recover_1_1"), model.selection("COMPSOLID", "Extrusion_2_1")]
305 Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects)
306 Group_1 = model.addGroup(Part_1_doc, [model.selection("SOLID", "Partition_1_1_2")])
307 Group_1.setName("virole")
308 Group_1.result().setName("virole")
309 Group_2 = model.addGroup(Part_1_doc, [model.selection("SOLID", "Partition_1_1_4")])
310 Group_2.setName("bol")
311 Group_2.result().setName("bol")
312 Group_3 = model.addGroup(Part_1_doc, [model.selection("SOLID", "Partition_1_1_1")])
313 Group_3.setName("pp")
314 Group_3.result().setName("pp")
315 Group_4_objects = [model.selection("SOLID", "Partition_1_1_6"),
316                    model.selection("SOLID", "Partition_1_1_8"),
317                    model.selection("SOLID", "Partition_1_1_7"),
318                    model.selection("SOLID", "Partition_1_1_12"),
319                    model.selection("SOLID", "Partition_1_1_11"),
320                    model.selection("SOLID", "Partition_1_1_10")]
321 Group_4 = model.addGroup(Part_1_doc, Group_4_objects)
322 Group_4.setName("pt")
323 Group_4.result().setName("pt")
324 Group_5 = model.addGroup(Part_1_doc, [model.selection("SOLID", "Partition_1_1_3")])
325 Group_5.setName("pt_virole")
326 Group_5.result().setName("pt_virole")
327 Group_6 = model.addGroup(Part_1_doc, [model.selection("SOLID", "Partition_1_1_9"), model.selection("SOLID", "Partition_1_1_5")])
328 Group_6.setName("axe_eau")
329 Group_6.result().setName("axe_eau")
330 Group_7_objects = [model.selection("FACE", "Partition_1_1_3/Modified_Face&GVProfile/SketchLine_4"),
331                    model.selection("FACE", "Recover_1_1_2/Modified_Face&GVProfile/SketchArc_1_2"),
332                    model.selection("FACE", "Recover_1_1_2/Modified_Face&GVProfile/SketchLine_3"),
333                    model.selection("FACE", "Recover_1_1_1/Modified_Face&GVProfile/SketchLine_3"),
334                    model.selection("FACE", "Extrusion_2_1_1/To_Face"),
335                    model.selection("FACE", "Extrusion_2_1_5/To_Face")]
336 Group_7 = model.addGroup(Part_1_doc, Group_7_objects)
337 Group_7.setName("faces_sec")
338 Group_7.result().setName("faces_sec")
339 Group_8_objects = [model.selection("FACE", "(Partition_1_1_4/Modified_Face&GVProfile/SketchLine_23)(Partition_1_1_4/Modified_Face&GVBody_1_3/To_Face)(Recover_1_1_3/Modified_Face&GVProfile/SketchArc_5_2)2(Recover_1_1_3/Modified_Face&GVProfile/SketchArc_6_2)2(Recover_1_1_3/Modified_Face&GVProfile/SketchLine_10)2(Recover_1_1_3/Modified_Face&GVProfile/SketchLine_9)2(Recover_1_1_3/Modified_Face&GVProfile/SketchLine_8)2(Recover_1_1_3/Modified_Face&GVProfile/SketchArc_4_2)2(Recover_1_1_3/Modified_Face&GVProfile/SketchLine_7)2(Partition_1_1_4/Modified_Face&GVBody_1_3/From_Face)2"),
340                    model.selection("FACE", "(Partition_1_1_3/Modified_Face&GVProfile/SketchLine_23)(Partition_1_1_3/Modified_Face&GVBody_1_2/To_Face)(Recover_1_1_2/Modified_Face&GVProfile/SketchLine_3)2(Recover_1_1_2/Modified_Face&GVProfile/SketchArc_1_2)2(Partition_1_1_3/Modified_Face&GVProfile/SketchLine_4)2(Partition_1_1_3/Modified_Face&GVProfile/SketchLine_6&PPProfile/SketchLine_18)2(Partition_1_1_3/Modified_Face&GVProfile/SketchLine_6&PPProfile/SketchLine_22)2(Recover_1_1_2/Modified_Face&GVProfile/SketchLine_7)2(Recover_1_1_2/Modified_Face&GVProfile/SketchLine_24)2(Partition_1_1_3/Modified_Face&GVBody_1_2/From_Face)2"),
341                    model.selection("FACE", "(Partition_1_1_3/Modified_Face&GVProfile/SketchLine_6&PPProfile/SketchLine_22)(Partition_1_1_3/Modified_Face&GVBody_1_2/To_Face)"),
342                    model.selection("FACE", "Remove_SubShapes_1_1/Modified_Face&PPProfile/SketchLine_26"),
343                    model.selection("FACE", "Remove_SubShapes_1_1/Modified_Face&PPProfile/SketchArc_8_2"),
344                    model.selection("FACE", "(Partition_1_1_5/Modified_Face&PHomoProfile/SketchArc_9_2&GVProfile/SketchLine_5)(Extrusion_2_1_4/Generated_Face&PHomoProfile/SketchLine_30)(Extrusion_2_1_3/Generated_Face&PHomoProfile/SketchLine_30)(Partition_1_1_5/Modified_Face&PHomoProfile/SketchLine_29)(Partition_1_1_5/Modified_Face&Extrusion_2_1_1/From_Face&PPProfile/SketchLine_22)"),
345                    model.selection("FACE", "Remove_SubShapes_1_1/Modified_Face&PPProfile/SketchLine_15"),
346                    model.selection("FACE", "Remove_SubShapes_1_1/Modified_Face&PPProfile/SketchArc_7_2"),
347                    model.selection("FACE", "(Partition_1_1_9/Modified_Face&PHomoProfile/SketchLine_36)(Extrusion_2_1_7/Generated_Face&PHomoProfile/SketchLine_40)(Extrusion_2_1_8/Generated_Face&PHomoProfile/SketchLine_40)(Partition_1_1_9/Modified_Face&PHomoProfile/SketchArc_10_2&GVProfile/SketchLine_5)(Partition_1_1_9/Modified_Face&Extrusion_2_1_5/From_Face&PPProfile/SketchLine_18)"),
348                    model.selection("FACE", "(Partition_1_1_4/Modified_Face&GVProfile/SketchLine_23)(Partition_1_1_4/Modified_Face&GVBody_1_3/From_Face)(Recover_1_1_3/Modified_Face&GVProfile/SketchArc_5_2)2(Recover_1_1_3/Modified_Face&GVProfile/SketchArc_6_2)2(Recover_1_1_3/Modified_Face&GVProfile/SketchLine_10)2(Recover_1_1_3/Modified_Face&GVProfile/SketchLine_9)2(Recover_1_1_3/Modified_Face&GVProfile/SketchLine_8)2(Recover_1_1_3/Modified_Face&GVProfile/SketchArc_4_2)2(Recover_1_1_3/Modified_Face&GVProfile/SketchLine_7)2(Partition_1_1_4/Modified_Face&GVBody_1_3/To_Face)2"),
349                    model.selection("FACE", "(Partition_1_1_3/Modified_Face&GVProfile/SketchLine_23)(Partition_1_1_3/Modified_Face&GVBody_1_2/From_Face)(Recover_1_1_2/Modified_Face&GVProfile/SketchLine_3)2(Recover_1_1_2/Modified_Face&GVProfile/SketchArc_1_2)2(Partition_1_1_3/Modified_Face&GVProfile/SketchLine_4)2(Partition_1_1_3/Modified_Face&GVProfile/SketchLine_6&PPProfile/SketchLine_18)2(Partition_1_1_3/Modified_Face&GVProfile/SketchLine_6&PPProfile/SketchLine_22)2(Recover_1_1_2/Modified_Face&GVProfile/SketchLine_7)2(Recover_1_1_2/Modified_Face&GVProfile/SketchLine_24)2(Partition_1_1_3/Modified_Face&GVBody_1_2/To_Face)2"),
350                    model.selection("FACE", "(Partition_1_1_3/Modified_Face&GVProfile/SketchLine_6&PPProfile/SketchLine_18)(Partition_1_1_3/Modified_Face&GVBody_1_2/From_Face)")]
351 Group_8 = model.addGroup(Part_1_doc, Group_8_objects)
352 Group_8.setName("faces_pr")
353 Group_8.result().setName("faces_pr")
354 Group_9_objects = [model.selection("FACE", "Partition_1_1_6/Modified_Face&PHomoProfile/SketchLine_29"),
355                    model.selection("FACE", "Extrusion_2_1_3/Generated_Face&PHomoProfile/SketchLine_29"),
356                    model.selection("FACE", "Extrusion_2_1_7/Generated_Face&PHomoProfile/SketchLine_36"),
357                    model.selection("FACE", "Partition_1_1_10/Modified_Face&PHomoProfile/SketchLine_36")]
358 Group_9 = model.addGroup(Part_1_doc, Group_9_objects)
359 Group_9.setName("pt_symz")
360 Group_9.result().setName("pt_symz")
361 Group_10_objects = [model.selection("FACE", "Recover_1_1_1/Modified_Face&GVBody_1_1/To_Face"),
362                     model.selection("FACE", "Recover_1_1_1/Modified_Face&GVBody_1_1/From_Face"),
363                     model.selection("FACE", "Partition_1_1_3/Modified_Face&GVBody_1_2/From_Face"),
364                     model.selection("FACE", "Partition_1_1_10/Modified_Face&PHomoProfile/SketchLine_36"),
365                     model.selection("FACE", "Extrusion_2_1_7/Generated_Face&PHomoProfile/SketchLine_36"),
366                     model.selection("FACE", "Extrusion_2_1_3/Generated_Face&PHomoProfile/SketchLine_29"),
367                     model.selection("FACE", "Partition_1_1_6/Modified_Face&PHomoProfile/SketchLine_29"),
368                     model.selection("FACE", "Partition_1_1_3/Modified_Face&GVBody_1_2/To_Face"),
369                     model.selection("FACE", "Partition_1_1_5/Modified_Face&PHomoProfile/SketchLine_29"),
370                     model.selection("FACE", "Partition_1_1_9/Modified_Face&PHomoProfile/SketchLine_36"),
371                     model.selection("FACE", "Partition_1_1_1/Modified_Face&Extrusion_1_1/To_Face"),
372                     model.selection("FACE", "Partition_1_1_4/Modified_Face&GVBody_1_3/From_Face"),
373                     model.selection("FACE", "Partition_1_1_4/Modified_Face&GVBody_1_3/To_Face")]
374 Group_10 = model.addGroup(Part_1_doc, Group_10_objects)
375 Group_10.setName("symz")
376 Group_10.result().setName("symz")
377 Group_11 = model.addGroup(Part_1_doc, [model.selection("FACE", "Recover_1_1_3/Modified_Face&GVProfile/SketchLine_10")])
378 Group_11.setName("appui")
379 Group_11.result().setName("appui")
380 Group_12 = model.addGroup(Part_1_doc, [model.selection("FACE", "Recover_1_1_1/Modified_Face&GVProfile/SketchLine_2")])
381 Group_12.setName("sup")
382 Group_12.result().setName("sup")
383 Group_13_objects = [model.selection("FACE", "Partition_1_1_6/Modified_Face&Extrusion_2_1_2/To_Face"),
384                     model.selection("FACE", "Extrusion_2_1_4/To_Face"),
385                     model.selection("FACE", "Extrusion_2_1_3/To_Face"),
386                     model.selection("FACE", "Extrusion_2_1_8/To_Face"),
387                     model.selection("FACE", "Extrusion_2_1_7/To_Face"),
388                     model.selection("FACE", "Partition_1_1_10/Modified_Face&Extrusion_2_1_6/To_Face")]
389 Group_13 = model.addGroup(Part_1_doc, Group_13_objects)
390 Group_13.setName("pt_sec")
391 Group_13.result().setName("pt_sec")
392 Group_14_objects = [model.selection("FACE", "Partition_1_1_6/Modified_Face&Extrusion_2_1_2/From_Face"),
393                     model.selection("FACE", "Extrusion_2_1_3/From_Face"),
394                     model.selection("FACE", "Extrusion_2_1_4/From_Face"),
395                     model.selection("FACE", "Extrusion_2_1_7/From_Face"),
396                     model.selection("FACE", "Extrusion_2_1_8/From_Face"),
397                     model.selection("FACE", "Partition_1_1_10/Modified_Face&Extrusion_2_1_6/From_Face")]
398 Group_14 = model.addGroup(Part_1_doc, Group_14_objects)
399 Group_14.setName("pt_pr")
400 Group_14.result().setName("pt_pr")
401 Group_15 = model.addGroup(Part_1_doc, [model.selection("VERTEX", "Recover_1_1_3/Modified_Vertex&weak_name_9")])
402 Group_15.setName("NO_DX")
403 Group_15.result().setName("NO_DX")
404 model.end()
405
406 from ModelAPI import *
407
408 aFactory = ModelAPI_Session.get().validators()
409
410 # Check groups
411 for i in range(Part_1_doc.size("Groups")):
412   GroupFeature = Part_1_doc.feature(objectToResult(Part_1_doc.object("Groups", i)))
413   assert(aFactory.validate(GroupFeature))
414
415 model.begin()
416 toto.setValue(2000)
417 model.end()
418
419 # Check groups again
420 for i in range(Part_1_doc.size("Groups")):
421   GroupFeature = Part_1_doc.feature(objectToResult(Part_1_doc.object("Groups", i)))
422   assert(aFactory.validate(GroupFeature))