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"/>
44 <box id="ThreePoints" title="Tree points" icon=":icons/circle_3pt_32x32.png">
45 <sketch-2dpoint_selector id="FirstPoint" accept_expressions="0" title="First point" tooltip="First point"/>
46 <sketch-2dpoint_selector id="SecondPoint" accept_expressions="0" title="Second point" tooltip="Second point"/>
47 <sketch-2dpoint_selector id="ThirdPoint" accept_expressions="0" title="Third point" tooltip="Third point"/>
50 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
53 <feature id="SketchArc" title="Arc" tooltip="Create arc" icon=":icons/arc.png">
54 <sketch-2dpoint_selector id="ArcCenter" accept_expressions="0" title="Center" tooltip="Center of a circle"/>
55 <sketch-2dpoint_selector id="ArcStartPoint" accept_expressions="0" title="Start point" tooltip="Start point"/>
56 <sketch-2dpoint_selector id="ArcEndPoint" accept_expressions="0" title="End point" tooltip="End point"/>
57 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
58 <validator id="GeomValidators_Different" parameters="ArcCenter,ArcStartPoint,ArcEndPoint"/>
60 <!-- SketchConstraintFillet -->
61 <feature id="SketchConstraintFillet" title="Fillet" tooltip="Create constraint defining fillet between two objects" icon=":icons/fillet.png">
62 <sketch_shape_selector id="ConstraintEntityA"
63 label="Point" tooltip="Select point for fillet (should be shared by two entities only)" shape_types="vertex">
64 <validator id="SketchPlugin_FilletVertexValidator"/>
65 </sketch_shape_selector>
66 <doublevalue label="Radius" tooltip="Fillet arc radius" id="ConstraintValue" accept_expressions="0" min="0" default="1" use_reset="false">
67 <validator id="GeomValidators_Positive"/>
69 <validator id="PartSet_FilletSelection"/>
73 <group id="Constraints">
74 <!-- SketchConstraintDistance -->
76 id="SketchConstraintDistance"
78 tooltip="Set fixed distance from a point to an object"
79 icon=":icons/distance.png">
80 <label title="Select objects for distance definition. Following objects can be accepted: point, line or arc end point, center of circle or arc."/>
81 <sketch_shape_selector
82 id="ConstraintEntityA"
84 tooltip="Select point, line end point, line, center of circle or arc."
85 shape_types="edge vertex">
86 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
87 <validator id="PartSet_DifferentObjects"/>
88 <validator id="GeomValidators_ShapeType" parameters="vertex,line"/>
89 </sketch_shape_selector>
90 <sketch_shape_selector
91 id="ConstraintEntityB"
93 tooltip="Select point, line end point, line, center of circle or arc."
94 shape_types="edge vertex">
95 <validator id="PartSet_DifferentObjects"/>
96 <validator id="SketchPlugin_DistanceAttr" parameters="ConstraintEntityA"/>
97 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
98 <validator id="GeomValidators_ShapeType" parameters="vertex,line"/>
99 </sketch_shape_selector>
100 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
102 <doublevalue_editor label="Value" tooltip="Distance" id="ConstraintValue" default="computed" min="0">
103 <validator id="GeomValidators_Positive"/>
104 </doublevalue_editor>
106 <validator id="PartSet_DistanceSelection"/>
109 <!-- SketchConstraintLength -->
110 <feature id="SketchConstraintLength" title="Length" tooltip="Set fixed length of a line segment" icon=":icons/length.png">
111 <label title="Select a line on which to calculate length" tooltip="Select a line on which to calculate length"/>
112 <shape_selector id="ConstraintEntityA" label="Line" tooltip="Select an line" shape_types="edge" >
113 <validator id="GeomValidators_ShapeType" parameters="line"/>
115 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
116 <doublevalue_editor label="Value" tooltip="Length" id="ConstraintValue" default="computed">
117 <validator id="GeomValidators_Positive"/>
118 </doublevalue_editor>
119 <validator id="PartSet_LengthSelection"/>
122 <!-- SketchConstraintRadius -->
123 <feature id="SketchConstraintRadius" title="Radius" tooltip="Set fixed radius of a circle or an arc" icon=":icons/radius_constr.png">
124 <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"/>
125 <shape_selector id="ConstraintEntityA" label="Circle or Arc" tooltip="Select a circle or an arc"
127 <validator id="GeomValidators_ShapeType" parameters="circle"/>
129 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
130 <doublevalue_editor label="Value" tooltip="Radius" id="ConstraintValue" default="computed">
131 <validator id="GeomValidators_Positive"/>
132 </doublevalue_editor>
133 <validator id="PartSet_RadiusSelection"/>
136 <!-- SketchConstraintAngle -->
137 <feature id="SketchConstraintAngle" title="Angle" tooltip="Set fixed angle between two line segments" icon=":icons/angle_constr.png">
138 <sketch_shape_selector id="ConstraintEntityA" label="Line 1" tooltip="Select an line" shape_types="edge" >
139 <validator id="GeomValidators_ShapeType" parameters="line"/>
140 <validator id="PartSet_DifferentObjects"/>
141 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
142 </sketch_shape_selector>
143 <sketch_shape_selector id="ConstraintEntityB" label="Line 2" tooltip="Select an line" shape_types="edge" >
144 <validator id="GeomValidators_ShapeType" parameters="line"/>
145 <validator id="PartSet_DifferentObjects"/>
146 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
147 </sketch_shape_selector>
148 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
149 <doublevalue_editor label="Value" tooltip="Angle" id="ConstraintValue" default="computed" min="0" max="180" />
150 <validator id="PartSet_AngleSelection"/>
153 <!-- SketchConstraintParallel -->
154 <feature id="SketchConstraintParallel" title="Parallel" tooltip="Create constraint defining two parallel lines" icon=":icons/parallel.png">
155 <sketch_shape_selector id="ConstraintEntityA"
156 label="First line" tooltip="Select a line" shape_types="edge">
157 <validator id="GeomValidators_ShapeType" parameters="line"/>
158 <validator id="PartSet_DifferentObjects"/>
159 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
160 </sketch_shape_selector>
162 <sketch_shape_selector id="ConstraintEntityB" label="Second line" tooltip="Select a line"
164 <validator id="GeomValidators_ShapeType" parameters="line"/>
165 <validator id="PartSet_DifferentObjects"/>
166 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
167 </sketch_shape_selector>
168 <validator id="PartSet_ParallelSelection"/>
171 <!-- SketchConstraintPerpendicular -->
172 <feature id="SketchConstraintPerpendicular" title="Perpendicular"
173 tooltip="Create constraint defining two perpendicular lines"
174 icon=":icons/perpendicular.png">
175 <sketch_shape_selector id="ConstraintEntityA"
176 label="First line" tooltip="Select an line"
178 <validator id="PartSet_DifferentObjects"/>
179 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
180 <validator id="GeomValidators_ShapeType" parameters="line"/>
181 </sketch_shape_selector>
183 <sketch_shape_selector id="ConstraintEntityB"
184 label="Second line" tooltip="Select an line"
186 <validator id="PartSet_DifferentObjects"/>
187 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
188 <validator id="GeomValidators_ShapeType" parameters="line"/>
189 </sketch_shape_selector>
190 <validator id="PartSet_PerpendicularSelection"/>
193 <!-- SketchConstraintCoincedence -->
194 <feature id="SketchConstraintCoincidence" title="Coincident" tooltip="Create constraint for the coincidence of two points or point on line or circle" icon=":icons/coincedence.png">
195 <sketch_shape_selector id="ConstraintEntityA" label="First object" tooltip="Select a first object" shape_types="vertex edge">
196 <validator id="PartSet_DifferentObjects"/>
197 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
198 </sketch_shape_selector>
199 <sketch_shape_selector id="ConstraintEntityB" label="Second object" tooltip="Select a second object" shape_types="vertex edge">
200 <validator id="PartSet_DifferentObjects"/>
201 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
202 <validator id="SketchPlugin_CoincidenceAttr" parameters="ConstraintEntityA"/>
203 </sketch_shape_selector>
204 <validator id="PartSet_CoincidentSelection"/>
207 <!-- SketchConstraintRigid -->
208 <feature id="SketchConstraintRigid" title="Fixed" tooltip="Fix an object" icon=":icons/fixed.png">
209 <sketch_shape_selector id="ConstraintEntityA" label="Object"
210 tooltip="Select point, line end point, line, center of circle or arc."
211 shape_types="edge vertex">
212 <validator id="GeomValidators_ShapeType" parameters="vertex,line,circle"/>
213 <validator id="SketchPlugin_NotFixed"/>
214 </sketch_shape_selector>
215 <validator id="PartSet_RigidSelection"/>
218 <!-- SketchConstraintHorizontal -->
219 <feature id="SketchConstraintHorizontal" title="Horizontal" tooltip="Create constraint defining horizontal line" icon=":icons/horisontal.png">
220 <sketch_shape_selector id="ConstraintEntityA"
221 label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
222 <validator id="GeomValidators_ShapeType" parameters="line"/>
223 </sketch_shape_selector>
224 <validator id="PartSet_HVDirSelection"/>
227 <!-- SketchConstraintVertical -->
228 <feature id="SketchConstraintVertical" title="Vertical" tooltip="Create constraint defining vertical line" icon=":icons/vertical.png">
229 <sketch_shape_selector id="ConstraintEntityA"
230 label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
231 <validator id="GeomValidators_ShapeType" parameters="line"/>
232 </sketch_shape_selector>
233 <validator id="PartSet_HVDirSelection"/>
236 <!-- SketchConstraintEqual -->
237 <feature id="SketchConstraintEqual" title="Equal"
238 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"
239 icon=":icons/equal.png">
240 <sketch_shape_selector id="ConstraintEntityA"
241 label="First object" tooltip="Select line, circle or arc" shape_types="edge">
242 <validator id="PartSet_DifferentObjects"/>
243 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
244 </sketch_shape_selector>
246 <sketch_shape_selector id="ConstraintEntityB"
247 label="Second object" tooltip="Select line, circle or arc" shape_types="edge">
248 <validator id="SketchPlugin_EqualAttr" parameters="ConstraintEntityA"/>
249 <validator id="PartSet_DifferentObjects"/>
250 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
251 </sketch_shape_selector>
252 <validator id="PartSet_EqualSelection"/>
255 <!-- SketchConstraintTangent -->
256 <feature id="SketchConstraintTangent" title="Tangent" tooltip="Create constraint defining tangency of two objects with common coincident point" icon=":icons/tangent.png">
257 <sketch_shape_selector id="ConstraintEntityA"
258 label="First object" tooltip="Select line or arc" shape_types="edge">
259 <validator id="SketchPlugin_TangentAttr" parameters="ConstraintEntityB"/>
260 <validator id="PartSet_DifferentObjects"/>
261 </sketch_shape_selector>
263 <sketch_shape_selector id="ConstraintEntityB"
264 label="Second object" tooltip="Select line or arc" shape_types="edge">
265 <validator id="SketchPlugin_TangentAttr" parameters="ConstraintEntityA"/>
266 <validator id="PartSet_DifferentObjects"/>
267 </sketch_shape_selector>
268 <validator id="PartSet_TangentSelection"/>
271 <!-- SketchConstraintCollinear -->
272 <feature id="SketchConstraintCollinear" title="Collinear" tooltip="Create constraint defining collinearity of two lines" icon=":icons/collinear.png">
273 <sketch_shape_selector id="ConstraintEntityA"
274 label="First line" tooltip="Select a line" shape_types="edge">
275 <validator id="GeomValidators_ShapeType" parameters="line"/>
276 <validator id="PartSet_DifferentObjects"/>
277 </sketch_shape_selector>
279 <sketch_shape_selector id="ConstraintEntityB"
280 label="Second line" tooltip="Select a line" shape_types="edge">
281 <validator id="GeomValidators_ShapeType" parameters="line"/>
282 <validator id="PartSet_DifferentObjects"/>
283 </sketch_shape_selector>
284 <validator id="PartSet_CollinearSelection"/>
287 <!-- SketchConstraintMiddle -->
288 <feature id="SketchConstraintMiddle" title="Middle point" tooltip="Create constraint for setting middle point on a line" icon=":icons/middlepoint.png">
289 <sketch_shape_selector id="ConstraintEntityA" label="First object" tooltip="Select a first object" shape_types="vertex edge">
290 <validator id="PartSet_DifferentObjects"/>
291 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
292 <validator id="SketchPlugin_MiddlePointAttr" parameters="ConstraintEntityB"/>
293 </sketch_shape_selector>
294 <sketch_shape_selector id="ConstraintEntityB" label="Second object" tooltip="Select a second object" shape_types="vertex edge">
295 <validator id="PartSet_DifferentObjects"/>
296 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
297 <validator id="SketchPlugin_MiddlePointAttr" parameters="ConstraintEntityA"/>
298 </sketch_shape_selector>
299 <validator id="PartSet_MiddlePointSelection"/>
305 <!-- SketchConstraintMirror -->
307 id="SketchConstraintMirror"
308 title="Mirror" icon=":icons/mirror.png"
309 tooltip="Create constraint, mirroring group of objects">
310 <sketch_shape_selector id="ConstraintEntityA"
311 label="Mirror line" tooltip="Select mirror line" shape_types="edge">
312 <validator id="GeomValidators_ShapeType" parameters="line"/>
313 </sketch_shape_selector>
314 <sketch_multi_selector id="ConstraintMirrorList"
316 tooltip="Select list of mirroring objects"
319 <validator id="SketchPlugin_MirrorAttr" />
320 </sketch_multi_selector>
323 <!-- SketchMultiTranslation -->
325 id="SketchMultiTranslation"
326 title="Translation" icon=":icons/translate.png"
327 tooltip="Multiple translation">
328 <sketch_multi_selector id="MultiTranslationList"
330 tooltip="Select list of translating objects"
333 <validator id="SketchPlugin_CopyValidator" />
334 </sketch_multi_selector>
335 <toolbox id="ValueType">
336 <box id="SingleValue" title="Single value" icon=":icons/translate_32x32.png">
337 <groupbox title="Direction">
338 <sketch_shape_selector
339 id="MultiTranslationStartPoint"
341 tooltip="Start point of translation"
342 shape_types="vertex">
343 <validator id="PartSet_DifferentObjects"/>
344 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
345 </sketch_shape_selector>
346 <sketch_shape_selector
347 id="MultiTranslationEndPoint"
349 tooltip="Final point of translation"
350 shape_types="vertex">
351 <validator id="PartSet_DifferentObjects"/>
352 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
353 </sketch_shape_selector>
356 <box id="FullValue" title="Full value" icon=":icons/translate_full_32x32.png">
357 <groupbox title="Direction">
358 <sketch_shape_selector
359 id="MultiTranslationStartPoint"
361 tooltip="Start point of translation"
362 shape_types="vertex">
363 <validator id="PartSet_DifferentObjects"/>
364 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
365 </sketch_shape_selector>
366 <sketch_shape_selector
367 id="MultiTranslationEndPoint"
369 tooltip="Final point of translation"
370 shape_types="vertex">
371 <validator id="PartSet_DifferentObjects"/>
372 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
373 </sketch_shape_selector>
377 <integervalue id="MultiTranslationObjects"
378 label="Total number of objects"
379 tooltip="Total number of objects"
380 default="2" min="2" use_reset="false">
381 <validator id="GeomValidators_Positive"/>
385 <!-- SketchMultiRotation -->
387 id="SketchMultiRotation"
388 title="Rotation" icon=":icons/rotate.png"
389 tooltip="Multiple rotation">
390 <sketch_multi_selector id="MultiRotationList"
392 tooltip="Select list of rotating objects"
395 <validator id="SketchPlugin_CopyValidator" />
396 </sketch_multi_selector>
397 <sketch_shape_selector
398 id="MultiRotationCenter"
399 label="Center of rotation"
400 tooltip="Center of rotation"
401 shape_types="vertex">
402 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
403 </sketch_shape_selector>
404 <toolbox id="AngleType">
405 <box id="SingleAngle" title="Single angle" icon=":icons/angle_up_32x32.png">
406 <doublevalue id="MultiRotationAngle"
408 icon=":icons/angle.png"
409 tooltip="Rotation angle"
410 default="90" use_reset="false"/>
412 <box id="FullAngle" title="Full angle" icon=":icons/angle_up_full_32x32.png">
413 <doublevalue id="MultiRotationAngle"
415 icon=":icons/angle.png"
416 tooltip="Rotation angle"
417 default="90" use_reset="false"/>
420 <integervalue id="MultiRotationObjects"
421 label="Total number of objects"
422 tooltip="Total number of objects"
423 default="2" min="2" use_reset="false">
424 <validator id="GeomValidators_Positive"/>