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"/>
43 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
45 <box id="ThreePoints" title="Three points" icon=":icons/circle_3pt_32x32.png">
46 <sketch-2dpoint_selector id="FirstPoint" accept_expressions="0" title="First point" tooltip="First point"/>
47 <sketch-2dpoint_selector id="SecondPoint" accept_expressions="0" title="Second point" tooltip="Second point"/>
48 <sketch-2dpoint_selector id="ThirdPoint" accept_expressions="0" title="Third point" tooltip="Third point"/>
49 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
59 icon=":icons/arc.png">
60 <toolbox id="ArcType">
61 <box id="CenterStartEnd" title="Center and two points" icon=":icons/arc_base_32x32.png">
62 <sketch-2dpoint_selector id="ArcCenter" accept_expressions="0" title="Center" tooltip="Center of a circle"/>
63 <sketch-2dpoint_selector id="ArcStartPoint" accept_expressions="0" title="Start point" tooltip="Start point"/>
64 <sketch-2dpoint_selector id="ArcEndPoint" accept_expressions="0" title="End point" tooltip="End point"/>
65 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
66 <validator id="GeomValidators_Different" parameters="ArcCenter,ArcStartPoint,ArcEndPoint"/>
68 <box id="ThreePoints" title="Three points on arc" icon=":icons/arc_3pt_32x32.png">
69 <sketch-2dpoint_selector id="ArcStartPoint" accept_expressions="0" title="Start point" tooltip="Start point"/>
70 <sketch-2dpoint_selector id="ArcEndPoint" accept_expressions="0" title="End point" tooltip="End point"/>
71 <sketch-2dpoint_selector id="ArcPassedPoint" accept_expressions="0" title="Passed point" tooltip="Passed point"/>
72 <doublevalue id="ArcRadius" accept_expressions="0" label="Radius:" default="computed" icon=":icons/radius.png" tooltip="Set radius" obligatory="1">
73 <validator id="GeomValidators_Positive"/>
75 <doublevalue id="ArcAngle" label="Angle:" icon=":icons/angle.png" tooltip="Set angle" default="90" use_reset="false" obligatory="1"/>
76 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
77 <validator id="GeomValidators_Different" parameters="ArcStartPoint,ArcEndPoint,ArcPassedPoint"/>
79 <box id="Tangent" title="Tangent with edge" icon=":icons/arc_tang_32x32.png">
80 <sketch_shape_selector id="ArcTangentPoint" label="Start point" tooltip="Select point on line" shape_types="vertex" />
81 <sketch-2dpoint_selector id="ArcEndPoint" accept_expressions="0" title="End point" tooltip="End point"/>
82 <doublevalue id="ArcRadius" accept_expressions="0" label="Radius:" default="computed" icon=":icons/radius.png" tooltip="Set radius" obligatory="1">
83 <validator id="GeomValidators_Positive"/>
85 <doublevalue id="ArcAngle" label="Angle:" icon=":icons/angle.png" tooltip="Set angle" default="90" use_reset="false" obligatory="1"/>
86 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
91 <!-- SketchConstraintFillet -->
92 <feature id="SketchConstraintFillet" title="Fillet" tooltip="Create constraint defining fillet between two objects" icon=":icons/fillet.png">
93 <!--<sketch_shape_selector id="ConstraintEntityA"
94 label="Point" tooltip="Select point for fillet (should be shared by two entities only)" shape_types="vertex">
95 <validator id="SketchPlugin_FilletVertexValidator"/>
96 </sketch_shape_selector>-->
97 <sketch_multi_selector id="ConstraintEntityA"
99 tooltip="Select points for fillets"
100 type_choice="Vertices">
101 <validator id="SketchPlugin_FilletVertexValidator"/>
102 </sketch_multi_selector>
103 <doublevalue label="Radius" tooltip="Fillet arc radius" id="ConstraintValue" accept_expressions="0" min="0" use_reset="false">
104 <validator id="GeomValidators_Positive"/>
106 <validator id="PartSet_FilletSelection"/>
110 <group id="Constraints">
111 <!-- SketchConstraintDistance -->
113 id="SketchConstraintDistance"
115 tooltip="Set fixed distance from a point to an object"
116 icon=":icons/distance.png">
117 <label title="Select objects for distance definition. Following objects can be accepted: point, line or arc end point, center of circle or arc."/>
118 <sketch_shape_selector
119 id="ConstraintEntityA"
121 tooltip="Select point, line end point, line, center of circle or arc."
122 shape_types="edge vertex">
123 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
124 <validator id="PartSet_DifferentObjects"/>
125 <validator id="GeomValidators_ShapeType" parameters="vertex,line"/>
126 </sketch_shape_selector>
127 <sketch_shape_selector
128 id="ConstraintEntityB"
129 label="Second object"
130 tooltip="Select point, line end point, line, center of circle or arc."
131 shape_types="edge vertex">
132 <validator id="PartSet_DifferentObjects"/>
133 <validator id="SketchPlugin_DistanceAttr" parameters="ConstraintEntityA"/>
134 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
135 <validator id="GeomValidators_ShapeType" parameters="vertex,line"/>
136 </sketch_shape_selector>
137 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
139 <doublevalue_editor label="Value" tooltip="Distance" id="ConstraintValue" default="computed" min="0">
140 <validator id="GeomValidators_Positive"/>
141 </doublevalue_editor>
143 <validator id="PartSet_DistanceSelection"/>
146 <!-- SketchConstraintLength -->
147 <feature id="SketchConstraintLength" title="Length" tooltip="Set fixed length of a line segment" icon=":icons/length.png">
148 <label title="Select a line on which to calculate length" tooltip="Select a line on which to calculate length"/>
149 <shape_selector id="ConstraintEntityA" label="Line" tooltip="Select an line" shape_types="edge" >
150 <validator id="GeomValidators_ShapeType" parameters="line"/>
152 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
153 <doublevalue_editor label="Value" tooltip="Length" id="ConstraintValue" default="computed">
154 <validator id="GeomValidators_Positive"/>
155 </doublevalue_editor>
156 <validator id="PartSet_LengthSelection"/>
159 <!-- SketchConstraintRadius -->
160 <feature id="SketchConstraintRadius" title="Radius" tooltip="Set fixed radius of a circle or an arc" icon=":icons/radius_constr.png">
161 <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"/>
162 <shape_selector id="ConstraintEntityA" label="Circle or Arc" tooltip="Select a circle or an arc"
164 <validator id="GeomValidators_ShapeType" parameters="circle"/>
166 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
167 <doublevalue_editor label="Value" tooltip="Radius" id="ConstraintValue" default="computed">
168 <validator id="GeomValidators_Positive"/>
169 </doublevalue_editor>
170 <validator id="PartSet_RadiusSelection"/>
173 <!-- SketchConstraintAngle -->
174 <feature id="SketchConstraintAngle" title="Angle" tooltip="Set fixed angle between two line segments" icon=":icons/angle_constr.png">
175 <sketch_shape_selector id="ConstraintEntityA" label="Line 1" tooltip="Select an line" shape_types="edge" >
176 <validator id="GeomValidators_ShapeType" parameters="line"/>
177 <validator id="PartSet_DifferentObjects"/>
178 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
179 </sketch_shape_selector>
180 <sketch_shape_selector id="ConstraintEntityB" label="Line 2" tooltip="Select an line" shape_types="edge" >
181 <validator id="GeomValidators_ShapeType" parameters="line"/>
182 <validator id="PartSet_DifferentObjects"/>
183 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
184 </sketch_shape_selector>
185 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
186 <doublevalue_editor label="Value" tooltip="Angle" id="ConstraintValue" default="computed" min="0" max="180" />
187 <validator id="PartSet_AngleSelection"/>
190 <!-- SketchConstraintParallel -->
191 <feature id="SketchConstraintParallel" title="Parallel" tooltip="Create constraint defining two parallel lines" icon=":icons/parallel.png">
192 <sketch_shape_selector id="ConstraintEntityA"
193 label="First line" tooltip="Select a line" shape_types="edge">
194 <validator id="GeomValidators_ShapeType" parameters="line"/>
195 <validator id="PartSet_DifferentObjects"/>
196 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
197 </sketch_shape_selector>
199 <sketch_shape_selector id="ConstraintEntityB" label="Second line" tooltip="Select a line"
201 <validator id="GeomValidators_ShapeType" parameters="line"/>
202 <validator id="PartSet_DifferentObjects"/>
203 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
204 </sketch_shape_selector>
205 <validator id="PartSet_ParallelSelection"/>
208 <!-- SketchConstraintPerpendicular -->
209 <feature id="SketchConstraintPerpendicular" title="Perpendicular"
210 tooltip="Create constraint defining two perpendicular lines"
211 icon=":icons/perpendicular.png">
212 <sketch_shape_selector id="ConstraintEntityA"
213 label="First line" tooltip="Select an line"
215 <validator id="PartSet_DifferentObjects"/>
216 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
217 <validator id="GeomValidators_ShapeType" parameters="line"/>
218 </sketch_shape_selector>
220 <sketch_shape_selector id="ConstraintEntityB"
221 label="Second line" tooltip="Select an line"
223 <validator id="PartSet_DifferentObjects"/>
224 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
225 <validator id="GeomValidators_ShapeType" parameters="line"/>
226 </sketch_shape_selector>
227 <validator id="PartSet_PerpendicularSelection"/>
230 <!-- SketchConstraintCoincidence -->
231 <feature id="SketchConstraintCoincidence" title="Coincident" tooltip="Create constraint for the coincidence of two points or point on line or circle" icon=":icons/coincedence.png">
232 <sketch_shape_selector id="ConstraintEntityA" label="First object" tooltip="Select a first object" shape_types="vertex edge">
233 <validator id="PartSet_DifferentObjects"/>
234 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
235 </sketch_shape_selector>
236 <sketch_shape_selector id="ConstraintEntityB" label="Second object" tooltip="Select a second object" shape_types="vertex edge">
237 <validator id="PartSet_DifferentObjects"/>
238 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
239 <validator id="SketchPlugin_CoincidenceAttr" parameters="ConstraintEntityA"/>
240 </sketch_shape_selector>
241 <validator id="PartSet_CoincidentSelection"/>
244 <!-- SketchConstraintRigid -->
245 <feature id="SketchConstraintRigid" title="Fixed" tooltip="Fix an object" icon=":icons/fixed.png">
246 <sketch_shape_selector id="ConstraintEntityA" label="Object"
247 tooltip="Select point, line end point, line, center of circle or arc."
248 shape_types="edge vertex">
249 <validator id="GeomValidators_ShapeType" parameters="vertex,line,circle"/>
250 <validator id="SketchPlugin_NotFixed"/>
251 </sketch_shape_selector>
252 <validator id="PartSet_RigidSelection"/>
255 <!-- SketchConstraintHorizontal -->
256 <feature id="SketchConstraintHorizontal" title="Horizontal" tooltip="Create constraint defining horizontal line" icon=":icons/horisontal.png">
257 <sketch_shape_selector id="ConstraintEntityA"
258 label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
259 <validator id="GeomValidators_ShapeType" parameters="line"/>
260 </sketch_shape_selector>
261 <validator id="PartSet_HVDirSelection"/>
264 <!-- SketchConstraintVertical -->
265 <feature id="SketchConstraintVertical" title="Vertical" tooltip="Create constraint defining vertical line" icon=":icons/vertical.png">
266 <sketch_shape_selector id="ConstraintEntityA"
267 label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
268 <validator id="GeomValidators_ShapeType" parameters="line"/>
269 </sketch_shape_selector>
270 <validator id="PartSet_HVDirSelection"/>
273 <!-- SketchConstraintEqual -->
274 <feature id="SketchConstraintEqual" title="Equal"
275 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"
276 icon=":icons/equal.png">
277 <sketch_shape_selector id="ConstraintEntityA"
278 label="First object" tooltip="Select line, circle or arc" shape_types="edge">
279 <validator id="PartSet_DifferentObjects"/>
280 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
281 </sketch_shape_selector>
283 <sketch_shape_selector id="ConstraintEntityB"
284 label="Second object" tooltip="Select line, circle or arc" shape_types="edge">
285 <validator id="SketchPlugin_EqualAttr" parameters="ConstraintEntityA"/>
286 <validator id="PartSet_DifferentObjects"/>
287 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
288 </sketch_shape_selector>
289 <validator id="PartSet_EqualSelection"/>
292 <!-- SketchConstraintTangent -->
293 <feature id="SketchConstraintTangent" title="Tangent" tooltip="Create constraint defining tangency of two objects with common coincident point" icon=":icons/tangent.png">
294 <sketch_shape_selector id="ConstraintEntityA"
295 label="First object" tooltip="Select line or arc" shape_types="edge">
296 <validator id="SketchPlugin_TangentAttr" parameters="ConstraintEntityB"/>
297 <validator id="PartSet_DifferentObjects"/>
298 </sketch_shape_selector>
300 <sketch_shape_selector id="ConstraintEntityB"
301 label="Second object" tooltip="Select line or arc" shape_types="edge">
302 <validator id="SketchPlugin_TangentAttr" parameters="ConstraintEntityA"/>
303 <validator id="PartSet_DifferentObjects"/>
304 </sketch_shape_selector>
305 <validator id="PartSet_TangentSelection"/>
308 <!-- SketchConstraintCollinear -->
309 <feature id="SketchConstraintCollinear" title="Collinear" tooltip="Create constraint defining collinearity of two lines" icon=":icons/collinear.png">
310 <sketch_shape_selector id="ConstraintEntityA"
311 label="First line" tooltip="Select a line" shape_types="edge">
312 <validator id="GeomValidators_ShapeType" parameters="line"/>
313 <validator id="PartSet_DifferentObjects"/>
314 </sketch_shape_selector>
316 <sketch_shape_selector id="ConstraintEntityB"
317 label="Second line" tooltip="Select a line" shape_types="edge">
318 <validator id="GeomValidators_ShapeType" parameters="line"/>
319 <validator id="PartSet_DifferentObjects"/>
320 </sketch_shape_selector>
321 <validator id="PartSet_CollinearSelection"/>
324 <!-- SketchConstraintMiddle -->
325 <feature id="SketchConstraintMiddle" title="Middle point" tooltip="Create constraint for setting middle point on a line" icon=":icons/middlepoint.png">
326 <sketch_shape_selector id="ConstraintEntityA" label="First object" tooltip="Select a first object" shape_types="vertex edge">
327 <validator id="PartSet_DifferentObjects"/>
328 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
329 <validator id="SketchPlugin_MiddlePointAttr" parameters="ConstraintEntityB"/>
330 </sketch_shape_selector>
331 <sketch_shape_selector id="ConstraintEntityB" label="Second object" tooltip="Select a second object" shape_types="vertex edge">
332 <validator id="PartSet_DifferentObjects"/>
333 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
334 <validator id="SketchPlugin_MiddlePointAttr" parameters="ConstraintEntityA"/>
335 </sketch_shape_selector>
336 <validator id="PartSet_MiddlePointSelection"/>
342 <!-- SketchConstraintMirror -->
344 id="SketchConstraintMirror"
345 title="Mirror" icon=":icons/mirror.png"
346 tooltip="Create constraint, mirroring group of objects">
347 <sketch_shape_selector id="ConstraintEntityA"
348 label="Mirror line" tooltip="Select mirror line" shape_types="edge">
349 <validator id="GeomValidators_ShapeType" parameters="line"/>
350 </sketch_shape_selector>
351 <sketch_multi_selector id="ConstraintMirrorList"
353 tooltip="Select list of mirroring objects"
356 <validator id="SketchPlugin_MirrorAttr" />
357 </sketch_multi_selector>
360 <!-- SketchMultiTranslation -->
362 id="SketchMultiTranslation"
363 title="Translation" icon=":icons/translate.png"
364 tooltip="Multiple translation">
365 <sketch_multi_selector id="MultiTranslationList"
367 tooltip="Select list of translating objects"
370 <validator id="SketchPlugin_CopyValidator" />
371 </sketch_multi_selector>
372 <toolbox id="ValueType">
373 <box id="SingleValue" title="Single value" icon=":icons/translate_32x32.png">
374 <groupbox title="Direction">
375 <sketch_shape_selector
376 id="MultiTranslationStartPoint"
378 tooltip="Start point of translation"
379 shape_types="vertex">
380 <validator id="PartSet_DifferentObjects"/>
381 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
382 </sketch_shape_selector>
383 <sketch_shape_selector
384 id="MultiTranslationEndPoint"
386 tooltip="Final point of translation"
387 shape_types="vertex">
388 <validator id="PartSet_DifferentObjects"/>
389 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
390 </sketch_shape_selector>
393 <box id="FullValue" title="Full value" icon=":icons/translate_full_32x32.png">
394 <groupbox title="Direction">
395 <sketch_shape_selector
396 id="MultiTranslationStartPoint"
398 tooltip="Start point of translation"
399 shape_types="vertex">
400 <validator id="PartSet_DifferentObjects"/>
401 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
402 </sketch_shape_selector>
403 <sketch_shape_selector
404 id="MultiTranslationEndPoint"
406 tooltip="Final point of translation"
407 shape_types="vertex">
408 <validator id="PartSet_DifferentObjects"/>
409 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
410 </sketch_shape_selector>
414 <integervalue id="MultiTranslationObjects"
415 label="Total number of objects"
416 tooltip="Total number of objects"
417 default="2" min="2" use_reset="false">
418 <validator id="GeomValidators_Positive"/>
422 <!-- SketchMultiRotation -->
424 id="SketchMultiRotation"
425 title="Rotation" icon=":icons/rotate.png"
426 tooltip="Multiple rotation">
427 <sketch_multi_selector id="MultiRotationList"
429 tooltip="Select list of rotating objects"
432 <validator id="SketchPlugin_CopyValidator" />
433 </sketch_multi_selector>
434 <sketch_shape_selector
435 id="MultiRotationCenter"
436 label="Center of rotation"
437 tooltip="Center of rotation"
438 shape_types="vertex">
439 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
440 </sketch_shape_selector>
441 <toolbox id="AngleType">
442 <box id="SingleAngle" title="Single angle" icon=":icons/angle_up_32x32.png">
443 <doublevalue id="MultiRotationAngle"
445 icon=":icons/angle.png"
446 tooltip="Rotation angle"
447 default="90" use_reset="false"/>
449 <box id="FullAngle" title="Full angle" icon=":icons/angle_up_full_32x32.png">
450 <doublevalue id="MultiRotationAngle"
452 icon=":icons/angle.png"
453 tooltip="Rotation angle"
454 default="90" use_reset="false"/>
457 <integervalue id="MultiRotationObjects"
458 label="Total number of objects"
459 tooltip="Total number of objects"
460 default="2" min="2" use_reset="false">
461 <validator id="GeomValidators_Positive"/>