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/intersection_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>
43 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
47 <feature id="SketchLine" title="Line" tooltip="Create line" icon=":icons/line.png">
48 <sketch-2dpoint_selector id="StartPoint" accept_expressions="0" title="Start point" tooltip="Start point coordinates" previous_feature_param="EndPoint"/>
49 <sketch-2dpoint_selector id="EndPoint" accept_expressions="0" title="End point" tooltip="End point coordinates"/>
50 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
51 <validator id="GeomValidators_Different" parameters="StartPoint,EndPoint"/>
58 tooltip="Create circle"
59 icon=":icons/circle.png">
60 <toolbox id="CircleType">
61 <box id="CenterRadius" title="Center and radius" icon=":icons/circle_pt_rad_32x32.png">
62 <sketch-2dpoint_selector id="CircleCenter" accept_expressions="0" title="Center" tooltip="Center coordinates"/>
63 <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">
64 <validator id="GeomValidators_Positive"/>
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"/>
73 <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 <validator id="GeomValidators_Different" parameters="ArcCenter,ArcStartPoint,ArcEndPoint"/>
89 <box id="ThreePoints" title="Three points on arc" icon=":icons/arc_3pt_32x32.png">
90 <sketch-2dpoint_selector id="ArcStartPoint" accept_expressions="0" title="Start point" tooltip="Start point"/>
91 <sketch-2dpoint_selector id="ArcEndPoint" accept_expressions="0" title="End point" tooltip="End point"/>
92 <sketch-2dpoint_selector id="ArcPassedPoint" accept_expressions="0" title="Passed point" tooltip="Passed point"/>
93 <validator id="GeomValidators_Different" parameters="ArcStartPoint,ArcEndPoint,ArcPassedPoint"/>
95 <box id="Tangent" title="Tangent with edge" icon=":icons/arc_tang_32x32.png">
96 <sketch_shape_selector id="ArcTangentPoint" label="Start point" tooltip="Select point on line" shape_types="vertex">
97 <validator id="SketchPlugin_ArcTangentPoint" parameters="" />
98 </sketch_shape_selector>
99 <sketch-2dpoint_selector id="ArcEndPoint" accept_expressions="0" title="End point" tooltip="End point"/>
102 <doublevalue id="ArcRadius" accept_expressions="0" label="Radius:" default="computed" icon=":icons/radius.png" tooltip="Set radius" obligatory="0">
103 <validator id="GeomValidators_Positive"/>
105 <doublevalue id="ArcAngle" label="Angle:" icon=":icons/angle.png" tooltip="Set angle" default="90" use_reset="false" obligatory="0"/>
106 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
111 <!-- SketchConstraintFillet -->
112 <feature id="SketchConstraintFillet" title="Fillet" tooltip="Create constraint defining fillet between two objects" icon=":icons/fillet.png">
113 <!--<sketch_shape_selector id="ConstraintEntityA"
114 label="Point" tooltip="Select point for fillet (should be shared by two entities only)" shape_types="vertex">
115 <validator id="SketchPlugin_FilletVertexValidator"/>
116 </sketch_shape_selector>-->
117 <sketch_multi_selector id="ConstraintEntityA"
119 tooltip="Select points for fillets"
120 type_choice="Vertices"
122 <validator id="SketchPlugin_FilletVertexValidator"/>
123 </sketch_multi_selector>
124 <doublevalue label="Radius" tooltip="Fillet arc radius" id="ConstraintValue" accept_expressions="0" min="0" use_reset="false">
125 <validator id="GeomValidators_Positive"/>
127 <validator id="PartSet_FilletSelection"/>
131 <group id="Constraints">
132 <!-- SketchConstraintDistance -->
134 id="SketchConstraintDistance"
136 tooltip="Set fixed distance from a point to an object"
137 icon=":icons/distance.png">
138 <label title="Select objects for distance definition. Following objects can be accepted: point, line or arc end point, center of circle or arc."/>
139 <sketch_shape_selector
140 id="ConstraintEntityA"
142 tooltip="Select point, line end point, line, center of circle or arc."
143 shape_types="edge vertex">
144 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
145 <validator id="PartSet_DifferentObjects"/>
146 <validator id="GeomValidators_ShapeType" parameters="vertex,line"/>
147 </sketch_shape_selector>
148 <sketch_shape_selector
149 id="ConstraintEntityB"
150 label="Second object"
151 tooltip="Select point, line end point, line, center of circle or arc."
152 shape_types="edge vertex">
153 <validator id="PartSet_DifferentObjects"/>
154 <validator id="SketchPlugin_DistanceAttr" parameters="ConstraintEntityA"/>
155 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
156 <validator id="GeomValidators_ShapeType" parameters="vertex,line"/>
157 </sketch_shape_selector>
158 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
160 <doublevalue_editor label="Value" tooltip="Distance" id="ConstraintValue" default="computed" min="0">
161 <validator id="GeomValidators_Positive"/>
162 </doublevalue_editor>
164 <validator id="PartSet_DistanceSelection"/>
167 <!-- SketchConstraintLength -->
168 <feature id="SketchConstraintLength" title="Length" tooltip="Set fixed length of a line segment" icon=":icons/length.png">
169 <label title="Select a line on which to calculate length" tooltip="Select a line on which to calculate length"/>
170 <shape_selector id="ConstraintEntityA" label="Line" tooltip="Select an line" shape_types="edge" >
171 <validator id="GeomValidators_ShapeType" parameters="line"/>
173 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
174 <doublevalue_editor label="Value" tooltip="Length" id="ConstraintValue" default="computed">
175 <validator id="GeomValidators_Positive"/>
176 </doublevalue_editor>
177 <validator id="PartSet_LengthSelection"/>
180 <!-- SketchConstraintRadius -->
181 <feature id="SketchConstraintRadius" title="Radius" tooltip="Set fixed radius of a circle or an arc" icon=":icons/radius_constr.png">
182 <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"/>
183 <shape_selector id="ConstraintEntityA" label="Circle or Arc" tooltip="Select a circle or an arc"
185 <validator id="GeomValidators_ShapeType" parameters="circle"/>
187 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
188 <doublevalue_editor label="Value" tooltip="Radius" id="ConstraintValue" default="computed">
189 <validator id="GeomValidators_Positive"/>
190 </doublevalue_editor>
191 <validator id="PartSet_RadiusSelection"/>
194 <!-- SketchConstraintAngle -->
195 <feature id="SketchConstraintAngle" title="Angle" tooltip="Set fixed angle between two line segments" icon=":icons/angle_constr.png">
196 <sketch_shape_selector id="ConstraintEntityA" label="Line 1" tooltip="Select an line" shape_types="edge" >
197 <validator id="GeomValidators_ShapeType" parameters="line"/>
198 <validator id="PartSet_DifferentObjects"/>
199 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
200 </sketch_shape_selector>
201 <sketch_shape_selector id="ConstraintEntityB" label="Line 2" 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="ConstraintEntityA"/>
205 </sketch_shape_selector>
206 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
207 <doublevalue_editor label="Value" tooltip="Angle" id="ConstraintValue" default="computed" min="0" max="180" />
208 <validator id="PartSet_AngleSelection"/>
211 <!-- SketchConstraintParallel -->
212 <feature id="SketchConstraintParallel" title="Parallel" tooltip="Create constraint defining two parallel lines" icon=":icons/parallel.png">
213 <sketch_shape_selector id="ConstraintEntityA"
214 label="First line" tooltip="Select a line" shape_types="edge">
215 <validator id="GeomValidators_ShapeType" parameters="line"/>
216 <validator id="PartSet_DifferentObjects"/>
217 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
218 </sketch_shape_selector>
220 <sketch_shape_selector id="ConstraintEntityB" label="Second line" tooltip="Select a line"
222 <validator id="GeomValidators_ShapeType" parameters="line"/>
223 <validator id="PartSet_DifferentObjects"/>
224 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
225 </sketch_shape_selector>
226 <validator id="PartSet_ParallelSelection"/>
229 <!-- SketchConstraintPerpendicular -->
230 <feature id="SketchConstraintPerpendicular" title="Perpendicular"
231 tooltip="Create constraint defining two perpendicular lines"
232 icon=":icons/perpendicular.png">
233 <sketch_shape_selector id="ConstraintEntityA"
234 label="First line" tooltip="Select an line"
236 <validator id="PartSet_DifferentObjects"/>
237 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
238 <validator id="GeomValidators_ShapeType" parameters="line"/>
239 </sketch_shape_selector>
241 <sketch_shape_selector id="ConstraintEntityB"
242 label="Second line" tooltip="Select an line"
244 <validator id="PartSet_DifferentObjects"/>
245 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
246 <validator id="GeomValidators_ShapeType" parameters="line"/>
247 </sketch_shape_selector>
248 <validator id="PartSet_PerpendicularSelection"/>
251 <!-- SketchConstraintCoincidence -->
252 <feature id="SketchConstraintCoincidence" title="Coincident" tooltip="Create constraint for the coincidence of two points or point on line or circle" icon=":icons/coincedence.png">
253 <sketch_shape_selector id="ConstraintEntityA" label="First object" tooltip="Select a first object" shape_types="vertex edge">
254 <validator id="PartSet_DifferentObjects"/>
255 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
256 </sketch_shape_selector>
257 <sketch_shape_selector id="ConstraintEntityB" label="Second object" tooltip="Select a second object" shape_types="vertex edge">
258 <validator id="PartSet_DifferentObjects"/>
259 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
260 <validator id="SketchPlugin_CoincidenceAttr" parameters="ConstraintEntityA"/>
261 </sketch_shape_selector>
262 <validator id="PartSet_CoincidentSelection"/>
265 <!-- SketchConstraintRigid -->
266 <feature id="SketchConstraintRigid" title="Fixed" tooltip="Fix an object" icon=":icons/fixed.png">
267 <sketch_shape_selector id="ConstraintEntityA" label="Object"
268 tooltip="Select point, line end point, line, center of circle or arc."
269 shape_types="edge vertex">
270 <validator id="GeomValidators_ShapeType" parameters="vertex,line,circle"/>
271 <validator id="SketchPlugin_NotFixed"/>
272 </sketch_shape_selector>
273 <validator id="PartSet_RigidSelection"/>
276 <!-- SketchConstraintHorizontal -->
277 <feature id="SketchConstraintHorizontal" title="Horizontal" tooltip="Create constraint defining horizontal line" icon=":icons/horisontal.png">
278 <sketch_shape_selector id="ConstraintEntityA"
279 label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
280 <validator id="GeomValidators_ShapeType" parameters="line"/>
281 </sketch_shape_selector>
282 <validator id="PartSet_HVDirSelection"/>
285 <!-- SketchConstraintVertical -->
286 <feature id="SketchConstraintVertical" title="Vertical" tooltip="Create constraint defining vertical line" icon=":icons/vertical.png">
287 <sketch_shape_selector id="ConstraintEntityA"
288 label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
289 <validator id="GeomValidators_ShapeType" parameters="line"/>
290 </sketch_shape_selector>
291 <validator id="PartSet_HVDirSelection"/>
294 <!-- SketchConstraintEqual -->
295 <feature id="SketchConstraintEqual" title="Equal"
296 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"
297 icon=":icons/equal.png">
298 <sketch_shape_selector id="ConstraintEntityA"
299 label="First object" tooltip="Select line, circle or arc" shape_types="edge">
300 <validator id="PartSet_DifferentObjects"/>
301 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
302 </sketch_shape_selector>
304 <sketch_shape_selector id="ConstraintEntityB"
305 label="Second object" tooltip="Select line, circle or arc" shape_types="edge">
306 <validator id="SketchPlugin_EqualAttr" parameters="ConstraintEntityA"/>
307 <validator id="PartSet_DifferentObjects"/>
308 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
309 </sketch_shape_selector>
310 <validator id="PartSet_EqualSelection"/>
313 <!-- SketchConstraintTangent -->
314 <feature id="SketchConstraintTangent" title="Tangent" tooltip="Create constraint defining tangency of two objects with common coincident point" icon=":icons/tangent.png">
315 <sketch_shape_selector id="ConstraintEntityA"
316 label="First object" tooltip="Select line or arc" shape_types="edge">
317 <validator id="SketchPlugin_TangentAttr" parameters="ConstraintEntityB"/>
318 <validator id="PartSet_DifferentObjects"/>
319 </sketch_shape_selector>
321 <sketch_shape_selector id="ConstraintEntityB"
322 label="Second object" tooltip="Select line or arc" shape_types="edge">
323 <validator id="SketchPlugin_TangentAttr" parameters="ConstraintEntityA"/>
324 <validator id="PartSet_DifferentObjects"/>
325 </sketch_shape_selector>
326 <validator id="PartSet_TangentSelection"/>
329 <!-- SketchConstraintCollinear -->
331 <feature id="SketchConstraintCollinear" title="Collinear" tooltip="Create constraint defining collinearity of two lines" icon=":icons/collinear.png">
332 <sketch_shape_selector id="ConstraintEntityA"
333 label="First line" tooltip="Select a line" shape_types="edge">
334 <validator id="GeomValidators_ShapeType" parameters="line"/>
335 <validator id="PartSet_DifferentObjects"/>
336 </sketch_shape_selector>
338 <sketch_shape_selector id="ConstraintEntityB"
339 label="Second line" tooltip="Select a line" shape_types="edge">
340 <validator id="GeomValidators_ShapeType" parameters="line"/>
341 <validator id="PartSet_DifferentObjects"/>
342 </sketch_shape_selector>
343 <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"
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"
395 <validator id="SketchPlugin_CopyValidator" />
396 </sketch_multi_selector>
397 <toolbox id="ValueType">
398 <box id="SingleValue" title="Single value" icon=":icons/translate_32x32.png">
399 <groupbox title="Direction">
400 <sketch_shape_selector
401 id="MultiTranslationStartPoint"
403 tooltip="Start point of translation"
404 shape_types="vertex">
405 <validator id="PartSet_DifferentObjects"/>
406 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
407 </sketch_shape_selector>
408 <sketch_shape_selector
409 id="MultiTranslationEndPoint"
411 tooltip="Final point of translation"
412 shape_types="vertex">
413 <validator id="PartSet_DifferentObjects"/>
414 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
415 </sketch_shape_selector>
418 <box id="FullValue" title="Full value" icon=":icons/translate_full_32x32.png">
419 <groupbox title="Direction">
420 <sketch_shape_selector
421 id="MultiTranslationStartPoint"
423 tooltip="Start point of translation"
424 shape_types="vertex">
425 <validator id="PartSet_DifferentObjects"/>
426 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
427 </sketch_shape_selector>
428 <sketch_shape_selector
429 id="MultiTranslationEndPoint"
431 tooltip="Final point of translation"
432 shape_types="vertex">
433 <validator id="PartSet_DifferentObjects"/>
434 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
435 </sketch_shape_selector>
439 <integervalue id="MultiTranslationObjects"
440 label="Total number of objects"
441 tooltip="Total number of objects"
442 default="2" min="2" use_reset="false">
443 <validator id="GeomValidators_Positive"/>
447 <!-- SketchMultiRotation -->
449 id="SketchMultiRotation"
450 title="Rotation" icon=":icons/rotate.png"
451 tooltip="Multiple rotation">
452 <sketch_multi_selector id="MultiRotationList"
454 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"/>