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">
121 <validator id="SketchPlugin_FilletVertexValidator"/>
122 </sketch_multi_selector>
123 <doublevalue label="Radius" tooltip="Fillet arc radius" id="ConstraintValue" accept_expressions="0" min="0" use_reset="false">
124 <validator id="GeomValidators_Positive"/>
126 <validator id="PartSet_FilletSelection"/>
130 <group id="Constraints">
131 <!-- SketchConstraintDistance -->
133 id="SketchConstraintDistance"
135 tooltip="Set fixed distance from a point to an object"
136 icon=":icons/distance.png">
137 <label title="Select objects for distance definition. Following objects can be accepted: point, line or arc end point, center of circle or arc."/>
138 <sketch_shape_selector
139 id="ConstraintEntityA"
141 tooltip="Select point, line end point, line, center of circle or arc."
142 shape_types="edge vertex">
143 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
144 <validator id="PartSet_DifferentObjects"/>
145 <validator id="GeomValidators_ShapeType" parameters="vertex,line"/>
146 </sketch_shape_selector>
147 <sketch_shape_selector
148 id="ConstraintEntityB"
149 label="Second object"
150 tooltip="Select point, line end point, line, center of circle or arc."
151 shape_types="edge vertex">
152 <validator id="PartSet_DifferentObjects"/>
153 <validator id="SketchPlugin_DistanceAttr" parameters="ConstraintEntityA"/>
154 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
155 <validator id="GeomValidators_ShapeType" parameters="vertex,line"/>
156 </sketch_shape_selector>
157 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
159 <doublevalue_editor label="Value" tooltip="Distance" id="ConstraintValue" default="computed" min="0">
160 <validator id="GeomValidators_Positive"/>
161 </doublevalue_editor>
163 <validator id="PartSet_DistanceSelection"/>
166 <!-- SketchConstraintLength -->
167 <feature id="SketchConstraintLength" title="Length" tooltip="Set fixed length of a line segment" icon=":icons/length.png">
168 <label title="Select a line on which to calculate length" tooltip="Select a line on which to calculate length"/>
169 <shape_selector id="ConstraintEntityA" label="Line" tooltip="Select an line" shape_types="edge" >
170 <validator id="GeomValidators_ShapeType" parameters="line"/>
172 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
173 <doublevalue_editor label="Value" tooltip="Length" id="ConstraintValue" default="computed">
174 <validator id="GeomValidators_Positive"/>
175 </doublevalue_editor>
176 <validator id="PartSet_LengthSelection"/>
179 <!-- SketchConstraintRadius -->
180 <feature id="SketchConstraintRadius" title="Radius" tooltip="Set fixed radius of a circle or an arc" icon=":icons/radius_constr.png">
181 <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"/>
182 <shape_selector id="ConstraintEntityA" label="Circle or Arc" tooltip="Select a circle or an arc"
184 <validator id="GeomValidators_ShapeType" parameters="circle"/>
186 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
187 <doublevalue_editor label="Value" tooltip="Radius" id="ConstraintValue" default="computed">
188 <validator id="GeomValidators_Positive"/>
189 </doublevalue_editor>
190 <validator id="PartSet_RadiusSelection"/>
193 <!-- SketchConstraintAngle -->
194 <feature id="SketchConstraintAngle" title="Angle" tooltip="Set fixed angle between two line segments" icon=":icons/angle_constr.png">
195 <sketch_shape_selector id="ConstraintEntityA" label="Line 1" tooltip="Select an line" shape_types="edge" >
196 <validator id="GeomValidators_ShapeType" parameters="line"/>
197 <validator id="PartSet_DifferentObjects"/>
198 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
199 </sketch_shape_selector>
200 <sketch_shape_selector id="ConstraintEntityB" label="Line 2" tooltip="Select an line" shape_types="edge" >
201 <validator id="GeomValidators_ShapeType" parameters="line"/>
202 <validator id="PartSet_DifferentObjects"/>
203 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
204 </sketch_shape_selector>
205 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
206 <doublevalue_editor label="Value" tooltip="Angle" id="ConstraintValue" default="computed" min="0" max="180" />
207 <validator id="PartSet_AngleSelection"/>
210 <!-- SketchConstraintParallel -->
211 <feature id="SketchConstraintParallel" title="Parallel" tooltip="Create constraint defining two parallel lines" icon=":icons/parallel.png">
212 <sketch_shape_selector id="ConstraintEntityA"
213 label="First line" tooltip="Select a line" shape_types="edge">
214 <validator id="GeomValidators_ShapeType" parameters="line"/>
215 <validator id="PartSet_DifferentObjects"/>
216 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
217 </sketch_shape_selector>
219 <sketch_shape_selector id="ConstraintEntityB" label="Second line" tooltip="Select a line"
221 <validator id="GeomValidators_ShapeType" parameters="line"/>
222 <validator id="PartSet_DifferentObjects"/>
223 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
224 </sketch_shape_selector>
225 <validator id="PartSet_ParallelSelection"/>
228 <!-- SketchConstraintPerpendicular -->
229 <feature id="SketchConstraintPerpendicular" title="Perpendicular"
230 tooltip="Create constraint defining two perpendicular lines"
231 icon=":icons/perpendicular.png">
232 <sketch_shape_selector id="ConstraintEntityA"
233 label="First line" tooltip="Select an line"
235 <validator id="PartSet_DifferentObjects"/>
236 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
237 <validator id="GeomValidators_ShapeType" parameters="line"/>
238 </sketch_shape_selector>
240 <sketch_shape_selector id="ConstraintEntityB"
241 label="Second line" tooltip="Select an line"
243 <validator id="PartSet_DifferentObjects"/>
244 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
245 <validator id="GeomValidators_ShapeType" parameters="line"/>
246 </sketch_shape_selector>
247 <validator id="PartSet_PerpendicularSelection"/>
250 <!-- SketchConstraintCoincidence -->
251 <feature id="SketchConstraintCoincidence" title="Coincident" tooltip="Create constraint for the coincidence of two points or point on line or circle" icon=":icons/coincedence.png">
252 <sketch_shape_selector id="ConstraintEntityA" label="First object" tooltip="Select a first object" shape_types="vertex edge">
253 <validator id="PartSet_DifferentObjects"/>
254 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
255 </sketch_shape_selector>
256 <sketch_shape_selector id="ConstraintEntityB" label="Second object" tooltip="Select a second object" shape_types="vertex edge">
257 <validator id="PartSet_DifferentObjects"/>
258 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
259 <validator id="SketchPlugin_CoincidenceAttr" parameters="ConstraintEntityA"/>
260 </sketch_shape_selector>
261 <validator id="PartSet_CoincidentSelection"/>
264 <!-- SketchConstraintRigid -->
265 <feature id="SketchConstraintRigid" title="Fixed" tooltip="Fix an object" icon=":icons/fixed.png">
266 <sketch_shape_selector id="ConstraintEntityA" label="Object"
267 tooltip="Select point, line end point, line, center of circle or arc."
268 shape_types="edge vertex">
269 <validator id="GeomValidators_ShapeType" parameters="vertex,line,circle"/>
270 <validator id="SketchPlugin_NotFixed"/>
271 </sketch_shape_selector>
272 <validator id="PartSet_RigidSelection"/>
275 <!-- SketchConstraintHorizontal -->
276 <feature id="SketchConstraintHorizontal" title="Horizontal" tooltip="Create constraint defining horizontal line" icon=":icons/horisontal.png">
277 <sketch_shape_selector id="ConstraintEntityA"
278 label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
279 <validator id="GeomValidators_ShapeType" parameters="line"/>
280 </sketch_shape_selector>
281 <validator id="PartSet_HVDirSelection"/>
284 <!-- SketchConstraintVertical -->
285 <feature id="SketchConstraintVertical" title="Vertical" tooltip="Create constraint defining vertical line" icon=":icons/vertical.png">
286 <sketch_shape_selector id="ConstraintEntityA"
287 label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
288 <validator id="GeomValidators_ShapeType" parameters="line"/>
289 </sketch_shape_selector>
290 <validator id="PartSet_HVDirSelection"/>
293 <!-- SketchConstraintEqual -->
294 <feature id="SketchConstraintEqual" title="Equal"
295 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"
296 icon=":icons/equal.png">
297 <sketch_shape_selector id="ConstraintEntityA"
298 label="First object" tooltip="Select line, circle or arc" shape_types="edge">
299 <validator id="PartSet_DifferentObjects"/>
300 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
301 </sketch_shape_selector>
303 <sketch_shape_selector id="ConstraintEntityB"
304 label="Second object" tooltip="Select line, circle or arc" shape_types="edge">
305 <validator id="SketchPlugin_EqualAttr" parameters="ConstraintEntityA"/>
306 <validator id="PartSet_DifferentObjects"/>
307 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
308 </sketch_shape_selector>
309 <validator id="PartSet_EqualSelection"/>
312 <!-- SketchConstraintTangent -->
313 <feature id="SketchConstraintTangent" title="Tangent" tooltip="Create constraint defining tangency of two objects with common coincident point" icon=":icons/tangent.png">
314 <sketch_shape_selector id="ConstraintEntityA"
315 label="First object" tooltip="Select line or arc" shape_types="edge">
316 <validator id="SketchPlugin_TangentAttr" parameters="ConstraintEntityB"/>
317 <validator id="PartSet_DifferentObjects"/>
318 </sketch_shape_selector>
320 <sketch_shape_selector id="ConstraintEntityB"
321 label="Second object" tooltip="Select line or arc" shape_types="edge">
322 <validator id="SketchPlugin_TangentAttr" parameters="ConstraintEntityA"/>
323 <validator id="PartSet_DifferentObjects"/>
324 </sketch_shape_selector>
325 <validator id="PartSet_TangentSelection"/>
328 <!-- SketchConstraintCollinear -->
329 <feature id="SketchConstraintCollinear" title="Collinear" tooltip="Create constraint defining collinearity of two lines" icon=":icons/collinear.png">
330 <sketch_shape_selector id="ConstraintEntityA"
331 label="First line" tooltip="Select a line" shape_types="edge">
332 <validator id="GeomValidators_ShapeType" parameters="line"/>
333 <validator id="PartSet_DifferentObjects"/>
334 </sketch_shape_selector>
336 <sketch_shape_selector id="ConstraintEntityB"
337 label="Second line" tooltip="Select a line" shape_types="edge">
338 <validator id="GeomValidators_ShapeType" parameters="line"/>
339 <validator id="PartSet_DifferentObjects"/>
340 </sketch_shape_selector>
341 <validator id="PartSet_CollinearSelection"/>
344 <!-- SketchConstraintMiddle -->
345 <feature id="SketchConstraintMiddle" title="Middle point" tooltip="Create constraint for setting middle point on a line" icon=":icons/middlepoint.png">
346 <sketch_shape_selector id="ConstraintEntityA" label="First object" tooltip="Select a first object" shape_types="vertex edge">
347 <validator id="PartSet_DifferentObjects"/>
348 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
349 <validator id="SketchPlugin_MiddlePointAttr" parameters="ConstraintEntityB"/>
350 </sketch_shape_selector>
351 <sketch_shape_selector id="ConstraintEntityB" label="Second object" tooltip="Select a second object" shape_types="vertex edge">
352 <validator id="PartSet_DifferentObjects"/>
353 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
354 <validator id="SketchPlugin_MiddlePointAttr" parameters="ConstraintEntityA"/>
355 </sketch_shape_selector>
356 <validator id="PartSet_MiddlePointSelection"/>
362 <!-- SketchConstraintMirror -->
364 id="SketchConstraintMirror"
365 title="Mirror" icon=":icons/mirror.png"
366 tooltip="Create constraint, mirroring group of objects">
367 <sketch_shape_selector id="ConstraintEntityA"
368 label="Mirror line" tooltip="Select mirror line" shape_types="edge">
369 <validator id="GeomValidators_ShapeType" parameters="line"/>
370 </sketch_shape_selector>
371 <sketch_multi_selector id="ConstraintMirrorList"
373 tooltip="Select list of mirroring objects"
376 <validator id="SketchPlugin_MirrorAttr" />
377 </sketch_multi_selector>
380 <!-- SketchMultiTranslation -->
382 id="SketchMultiTranslation"
383 title="Translation" icon=":icons/translate.png"
384 tooltip="Multiple translation">
385 <sketch_multi_selector id="MultiTranslationList"
387 tooltip="Select list of translating objects"
390 <validator id="SketchPlugin_CopyValidator" />
391 </sketch_multi_selector>
392 <toolbox id="ValueType">
393 <box id="SingleValue" title="Single value" icon=":icons/translate_32x32.png">
394 <groupbox title="Direction">
395 <sketch_shape_selector
396 id="MultiTranslationStartPoint"
398 tooltip="Start point of translation"
399 shape_types="vertex">
400 <validator id="PartSet_DifferentObjects"/>
401 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
402 </sketch_shape_selector>
403 <sketch_shape_selector
404 id="MultiTranslationEndPoint"
406 tooltip="Final point of translation"
407 shape_types="vertex">
408 <validator id="PartSet_DifferentObjects"/>
409 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
410 </sketch_shape_selector>
413 <box id="FullValue" title="Full value" icon=":icons/translate_full_32x32.png">
414 <groupbox title="Direction">
415 <sketch_shape_selector
416 id="MultiTranslationStartPoint"
418 tooltip="Start point of translation"
419 shape_types="vertex">
420 <validator id="PartSet_DifferentObjects"/>
421 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
422 </sketch_shape_selector>
423 <sketch_shape_selector
424 id="MultiTranslationEndPoint"
426 tooltip="Final point of translation"
427 shape_types="vertex">
428 <validator id="PartSet_DifferentObjects"/>
429 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
430 </sketch_shape_selector>
434 <integervalue id="MultiTranslationObjects"
435 label="Total number of objects"
436 tooltip="Total number of objects"
437 default="2" min="2" use_reset="false">
438 <validator id="GeomValidators_Positive"/>
442 <!-- SketchMultiRotation -->
444 id="SketchMultiRotation"
445 title="Rotation" icon=":icons/rotate.png"
446 tooltip="Multiple rotation">
447 <sketch_multi_selector id="MultiRotationList"
449 tooltip="Select list of rotating objects"
452 <validator id="SketchPlugin_CopyValidator" />
453 </sketch_multi_selector>
454 <sketch_shape_selector
455 id="MultiRotationCenter"
456 label="Center of rotation"
457 tooltip="Center of rotation"
458 shape_types="vertex">
459 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
460 </sketch_shape_selector>
461 <toolbox id="AngleType">
462 <box id="SingleAngle" title="Single angle" icon=":icons/angle_up_32x32.png">
463 <doublevalue id="MultiRotationAngle"
465 icon=":icons/angle.png"
466 tooltip="Rotation angle"
467 default="90" use_reset="false"/>
469 <box id="FullAngle" title="Full angle" icon=":icons/angle_up_full_32x32.png">
470 <doublevalue id="MultiRotationAngle"
472 icon=":icons/angle.png"
473 tooltip="Rotation angle"
474 default="90" use_reset="false"/>
477 <integervalue id="MultiRotationObjects"
478 label="Total number of objects"
479 tooltip="Total number of objects"
480 default="2" min="2" use_reset="false">
481 <validator id="GeomValidators_Positive"/>