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" 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" title="Start point" tooltip="Start point coordinates" previous_feature_param="EndPoint"/>
26 <sketch-2dpoint_selector id="EndPoint" 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" title="Center" tooltip="Center coordinates"/>
32 <point2ddistance id="CircleRadius" 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" title="Center" tooltip="Center of a circle"/>
39 <sketch-2dpoint_selector id="ArcStartPoint" title="Start point" tooltip="Start point"/>
40 <sketch-2dpoint_selector id="ArcEndPoint" 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"/>
46 <group id="Constraints">
47 <!-- SketchConstraintDistance -->
49 id="SketchConstraintDistance"
51 tooltip="Set fixed distance from a point to an object"
52 icon=":icons/distance.png">
53 <label title="Select objects for distance definition. Following objects can be accepted: point, line or arc end point, center of circle or arc."/>
54 <sketch_shape_selector
55 id="ConstraintEntityA"
57 tooltip="Select point, line end point, line, center of circle or arc."
58 shape_types="edge vertex">
59 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
60 <validator id="PartSet_DifferentObjects"/>
61 <validator id="GeomValidators_ShapeType" parameters="vertex,line"/>
62 </sketch_shape_selector>
63 <sketch_shape_selector
64 id="ConstraintEntityB"
66 tooltip="Select point, line end point, line, center of circle or arc."
67 shape_types="edge vertex">
68 <validator id="PartSet_DifferentObjects"/>
69 <validator id="SketchPlugin_DistanceAttr" parameters="ConstraintEntityA"/>
70 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
71 <validator id="GeomValidators_ShapeType" parameters="vertex,line"/>
72 </sketch_shape_selector>
73 <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
75 <doublevalue_editor label="Value" tooltip="Distance" id="ConstraintValue" default="computed" min="0">
76 <validator id="GeomValidators_Positive"/>
79 <validator id="PartSet_DistanceSelection"/>
82 <!-- SketchConstraintLength -->
83 <feature id="SketchConstraintLength" title="Length" tooltip="Set fixed length of a line segment" icon=":icons/length.png">
84 <label title="Select a line on which to calculate length" tooltip="Select a line on which to calculate length"/>
85 <shape_selector id="ConstraintEntityA" label="Line" tooltip="Select an line" shape_types="edge" >
86 <validator id="GeomValidators_ShapeType" parameters="line"/>
88 <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
89 <doublevalue_editor label="Value" tooltip="Length" id="ConstraintValue" default="computed">
90 <validator id="GeomValidators_Positive"/>
92 <validator id="PartSet_LengthSelection"/>
95 <!-- SketchConstraintRadius -->
96 <feature id="SketchConstraintRadius" title="Radius" tooltip="Set fixed radius of a circle or an arc" icon=":icons/radius_constr.png">
97 <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"/>
98 <shape_selector id="ConstraintEntityA" label="Circle or Arc" tooltip="Select a circle or an arc"
100 <validator id="GeomValidators_ShapeType" parameters="circle"/>
102 <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
103 <doublevalue_editor label="Value" tooltip="Radius" id="ConstraintValue" default="computed">
104 <validator id="GeomValidators_Positive"/>
105 </doublevalue_editor>
106 <validator id="PartSet_RadiusSelection"/>
109 <!-- SketchConstraintAngle -->
110 <feature id="SketchConstraintAngle" title="Angle" tooltip="Set fixed angle between two line segments" icon=":icons/angle_constr.png">
111 <shape_selector id="ConstraintEntityA" label="Line 1" tooltip="Select an line" shape_types="edge" >
112 <validator id="GeomValidators_ShapeType" parameters="line"/>
113 <validator id="PartSet_DifferentObjects"/>
114 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
116 <shape_selector id="ConstraintEntityB" label="Line 2" tooltip="Select an line" shape_types="edge" >
117 <validator id="GeomValidators_ShapeType" parameters="line"/>
118 <validator id="PartSet_DifferentObjects"/>
119 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
121 <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
122 <doublevalue_editor label="Value" tooltip="Angle" id="ConstraintValue" default="computed" min="0" max="180" />
123 <validator id="PartSet_AngleSelection"/>
126 <!-- SketchConstraintParallel -->
127 <feature id="SketchConstraintParallel" title="Parallel" tooltip="Create constraint defining two parallel lines" icon=":icons/parallel.png">
128 <sketch_shape_selector id="ConstraintEntityA"
129 label="First line" tooltip="Select a line" shape_types="edge">
130 <validator id="GeomValidators_ShapeType" parameters="line"/>
131 <validator id="PartSet_DifferentObjects"/>
132 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
133 </sketch_shape_selector>
135 <sketch_shape_selector id="ConstraintEntityB" label="Second line" tooltip="Select a line"
137 <validator id="GeomValidators_ShapeType" parameters="line"/>
138 <validator id="PartSet_DifferentObjects"/>
139 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
140 </sketch_shape_selector>
141 <validator id="PartSet_ParallelSelection"/>
144 <!-- SketchConstraintPerpendicular -->
145 <feature id="SketchConstraintPerpendicular" title="Perpendicular"
146 tooltip="Create constraint defining two perpendicular lines"
147 icon=":icons/perpendicular.png">
148 <sketch_shape_selector id="ConstraintEntityA"
149 label="First line" tooltip="Select an line"
151 <validator id="PartSet_DifferentObjects"/>
152 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
153 <validator id="GeomValidators_ShapeType" parameters="line"/>
154 </sketch_shape_selector>
156 <sketch_shape_selector id="ConstraintEntityB"
157 label="Second line" tooltip="Select an line"
159 <validator id="PartSet_DifferentObjects"/>
160 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
161 <validator id="GeomValidators_ShapeType" parameters="line"/>
162 </sketch_shape_selector>
163 <validator id="PartSet_PerpendicularSelection"/>
166 <!-- SketchConstraintCoincedence -->
167 <feature id="SketchConstraintCoincidence" title="Coincident" tooltip="Create constraint for the coincidence of two points or point on line or circle" icon=":icons/coincedence.png">
168 <sketch_shape_selector id="ConstraintEntityA" label="First object" tooltip="Select a first object" shape_types="vertex edge">
169 <validator id="PartSet_DifferentObjects"/>
170 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
171 </sketch_shape_selector>
172 <sketch_shape_selector id="ConstraintEntityB" label="Second object" tooltip="Select a second object" shape_types="vertex edge">
173 <validator id="PartSet_DifferentObjects"/>
174 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
175 <validator id="SketchPlugin_CoincidenceAttr" parameters="ConstraintEntityA"/>
176 </sketch_shape_selector>
177 <validator id="PartSet_CoincidentSelection"/>
180 <!-- SketchConstraintRigid -->
181 <feature id="SketchConstraintRigid" title="Fixed" tooltip="Fix an object" icon=":icons/fixed.png">
182 <sketch_shape_selector id="ConstraintEntityA" label="Object"
183 tooltip="Select point, line end point, line, center of circle or arc."
184 shape_types="edge vertex">
185 <validator id="GeomValidators_ShapeType" parameters="vertex,line,circle"/>
186 <validator id="SketchPlugin_NotFixed"/>
187 </sketch_shape_selector>
188 <validator id="PartSet_RigidSelection"/>
191 <!-- SketchConstraintHorizontal -->
192 <feature id="SketchConstraintHorizontal" title="Horizontal" tooltip="Create constraint defining horizontal line" icon=":icons/horisontal.png">
193 <sketch_shape_selector id="ConstraintEntityA"
194 label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
195 <validator id="GeomValidators_ShapeType" parameters="line"/>
196 </sketch_shape_selector>
197 <validator id="PartSet_HVDirSelection"/>
200 <!-- SketchConstraintVertical -->
201 <feature id="SketchConstraintVertical" title="Vertical" tooltip="Create constraint defining vertical line" icon=":icons/vertical.png">
202 <sketch_shape_selector id="ConstraintEntityA"
203 label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
204 <validator id="GeomValidators_ShapeType" parameters="line"/>
205 </sketch_shape_selector>
206 <validator id="PartSet_HVDirSelection"/>
209 <!-- SketchConstraintEqual -->
210 <feature id="SketchConstraintEqual" title="Equal"
211 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"
212 icon=":icons/equal.png">
213 <sketch_shape_selector id="ConstraintEntityA"
214 label="First object" tooltip="Select line, circle or arc" shape_types="edge">
215 <validator id="PartSet_DifferentObjects"/>
216 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
217 </sketch_shape_selector>
219 <sketch_shape_selector id="ConstraintEntityB"
220 label="Second object" tooltip="Select line, circle or arc" shape_types="edge">
221 <validator id="SketchPlugin_EqualAttr" parameters="ConstraintEntityA"/>
222 <validator id="PartSet_DifferentObjects"/>
223 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
224 </sketch_shape_selector>
227 <!-- SketchConstraintTangent -->
228 <feature id="SketchConstraintTangent" title="Tangent" tooltip="Create constraint defining tangency of two objects with common coincident point" icon=":icons/tangent.png">
229 <sketch_shape_selector id="ConstraintEntityA"
230 label="First object" tooltip="Select line or arc" shape_types="edge">
231 <validator id="PartSet_CoincidentAttr" parameters="ConstraintEntityB"/>
232 <validator id="PartSet_DifferentObjects"/>
233 </sketch_shape_selector>
235 <sketch_shape_selector id="ConstraintEntityB"
236 label="Second object" tooltip="Select line or arc" shape_types="edge">
237 <validator id="PartSet_CoincidentAttr" parameters="ConstraintEntityA"/>
238 <validator id="SketchPlugin_TangentAttr" parameters="ConstraintEntityA"/>
239 <validator id="PartSet_DifferentObjects"/>
240 </sketch_shape_selector>
241 <validator id="PartSet_TangentSelection"/>
247 <!-- SketchConstraintFillet -->
248 <feature id="SketchConstraintFillet" title="Fillet" tooltip="Create constraint defining fillet between two objects" icon=":icons/fillet.png">
249 <sketch_shape_selector id="ConstraintEntityA"
250 label="First object" tooltip="Select line or arc" shape_types="edge">
251 <validator id="PartSet_DifferentObjects"/>
252 <validator id="PartSet_CoincidentAttr" parameters="ConstraintEntityB"/>
253 </sketch_shape_selector>
255 <sketch_shape_selector id="ConstraintEntityB"
256 label="Second object" tooltip="Select line or arc" shape_types="edge">
257 <validator id="PartSet_DifferentObjects"/>
258 <validator id="PartSet_CoincidentAttr" parameters="ConstraintEntityA"/>
259 </sketch_shape_selector>
261 <doublevalue label="Value" tooltip="Fillet radius" id="ConstraintValue" min="0" default="1" use_reset="false">
262 <validator id="GeomValidators_Positive"/>
264 <validator id="PartSet_FilletSelection"/>
267 <!-- SketchConstraintMirror -->
269 id="SketchConstraintMirror"
270 title="Mirror" icon=":icons/mirror.png"
271 tooltip="Create constraint, mirroring group of objects">
272 <sketch_shape_selector id="ConstraintEntityA"
273 label="Mirror line" tooltip="Select mirror line" shape_types="edge">
274 <validator id="GeomValidators_ShapeType" parameters="line"/>
275 </sketch_shape_selector>
276 <sketch_multi_selector id="ConstraintMirrorList"
278 tooltip="Select list of mirroring objects"
281 <validator id="SketchPlugin_MirrorAttr" />
282 </sketch_multi_selector>
285 <!-- SketchMultiTranslation -->
287 id="SketchMultiTranslation"
288 title="Translation" icon=":icons/translate.png"
289 tooltip="Multiple translation">
290 <sketch_multi_selector id="MultiTranslationList"
292 tooltip="Select list of translating objects"
295 <validator id="SketchPlugin_CopyValidator" />
296 </sketch_multi_selector>
297 <groupbox title="Direction">
298 <sketch-2dpoint_selector
299 id="MultiTranslationStartPoint"
301 tooltip="Start point of translation"/>
302 <sketch-2dpoint_selector
303 id="MultiTranslationEndPoint"
305 tooltip="Final point of translation"/>
307 <integervalue id="MultiTranslationCopies"
308 label="Number of copies"
309 tooltip="Number of copies"
310 default="1" min="1" use_reset="false">
311 <validator id="GeomValidators_Positive"/>
315 <!-- SketchMultiRotation -->
317 id="SketchMultiRotation"
318 title="Rotation" icon=":icons/rotate.png"
319 tooltip="Multiple rotation">
320 <sketch_multi_selector id="MultiRotationList"
322 tooltip="Select list of rotating objects"
325 <validator id="SketchPlugin_CopyValidator" />
326 </sketch_multi_selector>
327 <sketch-2dpoint_selector
328 id="MultiRotationCenter"
329 title="Center of rotation"
330 tooltip="Center of rotation"/>
331 <point2dangle id="MultiRotationAngle"
332 first_point="MultiRotationCenter"
334 icon=":icons/angle.png"
335 tooltip="Rotation angle"
337 <integervalue id="MultiRotationCopies"
338 label="Number of copies"
339 tooltip="Number of copies"
340 default="1" min="1" use_reset="false">
341 <validator id="GeomValidators_Positive"/>