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="AngleValue" default="computed" min="0" max="360" />
208 <validator id="PartSet_AngleSelection"/>
209 <module_choice id="AngleType"
210 widget_type="radiobuttons"
211 buttons_dir="horizontal"
213 tooltip="Type of angle"
214 string_list="Direct Complementary Additional"
215 icons_list=":icons/angle_direct.png :icons/angle_complementary.png :icons/angle_backward.png"
221 <!-- SketchConstraintParallel -->
222 <feature id="SketchConstraintParallel" title="Parallel" tooltip="Create constraint defining two parallel lines" icon=":icons/parallel.png">
223 <sketch_shape_selector id="ConstraintEntityA"
224 label="First line" tooltip="Select a line" shape_types="edge">
225 <validator id="GeomValidators_ShapeType" parameters="line"/>
226 <validator id="PartSet_DifferentObjects"/>
227 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
228 </sketch_shape_selector>
230 <sketch_shape_selector id="ConstraintEntityB" label="Second line" tooltip="Select a line"
232 <validator id="GeomValidators_ShapeType" parameters="line"/>
233 <validator id="PartSet_DifferentObjects"/>
234 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
235 </sketch_shape_selector>
236 <validator id="PartSet_ParallelSelection"/>
239 <!-- SketchConstraintPerpendicular -->
240 <feature id="SketchConstraintPerpendicular" title="Perpendicular"
241 tooltip="Create constraint defining two perpendicular lines"
242 icon=":icons/perpendicular.png">
243 <sketch_shape_selector id="ConstraintEntityA"
244 label="First line" tooltip="Select an line"
246 <validator id="PartSet_DifferentObjects"/>
247 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
248 <validator id="GeomValidators_ShapeType" parameters="line"/>
249 </sketch_shape_selector>
251 <sketch_shape_selector id="ConstraintEntityB"
252 label="Second line" tooltip="Select an line"
254 <validator id="PartSet_DifferentObjects"/>
255 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
256 <validator id="GeomValidators_ShapeType" parameters="line"/>
257 </sketch_shape_selector>
258 <validator id="PartSet_PerpendicularSelection"/>
261 <!-- SketchConstraintCoincidence -->
262 <feature id="SketchConstraintCoincidence" title="Coincident" tooltip="Create constraint for the coincidence of two points or point on line or circle" icon=":icons/coincedence.png">
263 <sketch_shape_selector id="ConstraintEntityA" label="First object" tooltip="Select a first object" shape_types="vertex edge">
264 <validator id="PartSet_DifferentObjects"/>
265 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
266 </sketch_shape_selector>
267 <sketch_shape_selector id="ConstraintEntityB" label="Second object" tooltip="Select a second object" shape_types="vertex edge">
268 <validator id="PartSet_DifferentObjects"/>
269 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
270 <validator id="SketchPlugin_CoincidenceAttr" parameters="ConstraintEntityA"/>
271 </sketch_shape_selector>
272 <validator id="PartSet_CoincidentSelection"/>
275 <!-- SketchConstraintRigid -->
276 <feature id="SketchConstraintRigid" title="Fixed" tooltip="Fix an object" icon=":icons/fixed.png">
277 <sketch_shape_selector id="ConstraintEntityA" label="Object"
278 tooltip="Select point, line end point, line, center of circle or arc."
279 shape_types="edge vertex">
280 <validator id="GeomValidators_ShapeType" parameters="vertex,line,circle"/>
281 <validator id="SketchPlugin_NotFixed"/>
282 </sketch_shape_selector>
283 <validator id="PartSet_RigidSelection"/>
286 <!-- SketchConstraintHorizontal -->
287 <feature id="SketchConstraintHorizontal" title="Horizontal" tooltip="Create constraint defining horizontal line" icon=":icons/horisontal.png">
288 <sketch_shape_selector id="ConstraintEntityA"
289 label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
290 <validator id="GeomValidators_ShapeType" parameters="line"/>
291 </sketch_shape_selector>
292 <validator id="PartSet_HVDirSelection"/>
295 <!-- SketchConstraintVertical -->
296 <feature id="SketchConstraintVertical" title="Vertical" tooltip="Create constraint defining vertical line" icon=":icons/vertical.png">
297 <sketch_shape_selector id="ConstraintEntityA"
298 label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
299 <validator id="GeomValidators_ShapeType" parameters="line"/>
300 </sketch_shape_selector>
301 <validator id="PartSet_HVDirSelection"/>
304 <!-- SketchConstraintEqual -->
305 <feature id="SketchConstraintEqual" title="Equal"
306 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"
307 icon=":icons/equal.png">
308 <sketch_shape_selector id="ConstraintEntityA"
309 label="First object" tooltip="Select line, circle or arc" shape_types="edge">
310 <validator id="PartSet_DifferentObjects"/>
311 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
312 </sketch_shape_selector>
314 <sketch_shape_selector id="ConstraintEntityB"
315 label="Second object" tooltip="Select line, circle or arc" shape_types="edge">
316 <validator id="SketchPlugin_EqualAttr" parameters="ConstraintEntityA"/>
317 <validator id="PartSet_DifferentObjects"/>
318 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
319 </sketch_shape_selector>
320 <validator id="PartSet_EqualSelection"/>
323 <!-- SketchConstraintTangent -->
324 <feature id="SketchConstraintTangent" title="Tangent" tooltip="Create constraint defining tangency of two objects with common coincident point" icon=":icons/tangent.png">
325 <sketch_shape_selector id="ConstraintEntityA"
326 label="First object" tooltip="Select line or arc" shape_types="edge">
327 <validator id="SketchPlugin_TangentAttr" parameters="ConstraintEntityB"/>
328 <validator id="PartSet_DifferentObjects"/>
329 </sketch_shape_selector>
331 <sketch_shape_selector id="ConstraintEntityB"
332 label="Second object" tooltip="Select line or arc" shape_types="edge">
333 <validator id="SketchPlugin_TangentAttr" parameters="ConstraintEntityA"/>
334 <validator id="PartSet_DifferentObjects"/>
335 </sketch_shape_selector>
336 <validator id="PartSet_TangentSelection"/>
339 <!-- SketchConstraintCollinear -->
341 <feature id="SketchConstraintCollinear" title="Collinear" tooltip="Create constraint defining collinearity of two lines" icon=":icons/collinear.png">
342 <sketch_shape_selector id="ConstraintEntityA"
343 label="First line" tooltip="Select a line" shape_types="edge">
344 <validator id="GeomValidators_ShapeType" parameters="line"/>
345 <validator id="PartSet_DifferentObjects"/>
346 </sketch_shape_selector>
348 <sketch_shape_selector id="ConstraintEntityB"
349 label="Second line" tooltip="Select a line" shape_types="edge">
350 <validator id="GeomValidators_ShapeType" parameters="line"/>
351 <validator id="PartSet_DifferentObjects"/>
352 </sketch_shape_selector>
353 <validator id="PartSet_CollinearSelection"/>
357 <!-- SketchConstraintMiddle -->
358 <feature id="SketchConstraintMiddle" title="Middle point" tooltip="Create constraint for setting middle point on a line" icon=":icons/middlepoint.png">
359 <sketch_shape_selector id="ConstraintEntityA" label="First object" tooltip="Select a first object" shape_types="vertex edge">
360 <validator id="PartSet_DifferentObjects"/>
361 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
362 <validator id="SketchPlugin_MiddlePointAttr" parameters="ConstraintEntityB"/>
363 </sketch_shape_selector>
364 <sketch_shape_selector id="ConstraintEntityB" label="Second object" tooltip="Select a second object" shape_types="vertex edge">
365 <validator id="PartSet_DifferentObjects"/>
366 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
367 <validator id="SketchPlugin_MiddlePointAttr" parameters="ConstraintEntityA"/>
368 </sketch_shape_selector>
369 <validator id="PartSet_MiddlePointSelection"/>
375 <!-- SketchConstraintMirror -->
377 id="SketchConstraintMirror"
378 title="Mirror" icon=":icons/mirror.png"
379 tooltip="Create constraint, mirroring group of objects">
380 <sketch_shape_selector id="ConstraintEntityA"
381 label="Mirror line" tooltip="Select mirror line" shape_types="edge">
382 <validator id="GeomValidators_ShapeType" parameters="line"/>
383 </sketch_shape_selector>
384 <sketch_multi_selector id="ConstraintMirrorList"
386 tooltip="Select list of mirroring objects"
390 <validator id="SketchPlugin_MirrorAttr" />
391 </sketch_multi_selector>
394 <!-- SketchMultiTranslation -->
396 id="SketchMultiTranslation"
397 title="Translation" icon=":icons/translate.png"
398 tooltip="Multiple translation">
399 <sketch_multi_selector id="MultiTranslationList"
401 tooltip="Select list of translating objects"
405 <validator id="SketchPlugin_CopyValidator" />
406 </sketch_multi_selector>
407 <toolbox id="ValueType">
408 <box id="SingleValue" title="Single value" icon=":icons/translate_32x32.png">
409 <groupbox title="Direction">
410 <sketch_shape_selector
411 id="MultiTranslationStartPoint"
413 tooltip="Start point of translation"
414 shape_types="vertex">
415 <validator id="PartSet_DifferentObjects"/>
416 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
417 </sketch_shape_selector>
418 <sketch_shape_selector
419 id="MultiTranslationEndPoint"
421 tooltip="Final point of translation"
422 shape_types="vertex">
423 <validator id="PartSet_DifferentObjects"/>
424 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
425 </sketch_shape_selector>
428 <box id="FullValue" title="Full value" icon=":icons/translate_full_32x32.png">
429 <groupbox title="Direction">
430 <sketch_shape_selector
431 id="MultiTranslationStartPoint"
433 tooltip="Start point of translation"
434 shape_types="vertex">
435 <validator id="PartSet_DifferentObjects"/>
436 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
437 </sketch_shape_selector>
438 <sketch_shape_selector
439 id="MultiTranslationEndPoint"
441 tooltip="Final point of translation"
442 shape_types="vertex">
443 <validator id="PartSet_DifferentObjects"/>
444 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
445 </sketch_shape_selector>
449 <integervalue id="MultiTranslationObjects"
450 label="Total number of objects"
451 tooltip="Total number of objects"
452 default="2" min="2" use_reset="false">
453 <validator id="GeomValidators_Positive"/>
457 <!-- SketchMultiRotation -->
459 id="SketchMultiRotation"
460 title="Rotation" icon=":icons/rotate.png"
461 tooltip="Multiple rotation">
462 <sketch_multi_selector id="MultiRotationList"
464 tooltip="Select list of rotating objects"
468 <validator id="SketchPlugin_CopyValidator" />
469 </sketch_multi_selector>
470 <sketch_shape_selector
471 id="MultiRotationCenter"
472 label="Center of rotation"
473 tooltip="Center of rotation"
474 shape_types="vertex">
475 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
476 </sketch_shape_selector>
477 <toolbox id="AngleType">
478 <box id="SingleAngle" title="Single angle" icon=":icons/angle_up_32x32.png">
479 <doublevalue id="MultiRotationAngle"
481 icon=":icons/angle.png"
482 tooltip="Rotation angle"
483 default="90" use_reset="false"/>
485 <box id="FullAngle" title="Full angle" icon=":icons/angle_up_full_32x32.png">
486 <doublevalue id="MultiRotationAngle"
488 icon=":icons/angle.png"
489 tooltip="Rotation angle"
490 default="90" use_reset="false"/>
493 <integervalue id="MultiRotationObjects"
494 label="Total number of objects"
495 tooltip="Total number of objects"
496 default="2" min="2" use_reset="false">
497 <validator id="GeomValidators_Positive"/>