1 <!-- Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
4 <workbench id="Sketch">
8 nested="SketchPoint SketchLine SketchCircle SketchArc 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"-->
20 <feature id="SketchPoint" title="Point" tooltip="Create point" icon=":icons/point.png">
21 <sketch-2dpoint_selector id="PointCoordindates" accept_expressions="0" title="Point" tooltip="Point coordinates"/>
22 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
24 <feature id="SketchLine" title="Line" tooltip="Create line" icon=":icons/line.png">
25 <sketch-2dpoint_selector id="StartPoint" accept_expressions="0" title="Start point" tooltip="Start point coordinates" previous_feature_param="EndPoint"/>
26 <sketch-2dpoint_selector id="EndPoint" accept_expressions="0" title="End point" tooltip="End point coordinates"/>
27 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
28 <validator id="GeomValidators_Different" parameters="StartPoint,EndPoint"/>
35 tooltip="Create circle"
36 icon=":icons/circle.png">
37 <toolbox id="CircleType">
38 <box id="CenterRadius" title="Center and radius" icon=":icons/circle_pt_rad_32x32.png">
39 <sketch-2dpoint_selector id="CircleCenter" accept_expressions="0" title="Center" tooltip="Center coordinates"/>
40 <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">
41 <validator id="GeomValidators_Positive"/>
43 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
45 <box id="ThreePoints" title="Three points" icon=":icons/circle_3pt_32x32.png">
46 <sketch-2dpoint_selector id="FirstPoint" accept_expressions="0" title="First point" tooltip="First point"/>
47 <sketch-2dpoint_selector id="SecondPoint" accept_expressions="0" title="Second point" tooltip="Second point"/>
48 <sketch-2dpoint_selector id="ThirdPoint" accept_expressions="0" title="Third point" tooltip="Third point"/>
49 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
59 icon=":icons/arc.png">
60 <toolbox id="ArcType">
61 <box id="CenterStartEnd" title="Center and two points" icon=":icons/arc_base_32x32.png">
62 <sketch-2dpoint_selector id="ArcCenter" accept_expressions="0" title="Center" tooltip="Center of a circle"/>
63 <sketch-2dpoint_selector id="ArcStartPoint" accept_expressions="0" title="Start point" tooltip="Start point"/>
64 <sketch-2dpoint_selector id="ArcEndPoint" accept_expressions="0" title="End point" tooltip="End point"/>
65 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
66 <validator id="GeomValidators_Different" parameters="ArcCenter,ArcStartPoint,ArcEndPoint"/>
68 <box id="ThreePoints" title="Three points on arc" icon=":icons/arc_3pt_32x32.png">
69 <sketch-2dpoint_selector id="ArcStartPoint" accept_expressions="0" title="Start point" tooltip="Start point"/>
70 <sketch-2dpoint_selector id="ArcEndPoint" accept_expressions="0" title="End point" tooltip="End point"/>
71 <sketch-2dpoint_selector id="ArcPassedPoint" accept_expressions="0" title="Passed point" tooltip="Passed point"/>
72 <doublevalue id="ArcRadius" accept_expressions="0" label="Radius:" default="computed" icon=":icons/radius.png" tooltip="Set radius" obligatory="1">
73 <validator id="GeomValidators_Positive"/>
75 <doublevalue id="ArcAngle" label="Angle:" icon=":icons/angle.png" tooltip="Set angle" default="90" use_reset="false" obligatory="1"/>
76 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
77 <validator id="GeomValidators_Different" parameters="ArcStartPoint,ArcEndPoint,ArcPassedPoint"/>
79 <box id="Tangent" title="Tangent with edge" icon=":icons/arc_tang_32x32.png">
80 <sketch_shape_selector id="ArcTangentPoint" label="Start point" tooltip="Select point on line" shape_types="vertex">
81 <validator id="SketchPlugin_ArcTangentPoint" parameters="" />
82 </sketch_shape_selector>
83 <sketch-2dpoint_selector id="ArcEndPoint" accept_expressions="0" title="End point" tooltip="End point"/>
84 <doublevalue id="ArcRadius" accept_expressions="0" label="Radius:" default="computed" icon=":icons/radius.png" tooltip="Set radius" obligatory="1">
85 <validator id="GeomValidators_Positive"/>
87 <doublevalue id="ArcAngle" label="Angle:" icon=":icons/angle.png" tooltip="Set angle" default="90" use_reset="false" obligatory="1"/>
88 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
93 <!-- SketchConstraintFillet -->
94 <feature id="SketchConstraintFillet" title="Fillet" tooltip="Create constraint defining fillet between two objects" icon=":icons/fillet.png">
95 <!--<sketch_shape_selector id="ConstraintEntityA"
96 label="Point" tooltip="Select point for fillet (should be shared by two entities only)" shape_types="vertex">
97 <validator id="SketchPlugin_FilletVertexValidator"/>
98 </sketch_shape_selector>-->
99 <sketch_multi_selector id="ConstraintEntityA"
101 tooltip="Select points for fillets"
102 type_choice="Vertices">
103 <validator id="SketchPlugin_FilletVertexValidator"/>
104 </sketch_multi_selector>
105 <doublevalue label="Radius" tooltip="Fillet arc radius" id="ConstraintValue" accept_expressions="0" min="0" use_reset="false">
106 <validator id="GeomValidators_Positive"/>
108 <validator id="PartSet_FilletSelection"/>
112 <group id="Constraints">
113 <!-- SketchConstraintDistance -->
115 id="SketchConstraintDistance"
117 tooltip="Set fixed distance from a point to an object"
118 icon=":icons/distance.png">
119 <label title="Select objects for distance definition. Following objects can be accepted: point, line or arc end point, center of circle or arc."/>
120 <sketch_shape_selector
121 id="ConstraintEntityA"
123 tooltip="Select point, line end point, line, center of circle or arc."
124 shape_types="edge vertex">
125 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
126 <validator id="PartSet_DifferentObjects"/>
127 <validator id="GeomValidators_ShapeType" parameters="vertex,line"/>
128 </sketch_shape_selector>
129 <sketch_shape_selector
130 id="ConstraintEntityB"
131 label="Second object"
132 tooltip="Select point, line end point, line, center of circle or arc."
133 shape_types="edge vertex">
134 <validator id="PartSet_DifferentObjects"/>
135 <validator id="SketchPlugin_DistanceAttr" parameters="ConstraintEntityA"/>
136 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
137 <validator id="GeomValidators_ShapeType" parameters="vertex,line"/>
138 </sketch_shape_selector>
139 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
141 <doublevalue_editor label="Value" tooltip="Distance" id="ConstraintValue" default="computed" min="0">
142 <validator id="GeomValidators_Positive"/>
143 </doublevalue_editor>
145 <validator id="PartSet_DistanceSelection"/>
148 <!-- SketchConstraintLength -->
149 <feature id="SketchConstraintLength" title="Length" tooltip="Set fixed length of a line segment" icon=":icons/length.png">
150 <label title="Select a line on which to calculate length" tooltip="Select a line on which to calculate length"/>
151 <shape_selector id="ConstraintEntityA" label="Line" tooltip="Select an line" shape_types="edge" >
152 <validator id="GeomValidators_ShapeType" parameters="line"/>
154 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
155 <doublevalue_editor label="Value" tooltip="Length" id="ConstraintValue" default="computed">
156 <validator id="GeomValidators_Positive"/>
157 </doublevalue_editor>
158 <validator id="PartSet_LengthSelection"/>
161 <!-- SketchConstraintRadius -->
162 <feature id="SketchConstraintRadius" title="Radius" tooltip="Set fixed radius of a circle or an arc" icon=":icons/radius_constr.png">
163 <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"/>
164 <shape_selector id="ConstraintEntityA" label="Circle or Arc" tooltip="Select a circle or an arc"
166 <validator id="GeomValidators_ShapeType" parameters="circle"/>
168 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
169 <doublevalue_editor label="Value" tooltip="Radius" id="ConstraintValue" default="computed">
170 <validator id="GeomValidators_Positive"/>
171 </doublevalue_editor>
172 <validator id="PartSet_RadiusSelection"/>
175 <!-- SketchConstraintAngle -->
176 <feature id="SketchConstraintAngle" title="Angle" tooltip="Set fixed angle between two line segments" icon=":icons/angle_constr.png">
177 <sketch_shape_selector id="ConstraintEntityA" label="Line 1" tooltip="Select an line" shape_types="edge" >
178 <validator id="GeomValidators_ShapeType" parameters="line"/>
179 <validator id="PartSet_DifferentObjects"/>
180 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
181 </sketch_shape_selector>
182 <sketch_shape_selector id="ConstraintEntityB" label="Line 2" tooltip="Select an line" shape_types="edge" >
183 <validator id="GeomValidators_ShapeType" parameters="line"/>
184 <validator id="PartSet_DifferentObjects"/>
185 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
186 </sketch_shape_selector>
187 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
188 <doublevalue_editor label="Value" tooltip="Angle" id="ConstraintValue" default="computed" min="0" max="180" />
189 <validator id="PartSet_AngleSelection"/>
192 <!-- SketchConstraintParallel -->
193 <feature id="SketchConstraintParallel" title="Parallel" tooltip="Create constraint defining two parallel lines" icon=":icons/parallel.png">
194 <sketch_shape_selector id="ConstraintEntityA"
195 label="First line" tooltip="Select a 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>
201 <sketch_shape_selector id="ConstraintEntityB" label="Second line" tooltip="Select a line"
203 <validator id="GeomValidators_ShapeType" parameters="line"/>
204 <validator id="PartSet_DifferentObjects"/>
205 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
206 </sketch_shape_selector>
207 <validator id="PartSet_ParallelSelection"/>
210 <!-- SketchConstraintPerpendicular -->
211 <feature id="SketchConstraintPerpendicular" title="Perpendicular"
212 tooltip="Create constraint defining two perpendicular lines"
213 icon=":icons/perpendicular.png">
214 <sketch_shape_selector id="ConstraintEntityA"
215 label="First line" tooltip="Select an line"
217 <validator id="PartSet_DifferentObjects"/>
218 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
219 <validator id="GeomValidators_ShapeType" parameters="line"/>
220 </sketch_shape_selector>
222 <sketch_shape_selector id="ConstraintEntityB"
223 label="Second line" tooltip="Select an line"
225 <validator id="PartSet_DifferentObjects"/>
226 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
227 <validator id="GeomValidators_ShapeType" parameters="line"/>
228 </sketch_shape_selector>
229 <validator id="PartSet_PerpendicularSelection"/>
232 <!-- SketchConstraintCoincidence -->
233 <feature id="SketchConstraintCoincidence" title="Coincident" tooltip="Create constraint for the coincidence of two points or point on line or circle" icon=":icons/coincedence.png">
234 <sketch_shape_selector id="ConstraintEntityA" label="First object" tooltip="Select a first object" shape_types="vertex edge">
235 <validator id="PartSet_DifferentObjects"/>
236 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
237 </sketch_shape_selector>
238 <sketch_shape_selector id="ConstraintEntityB" label="Second object" tooltip="Select a second object" shape_types="vertex edge">
239 <validator id="PartSet_DifferentObjects"/>
240 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
241 <validator id="SketchPlugin_CoincidenceAttr" parameters="ConstraintEntityA"/>
242 </sketch_shape_selector>
243 <validator id="PartSet_CoincidentSelection"/>
246 <!-- SketchConstraintRigid -->
247 <feature id="SketchConstraintRigid" title="Fixed" tooltip="Fix an object" icon=":icons/fixed.png">
248 <sketch_shape_selector id="ConstraintEntityA" label="Object"
249 tooltip="Select point, line end point, line, center of circle or arc."
250 shape_types="edge vertex">
251 <validator id="GeomValidators_ShapeType" parameters="vertex,line,circle"/>
252 <validator id="SketchPlugin_NotFixed"/>
253 </sketch_shape_selector>
254 <validator id="PartSet_RigidSelection"/>
257 <!-- SketchConstraintHorizontal -->
258 <feature id="SketchConstraintHorizontal" title="Horizontal" tooltip="Create constraint defining horizontal line" icon=":icons/horisontal.png">
259 <sketch_shape_selector id="ConstraintEntityA"
260 label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
261 <validator id="GeomValidators_ShapeType" parameters="line"/>
262 </sketch_shape_selector>
263 <validator id="PartSet_HVDirSelection"/>
266 <!-- SketchConstraintVertical -->
267 <feature id="SketchConstraintVertical" title="Vertical" tooltip="Create constraint defining vertical line" icon=":icons/vertical.png">
268 <sketch_shape_selector id="ConstraintEntityA"
269 label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
270 <validator id="GeomValidators_ShapeType" parameters="line"/>
271 </sketch_shape_selector>
272 <validator id="PartSet_HVDirSelection"/>
275 <!-- SketchConstraintEqual -->
276 <feature id="SketchConstraintEqual" title="Equal"
277 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"
278 icon=":icons/equal.png">
279 <sketch_shape_selector id="ConstraintEntityA"
280 label="First object" tooltip="Select line, circle or arc" shape_types="edge">
281 <validator id="PartSet_DifferentObjects"/>
282 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
283 </sketch_shape_selector>
285 <sketch_shape_selector id="ConstraintEntityB"
286 label="Second object" tooltip="Select line, circle or arc" shape_types="edge">
287 <validator id="SketchPlugin_EqualAttr" parameters="ConstraintEntityA"/>
288 <validator id="PartSet_DifferentObjects"/>
289 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
290 </sketch_shape_selector>
291 <validator id="PartSet_EqualSelection"/>
294 <!-- SketchConstraintTangent -->
295 <feature id="SketchConstraintTangent" title="Tangent" tooltip="Create constraint defining tangency of two objects with common coincident point" icon=":icons/tangent.png">
296 <sketch_shape_selector id="ConstraintEntityA"
297 label="First object" tooltip="Select line or arc" shape_types="edge">
298 <validator id="SketchPlugin_TangentAttr" parameters="ConstraintEntityB"/>
299 <validator id="PartSet_DifferentObjects"/>
300 </sketch_shape_selector>
302 <sketch_shape_selector id="ConstraintEntityB"
303 label="Second object" tooltip="Select line or arc" shape_types="edge">
304 <validator id="SketchPlugin_TangentAttr" parameters="ConstraintEntityA"/>
305 <validator id="PartSet_DifferentObjects"/>
306 </sketch_shape_selector>
307 <validator id="PartSet_TangentSelection"/>
310 <!-- SketchConstraintCollinear -->
311 <feature id="SketchConstraintCollinear" title="Collinear" tooltip="Create constraint defining collinearity of two lines" icon=":icons/collinear.png">
312 <sketch_shape_selector id="ConstraintEntityA"
313 label="First line" tooltip="Select a line" shape_types="edge">
314 <validator id="GeomValidators_ShapeType" parameters="line"/>
315 <validator id="PartSet_DifferentObjects"/>
316 </sketch_shape_selector>
318 <sketch_shape_selector id="ConstraintEntityB"
319 label="Second line" tooltip="Select a line" shape_types="edge">
320 <validator id="GeomValidators_ShapeType" parameters="line"/>
321 <validator id="PartSet_DifferentObjects"/>
322 </sketch_shape_selector>
323 <validator id="PartSet_CollinearSelection"/>
326 <!-- SketchConstraintMiddle -->
327 <feature id="SketchConstraintMiddle" title="Middle point" tooltip="Create constraint for setting middle point on a line" icon=":icons/middlepoint.png">
328 <sketch_shape_selector id="ConstraintEntityA" label="First object" tooltip="Select a first object" shape_types="vertex edge">
329 <validator id="PartSet_DifferentObjects"/>
330 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
331 <validator id="SketchPlugin_MiddlePointAttr" parameters="ConstraintEntityB"/>
332 </sketch_shape_selector>
333 <sketch_shape_selector id="ConstraintEntityB" label="Second object" tooltip="Select a second object" shape_types="vertex edge">
334 <validator id="PartSet_DifferentObjects"/>
335 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
336 <validator id="SketchPlugin_MiddlePointAttr" parameters="ConstraintEntityA"/>
337 </sketch_shape_selector>
338 <validator id="PartSet_MiddlePointSelection"/>
344 <!-- SketchConstraintMirror -->
346 id="SketchConstraintMirror"
347 title="Mirror" icon=":icons/mirror.png"
348 tooltip="Create constraint, mirroring group of objects">
349 <sketch_shape_selector id="ConstraintEntityA"
350 label="Mirror line" tooltip="Select mirror line" shape_types="edge">
351 <validator id="GeomValidators_ShapeType" parameters="line"/>
352 </sketch_shape_selector>
353 <sketch_multi_selector id="ConstraintMirrorList"
355 tooltip="Select list of mirroring objects"
358 <validator id="SketchPlugin_MirrorAttr" />
359 </sketch_multi_selector>
362 <!-- SketchMultiTranslation -->
364 id="SketchMultiTranslation"
365 title="Translation" icon=":icons/translate.png"
366 tooltip="Multiple translation">
367 <sketch_multi_selector id="MultiTranslationList"
369 tooltip="Select list of translating objects"
372 <validator id="SketchPlugin_CopyValidator" />
373 </sketch_multi_selector>
374 <toolbox id="ValueType">
375 <box id="SingleValue" title="Single value" icon=":icons/translate_32x32.png">
376 <groupbox title="Direction">
377 <sketch_shape_selector
378 id="MultiTranslationStartPoint"
380 tooltip="Start point of translation"
381 shape_types="vertex">
382 <validator id="PartSet_DifferentObjects"/>
383 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
384 </sketch_shape_selector>
385 <sketch_shape_selector
386 id="MultiTranslationEndPoint"
388 tooltip="Final point of translation"
389 shape_types="vertex">
390 <validator id="PartSet_DifferentObjects"/>
391 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
392 </sketch_shape_selector>
395 <box id="FullValue" title="Full value" icon=":icons/translate_full_32x32.png">
396 <groupbox title="Direction">
397 <sketch_shape_selector
398 id="MultiTranslationStartPoint"
400 tooltip="Start point of translation"
401 shape_types="vertex">
402 <validator id="PartSet_DifferentObjects"/>
403 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
404 </sketch_shape_selector>
405 <sketch_shape_selector
406 id="MultiTranslationEndPoint"
408 tooltip="Final point of translation"
409 shape_types="vertex">
410 <validator id="PartSet_DifferentObjects"/>
411 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
412 </sketch_shape_selector>
416 <integervalue id="MultiTranslationObjects"
417 label="Total number of objects"
418 tooltip="Total number of objects"
419 default="2" min="2" use_reset="false">
420 <validator id="GeomValidators_Positive"/>
424 <!-- SketchMultiRotation -->
426 id="SketchMultiRotation"
427 title="Rotation" icon=":icons/rotate.png"
428 tooltip="Multiple rotation">
429 <sketch_multi_selector id="MultiRotationList"
431 tooltip="Select list of rotating objects"
434 <validator id="SketchPlugin_CopyValidator" />
435 </sketch_multi_selector>
436 <sketch_shape_selector
437 id="MultiRotationCenter"
438 label="Center of rotation"
439 tooltip="Center of rotation"
440 shape_types="vertex">
441 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
442 </sketch_shape_selector>
443 <toolbox id="AngleType">
444 <box id="SingleAngle" title="Single angle" icon=":icons/angle_up_32x32.png">
445 <doublevalue id="MultiRotationAngle"
447 icon=":icons/angle.png"
448 tooltip="Rotation angle"
449 default="90" use_reset="false"/>
451 <box id="FullAngle" title="Full angle" icon=":icons/angle_up_full_32x32.png">
452 <doublevalue id="MultiRotationAngle"
454 icon=":icons/angle.png"
455 tooltip="Rotation angle"
456 default="90" use_reset="false"/>
459 <integervalue id="MultiRotationObjects"
460 label="Total number of objects"
461 tooltip="Total number of objects"
462 default="2" min="2" use_reset="false">
463 <validator id="GeomValidators_Positive"/>