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"
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"/>
30 <feature id="SketchCircle" title="Circle" tooltip="Create circle" icon=":icons/circle.png">
31 <sketch-2dpoint_selector id="CircleCenter" accept_expressions="0" title="Center" tooltip="Center coordinates"/>
32 <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">
33 <validator id="GeomValidators_Positive"/>
35 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
37 <feature id="SketchArc" title="Arc" tooltip="Create arc" icon=":icons/arc.png">
38 <sketch-2dpoint_selector id="ArcCenter" accept_expressions="0" title="Center" tooltip="Center of a circle"/>
39 <sketch-2dpoint_selector id="ArcStartPoint" accept_expressions="0" title="Start point" tooltip="Start point"/>
40 <sketch-2dpoint_selector id="ArcEndPoint" accept_expressions="0" title="End point" tooltip="End point"/>
41 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
42 <validator id="GeomValidators_Different" parameters="ArcCenter,ArcStartPoint,ArcEndPoint"/>
44 <!-- SketchConstraintFillet -->
45 <feature id="SketchConstraintFillet" title="Fillet" tooltip="Create constraint defining fillet between two objects" icon=":icons/fillet.png">
46 <sketch_shape_selector id="ConstraintEntityA"
47 label="Point" tooltip="Select point for fillet (should be shared by two entities only)" shape_types="vertex">
48 <validator id="SketchPlugin_FilletVertexValidator"/>
49 </sketch_shape_selector>
50 <doublevalue label="Radius" tooltip="Fillet arc radius" id="ConstraintValue" accept_expressions="0" min="0" default="1" use_reset="false">
51 <validator id="GeomValidators_Positive"/>
53 <validator id="PartSet_FilletSelection"/>
57 <group id="Constraints">
58 <!-- SketchConstraintDistance -->
60 id="SketchConstraintDistance"
62 tooltip="Set fixed distance from a point to an object"
63 icon=":icons/distance.png">
64 <label title="Select objects for distance definition. Following objects can be accepted: point, line or arc end point, center of circle or arc."/>
65 <sketch_shape_selector
66 id="ConstraintEntityA"
68 tooltip="Select point, line end point, line, center of circle or arc."
69 shape_types="edge vertex">
70 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
71 <validator id="PartSet_DifferentObjects"/>
72 <validator id="GeomValidators_ShapeType" parameters="vertex,line"/>
73 </sketch_shape_selector>
74 <sketch_shape_selector
75 id="ConstraintEntityB"
77 tooltip="Select point, line end point, line, center of circle or arc."
78 shape_types="edge vertex">
79 <validator id="PartSet_DifferentObjects"/>
80 <validator id="SketchPlugin_DistanceAttr" parameters="ConstraintEntityA"/>
81 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
82 <validator id="GeomValidators_ShapeType" parameters="vertex,line"/>
83 </sketch_shape_selector>
84 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
86 <doublevalue_editor label="Value" tooltip="Distance" id="ConstraintValue" default="computed" min="0">
87 <validator id="GeomValidators_Positive"/>
90 <validator id="PartSet_DistanceSelection"/>
93 <!-- SketchConstraintLength -->
94 <feature id="SketchConstraintLength" title="Length" tooltip="Set fixed length of a line segment" icon=":icons/length.png">
95 <label title="Select a line on which to calculate length" tooltip="Select a line on which to calculate length"/>
96 <shape_selector id="ConstraintEntityA" label="Line" tooltip="Select an line" shape_types="edge" >
97 <validator id="GeomValidators_ShapeType" parameters="line"/>
99 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
100 <doublevalue_editor label="Value" tooltip="Length" id="ConstraintValue" default="computed">
101 <validator id="GeomValidators_Positive"/>
102 </doublevalue_editor>
103 <validator id="PartSet_LengthSelection"/>
106 <!-- SketchConstraintRadius -->
107 <feature id="SketchConstraintRadius" title="Radius" tooltip="Set fixed radius of a circle or an arc" icon=":icons/radius_constr.png">
108 <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"/>
109 <shape_selector id="ConstraintEntityA" label="Circle or Arc" tooltip="Select a circle or an arc"
111 <validator id="GeomValidators_ShapeType" parameters="circle"/>
113 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
114 <doublevalue_editor label="Value" tooltip="Radius" id="ConstraintValue" default="computed">
115 <validator id="GeomValidators_Positive"/>
116 </doublevalue_editor>
117 <validator id="PartSet_RadiusSelection"/>
120 <!-- SketchConstraintAngle -->
121 <feature id="SketchConstraintAngle" title="Angle" tooltip="Set fixed angle between two line segments" icon=":icons/angle_constr.png">
122 <sketch_shape_selector id="ConstraintEntityA" label="Line 1" tooltip="Select an line" shape_types="edge" >
123 <validator id="GeomValidators_ShapeType" parameters="line"/>
124 <validator id="PartSet_DifferentObjects"/>
125 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
126 </sketch_shape_selector>
127 <sketch_shape_selector id="ConstraintEntityB" label="Line 2" tooltip="Select an line" shape_types="edge" >
128 <validator id="GeomValidators_ShapeType" parameters="line"/>
129 <validator id="PartSet_DifferentObjects"/>
130 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
131 </sketch_shape_selector>
132 <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
133 <doublevalue_editor label="Value" tooltip="Angle" id="ConstraintValue" default="computed" min="0" max="180" />
134 <validator id="PartSet_AngleSelection"/>
137 <!-- SketchConstraintParallel -->
138 <feature id="SketchConstraintParallel" title="Parallel" tooltip="Create constraint defining two parallel lines" icon=":icons/parallel.png">
139 <sketch_shape_selector id="ConstraintEntityA"
140 label="First line" tooltip="Select a line" shape_types="edge">
141 <validator id="GeomValidators_ShapeType" parameters="line"/>
142 <validator id="PartSet_DifferentObjects"/>
143 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
144 </sketch_shape_selector>
146 <sketch_shape_selector id="ConstraintEntityB" label="Second line" tooltip="Select a line"
148 <validator id="GeomValidators_ShapeType" parameters="line"/>
149 <validator id="PartSet_DifferentObjects"/>
150 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
151 </sketch_shape_selector>
152 <validator id="PartSet_ParallelSelection"/>
155 <!-- SketchConstraintPerpendicular -->
156 <feature id="SketchConstraintPerpendicular" title="Perpendicular"
157 tooltip="Create constraint defining two perpendicular lines"
158 icon=":icons/perpendicular.png">
159 <sketch_shape_selector id="ConstraintEntityA"
160 label="First line" tooltip="Select an line"
162 <validator id="PartSet_DifferentObjects"/>
163 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
164 <validator id="GeomValidators_ShapeType" parameters="line"/>
165 </sketch_shape_selector>
167 <sketch_shape_selector id="ConstraintEntityB"
168 label="Second line" tooltip="Select an line"
170 <validator id="PartSet_DifferentObjects"/>
171 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
172 <validator id="GeomValidators_ShapeType" parameters="line"/>
173 </sketch_shape_selector>
174 <validator id="PartSet_PerpendicularSelection"/>
177 <!-- SketchConstraintCoincedence -->
178 <feature id="SketchConstraintCoincidence" title="Coincident" tooltip="Create constraint for the coincidence of two points or point on line or circle" icon=":icons/coincedence.png">
179 <sketch_shape_selector id="ConstraintEntityA" label="First object" tooltip="Select a first object" shape_types="vertex edge">
180 <validator id="PartSet_DifferentObjects"/>
181 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
182 </sketch_shape_selector>
183 <sketch_shape_selector id="ConstraintEntityB" label="Second object" tooltip="Select a second object" shape_types="vertex edge">
184 <validator id="PartSet_DifferentObjects"/>
185 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
186 <validator id="SketchPlugin_CoincidenceAttr" parameters="ConstraintEntityA"/>
187 </sketch_shape_selector>
188 <validator id="PartSet_CoincidentSelection"/>
191 <!-- SketchConstraintRigid -->
192 <feature id="SketchConstraintRigid" title="Fixed" tooltip="Fix an object" icon=":icons/fixed.png">
193 <sketch_shape_selector id="ConstraintEntityA" label="Object"
194 tooltip="Select point, line end point, line, center of circle or arc."
195 shape_types="edge vertex">
196 <validator id="GeomValidators_ShapeType" parameters="vertex,line,circle"/>
197 <validator id="SketchPlugin_NotFixed"/>
198 </sketch_shape_selector>
199 <validator id="PartSet_RigidSelection"/>
202 <!-- SketchConstraintHorizontal -->
203 <feature id="SketchConstraintHorizontal" title="Horizontal" tooltip="Create constraint defining horizontal line" icon=":icons/horisontal.png">
204 <sketch_shape_selector id="ConstraintEntityA"
205 label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
206 <validator id="GeomValidators_ShapeType" parameters="line"/>
207 </sketch_shape_selector>
208 <validator id="PartSet_HVDirSelection"/>
211 <!-- SketchConstraintVertical -->
212 <feature id="SketchConstraintVertical" title="Vertical" tooltip="Create constraint defining vertical line" icon=":icons/vertical.png">
213 <sketch_shape_selector id="ConstraintEntityA"
214 label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
215 <validator id="GeomValidators_ShapeType" parameters="line"/>
216 </sketch_shape_selector>
217 <validator id="PartSet_HVDirSelection"/>
220 <!-- SketchConstraintEqual -->
221 <feature id="SketchConstraintEqual" title="Equal"
222 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"
223 icon=":icons/equal.png">
224 <sketch_shape_selector id="ConstraintEntityA"
225 label="First object" tooltip="Select line, circle or arc" shape_types="edge">
226 <validator id="PartSet_DifferentObjects"/>
227 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
228 </sketch_shape_selector>
230 <sketch_shape_selector id="ConstraintEntityB"
231 label="Second object" tooltip="Select line, circle or arc" shape_types="edge">
232 <validator id="SketchPlugin_EqualAttr" parameters="ConstraintEntityA"/>
233 <validator id="PartSet_DifferentObjects"/>
234 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
235 </sketch_shape_selector>
236 <validator id="PartSet_EqualSelection"/>
239 <!-- SketchConstraintTangent -->
240 <feature id="SketchConstraintTangent" title="Tangent" tooltip="Create constraint defining tangency of two objects with common coincident point" icon=":icons/tangent.png">
241 <sketch_shape_selector id="ConstraintEntityA"
242 label="First object" tooltip="Select line or arc" shape_types="edge">
243 <validator id="PartSet_CoincidentAttr" parameters="ConstraintEntityB"/>
244 <validator id="PartSet_DifferentObjects"/>
245 </sketch_shape_selector>
247 <sketch_shape_selector id="ConstraintEntityB"
248 label="Second object" tooltip="Select line or arc" shape_types="edge">
249 <validator id="PartSet_CoincidentAttr" parameters="ConstraintEntityA"/>
250 <validator id="SketchPlugin_TangentAttr" parameters="ConstraintEntityA"/>
251 <validator id="PartSet_DifferentObjects"/>
252 </sketch_shape_selector>
253 <validator id="PartSet_TangentSelection"/>
259 <!-- SketchConstraintMirror -->
261 id="SketchConstraintMirror"
262 title="Mirror" icon=":icons/mirror.png"
263 tooltip="Create constraint, mirroring group of objects">
264 <sketch_shape_selector id="ConstraintEntityA"
265 label="Mirror line" tooltip="Select mirror line" shape_types="edge">
266 <validator id="GeomValidators_ShapeType" parameters="line"/>
267 </sketch_shape_selector>
268 <sketch_multi_selector id="ConstraintMirrorList"
270 tooltip="Select list of mirroring objects"
273 <validator id="SketchPlugin_MirrorAttr" />
274 </sketch_multi_selector>
277 <!-- SketchMultiTranslation -->
279 id="SketchMultiTranslation"
280 title="Translation" icon=":icons/translate.png"
281 tooltip="Multiple translation">
282 <sketch_multi_selector id="MultiTranslationList"
284 tooltip="Select list of translating objects"
287 <validator id="SketchPlugin_CopyValidator" />
288 </sketch_multi_selector>
289 <toolbox id="ValueType">
290 <box id="SingleValue" title="Single value" icon=":icons/translate_32x32.png">
291 <groupbox title="Direction">
292 <sketch_shape_selector
293 id="MultiTranslationStartPoint"
295 tooltip="Start point of translation"
296 shape_types="vertex">
297 <validator id="PartSet_DifferentObjects"/>
298 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
299 </sketch_shape_selector>
300 <sketch_shape_selector
301 id="MultiTranslationEndPoint"
303 tooltip="Final point of translation"
304 shape_types="vertex">
305 <validator id="PartSet_DifferentObjects"/>
306 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
307 </sketch_shape_selector>
310 <box id="FullValue" title="Full value" icon=":icons/translate_full_32x32.png">
311 <groupbox title="Direction">
312 <sketch_shape_selector
313 id="MultiTranslationStartPoint"
315 tooltip="Start point of translation"
316 shape_types="vertex">
317 <validator id="PartSet_DifferentObjects"/>
318 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
319 </sketch_shape_selector>
320 <sketch_shape_selector
321 id="MultiTranslationEndPoint"
323 tooltip="Final point of translation"
324 shape_types="vertex">
325 <validator id="PartSet_DifferentObjects"/>
326 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
327 </sketch_shape_selector>
331 <integervalue id="MultiTranslationObjects"
332 label="Total number of objects"
333 tooltip="Total number of objects"
334 default="2" min="2" use_reset="false">
335 <validator id="GeomValidators_Positive"/>
339 <!-- SketchMultiRotation -->
341 id="SketchMultiRotation"
342 title="Rotation" icon=":icons/rotate.png"
343 tooltip="Multiple rotation">
344 <sketch_multi_selector id="MultiRotationList"
346 tooltip="Select list of rotating objects"
349 <validator id="SketchPlugin_CopyValidator" />
350 </sketch_multi_selector>
351 <sketch_shape_selector
352 id="MultiRotationCenter"
353 label="Center of rotation"
354 tooltip="Center of rotation"
355 shape_types="vertex">
356 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
357 </sketch_shape_selector>
358 <toolbox id="AngleType">
359 <box id="SingleAngle" title="Single angle" icon=":icons/angle_up_32x32.png">
360 <doublevalue id="MultiRotationAngle"
362 icon=":icons/angle.png"
363 tooltip="Rotation angle"
364 default="90" use_reset="false"/>
366 <box id="FullAngle" title="Full angle" icon=":icons/angle_up_full_32x32.png">
367 <doublevalue id="MultiRotationAngle"
369 icon=":icons/angle.png"
370 tooltip="Rotation angle"
371 default="90" use_reset="false"/>
374 <integervalue id="MultiRotationObjects"
375 label="Total number of objects"
376 tooltip="Total number of objects"
377 default="2" min="2" use_reset="false">
378 <validator id="GeomValidators_Positive"/>