1 <!-- Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
4 <workbench id="Sketch">
8 nested="SketchPoint SketchLine SketchCircle SketchArc SketchConstraintLength SketchConstraintRadius SketchConstraintDistance SketchConstraintParallel SketchConstraintPerpendicular SketchConstraintRigid SketchConstraintHorizontal SketchConstraintVertical SketchConstraintEqual SketchConstraintTangent SketchConstraintFillet SketchConstraintCoincidence SketchConstraintMirror SketchConstraintAngle SketchMultiRotation SketchMultiTranslation SketchConstraintCollinear SketchConstraintMiddle"
9 when_nested="accept abort"
11 tooltip="Create sketch"
12 icon=":icons/sketch.png">
13 <sketch-start-label id="External" title="Select a plane on which to create a sketch" tooltip="Select a plane on which to create a sketch">
14 <validator id="GeomValidators_Face" parameters="plane"/>
16 <error_label id="SolverError"/>
17 <validator id="SketchPlugin_SolverErrorValidator"/>
18 <!--icon=":pictures/x_point.png"-->
20 <feature id="SketchPoint" title="Point" tooltip="Create point" icon=":icons/point.png">
21 <sketch-2dpoint_selector id="PointCoordindates" accept_expressions="0" title="Point" tooltip="Point coordinates"/>
22 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
24 <feature id="SketchLine" title="Line" tooltip="Create line" icon=":icons/line.png">
25 <sketch-2dpoint_selector id="StartPoint" accept_expressions="0" title="Start point" tooltip="Start point coordinates" previous_feature_param="EndPoint"/>
26 <sketch-2dpoint_selector id="EndPoint" accept_expressions="0" title="End point" tooltip="End point coordinates"/>
27 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
28 <validator id="GeomValidators_Different" parameters="StartPoint,EndPoint"/>
35 tooltip="Create circle"
36 icon=":icons/circle.png">
37 <toolbox id="CircleType">
38 <box id="CenterRadius" title="Center and radius" icon=":icons/circle_pt_rad_32x32.png">
39 <sketch-2dpoint_selector id="CircleCenter" accept_expressions="0" title="Center" tooltip="Center coordinates"/>
40 <point2ddistance id="CircleRadius" accept_expressions="0" first_point="CircleCenter" label="Radius:" min="0" step="1.0" default="0" icon=":icons/radius.png" tooltip="Set radius">
41 <validator id="GeomValidators_Positive"/>
44 <box id="ThreePoints" title="Tree points" icon=":icons/circle_3pt_32x32.png">
45 <sketch-2dpoint_selector id="FirstPoint" accept_expressions="0" title="First point" tooltip="First point"/>
46 <sketch-2dpoint_selector id="SecondPoint" accept_expressions="0" title="Second point" tooltip="Second point"/>
47 <sketch-2dpoint_selector id="ThirdPoint" accept_expressions="0" title="Third point" tooltip="Third point"/>
50 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
53 <feature id="SketchArc" title="Arc" tooltip="Create arc" icon=":icons/arc.png">
54 <sketch-2dpoint_selector id="ArcCenter" accept_expressions="0" title="Center" tooltip="Center of a circle"/>
55 <sketch-2dpoint_selector id="ArcStartPoint" accept_expressions="0" title="Start point" tooltip="Start point"/>
56 <sketch-2dpoint_selector id="ArcEndPoint" accept_expressions="0" title="End point" tooltip="End point"/>
57 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
58 <validator id="GeomValidators_Different" parameters="ArcCenter,ArcStartPoint,ArcEndPoint"/>
60 <!-- SketchConstraintFillet -->
61 <feature id="SketchConstraintFillet" title="Fillet" tooltip="Create constraint defining fillet between two objects" icon=":icons/fillet.png">
62 <!--<sketch_shape_selector id="ConstraintEntityA"
63 label="Point" tooltip="Select point for fillet (should be shared by two entities only)" shape_types="vertex">
64 <validator id="SketchPlugin_FilletVertexValidator"/>
65 </sketch_shape_selector>-->
66 <sketch_multi_selector id="ConstraintEntityA"
68 tooltip="Select points for fillets"
69 type_choice="Vertices">
70 <validator id="SketchPlugin_FilletVertexValidator"/>
71 </sketch_multi_selector>
72 <doublevalue label="Radius" tooltip="Fillet arc radius" id="ConstraintValue" accept_expressions="0" min="0" use_reset="false">
73 <validator id="GeomValidators_Positive"/>
75 <validator id="PartSet_FilletSelection"/>
79 <group id="Constraints">
80 <!-- SketchConstraintDistance -->
82 id="SketchConstraintDistance"
84 tooltip="Set fixed distance from a point to an object"
85 icon=":icons/distance.png">
86 <label title="Select objects for distance definition. Following objects can be accepted: point, line or arc end point, center of circle or arc."/>
87 <sketch_shape_selector
88 id="ConstraintEntityA"
90 tooltip="Select point, line end point, line, center of circle or arc."
91 shape_types="edge vertex">
92 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
93 <validator id="PartSet_DifferentObjects"/>
94 <validator id="GeomValidators_ShapeType" parameters="vertex,line"/>
95 </sketch_shape_selector>
96 <sketch_shape_selector
97 id="ConstraintEntityB"
99 tooltip="Select point, line end point, line, center of circle or arc."
100 shape_types="edge vertex">
101 <validator id="PartSet_DifferentObjects"/>
102 <validator id="SketchPlugin_DistanceAttr" parameters="ConstraintEntityA"/>
103 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
104 <validator id="GeomValidators_ShapeType" parameters="vertex,line"/>
105 </sketch_shape_selector>
106 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
108 <doublevalue_editor label="Value" tooltip="Distance" id="ConstraintValue" default="computed" min="0">
109 <validator id="GeomValidators_Positive"/>
110 </doublevalue_editor>
112 <validator id="PartSet_DistanceSelection"/>
115 <!-- SketchConstraintLength -->
116 <feature id="SketchConstraintLength" title="Length" tooltip="Set fixed length of a line segment" icon=":icons/length.png">
117 <label title="Select a line on which to calculate length" tooltip="Select a line on which to calculate length"/>
118 <shape_selector id="ConstraintEntityA" label="Line" tooltip="Select an line" shape_types="edge" >
119 <validator id="GeomValidators_ShapeType" parameters="line"/>
121 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
122 <doublevalue_editor label="Value" tooltip="Length" id="ConstraintValue" default="computed">
123 <validator id="GeomValidators_Positive"/>
124 </doublevalue_editor>
125 <validator id="PartSet_LengthSelection"/>
128 <!-- SketchConstraintRadius -->
129 <feature id="SketchConstraintRadius" title="Radius" tooltip="Set fixed radius of a circle or an arc" icon=":icons/radius_constr.png">
130 <label title="Select a circle or an arc on which to calculate radius" tooltip="Select a circle or an arc on which to calculate radius"/>
131 <shape_selector id="ConstraintEntityA" label="Circle or Arc" tooltip="Select a circle or an arc"
133 <validator id="GeomValidators_ShapeType" parameters="circle"/>
135 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
136 <doublevalue_editor label="Value" tooltip="Radius" id="ConstraintValue" default="computed">
137 <validator id="GeomValidators_Positive"/>
138 </doublevalue_editor>
139 <validator id="PartSet_RadiusSelection"/>
142 <!-- SketchConstraintAngle -->
143 <feature id="SketchConstraintAngle" title="Angle" tooltip="Set fixed angle between two line segments" icon=":icons/angle_constr.png">
144 <sketch_shape_selector id="ConstraintEntityA" label="Line 1" tooltip="Select an line" shape_types="edge" >
145 <validator id="GeomValidators_ShapeType" parameters="line"/>
146 <validator id="PartSet_DifferentObjects"/>
147 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
148 </sketch_shape_selector>
149 <sketch_shape_selector id="ConstraintEntityB" label="Line 2" tooltip="Select an line" shape_types="edge" >
150 <validator id="GeomValidators_ShapeType" parameters="line"/>
151 <validator id="PartSet_DifferentObjects"/>
152 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
153 </sketch_shape_selector>
154 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
155 <doublevalue_editor label="Value" tooltip="Angle" id="ConstraintValue" default="computed" min="0" max="180" />
156 <validator id="PartSet_AngleSelection"/>
159 <!-- SketchConstraintParallel -->
160 <feature id="SketchConstraintParallel" title="Parallel" tooltip="Create constraint defining two parallel lines" icon=":icons/parallel.png">
161 <sketch_shape_selector id="ConstraintEntityA"
162 label="First line" tooltip="Select a line" shape_types="edge">
163 <validator id="GeomValidators_ShapeType" parameters="line"/>
164 <validator id="PartSet_DifferentObjects"/>
165 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
166 </sketch_shape_selector>
168 <sketch_shape_selector id="ConstraintEntityB" label="Second line" tooltip="Select a line"
170 <validator id="GeomValidators_ShapeType" parameters="line"/>
171 <validator id="PartSet_DifferentObjects"/>
172 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
173 </sketch_shape_selector>
174 <validator id="PartSet_ParallelSelection"/>
177 <!-- SketchConstraintPerpendicular -->
178 <feature id="SketchConstraintPerpendicular" title="Perpendicular"
179 tooltip="Create constraint defining two perpendicular lines"
180 icon=":icons/perpendicular.png">
181 <sketch_shape_selector id="ConstraintEntityA"
182 label="First line" tooltip="Select an line"
184 <validator id="PartSet_DifferentObjects"/>
185 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
186 <validator id="GeomValidators_ShapeType" parameters="line"/>
187 </sketch_shape_selector>
189 <sketch_shape_selector id="ConstraintEntityB"
190 label="Second line" tooltip="Select an line"
192 <validator id="PartSet_DifferentObjects"/>
193 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
194 <validator id="GeomValidators_ShapeType" parameters="line"/>
195 </sketch_shape_selector>
196 <validator id="PartSet_PerpendicularSelection"/>
199 <!-- SketchConstraintCoincedence -->
200 <feature id="SketchConstraintCoincidence" title="Coincident" tooltip="Create constraint for the coincidence of two points or point on line or circle" icon=":icons/coincedence.png">
201 <sketch_shape_selector id="ConstraintEntityA" label="First object" tooltip="Select a first object" shape_types="vertex edge">
202 <validator id="PartSet_DifferentObjects"/>
203 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
204 </sketch_shape_selector>
205 <sketch_shape_selector id="ConstraintEntityB" label="Second object" tooltip="Select a second object" shape_types="vertex edge">
206 <validator id="PartSet_DifferentObjects"/>
207 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
208 <validator id="SketchPlugin_CoincidenceAttr" parameters="ConstraintEntityA"/>
209 </sketch_shape_selector>
210 <validator id="PartSet_CoincidentSelection"/>
213 <!-- SketchConstraintRigid -->
214 <feature id="SketchConstraintRigid" title="Fixed" tooltip="Fix an object" icon=":icons/fixed.png">
215 <sketch_shape_selector id="ConstraintEntityA" label="Object"
216 tooltip="Select point, line end point, line, center of circle or arc."
217 shape_types="edge vertex">
218 <validator id="GeomValidators_ShapeType" parameters="vertex,line,circle"/>
219 <validator id="SketchPlugin_NotFixed"/>
220 </sketch_shape_selector>
221 <validator id="PartSet_RigidSelection"/>
224 <!-- SketchConstraintHorizontal -->
225 <feature id="SketchConstraintHorizontal" title="Horizontal" tooltip="Create constraint defining horizontal line" icon=":icons/horisontal.png">
226 <sketch_shape_selector id="ConstraintEntityA"
227 label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
228 <validator id="GeomValidators_ShapeType" parameters="line"/>
229 </sketch_shape_selector>
230 <validator id="PartSet_HVDirSelection"/>
233 <!-- SketchConstraintVertical -->
234 <feature id="SketchConstraintVertical" title="Vertical" tooltip="Create constraint defining vertical line" icon=":icons/vertical.png">
235 <sketch_shape_selector id="ConstraintEntityA"
236 label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
237 <validator id="GeomValidators_ShapeType" parameters="line"/>
238 </sketch_shape_selector>
239 <validator id="PartSet_HVDirSelection"/>
242 <!-- SketchConstraintEqual -->
243 <feature id="SketchConstraintEqual" title="Equal"
244 tooltip="Create constraint defining equal lengths of two lines or line and arc or equal radii of two arcs or two circles or arc and circle"
245 icon=":icons/equal.png">
246 <sketch_shape_selector id="ConstraintEntityA"
247 label="First object" tooltip="Select line, circle or arc" shape_types="edge">
248 <validator id="PartSet_DifferentObjects"/>
249 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
250 </sketch_shape_selector>
252 <sketch_shape_selector id="ConstraintEntityB"
253 label="Second object" tooltip="Select line, circle or arc" shape_types="edge">
254 <validator id="SketchPlugin_EqualAttr" parameters="ConstraintEntityA"/>
255 <validator id="PartSet_DifferentObjects"/>
256 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
257 </sketch_shape_selector>
258 <validator id="PartSet_EqualSelection"/>
261 <!-- SketchConstraintTangent -->
262 <feature id="SketchConstraintTangent" title="Tangent" tooltip="Create constraint defining tangency of two objects with common coincident point" icon=":icons/tangent.png">
263 <sketch_shape_selector id="ConstraintEntityA"
264 label="First object" tooltip="Select line or arc" shape_types="edge">
265 <validator id="SketchPlugin_TangentAttr" parameters="ConstraintEntityB"/>
266 <validator id="PartSet_DifferentObjects"/>
267 </sketch_shape_selector>
269 <sketch_shape_selector id="ConstraintEntityB"
270 label="Second object" tooltip="Select line or arc" shape_types="edge">
271 <validator id="SketchPlugin_TangentAttr" parameters="ConstraintEntityA"/>
272 <validator id="PartSet_DifferentObjects"/>
273 </sketch_shape_selector>
274 <validator id="PartSet_TangentSelection"/>
277 <!-- SketchConstraintCollinear -->
278 <feature id="SketchConstraintCollinear" title="Collinear" tooltip="Create constraint defining collinearity of two lines" icon=":icons/collinear.png">
279 <sketch_shape_selector id="ConstraintEntityA"
280 label="First line" tooltip="Select a line" shape_types="edge">
281 <validator id="GeomValidators_ShapeType" parameters="line"/>
282 <validator id="PartSet_DifferentObjects"/>
283 </sketch_shape_selector>
285 <sketch_shape_selector id="ConstraintEntityB"
286 label="Second line" tooltip="Select a line" shape_types="edge">
287 <validator id="GeomValidators_ShapeType" parameters="line"/>
288 <validator id="PartSet_DifferentObjects"/>
289 </sketch_shape_selector>
290 <validator id="PartSet_CollinearSelection"/>
293 <!-- SketchConstraintMiddle -->
294 <feature id="SketchConstraintMiddle" title="Middle point" tooltip="Create constraint for setting middle point on a line" icon=":icons/middlepoint.png">
295 <sketch_shape_selector id="ConstraintEntityA" label="First object" tooltip="Select a first object" shape_types="vertex edge">
296 <validator id="PartSet_DifferentObjects"/>
297 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
298 <validator id="SketchPlugin_MiddlePointAttr" parameters="ConstraintEntityB"/>
299 </sketch_shape_selector>
300 <sketch_shape_selector id="ConstraintEntityB" label="Second object" tooltip="Select a second object" shape_types="vertex edge">
301 <validator id="PartSet_DifferentObjects"/>
302 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
303 <validator id="SketchPlugin_MiddlePointAttr" parameters="ConstraintEntityA"/>
304 </sketch_shape_selector>
305 <validator id="PartSet_MiddlePointSelection"/>
311 <!-- SketchConstraintMirror -->
313 id="SketchConstraintMirror"
314 title="Mirror" icon=":icons/mirror.png"
315 tooltip="Create constraint, mirroring group of objects">
316 <sketch_shape_selector id="ConstraintEntityA"
317 label="Mirror line" tooltip="Select mirror line" shape_types="edge">
318 <validator id="GeomValidators_ShapeType" parameters="line"/>
319 </sketch_shape_selector>
320 <sketch_multi_selector id="ConstraintMirrorList"
322 tooltip="Select list of mirroring objects"
325 <validator id="SketchPlugin_MirrorAttr" />
326 </sketch_multi_selector>
329 <!-- SketchMultiTranslation -->
331 id="SketchMultiTranslation"
332 title="Translation" icon=":icons/translate.png"
333 tooltip="Multiple translation">
334 <sketch_multi_selector id="MultiTranslationList"
336 tooltip="Select list of translating objects"
339 <validator id="SketchPlugin_CopyValidator" />
340 </sketch_multi_selector>
341 <toolbox id="ValueType">
342 <box id="SingleValue" title="Single value" icon=":icons/translate_32x32.png">
343 <groupbox title="Direction">
344 <sketch_shape_selector
345 id="MultiTranslationStartPoint"
347 tooltip="Start point of translation"
348 shape_types="vertex">
349 <validator id="PartSet_DifferentObjects"/>
350 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
351 </sketch_shape_selector>
352 <sketch_shape_selector
353 id="MultiTranslationEndPoint"
355 tooltip="Final point of translation"
356 shape_types="vertex">
357 <validator id="PartSet_DifferentObjects"/>
358 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
359 </sketch_shape_selector>
362 <box id="FullValue" title="Full value" icon=":icons/translate_full_32x32.png">
363 <groupbox title="Direction">
364 <sketch_shape_selector
365 id="MultiTranslationStartPoint"
367 tooltip="Start point of translation"
368 shape_types="vertex">
369 <validator id="PartSet_DifferentObjects"/>
370 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
371 </sketch_shape_selector>
372 <sketch_shape_selector
373 id="MultiTranslationEndPoint"
375 tooltip="Final point of translation"
376 shape_types="vertex">
377 <validator id="PartSet_DifferentObjects"/>
378 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
379 </sketch_shape_selector>
383 <integervalue id="MultiTranslationObjects"
384 label="Total number of objects"
385 tooltip="Total number of objects"
386 default="2" min="2" use_reset="false">
387 <validator id="GeomValidators_Positive"/>
391 <!-- SketchMultiRotation -->
393 id="SketchMultiRotation"
394 title="Rotation" icon=":icons/rotate.png"
395 tooltip="Multiple rotation">
396 <sketch_multi_selector id="MultiRotationList"
398 tooltip="Select list of rotating objects"
401 <validator id="SketchPlugin_CopyValidator" />
402 </sketch_multi_selector>
403 <sketch_shape_selector
404 id="MultiRotationCenter"
405 label="Center of rotation"
406 tooltip="Center of rotation"
407 shape_types="vertex">
408 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
409 </sketch_shape_selector>
410 <toolbox id="AngleType">
411 <box id="SingleAngle" title="Single angle" icon=":icons/angle_up_32x32.png">
412 <doublevalue id="MultiRotationAngle"
414 icon=":icons/angle.png"
415 tooltip="Rotation angle"
416 default="90" use_reset="false"/>
418 <box id="FullAngle" title="Full angle" icon=":icons/angle_up_full_32x32.png">
419 <doublevalue id="MultiRotationAngle"
421 icon=":icons/angle.png"
422 tooltip="Rotation angle"
423 default="90" use_reset="false"/>
426 <integervalue id="MultiRotationObjects"
427 label="Total number of objects"
428 tooltip="Total number of objects"
429 default="2" min="2" use_reset="false">
430 <validator id="GeomValidators_Positive"/>