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 <validator id="SketchPlugin_SolverErrorValidator"/>
17 <!--icon=":pictures/x_point.png"-->
19 <feature id="SketchPoint" title="Point" tooltip="Create point" icon=":icons/point.png">
20 <sketch-2dpoint_selector id="PointCoordindates" title="Point" tooltip="Point coordinates"/>
21 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
23 <feature id="SketchLine" title="Line" tooltip="Create line" icon=":icons/line.png">
24 <sketch-2dpoint_selector id="StartPoint" title="Start point" tooltip="Start point coordinates" previous_feature_param="EndPoint"/>
25 <sketch-2dpoint_selector id="EndPoint" title="End point" tooltip="End point coordinates"/>
26 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
27 <validator id="GeomValidators_Different" parameters="StartPoint,EndPoint"/>
29 <feature id="SketchCircle" title="Circle" tooltip="Create circle" icon=":icons/circle.png">
30 <sketch-2dpoint_selector id="CircleCenter" title="Center" tooltip="Center coordinates"/>
31 <point2ddistance id="CircleRadius" first_point="CircleCenter" label="Radius:" min="0" step="1.0" default="0" icon=":icons/radius.png" tooltip="Set radius">
32 <validator id="GeomValidators_Positive"/>
34 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
36 <feature id="SketchArc" title="Arc" tooltip="Create arc" icon=":icons/arc.png">
37 <sketch-2dpoint_selector id="ArcCenter" title="Center" tooltip="Center of a circle"/>
38 <sketch-2dpoint_selector id="ArcStartPoint" title="Start point" tooltip="Start point"/>
39 <sketch-2dpoint_selector id="ArcEndPoint" title="End point" tooltip="End point"/>
40 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
41 <validator id="GeomValidators_Different" parameters="ArcCenter,ArcStartPoint,ArcEndPoint"/>
45 <group id="Constraints">
46 <!-- SketchConstraintDistance -->
48 id="SketchConstraintDistance"
50 tooltip="Set fixed distance from a point to an object"
51 icon=":icons/distance.png">
52 <label title="Select objects for distance definition. Following objects can be accepted: point, line or arc end point, center of circle or arc."/>
53 <sketch_shape_selector
54 id="ConstraintEntityA"
56 tooltip="Select point, line end point, line, center of circle or arc."
57 shape_types="edge vertex">
58 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
59 <validator id="PartSet_DifferentObjects"/>
60 <validator id="GeomValidators_ShapeType" parameters="vertex,line"/>
61 </sketch_shape_selector>
62 <sketch_shape_selector
63 id="ConstraintEntityB"
65 tooltip="Select point, line end point, line, center of circle or arc."
66 shape_types="edge vertex">
67 <validator id="PartSet_DifferentObjects"/>
68 <validator id="SketchPlugin_DistanceAttr" parameters="ConstraintEntityA"/>
69 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
70 <validator id="GeomValidators_ShapeType" parameters="vertex,line"/>
71 </sketch_shape_selector>
72 <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
74 <doublevalue_editor label="Value" tooltip="Distance" id="ConstraintValue" default="computed" min="0">
75 <validator id="GeomValidators_Positive"/>
78 <validator id="PartSet_DistanceSelection"/>
81 <!-- SketchConstraintLength -->
82 <feature id="SketchConstraintLength" title="Length" tooltip="Set fixed length of a line segment" icon=":icons/length.png">
83 <label title="Select a line on which to calculate length" tooltip="Select a line on which to calculate length"/>
84 <shape_selector id="ConstraintEntityA" label="Line" tooltip="Select an line" shape_types="edge" >
85 <validator id="GeomValidators_ShapeType" parameters="line"/>
87 <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
88 <doublevalue_editor label="Value" tooltip="Length" id="ConstraintValue" default="computed">
89 <validator id="GeomValidators_Positive"/>
91 <validator id="PartSet_LengthSelection"/>
94 <!-- SketchConstraintRadius -->
95 <feature id="SketchConstraintRadius" title="Radius" tooltip="Set fixed radius of a circle or an arc" icon=":icons/radius_constr.png">
96 <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"/>
97 <shape_selector id="ConstraintEntityA" label="Circle or Arc" tooltip="Select a circle or an arc"
99 <validator id="GeomValidators_ShapeType" parameters="circle"/>
101 <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
102 <doublevalue_editor label="Value" tooltip="Radius" id="ConstraintValue" default="computed">
103 <validator id="GeomValidators_Positive"/>
104 </doublevalue_editor>
105 <validator id="PartSet_RadiusSelection"/>
108 <!-- SketchConstraintAngle -->
109 <feature id="SketchConstraintAngle" title="Angle" tooltip="Set fixed angle between two line segments" icon=":icons/angle_constr.png">
110 <shape_selector id="ConstraintEntityA" label="Line" tooltip="Select an line" shape_types="edge" >
111 <validator id="GeomValidators_ShapeType" parameters="line"/>
112 <validator id="PartSet_DifferentObjects"/>
113 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
115 <shape_selector id="ConstraintEntityB" label="Line" tooltip="Select an line" shape_types="edge" >
116 <validator id="GeomValidators_ShapeType" parameters="line"/>
117 <validator id="PartSet_DifferentObjects"/>
118 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
120 <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
121 <doublevalue_editor label="Value" tooltip="Angle" id="ConstraintValue" default="computed" />
122 <validator id="PartSet_AngleSelection"/>
125 <!-- SketchConstraintParallel -->
126 <feature id="SketchConstraintParallel" title="Parallel" tooltip="Create constraint defining two parallel lines" icon=":icons/parallel.png">
127 <sketch_shape_selector id="ConstraintEntityA"
128 label="First line" tooltip="Select a line" shape_types="edge">
129 <validator id="GeomValidators_ShapeType" parameters="line"/>
130 <validator id="PartSet_DifferentObjects"/>
131 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
132 </sketch_shape_selector>
134 <sketch_shape_selector id="ConstraintEntityB" label="Second line" tooltip="Select a line"
136 <validator id="GeomValidators_ShapeType" parameters="line"/>
137 <validator id="PartSet_DifferentObjects"/>
138 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
139 </sketch_shape_selector>
140 <validator id="PartSet_ParallelSelection"/>
143 <!-- SketchConstraintPerpendicular -->
144 <feature id="SketchConstraintPerpendicular" title="Perpendicular"
145 tooltip="Create constraint defining two perpendicular lines"
146 icon=":icons/perpendicular.png">
147 <sketch_shape_selector id="ConstraintEntityA"
148 label="First line" tooltip="Select an line"
150 <validator id="PartSet_DifferentObjects"/>
151 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
152 <validator id="GeomValidators_ShapeType" parameters="line"/>
153 </sketch_shape_selector>
155 <sketch_shape_selector id="ConstraintEntityB"
156 label="Second line" tooltip="Select an line"
158 <validator id="PartSet_DifferentObjects"/>
159 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
160 <validator id="GeomValidators_ShapeType" parameters="line"/>
161 </sketch_shape_selector>
162 <validator id="PartSet_PerpendicularSelection"/>
165 <!-- SketchConstraintCoincedence -->
166 <feature id="SketchConstraintCoincidence" title="Coincident" tooltip="Create constraint for the coincidence of two points or point on line or circle" icon=":icons/coincedence.png">
167 <sketch_shape_selector id="ConstraintEntityA" label="First object" tooltip="Select a first object" shape_types="vertex edge">
168 <validator id="PartSet_DifferentObjects"/>
169 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
170 </sketch_shape_selector>
171 <sketch_shape_selector id="ConstraintEntityB" label="Second object" tooltip="Select a second object" shape_types="vertex edge">
172 <validator id="PartSet_DifferentObjects"/>
173 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
174 <validator id="SketchPlugin_CoincidenceAttr" parameters="ConstraintEntityA"/>
175 </sketch_shape_selector>
176 <validator id="PartSet_CoincidentSelection"/>
179 <!-- SketchConstraintRigid -->
180 <feature id="SketchConstraintRigid" title="Fixed" tooltip="Fix an object" icon=":icons/fixed.png">
181 <sketch_shape_selector id="ConstraintEntityA" label="Object"
182 tooltip="Select point, line end point, line, center of circle or arc."
183 shape_types="edge vertex">
184 <validator id="GeomValidators_ShapeType" parameters="vertex,line,circle"/>
185 <validator id="SketchPlugin_NotFixed"/>
186 </sketch_shape_selector>
187 <validator id="PartSet_RigidSelection"/>
190 <!-- SketchConstraintHorizontal -->
191 <feature id="SketchConstraintHorizontal" title="Horizontal" tooltip="Create constraint defining horizontal line" icon=":icons/horisontal.png">
192 <sketch_shape_selector id="ConstraintEntityA"
193 label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
194 <validator id="GeomValidators_ShapeType" parameters="line"/>
195 </sketch_shape_selector>
196 <validator id="PartSet_HVDirSelection"/>
199 <!-- SketchConstraintVertical -->
200 <feature id="SketchConstraintVertical" title="Vertical" tooltip="Create constraint defining vertical line" icon=":icons/vertical.png">
201 <sketch_shape_selector id="ConstraintEntityA"
202 label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
203 <validator id="GeomValidators_ShapeType" parameters="line"/>
204 </sketch_shape_selector>
205 <validator id="PartSet_HVDirSelection"/>
208 <!-- SketchConstraintEqual -->
209 <feature id="SketchConstraintEqual" title="Equal"
210 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"
211 icon=":icons/equal.png">
212 <sketch_shape_selector id="ConstraintEntityA"
213 label="First object" tooltip="Select line, circle or arc" shape_types="edge">
214 <validator id="PartSet_DifferentObjects"/>
215 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
216 </sketch_shape_selector>
218 <sketch_shape_selector id="ConstraintEntityB"
219 label="Second object" tooltip="Select line, circle or arc" shape_types="edge">
220 <validator id="SketchPlugin_EqualAttr" parameters="ConstraintEntityA"/>
221 <validator id="PartSet_DifferentObjects"/>
222 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
223 </sketch_shape_selector>
226 <!-- SketchConstraintTangent -->
227 <feature id="SketchConstraintTangent" title="Tangent" tooltip="Create constraint defining tangency of two objects with common coincident point" icon=":icons/tangent.png">
228 <sketch_shape_selector id="ConstraintEntityA"
229 label="First object" tooltip="Select line or arc" shape_types="edge">
230 <validator id="PartSet_CoincidentAttr" parameters="ConstraintEntityB"/>
231 <validator id="PartSet_DifferentObjects"/>
232 </sketch_shape_selector>
234 <sketch_shape_selector id="ConstraintEntityB"
235 label="Second object" tooltip="Select line or arc" shape_types="edge">
236 <validator id="PartSet_CoincidentAttr" parameters="ConstraintEntityA"/>
237 <validator id="SketchPlugin_TangentAttr" parameters="ConstraintEntityA"/>
238 <validator id="PartSet_DifferentObjects"/>
239 </sketch_shape_selector>
240 <validator id="PartSet_TangentSelection"/>
246 <!-- SketchConstraintFillet -->
247 <feature id="SketchConstraintFillet" title="Fillet" tooltip="Create constraint defining fillet between two objects" icon=":icons/fillet.png">
248 <sketch_shape_selector id="ConstraintEntityA"
249 label="First object" tooltip="Select line or arc" shape_types="edge">
250 <validator id="PartSet_DifferentObjects"/>
251 <validator id="PartSet_CoincidentAttr" parameters="ConstraintEntityB"/>
252 </sketch_shape_selector>
254 <sketch_shape_selector id="ConstraintEntityB"
255 label="Second object" tooltip="Select line or arc" shape_types="edge">
256 <validator id="PartSet_DifferentObjects"/>
257 <validator id="PartSet_CoincidentAttr" parameters="ConstraintEntityA"/>
258 </sketch_shape_selector>
260 <doublevalue label="Value" tooltip="Fillet radius" id="ConstraintValue" min="0" default="1" use_reset="false">
261 <validator id="GeomValidators_Positive"/>
263 <validator id="PartSet_FilletSelection"/>
266 <!-- SketchConstraintMirror -->
268 id="SketchConstraintMirror"
269 title="Mirror" icon=":icons/mirror.png"
270 tooltip="Create constraint, mirroring group of objects">
271 <sketch_shape_selector id="ConstraintEntityA"
272 label="Mirror line" tooltip="Select mirror line" shape_types="edge">
273 <validator id="GeomValidators_ShapeType" parameters="line"/>
274 </sketch_shape_selector>
275 <sketch_multi_selector id="ConstraintMirrorList"
277 tooltip="Select list of mirroring objects"
280 <validator id="SketchPlugin_MirrorAttr" />
281 </sketch_multi_selector>
284 <!-- SketchMultiTranslation -->
286 id="SketchMultiTranslation"
287 title="Translation" icon=":icons/translate.png"
288 tooltip="Multiple translation">
289 <sketch_multi_selector id="MultiTranslationList"
291 tooltip="Select list of translating objects"
294 <validator id="SketchPlugin_CopyValidator" />
295 </sketch_multi_selector>
296 <groupbox title="Direction">
297 <sketch-2dpoint_selector
298 id="MultiTranslationStartPoint"
300 tooltip="Start point of translation"/>
301 <sketch-2dpoint_selector
302 id="MultiTranslationEndPoint"
304 tooltip="Final point of translation"/>
306 <integervalue id="MultiTranslationCopies"
307 label="Number of copies"
308 tooltip="Number of copies"
309 default="1" min="1" use_reset="false">
310 <validator id="GeomValidators_Positive"/>
314 <!-- SketchMultiRotation -->
316 id="SketchMultiRotation"
317 title="Rotation" icon=":icons/rotate.png"
318 tooltip="Multiple rotation">
319 <sketch_multi_selector id="MultiRotationList"
321 tooltip="Select list of rotating objects"
324 <validator id="SketchPlugin_CopyValidator" />
325 </sketch_multi_selector>
326 <sketch-2dpoint_selector
327 id="MultiRotationCenter"
328 title="Center of rotation"
329 tooltip="Center of rotation"/>
330 <point2dangle id="MultiRotationAngle"
331 first_point="MultiRotationCenter"
333 icon=":icons/angle.png"
334 tooltip="Rotation angle"
336 <integervalue id="MultiRotationCopies"
337 label="Number of copies"
338 tooltip="Number of copies"
339 default="1" min="1" use_reset="false">
340 <validator id="GeomValidators_Positive"/>