1 <!-- Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
4 <workbench id="Sketch">
8 nested="SketchPoint SketchIntersectionPoint SketchLine SketchCircle SketchArc SketchRectangle 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"-->
22 <feature id="SketchPoint" title="Point" tooltip="Create point" icon=":icons/point.png">
23 <sketch-2dpoint_selector id="PointCoordindates" accept_expressions="0" title="Point" tooltip="Point coordinates"/>
24 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
27 <!-- Intersection Point -->
29 id="SketchIntersectionPoint"
30 title="Intersection Point"
31 tooltip="Create intersection point"
32 icon=":icons/point.png">
33 <sketch_shape_selector
36 tooltip="Select external line."
38 <validator id="GeomValidators_ShapeType" parameters="line"/>
39 <validator id="SketchPlugin_IntersectionValidator"/>
40 </sketch_shape_selector>
44 <feature id="SketchLine" title="Line" tooltip="Create line" icon=":icons/line.png">
45 <sketch-2dpoint_selector id="StartPoint" accept_expressions="0" title="Start point" tooltip="Start point coordinates" previous_feature_param="EndPoint"/>
46 <sketch-2dpoint_selector id="EndPoint" accept_expressions="0" title="End point" tooltip="End point coordinates"/>
47 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
48 <validator id="GeomValidators_Different" parameters="StartPoint,EndPoint"/>
55 tooltip="Create circle"
56 icon=":icons/circle.png">
57 <toolbox id="CircleType">
58 <box id="CenterRadius" title="Center and radius" icon=":icons/circle_pt_rad_32x32.png">
59 <sketch-2dpoint_selector id="CircleCenter" accept_expressions="0" title="Center" tooltip="Center coordinates"/>
60 <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">
61 <validator id="GeomValidators_Positive"/>
63 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
65 <box id="ThreePoints" title="Three points" icon=":icons/circle_3pt_32x32.png">
66 <sketch-2dpoint_selector id="FirstPoint" accept_expressions="0" title="First point" tooltip="First point"/>
67 <sketch-2dpoint_selector id="SecondPoint" accept_expressions="0" title="Second point" tooltip="Second point"/>
68 <sketch-2dpoint_selector id="ThirdPoint" accept_expressions="0" title="Third point" tooltip="Third point"/>
69 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
79 icon=":icons/arc.png">
80 <toolbox id="ArcType">
81 <box id="CenterStartEnd" title="Center and two points" icon=":icons/arc_base_32x32.png">
82 <sketch-2dpoint_selector id="ArcCenter" accept_expressions="0" title="Center" tooltip="Center of a circle"/>
83 <sketch-2dpoint_selector id="ArcStartPoint" accept_expressions="0" title="Start point" tooltip="Start point"/>
84 <sketch-2dpoint_selector id="ArcEndPoint" accept_expressions="0" title="End point" tooltip="End point"/>
85 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
86 <validator id="GeomValidators_Different" parameters="ArcCenter,ArcStartPoint,ArcEndPoint"/>
88 <box id="ThreePoints" title="Three points on arc" icon=":icons/arc_3pt_32x32.png">
89 <sketch-2dpoint_selector id="ArcStartPoint" accept_expressions="0" title="Start point" tooltip="Start point"/>
90 <sketch-2dpoint_selector id="ArcEndPoint" accept_expressions="0" title="End point" tooltip="End point"/>
91 <sketch-2dpoint_selector id="ArcPassedPoint" accept_expressions="0" title="Passed point" tooltip="Passed point"/>
92 <doublevalue id="ArcRadius" accept_expressions="0" label="Radius:" default="computed" icon=":icons/radius.png" tooltip="Set radius" obligatory="1">
93 <validator id="GeomValidators_Positive"/>
95 <doublevalue id="ArcAngle" label="Angle:" icon=":icons/angle.png" tooltip="Set angle" default="90" use_reset="false" obligatory="1"/>
96 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
97 <validator id="GeomValidators_Different" parameters="ArcStartPoint,ArcEndPoint,ArcPassedPoint"/>
99 <box id="Tangent" title="Tangent with edge" icon=":icons/arc_tang_32x32.png">
100 <sketch_shape_selector id="ArcTangentPoint" label="Start point" tooltip="Select point on line" shape_types="vertex">
101 <validator id="SketchPlugin_ArcTangentPoint" parameters="" />
102 </sketch_shape_selector>
103 <sketch-2dpoint_selector id="ArcEndPoint" accept_expressions="0" title="End point" tooltip="End point"/>
104 <doublevalue id="ArcRadius" accept_expressions="0" label="Radius:" default="computed" icon=":icons/radius.png" tooltip="Set radius" obligatory="1">
105 <validator id="GeomValidators_Positive"/>
107 <doublevalue id="ArcAngle" label="Angle:" icon=":icons/angle.png" tooltip="Set angle" default="90" use_reset="false" obligatory="1"/>
108 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
115 <!-- SketchConstraintFillet -->
116 <feature id="SketchConstraintFillet" title="Fillet" tooltip="Create constraint defining fillet between two objects" icon=":icons/fillet.png">
117 <!--<sketch_shape_selector id="ConstraintEntityA"
118 label="Point" tooltip="Select point for fillet (should be shared by two entities only)" shape_types="vertex">
119 <validator id="SketchPlugin_FilletVertexValidator"/>
120 </sketch_shape_selector>-->
121 <sketch_multi_selector id="ConstraintEntityA"
123 tooltip="Select points for fillets"
124 type_choice="Vertices">
125 <validator id="SketchPlugin_FilletVertexValidator"/>
126 </sketch_multi_selector>
127 <doublevalue label="Radius" tooltip="Fillet arc radius" id="ConstraintValue" accept_expressions="0" min="0" use_reset="false">
128 <validator id="GeomValidators_Positive"/>
130 <validator id="PartSet_FilletSelection"/>
134 <group id="Constraints">
135 <!-- SketchConstraintDistance -->
137 id="SketchConstraintDistance"
139 tooltip="Set fixed distance from a point to an object"
140 icon=":icons/distance.png">
141 <label title="Select objects for distance definition. Following objects can be accepted: point, line or arc end point, center of circle or arc."/>
142 <sketch_shape_selector
143 id="ConstraintEntityA"
145 tooltip="Select point, line end point, line, center of circle or arc."
146 shape_types="edge vertex">
147 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
148 <validator id="PartSet_DifferentObjects"/>
149 <validator id="GeomValidators_ShapeType" parameters="vertex,line"/>
150 </sketch_shape_selector>
151 <sketch_shape_selector
152 id="ConstraintEntityB"
153 label="Second object"
154 tooltip="Select point, line end point, line, center of circle or arc."
155 shape_types="edge vertex">
156 <validator id="PartSet_DifferentObjects"/>
157 <validator id="SketchPlugin_DistanceAttr" parameters="ConstraintEntityA"/>
158 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
159 <validator id="GeomValidators_ShapeType" parameters="vertex,line"/>
160 </sketch_shape_selector>
161 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
163 <doublevalue_editor label="Value" tooltip="Distance" id="ConstraintValue" default="computed" min="0">
164 <validator id="GeomValidators_Positive"/>
165 </doublevalue_editor>
167 <validator id="PartSet_DistanceSelection"/>
170 <!-- SketchConstraintLength -->
171 <feature id="SketchConstraintLength" title="Length" tooltip="Set fixed length of a line segment" icon=":icons/length.png">
172 <label title="Select a line on which to calculate length" tooltip="Select a line on which to calculate length"/>
173 <shape_selector id="ConstraintEntityA" label="Line" tooltip="Select an line" shape_types="edge" >
174 <validator id="GeomValidators_ShapeType" parameters="line"/>
176 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
177 <doublevalue_editor label="Value" tooltip="Length" id="ConstraintValue" default="computed">
178 <validator id="GeomValidators_Positive"/>
179 </doublevalue_editor>
180 <validator id="PartSet_LengthSelection"/>
183 <!-- SketchConstraintRadius -->
184 <feature id="SketchConstraintRadius" title="Radius" tooltip="Set fixed radius of a circle or an arc" icon=":icons/radius_constr.png">
185 <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"/>
186 <shape_selector id="ConstraintEntityA" label="Circle or Arc" tooltip="Select a circle or an arc"
188 <validator id="GeomValidators_ShapeType" parameters="circle"/>
190 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
191 <doublevalue_editor label="Value" tooltip="Radius" id="ConstraintValue" default="computed">
192 <validator id="GeomValidators_Positive"/>
193 </doublevalue_editor>
194 <validator id="PartSet_RadiusSelection"/>
197 <!-- SketchConstraintAngle -->
198 <feature id="SketchConstraintAngle" title="Angle" tooltip="Set fixed angle between two line segments" icon=":icons/angle_constr.png">
199 <sketch_shape_selector id="ConstraintEntityA" label="Line 1" tooltip="Select an line" shape_types="edge" >
200 <validator id="GeomValidators_ShapeType" parameters="line"/>
201 <validator id="PartSet_DifferentObjects"/>
202 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
203 </sketch_shape_selector>
204 <sketch_shape_selector id="ConstraintEntityB" label="Line 2" tooltip="Select an line" shape_types="edge" >
205 <validator id="GeomValidators_ShapeType" parameters="line"/>
206 <validator id="PartSet_DifferentObjects"/>
207 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
208 </sketch_shape_selector>
209 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
210 <doublevalue_editor label="Value" tooltip="Angle" id="ConstraintValue" default="computed" min="0" max="180" />
211 <validator id="PartSet_AngleSelection"/>
214 <!-- SketchConstraintParallel -->
215 <feature id="SketchConstraintParallel" title="Parallel" tooltip="Create constraint defining two parallel lines" icon=":icons/parallel.png">
216 <sketch_shape_selector id="ConstraintEntityA"
217 label="First line" tooltip="Select a line" shape_types="edge">
218 <validator id="GeomValidators_ShapeType" parameters="line"/>
219 <validator id="PartSet_DifferentObjects"/>
220 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
221 </sketch_shape_selector>
223 <sketch_shape_selector id="ConstraintEntityB" label="Second line" tooltip="Select a line"
225 <validator id="GeomValidators_ShapeType" parameters="line"/>
226 <validator id="PartSet_DifferentObjects"/>
227 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
228 </sketch_shape_selector>
229 <validator id="PartSet_ParallelSelection"/>
232 <!-- SketchConstraintPerpendicular -->
233 <feature id="SketchConstraintPerpendicular" title="Perpendicular"
234 tooltip="Create constraint defining two perpendicular lines"
235 icon=":icons/perpendicular.png">
236 <sketch_shape_selector id="ConstraintEntityA"
237 label="First line" tooltip="Select an line"
239 <validator id="PartSet_DifferentObjects"/>
240 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
241 <validator id="GeomValidators_ShapeType" parameters="line"/>
242 </sketch_shape_selector>
244 <sketch_shape_selector id="ConstraintEntityB"
245 label="Second line" tooltip="Select an line"
247 <validator id="PartSet_DifferentObjects"/>
248 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
249 <validator id="GeomValidators_ShapeType" parameters="line"/>
250 </sketch_shape_selector>
251 <validator id="PartSet_PerpendicularSelection"/>
254 <!-- SketchConstraintCoincidence -->
255 <feature id="SketchConstraintCoincidence" title="Coincident" tooltip="Create constraint for the coincidence of two points or point on line or circle" icon=":icons/coincedence.png">
256 <sketch_shape_selector id="ConstraintEntityA" label="First object" tooltip="Select a first object" shape_types="vertex edge">
257 <validator id="PartSet_DifferentObjects"/>
258 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
259 </sketch_shape_selector>
260 <sketch_shape_selector id="ConstraintEntityB" label="Second object" tooltip="Select a second object" shape_types="vertex edge">
261 <validator id="PartSet_DifferentObjects"/>
262 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
263 <validator id="SketchPlugin_CoincidenceAttr" parameters="ConstraintEntityA"/>
264 </sketch_shape_selector>
265 <validator id="PartSet_CoincidentSelection"/>
268 <!-- SketchConstraintRigid -->
269 <feature id="SketchConstraintRigid" title="Fixed" tooltip="Fix an object" icon=":icons/fixed.png">
270 <sketch_shape_selector id="ConstraintEntityA" label="Object"
271 tooltip="Select point, line end point, line, center of circle or arc."
272 shape_types="edge vertex">
273 <validator id="GeomValidators_ShapeType" parameters="vertex,line,circle"/>
274 <validator id="SketchPlugin_NotFixed"/>
275 </sketch_shape_selector>
276 <validator id="PartSet_RigidSelection"/>
279 <!-- SketchConstraintHorizontal -->
280 <feature id="SketchConstraintHorizontal" title="Horizontal" tooltip="Create constraint defining horizontal line" icon=":icons/horisontal.png">
281 <sketch_shape_selector id="ConstraintEntityA"
282 label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
283 <validator id="GeomValidators_ShapeType" parameters="line"/>
284 </sketch_shape_selector>
285 <validator id="PartSet_HVDirSelection"/>
288 <!-- SketchConstraintVertical -->
289 <feature id="SketchConstraintVertical" title="Vertical" tooltip="Create constraint defining vertical line" icon=":icons/vertical.png">
290 <sketch_shape_selector id="ConstraintEntityA"
291 label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
292 <validator id="GeomValidators_ShapeType" parameters="line"/>
293 </sketch_shape_selector>
294 <validator id="PartSet_HVDirSelection"/>
297 <!-- SketchConstraintEqual -->
298 <feature id="SketchConstraintEqual" title="Equal"
299 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"
300 icon=":icons/equal.png">
301 <sketch_shape_selector id="ConstraintEntityA"
302 label="First object" tooltip="Select line, circle or arc" shape_types="edge">
303 <validator id="PartSet_DifferentObjects"/>
304 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
305 </sketch_shape_selector>
307 <sketch_shape_selector id="ConstraintEntityB"
308 label="Second object" tooltip="Select line, circle or arc" shape_types="edge">
309 <validator id="SketchPlugin_EqualAttr" parameters="ConstraintEntityA"/>
310 <validator id="PartSet_DifferentObjects"/>
311 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
312 </sketch_shape_selector>
313 <validator id="PartSet_EqualSelection"/>
316 <!-- SketchConstraintTangent -->
317 <feature id="SketchConstraintTangent" title="Tangent" tooltip="Create constraint defining tangency of two objects with common coincident point" icon=":icons/tangent.png">
318 <sketch_shape_selector id="ConstraintEntityA"
319 label="First object" tooltip="Select line or arc" shape_types="edge">
320 <validator id="SketchPlugin_TangentAttr" parameters="ConstraintEntityB"/>
321 <validator id="PartSet_DifferentObjects"/>
322 </sketch_shape_selector>
324 <sketch_shape_selector id="ConstraintEntityB"
325 label="Second object" tooltip="Select line or arc" shape_types="edge">
326 <validator id="SketchPlugin_TangentAttr" parameters="ConstraintEntityA"/>
327 <validator id="PartSet_DifferentObjects"/>
328 </sketch_shape_selector>
329 <validator id="PartSet_TangentSelection"/>
332 <!-- SketchConstraintCollinear -->
333 <feature id="SketchConstraintCollinear" title="Collinear" tooltip="Create constraint defining collinearity of two lines" icon=":icons/collinear.png">
334 <sketch_shape_selector id="ConstraintEntityA"
335 label="First line" tooltip="Select a line" shape_types="edge">
336 <validator id="GeomValidators_ShapeType" parameters="line"/>
337 <validator id="PartSet_DifferentObjects"/>
338 </sketch_shape_selector>
340 <sketch_shape_selector id="ConstraintEntityB"
341 label="Second line" tooltip="Select a line" shape_types="edge">
342 <validator id="GeomValidators_ShapeType" parameters="line"/>
343 <validator id="PartSet_DifferentObjects"/>
344 </sketch_shape_selector>
345 <validator id="PartSet_CollinearSelection"/>
348 <!-- SketchConstraintMiddle -->
349 <feature id="SketchConstraintMiddle" title="Middle point" tooltip="Create constraint for setting middle point on a line" icon=":icons/middlepoint.png">
350 <sketch_shape_selector id="ConstraintEntityA" label="First object" tooltip="Select a first object" shape_types="vertex edge">
351 <validator id="PartSet_DifferentObjects"/>
352 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
353 <validator id="SketchPlugin_MiddlePointAttr" parameters="ConstraintEntityB"/>
354 </sketch_shape_selector>
355 <sketch_shape_selector id="ConstraintEntityB" label="Second object" tooltip="Select a second object" shape_types="vertex edge">
356 <validator id="PartSet_DifferentObjects"/>
357 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
358 <validator id="SketchPlugin_MiddlePointAttr" parameters="ConstraintEntityA"/>
359 </sketch_shape_selector>
360 <validator id="PartSet_MiddlePointSelection"/>
366 <!-- SketchConstraintMirror -->
368 id="SketchConstraintMirror"
369 title="Mirror" icon=":icons/mirror.png"
370 tooltip="Create constraint, mirroring group of objects">
371 <sketch_shape_selector id="ConstraintEntityA"
372 label="Mirror line" tooltip="Select mirror line" shape_types="edge">
373 <validator id="GeomValidators_ShapeType" parameters="line"/>
374 </sketch_shape_selector>
375 <sketch_multi_selector id="ConstraintMirrorList"
377 tooltip="Select list of mirroring objects"
380 <validator id="SketchPlugin_MirrorAttr" />
381 </sketch_multi_selector>
384 <!-- SketchMultiTranslation -->
386 id="SketchMultiTranslation"
387 title="Translation" icon=":icons/translate.png"
388 tooltip="Multiple translation">
389 <sketch_multi_selector id="MultiTranslationList"
391 tooltip="Select list of translating objects"
394 <validator id="SketchPlugin_CopyValidator" />
395 </sketch_multi_selector>
396 <toolbox id="ValueType">
397 <box id="SingleValue" title="Single value" icon=":icons/translate_32x32.png">
398 <groupbox title="Direction">
399 <sketch_shape_selector
400 id="MultiTranslationStartPoint"
402 tooltip="Start point of translation"
403 shape_types="vertex">
404 <validator id="PartSet_DifferentObjects"/>
405 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
406 </sketch_shape_selector>
407 <sketch_shape_selector
408 id="MultiTranslationEndPoint"
410 tooltip="Final point of translation"
411 shape_types="vertex">
412 <validator id="PartSet_DifferentObjects"/>
413 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
414 </sketch_shape_selector>
417 <box id="FullValue" title="Full value" icon=":icons/translate_full_32x32.png">
418 <groupbox title="Direction">
419 <sketch_shape_selector
420 id="MultiTranslationStartPoint"
422 tooltip="Start point of translation"
423 shape_types="vertex">
424 <validator id="PartSet_DifferentObjects"/>
425 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
426 </sketch_shape_selector>
427 <sketch_shape_selector
428 id="MultiTranslationEndPoint"
430 tooltip="Final point of translation"
431 shape_types="vertex">
432 <validator id="PartSet_DifferentObjects"/>
433 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
434 </sketch_shape_selector>
438 <integervalue id="MultiTranslationObjects"
439 label="Total number of objects"
440 tooltip="Total number of objects"
441 default="2" min="2" use_reset="false">
442 <validator id="GeomValidators_Positive"/>
446 <!-- SketchMultiRotation -->
448 id="SketchMultiRotation"
449 title="Rotation" icon=":icons/rotate.png"
450 tooltip="Multiple rotation">
451 <sketch_multi_selector id="MultiRotationList"
453 tooltip="Select list of rotating objects"
456 <validator id="SketchPlugin_CopyValidator" />
457 </sketch_multi_selector>
458 <sketch_shape_selector
459 id="MultiRotationCenter"
460 label="Center of rotation"
461 tooltip="Center of rotation"
462 shape_types="vertex">
463 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
464 </sketch_shape_selector>
465 <toolbox id="AngleType">
466 <box id="SingleAngle" title="Single angle" icon=":icons/angle_up_32x32.png">
467 <doublevalue id="MultiRotationAngle"
469 icon=":icons/angle.png"
470 tooltip="Rotation angle"
471 default="90" use_reset="false"/>
473 <box id="FullAngle" title="Full angle" icon=":icons/angle_up_full_32x32.png">
474 <doublevalue id="MultiRotationAngle"
476 icon=":icons/angle.png"
477 tooltip="Rotation angle"
478 default="90" use_reset="false"/>
481 <integervalue id="MultiRotationObjects"
482 label="Total number of objects"
483 tooltip="Total number of objects"
484 default="2" min="2" use_reset="false">
485 <validator id="GeomValidators_Positive"/>