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"/>
65 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
67 <box id="ThreePoints" title="Three points" icon=":icons/circle_3pt_32x32.png">
68 <sketch-2dpoint_selector id="FirstPoint" accept_expressions="0" title="First point" tooltip="First point"/>
69 <sketch-2dpoint_selector id="SecondPoint" accept_expressions="0" title="Second point" tooltip="Second point"/>
70 <sketch-2dpoint_selector id="ThirdPoint" accept_expressions="0" title="Third point" tooltip="Third point"/>
71 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
81 icon=":icons/arc.png">
82 <toolbox id="ArcType">
83 <box id="CenterStartEnd" title="Center and two points" icon=":icons/arc_base_32x32.png">
84 <sketch-2dpoint_selector id="ArcCenter" accept_expressions="0" title="Center" tooltip="Center of a circle"/>
85 <sketch-2dpoint_selector id="ArcStartPoint" accept_expressions="0" title="Start point" tooltip="Start point"/>
86 <sketch-2dpoint_selector id="ArcEndPoint" accept_expressions="0" title="End point" tooltip="End point"/>
87 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
88 <validator id="GeomValidators_Different" parameters="ArcCenter,ArcStartPoint,ArcEndPoint"/>
90 <box id="ThreePoints" title="Three points on arc" icon=":icons/arc_3pt_32x32.png">
91 <sketch-2dpoint_selector id="ArcStartPoint" accept_expressions="0" title="Start point" tooltip="Start point"/>
92 <sketch-2dpoint_selector id="ArcEndPoint" accept_expressions="0" title="End point" tooltip="End point"/>
93 <sketch-2dpoint_selector id="ArcPassedPoint" accept_expressions="0" title="Passed point" tooltip="Passed point"/>
94 <doublevalue id="ArcRadius" accept_expressions="0" label="Radius:" default="computed" icon=":icons/radius.png" tooltip="Set radius" obligatory="1">
95 <validator id="GeomValidators_Positive"/>
97 <doublevalue id="ArcAngle" label="Angle:" icon=":icons/angle.png" tooltip="Set angle" default="90" use_reset="false" obligatory="1"/>
98 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
99 <validator id="GeomValidators_Different" parameters="ArcStartPoint,ArcEndPoint,ArcPassedPoint"/>
101 <box id="Tangent" title="Tangent with edge" icon=":icons/arc_tang_32x32.png">
102 <sketch_shape_selector id="ArcTangentPoint" label="Start point" tooltip="Select point on line" shape_types="vertex">
103 <validator id="SketchPlugin_ArcTangentPoint" parameters="" />
104 </sketch_shape_selector>
105 <sketch-2dpoint_selector id="ArcEndPoint" accept_expressions="0" title="End point" tooltip="End point"/>
106 <doublevalue id="ArcRadius" accept_expressions="0" label="Radius:" default="computed" icon=":icons/radius.png" tooltip="Set radius" obligatory="1">
107 <validator id="GeomValidators_Positive"/>
109 <doublevalue id="ArcAngle" label="Angle:" icon=":icons/angle.png" tooltip="Set angle" default="90" use_reset="false" obligatory="1"/>
110 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
117 <!-- SketchConstraintFillet -->
118 <feature id="SketchConstraintFillet" title="Fillet" tooltip="Create constraint defining fillet between two objects" icon=":icons/fillet.png">
119 <!--<sketch_shape_selector id="ConstraintEntityA"
120 label="Point" tooltip="Select point for fillet (should be shared by two entities only)" shape_types="vertex">
121 <validator id="SketchPlugin_FilletVertexValidator"/>
122 </sketch_shape_selector>-->
123 <sketch_multi_selector id="ConstraintEntityA"
125 tooltip="Select points for fillets"
126 type_choice="Vertices">
127 <validator id="SketchPlugin_FilletVertexValidator"/>
128 </sketch_multi_selector>
129 <doublevalue label="Radius" tooltip="Fillet arc radius" id="ConstraintValue" accept_expressions="0" min="0" use_reset="false">
130 <validator id="GeomValidators_Positive"/>
132 <validator id="PartSet_FilletSelection"/>
136 <group id="Constraints">
137 <!-- SketchConstraintDistance -->
139 id="SketchConstraintDistance"
141 tooltip="Set fixed distance from a point to an object"
142 icon=":icons/distance.png">
143 <label title="Select objects for distance definition. Following objects can be accepted: point, line or arc end point, center of circle or arc."/>
144 <sketch_shape_selector
145 id="ConstraintEntityA"
147 tooltip="Select point, line end point, line, center of circle or arc."
148 shape_types="edge vertex">
149 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
150 <validator id="PartSet_DifferentObjects"/>
151 <validator id="GeomValidators_ShapeType" parameters="vertex,line"/>
152 </sketch_shape_selector>
153 <sketch_shape_selector
154 id="ConstraintEntityB"
155 label="Second object"
156 tooltip="Select point, line end point, line, center of circle or arc."
157 shape_types="edge vertex">
158 <validator id="PartSet_DifferentObjects"/>
159 <validator id="SketchPlugin_DistanceAttr" parameters="ConstraintEntityA"/>
160 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
161 <validator id="GeomValidators_ShapeType" parameters="vertex,line"/>
162 </sketch_shape_selector>
163 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
165 <doublevalue_editor label="Value" tooltip="Distance" id="ConstraintValue" default="computed" min="0">
166 <validator id="GeomValidators_Positive"/>
167 </doublevalue_editor>
169 <validator id="PartSet_DistanceSelection"/>
172 <!-- SketchConstraintLength -->
173 <feature id="SketchConstraintLength" title="Length" tooltip="Set fixed length of a line segment" icon=":icons/length.png">
174 <label title="Select a line on which to calculate length" tooltip="Select a line on which to calculate length"/>
175 <shape_selector id="ConstraintEntityA" label="Line" tooltip="Select an line" shape_types="edge" >
176 <validator id="GeomValidators_ShapeType" parameters="line"/>
178 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
179 <doublevalue_editor label="Value" tooltip="Length" id="ConstraintValue" default="computed">
180 <validator id="GeomValidators_Positive"/>
181 </doublevalue_editor>
182 <validator id="PartSet_LengthSelection"/>
185 <!-- SketchConstraintRadius -->
186 <feature id="SketchConstraintRadius" title="Radius" tooltip="Set fixed radius of a circle or an arc" icon=":icons/radius_constr.png">
187 <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"/>
188 <shape_selector id="ConstraintEntityA" label="Circle or Arc" tooltip="Select a circle or an arc"
190 <validator id="GeomValidators_ShapeType" parameters="circle"/>
192 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
193 <doublevalue_editor label="Value" tooltip="Radius" id="ConstraintValue" default="computed">
194 <validator id="GeomValidators_Positive"/>
195 </doublevalue_editor>
196 <validator id="PartSet_RadiusSelection"/>
199 <!-- SketchConstraintAngle -->
200 <feature id="SketchConstraintAngle" title="Angle" tooltip="Set fixed angle between two line segments" icon=":icons/angle_constr.png">
201 <sketch_shape_selector id="ConstraintEntityA" label="Line 1" tooltip="Select an line" shape_types="edge" >
202 <validator id="GeomValidators_ShapeType" parameters="line"/>
203 <validator id="PartSet_DifferentObjects"/>
204 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
205 </sketch_shape_selector>
206 <sketch_shape_selector id="ConstraintEntityB" label="Line 2" tooltip="Select an line" shape_types="edge" >
207 <validator id="GeomValidators_ShapeType" parameters="line"/>
208 <validator id="PartSet_DifferentObjects"/>
209 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
210 </sketch_shape_selector>
211 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
212 <doublevalue_editor label="Value" tooltip="Angle" id="ConstraintValue" default="computed" min="0" max="180" />
213 <validator id="PartSet_AngleSelection"/>
216 <!-- SketchConstraintParallel -->
217 <feature id="SketchConstraintParallel" title="Parallel" tooltip="Create constraint defining two parallel lines" icon=":icons/parallel.png">
218 <sketch_shape_selector id="ConstraintEntityA"
219 label="First line" tooltip="Select a line" shape_types="edge">
220 <validator id="GeomValidators_ShapeType" parameters="line"/>
221 <validator id="PartSet_DifferentObjects"/>
222 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
223 </sketch_shape_selector>
225 <sketch_shape_selector id="ConstraintEntityB" label="Second line" tooltip="Select a line"
227 <validator id="GeomValidators_ShapeType" parameters="line"/>
228 <validator id="PartSet_DifferentObjects"/>
229 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
230 </sketch_shape_selector>
231 <validator id="PartSet_ParallelSelection"/>
234 <!-- SketchConstraintPerpendicular -->
235 <feature id="SketchConstraintPerpendicular" title="Perpendicular"
236 tooltip="Create constraint defining two perpendicular lines"
237 icon=":icons/perpendicular.png">
238 <sketch_shape_selector id="ConstraintEntityA"
239 label="First line" tooltip="Select an line"
241 <validator id="PartSet_DifferentObjects"/>
242 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
243 <validator id="GeomValidators_ShapeType" parameters="line"/>
244 </sketch_shape_selector>
246 <sketch_shape_selector id="ConstraintEntityB"
247 label="Second line" tooltip="Select an line"
249 <validator id="PartSet_DifferentObjects"/>
250 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
251 <validator id="GeomValidators_ShapeType" parameters="line"/>
252 </sketch_shape_selector>
253 <validator id="PartSet_PerpendicularSelection"/>
256 <!-- SketchConstraintCoincidence -->
257 <feature id="SketchConstraintCoincidence" title="Coincident" tooltip="Create constraint for the coincidence of two points or point on line or circle" icon=":icons/coincedence.png">
258 <sketch_shape_selector id="ConstraintEntityA" label="First object" tooltip="Select a first object" shape_types="vertex edge">
259 <validator id="PartSet_DifferentObjects"/>
260 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
261 </sketch_shape_selector>
262 <sketch_shape_selector id="ConstraintEntityB" label="Second object" tooltip="Select a second object" shape_types="vertex edge">
263 <validator id="PartSet_DifferentObjects"/>
264 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
265 <validator id="SketchPlugin_CoincidenceAttr" parameters="ConstraintEntityA"/>
266 </sketch_shape_selector>
267 <validator id="PartSet_CoincidentSelection"/>
270 <!-- SketchConstraintRigid -->
271 <feature id="SketchConstraintRigid" title="Fixed" tooltip="Fix an object" icon=":icons/fixed.png">
272 <sketch_shape_selector id="ConstraintEntityA" label="Object"
273 tooltip="Select point, line end point, line, center of circle or arc."
274 shape_types="edge vertex">
275 <validator id="GeomValidators_ShapeType" parameters="vertex,line,circle"/>
276 <validator id="SketchPlugin_NotFixed"/>
277 </sketch_shape_selector>
278 <validator id="PartSet_RigidSelection"/>
281 <!-- SketchConstraintHorizontal -->
282 <feature id="SketchConstraintHorizontal" title="Horizontal" tooltip="Create constraint defining horizontal line" icon=":icons/horisontal.png">
283 <sketch_shape_selector id="ConstraintEntityA"
284 label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
285 <validator id="GeomValidators_ShapeType" parameters="line"/>
286 </sketch_shape_selector>
287 <validator id="PartSet_HVDirSelection"/>
290 <!-- SketchConstraintVertical -->
291 <feature id="SketchConstraintVertical" title="Vertical" tooltip="Create constraint defining vertical line" icon=":icons/vertical.png">
292 <sketch_shape_selector id="ConstraintEntityA"
293 label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
294 <validator id="GeomValidators_ShapeType" parameters="line"/>
295 </sketch_shape_selector>
296 <validator id="PartSet_HVDirSelection"/>
299 <!-- SketchConstraintEqual -->
300 <feature id="SketchConstraintEqual" title="Equal"
301 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"
302 icon=":icons/equal.png">
303 <sketch_shape_selector id="ConstraintEntityA"
304 label="First object" tooltip="Select line, circle or arc" shape_types="edge">
305 <validator id="PartSet_DifferentObjects"/>
306 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
307 </sketch_shape_selector>
309 <sketch_shape_selector id="ConstraintEntityB"
310 label="Second object" tooltip="Select line, circle or arc" shape_types="edge">
311 <validator id="SketchPlugin_EqualAttr" parameters="ConstraintEntityA"/>
312 <validator id="PartSet_DifferentObjects"/>
313 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
314 </sketch_shape_selector>
315 <validator id="PartSet_EqualSelection"/>
318 <!-- SketchConstraintTangent -->
319 <feature id="SketchConstraintTangent" title="Tangent" tooltip="Create constraint defining tangency of two objects with common coincident point" icon=":icons/tangent.png">
320 <sketch_shape_selector id="ConstraintEntityA"
321 label="First object" tooltip="Select line or arc" shape_types="edge">
322 <validator id="SketchPlugin_TangentAttr" parameters="ConstraintEntityB"/>
323 <validator id="PartSet_DifferentObjects"/>
324 </sketch_shape_selector>
326 <sketch_shape_selector id="ConstraintEntityB"
327 label="Second object" tooltip="Select line or arc" shape_types="edge">
328 <validator id="SketchPlugin_TangentAttr" parameters="ConstraintEntityA"/>
329 <validator id="PartSet_DifferentObjects"/>
330 </sketch_shape_selector>
331 <validator id="PartSet_TangentSelection"/>
334 <!-- SketchConstraintCollinear -->
335 <feature id="SketchConstraintCollinear" title="Collinear" tooltip="Create constraint defining collinearity of two lines" icon=":icons/collinear.png">
336 <sketch_shape_selector id="ConstraintEntityA"
337 label="First line" tooltip="Select a line" shape_types="edge">
338 <validator id="GeomValidators_ShapeType" parameters="line"/>
339 <validator id="PartSet_DifferentObjects"/>
340 </sketch_shape_selector>
342 <sketch_shape_selector id="ConstraintEntityB"
343 label="Second line" tooltip="Select a line" shape_types="edge">
344 <validator id="GeomValidators_ShapeType" parameters="line"/>
345 <validator id="PartSet_DifferentObjects"/>
346 </sketch_shape_selector>
347 <validator id="PartSet_CollinearSelection"/>
350 <!-- SketchConstraintMiddle -->
351 <feature id="SketchConstraintMiddle" title="Middle point" tooltip="Create constraint for setting middle point on a line" icon=":icons/middlepoint.png">
352 <sketch_shape_selector id="ConstraintEntityA" label="First object" tooltip="Select a first object" shape_types="vertex edge">
353 <validator id="PartSet_DifferentObjects"/>
354 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
355 <validator id="SketchPlugin_MiddlePointAttr" parameters="ConstraintEntityB"/>
356 </sketch_shape_selector>
357 <sketch_shape_selector id="ConstraintEntityB" label="Second object" tooltip="Select a second object" shape_types="vertex edge">
358 <validator id="PartSet_DifferentObjects"/>
359 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
360 <validator id="SketchPlugin_MiddlePointAttr" parameters="ConstraintEntityA"/>
361 </sketch_shape_selector>
362 <validator id="PartSet_MiddlePointSelection"/>
368 <!-- SketchConstraintMirror -->
370 id="SketchConstraintMirror"
371 title="Mirror" icon=":icons/mirror.png"
372 tooltip="Create constraint, mirroring group of objects">
373 <sketch_shape_selector id="ConstraintEntityA"
374 label="Mirror line" tooltip="Select mirror line" shape_types="edge">
375 <validator id="GeomValidators_ShapeType" parameters="line"/>
376 </sketch_shape_selector>
377 <sketch_multi_selector id="ConstraintMirrorList"
379 tooltip="Select list of mirroring objects"
382 <validator id="SketchPlugin_MirrorAttr" />
383 </sketch_multi_selector>
386 <!-- SketchMultiTranslation -->
388 id="SketchMultiTranslation"
389 title="Translation" icon=":icons/translate.png"
390 tooltip="Multiple translation">
391 <sketch_multi_selector id="MultiTranslationList"
393 tooltip="Select list of translating objects"
396 <validator id="SketchPlugin_CopyValidator" />
397 </sketch_multi_selector>
398 <toolbox id="ValueType">
399 <box id="SingleValue" title="Single value" icon=":icons/translate_32x32.png">
400 <groupbox title="Direction">
401 <sketch_shape_selector
402 id="MultiTranslationStartPoint"
404 tooltip="Start point of translation"
405 shape_types="vertex">
406 <validator id="PartSet_DifferentObjects"/>
407 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
408 </sketch_shape_selector>
409 <sketch_shape_selector
410 id="MultiTranslationEndPoint"
412 tooltip="Final point of translation"
413 shape_types="vertex">
414 <validator id="PartSet_DifferentObjects"/>
415 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
416 </sketch_shape_selector>
419 <box id="FullValue" title="Full value" icon=":icons/translate_full_32x32.png">
420 <groupbox title="Direction">
421 <sketch_shape_selector
422 id="MultiTranslationStartPoint"
424 tooltip="Start point of translation"
425 shape_types="vertex">
426 <validator id="PartSet_DifferentObjects"/>
427 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
428 </sketch_shape_selector>
429 <sketch_shape_selector
430 id="MultiTranslationEndPoint"
432 tooltip="Final point of translation"
433 shape_types="vertex">
434 <validator id="PartSet_DifferentObjects"/>
435 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
436 </sketch_shape_selector>
440 <integervalue id="MultiTranslationObjects"
441 label="Total number of objects"
442 tooltip="Total number of objects"
443 default="2" min="2" use_reset="false">
444 <validator id="GeomValidators_Positive"/>
448 <!-- SketchMultiRotation -->
450 id="SketchMultiRotation"
451 title="Rotation" icon=":icons/rotate.png"
452 tooltip="Multiple rotation">
453 <sketch_multi_selector id="MultiRotationList"
455 tooltip="Select list of rotating objects"
458 <validator id="SketchPlugin_CopyValidator" />
459 </sketch_multi_selector>
460 <sketch_shape_selector
461 id="MultiRotationCenter"
462 label="Center of rotation"
463 tooltip="Center of rotation"
464 shape_types="vertex">
465 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
466 </sketch_shape_selector>
467 <toolbox id="AngleType">
468 <box id="SingleAngle" title="Single angle" icon=":icons/angle_up_32x32.png">
469 <doublevalue id="MultiRotationAngle"
471 icon=":icons/angle.png"
472 tooltip="Rotation angle"
473 default="90" use_reset="false"/>
475 <box id="FullAngle" title="Full angle" icon=":icons/angle_up_full_32x32.png">
476 <doublevalue id="MultiRotationAngle"
478 icon=":icons/angle.png"
479 tooltip="Rotation angle"
480 default="90" use_reset="false"/>
483 <integervalue id="MultiRotationObjects"
484 label="Total number of objects"
485 tooltip="Total number of objects"
486 default="2" min="2" use_reset="false">
487 <validator id="GeomValidators_Positive"/>