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."
39 use_sketch_plane="false">
40 <validator id="GeomValidators_ShapeType" parameters="line"/>
41 <validator id="SketchPlugin_IntersectionValidator"/>
42 </sketch_shape_selector>
46 <feature id="SketchLine" title="Line" tooltip="Create line" icon=":icons/line.png">
47 <sketch-2dpoint_selector id="StartPoint" accept_expressions="0" title="Start point" tooltip="Start point coordinates" previous_feature_param="EndPoint"/>
48 <sketch-2dpoint_selector id="EndPoint" accept_expressions="0" title="End point" tooltip="End point coordinates"/>
49 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
50 <validator id="GeomValidators_Different" parameters="StartPoint,EndPoint"/>
57 tooltip="Create circle"
58 icon=":icons/circle.png">
59 <toolbox id="CircleType">
60 <box id="CenterRadius" title="Center and radius" icon=":icons/circle_pt_rad_32x32.png">
61 <sketch-2dpoint_selector id="CircleCenter" accept_expressions="0" title="Center" tooltip="Center coordinates"/>
62 <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">
63 <validator id="GeomValidators_Positive"/>
66 <box id="ThreePoints" title="Three points" icon=":icons/circle_3pt_32x32.png">
67 <sketch-2dpoint_selector id="FirstPoint" accept_expressions="0" title="First point" tooltip="First point"/>
68 <sketch-2dpoint_selector id="SecondPoint" accept_expressions="0" title="Second point" tooltip="Second point"/>
69 <sketch-2dpoint_selector id="ThirdPoint" accept_expressions="0" title="Third point" tooltip="Third point"/>
72 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
80 icon=":icons/arc.png">
81 <toolbox id="ArcType">
82 <box id="CenterStartEnd" title="Center and two points" icon=":icons/arc_base_32x32.png">
83 <sketch-2dpoint_selector id="ArcCenter" accept_expressions="0" title="Center" tooltip="Center of a circle"/>
84 <sketch-2dpoint_selector id="ArcStartPoint" accept_expressions="0" title="Start point" tooltip="Start point"/>
85 <sketch-2dpoint_selector id="ArcEndPoint" accept_expressions="0" title="End point" tooltip="End point"/>
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="0">
93 <validator id="GeomValidators_Positive"/>
95 <doublevalue id="ArcAngle" label="Angle:" icon=":icons/angle.png" tooltip="Set angle" default="90" use_reset="false" obligatory="0"/>
96 <validator id="GeomValidators_Different" parameters="ArcStartPoint,ArcEndPoint,ArcPassedPoint"/>
98 <box id="Tangent" title="Tangent with edge" icon=":icons/arc_tang_32x32.png">
99 <sketch_shape_selector id="ArcTangentPoint" label="Start point" tooltip="Select point on line" shape_types="vertex">
100 <validator id="SketchPlugin_ArcTangentPoint" parameters="" />
101 </sketch_shape_selector>
102 <sketch-2dpoint_selector id="ArcEndPoint" accept_expressions="0" title="End point" tooltip="End point"/>
103 <doublevalue id="ArcRadius" accept_expressions="0" label="Radius:" default="computed" icon=":icons/radius.png" tooltip="Set radius" obligatory="0">
104 <validator id="GeomValidators_Positive"/>
106 <doublevalue id="ArcAngle" label="Angle:" icon=":icons/angle.png" tooltip="Set angle" default="90" use_reset="false" obligatory="0"/>
109 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
114 <!-- SketchConstraintFillet -->
115 <feature id="SketchConstraintFillet" title="Fillet" tooltip="Create constraint defining fillet between two objects" icon=":icons/fillet.png">
116 <!--<sketch_shape_selector id="ConstraintEntityA"
117 label="Point" tooltip="Select point for fillet (should be shared by two entities only)" shape_types="vertex">
118 <validator id="SketchPlugin_FilletVertexValidator"/>
119 </sketch_shape_selector>-->
120 <sketch_multi_selector id="ConstraintEntityA"
122 tooltip="Select points for fillets"
123 type_choice="Vertices">
124 <validator id="SketchPlugin_FilletVertexValidator"/>
125 </sketch_multi_selector>
126 <doublevalue label="Radius" tooltip="Fillet arc radius" id="ConstraintValue" accept_expressions="0" min="0" use_reset="false">
127 <validator id="GeomValidators_Positive"/>
129 <validator id="PartSet_FilletSelection"/>
133 <group id="Constraints">
134 <!-- SketchConstraintDistance -->
136 id="SketchConstraintDistance"
138 tooltip="Set fixed distance from a point to an object"
139 icon=":icons/distance.png">
140 <label title="Select objects for distance definition. Following objects can be accepted: point, line or arc end point, center of circle or arc."/>
141 <sketch_shape_selector
142 id="ConstraintEntityA"
144 tooltip="Select point, line end point, line, center of circle or arc."
145 shape_types="edge vertex">
146 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
147 <validator id="PartSet_DifferentObjects"/>
148 <validator id="GeomValidators_ShapeType" parameters="vertex,line"/>
149 </sketch_shape_selector>
150 <sketch_shape_selector
151 id="ConstraintEntityB"
152 label="Second object"
153 tooltip="Select point, line end point, line, center of circle or arc."
154 shape_types="edge vertex">
155 <validator id="PartSet_DifferentObjects"/>
156 <validator id="SketchPlugin_DistanceAttr" parameters="ConstraintEntityA"/>
157 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
158 <validator id="GeomValidators_ShapeType" parameters="vertex,line"/>
159 </sketch_shape_selector>
160 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
162 <doublevalue_editor label="Value" tooltip="Distance" id="ConstraintValue" default="computed" min="0">
163 <validator id="GeomValidators_Positive"/>
164 </doublevalue_editor>
166 <validator id="PartSet_DistanceSelection"/>
169 <!-- SketchConstraintLength -->
170 <feature id="SketchConstraintLength" title="Length" tooltip="Set fixed length of a line segment" icon=":icons/length.png">
171 <label title="Select a line on which to calculate length" tooltip="Select a line on which to calculate length"/>
172 <shape_selector id="ConstraintEntityA" label="Line" tooltip="Select an line" shape_types="edge" >
173 <validator id="GeomValidators_ShapeType" parameters="line"/>
175 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
176 <doublevalue_editor label="Value" tooltip="Length" id="ConstraintValue" default="computed">
177 <validator id="GeomValidators_Positive"/>
178 </doublevalue_editor>
179 <validator id="PartSet_LengthSelection"/>
182 <!-- SketchConstraintRadius -->
183 <feature id="SketchConstraintRadius" title="Radius" tooltip="Set fixed radius of a circle or an arc" icon=":icons/radius_constr.png">
184 <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"/>
185 <shape_selector id="ConstraintEntityA" label="Circle or Arc" tooltip="Select a circle or an arc"
187 <validator id="GeomValidators_ShapeType" parameters="circle"/>
189 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
190 <doublevalue_editor label="Value" tooltip="Radius" id="ConstraintValue" default="computed">
191 <validator id="GeomValidators_Positive"/>
192 </doublevalue_editor>
193 <validator id="PartSet_RadiusSelection"/>
196 <!-- SketchConstraintAngle -->
197 <feature id="SketchConstraintAngle" title="Angle" tooltip="Set fixed angle between two line segments" icon=":icons/angle_constr.png">
198 <sketch_shape_selector id="ConstraintEntityA" label="Line 1" tooltip="Select an line" shape_types="edge" >
199 <validator id="GeomValidators_ShapeType" parameters="line"/>
200 <validator id="PartSet_DifferentObjects"/>
201 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
202 </sketch_shape_selector>
203 <sketch_shape_selector id="ConstraintEntityB" label="Line 2" tooltip="Select an line" shape_types="edge" >
204 <validator id="GeomValidators_ShapeType" parameters="line"/>
205 <validator id="PartSet_DifferentObjects"/>
206 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
207 </sketch_shape_selector>
208 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
209 <doublevalue_editor label="Value" tooltip="Angle" id="ConstraintValue" default="computed" min="0" max="180" />
210 <validator id="PartSet_AngleSelection"/>
213 <!-- SketchConstraintParallel -->
214 <feature id="SketchConstraintParallel" title="Parallel" tooltip="Create constraint defining two parallel lines" icon=":icons/parallel.png">
215 <sketch_shape_selector id="ConstraintEntityA"
216 label="First line" tooltip="Select a line" shape_types="edge">
217 <validator id="GeomValidators_ShapeType" parameters="line"/>
218 <validator id="PartSet_DifferentObjects"/>
219 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
220 </sketch_shape_selector>
222 <sketch_shape_selector id="ConstraintEntityB" label="Second line" tooltip="Select a line"
224 <validator id="GeomValidators_ShapeType" parameters="line"/>
225 <validator id="PartSet_DifferentObjects"/>
226 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
227 </sketch_shape_selector>
228 <validator id="PartSet_ParallelSelection"/>
231 <!-- SketchConstraintPerpendicular -->
232 <feature id="SketchConstraintPerpendicular" title="Perpendicular"
233 tooltip="Create constraint defining two perpendicular lines"
234 icon=":icons/perpendicular.png">
235 <sketch_shape_selector id="ConstraintEntityA"
236 label="First line" tooltip="Select an line"
238 <validator id="PartSet_DifferentObjects"/>
239 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
240 <validator id="GeomValidators_ShapeType" parameters="line"/>
241 </sketch_shape_selector>
243 <sketch_shape_selector id="ConstraintEntityB"
244 label="Second line" tooltip="Select an line"
246 <validator id="PartSet_DifferentObjects"/>
247 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
248 <validator id="GeomValidators_ShapeType" parameters="line"/>
249 </sketch_shape_selector>
250 <validator id="PartSet_PerpendicularSelection"/>
253 <!-- SketchConstraintCoincidence -->
254 <feature id="SketchConstraintCoincidence" title="Coincident" tooltip="Create constraint for the coincidence of two points or point on line or circle" icon=":icons/coincedence.png">
255 <sketch_shape_selector id="ConstraintEntityA" label="First object" tooltip="Select a first object" shape_types="vertex edge">
256 <validator id="PartSet_DifferentObjects"/>
257 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
258 </sketch_shape_selector>
259 <sketch_shape_selector id="ConstraintEntityB" label="Second object" tooltip="Select a second object" shape_types="vertex edge">
260 <validator id="PartSet_DifferentObjects"/>
261 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
262 <validator id="SketchPlugin_CoincidenceAttr" parameters="ConstraintEntityA"/>
263 </sketch_shape_selector>
264 <validator id="PartSet_CoincidentSelection"/>
267 <!-- SketchConstraintRigid -->
268 <feature id="SketchConstraintRigid" title="Fixed" tooltip="Fix an object" icon=":icons/fixed.png">
269 <sketch_shape_selector id="ConstraintEntityA" label="Object"
270 tooltip="Select point, line end point, line, center of circle or arc."
271 shape_types="edge vertex">
272 <validator id="GeomValidators_ShapeType" parameters="vertex,line,circle"/>
273 <validator id="SketchPlugin_NotFixed"/>
274 </sketch_shape_selector>
275 <validator id="PartSet_RigidSelection"/>
278 <!-- SketchConstraintHorizontal -->
279 <feature id="SketchConstraintHorizontal" title="Horizontal" tooltip="Create constraint defining horizontal line" icon=":icons/horisontal.png">
280 <sketch_shape_selector id="ConstraintEntityA"
281 label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
282 <validator id="GeomValidators_ShapeType" parameters="line"/>
283 </sketch_shape_selector>
284 <validator id="PartSet_HVDirSelection"/>
287 <!-- SketchConstraintVertical -->
288 <feature id="SketchConstraintVertical" title="Vertical" tooltip="Create constraint defining vertical line" icon=":icons/vertical.png">
289 <sketch_shape_selector id="ConstraintEntityA"
290 label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
291 <validator id="GeomValidators_ShapeType" parameters="line"/>
292 </sketch_shape_selector>
293 <validator id="PartSet_HVDirSelection"/>
296 <!-- SketchConstraintEqual -->
297 <feature id="SketchConstraintEqual" title="Equal"
298 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"
299 icon=":icons/equal.png">
300 <sketch_shape_selector id="ConstraintEntityA"
301 label="First object" tooltip="Select line, circle or arc" shape_types="edge">
302 <validator id="PartSet_DifferentObjects"/>
303 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
304 </sketch_shape_selector>
306 <sketch_shape_selector id="ConstraintEntityB"
307 label="Second object" tooltip="Select line, circle or arc" shape_types="edge">
308 <validator id="SketchPlugin_EqualAttr" parameters="ConstraintEntityA"/>
309 <validator id="PartSet_DifferentObjects"/>
310 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
311 </sketch_shape_selector>
312 <validator id="PartSet_EqualSelection"/>
315 <!-- SketchConstraintTangent -->
316 <feature id="SketchConstraintTangent" title="Tangent" tooltip="Create constraint defining tangency of two objects with common coincident point" icon=":icons/tangent.png">
317 <sketch_shape_selector id="ConstraintEntityA"
318 label="First object" tooltip="Select line or arc" shape_types="edge">
319 <validator id="SketchPlugin_TangentAttr" parameters="ConstraintEntityB"/>
320 <validator id="PartSet_DifferentObjects"/>
321 </sketch_shape_selector>
323 <sketch_shape_selector id="ConstraintEntityB"
324 label="Second object" tooltip="Select line or arc" shape_types="edge">
325 <validator id="SketchPlugin_TangentAttr" parameters="ConstraintEntityA"/>
326 <validator id="PartSet_DifferentObjects"/>
327 </sketch_shape_selector>
328 <validator id="PartSet_TangentSelection"/>
331 <!-- SketchConstraintCollinear -->
332 <feature id="SketchConstraintCollinear" title="Collinear" tooltip="Create constraint defining collinearity of two lines" icon=":icons/collinear.png">
333 <sketch_shape_selector id="ConstraintEntityA"
334 label="First line" tooltip="Select a line" shape_types="edge">
335 <validator id="GeomValidators_ShapeType" parameters="line"/>
336 <validator id="PartSet_DifferentObjects"/>
337 </sketch_shape_selector>
339 <sketch_shape_selector id="ConstraintEntityB"
340 label="Second line" tooltip="Select a line" shape_types="edge">
341 <validator id="GeomValidators_ShapeType" parameters="line"/>
342 <validator id="PartSet_DifferentObjects"/>
343 </sketch_shape_selector>
344 <validator id="PartSet_CollinearSelection"/>
347 <!-- SketchConstraintMiddle -->
348 <feature id="SketchConstraintMiddle" title="Middle point" tooltip="Create constraint for setting middle point on a line" icon=":icons/middlepoint.png">
349 <sketch_shape_selector id="ConstraintEntityA" label="First object" tooltip="Select a first object" shape_types="vertex edge">
350 <validator id="PartSet_DifferentObjects"/>
351 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
352 <validator id="SketchPlugin_MiddlePointAttr" parameters="ConstraintEntityB"/>
353 </sketch_shape_selector>
354 <sketch_shape_selector id="ConstraintEntityB" label="Second object" tooltip="Select a second object" shape_types="vertex edge">
355 <validator id="PartSet_DifferentObjects"/>
356 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
357 <validator id="SketchPlugin_MiddlePointAttr" parameters="ConstraintEntityA"/>
358 </sketch_shape_selector>
359 <validator id="PartSet_MiddlePointSelection"/>
365 <!-- SketchConstraintMirror -->
367 id="SketchConstraintMirror"
368 title="Mirror" icon=":icons/mirror.png"
369 tooltip="Create constraint, mirroring group of objects">
370 <sketch_shape_selector id="ConstraintEntityA"
371 label="Mirror line" tooltip="Select mirror line" shape_types="edge">
372 <validator id="GeomValidators_ShapeType" parameters="line"/>
373 </sketch_shape_selector>
374 <sketch_multi_selector id="ConstraintMirrorList"
376 tooltip="Select list of mirroring objects"
379 <validator id="SketchPlugin_MirrorAttr" />
380 </sketch_multi_selector>
383 <!-- SketchMultiTranslation -->
385 id="SketchMultiTranslation"
386 title="Translation" icon=":icons/translate.png"
387 tooltip="Multiple translation">
388 <sketch_multi_selector id="MultiTranslationList"
390 tooltip="Select list of translating objects"
393 <validator id="SketchPlugin_CopyValidator" />
394 </sketch_multi_selector>
395 <toolbox id="ValueType">
396 <box id="SingleValue" title="Single value" icon=":icons/translate_32x32.png">
397 <groupbox title="Direction">
398 <sketch_shape_selector
399 id="MultiTranslationStartPoint"
401 tooltip="Start point of translation"
402 shape_types="vertex">
403 <validator id="PartSet_DifferentObjects"/>
404 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
405 </sketch_shape_selector>
406 <sketch_shape_selector
407 id="MultiTranslationEndPoint"
409 tooltip="Final point of translation"
410 shape_types="vertex">
411 <validator id="PartSet_DifferentObjects"/>
412 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
413 </sketch_shape_selector>
416 <box id="FullValue" title="Full value" icon=":icons/translate_full_32x32.png">
417 <groupbox title="Direction">
418 <sketch_shape_selector
419 id="MultiTranslationStartPoint"
421 tooltip="Start point of translation"
422 shape_types="vertex">
423 <validator id="PartSet_DifferentObjects"/>
424 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
425 </sketch_shape_selector>
426 <sketch_shape_selector
427 id="MultiTranslationEndPoint"
429 tooltip="Final point of translation"
430 shape_types="vertex">
431 <validator id="PartSet_DifferentObjects"/>
432 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
433 </sketch_shape_selector>
437 <integervalue id="MultiTranslationObjects"
438 label="Total number of objects"
439 tooltip="Total number of objects"
440 default="2" min="2" use_reset="false">
441 <validator id="GeomValidators_Positive"/>
445 <!-- SketchMultiRotation -->
447 id="SketchMultiRotation"
448 title="Rotation" icon=":icons/rotate.png"
449 tooltip="Multiple rotation">
450 <sketch_multi_selector id="MultiRotationList"
452 tooltip="Select list of rotating objects"
455 <validator id="SketchPlugin_CopyValidator" />
456 </sketch_multi_selector>
457 <sketch_shape_selector
458 id="MultiRotationCenter"
459 label="Center of rotation"
460 tooltip="Center of rotation"
461 shape_types="vertex">
462 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
463 </sketch_shape_selector>
464 <toolbox id="AngleType">
465 <box id="SingleAngle" title="Single angle" icon=":icons/angle_up_32x32.png">
466 <doublevalue id="MultiRotationAngle"
468 icon=":icons/angle.png"
469 tooltip="Rotation angle"
470 default="90" use_reset="false"/>
472 <box id="FullAngle" title="Full angle" icon=":icons/angle_up_full_32x32.png">
473 <doublevalue id="MultiRotationAngle"
475 icon=":icons/angle.png"
476 tooltip="Rotation angle"
477 default="90" use_reset="false"/>
480 <integervalue id="MultiRotationObjects"
481 label="Total number of objects"
482 tooltip="Total number of objects"
483 default="2" min="2" use_reset="false">
484 <validator id="GeomValidators_Positive"/>