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 <!--icon=":pictures/x_point.png"-->
18 <feature id="SketchPoint" title="Point" tooltip="Create point" icon=":icons/point.png">
19 <sketch-2dpoint_selector id="PointCoordindates" title="Point" tooltip="Point coordinates"/>
20 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
22 <feature id="SketchLine" title="Line" tooltip="Create line" icon=":icons/line.png">
23 <sketch-2dpoint_selector id="StartPoint" title="Start point" tooltip="Start point coordinates" previous_feature_param="EndPoint"/>
24 <sketch-2dpoint_selector id="EndPoint" title="End point" tooltip="End point coordinates"/>
25 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
26 <validator id="GeomValidators_Different" parameters="StartPoint,EndPoint"/>
28 <feature id="SketchCircle" title="Circle" tooltip="Create circle" icon=":icons/circle.png">
29 <sketch-2dpoint_selector id="CircleCenter" title="Center" tooltip="Center coordinates"/>
30 <point2ddistance id="CircleRadius" first_point="CircleCenter" label="Radius:" min="0" step="1.0" default="0" icon=":icons/radius.png" tooltip="Set radius">
31 <validator id="GeomValidators_Positive"/>
33 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
35 <feature id="SketchArc" title="Arc" tooltip="Create arc" icon=":icons/arc.png">
36 <sketch-2dpoint_selector id="ArcCenter" title="Center" tooltip="Center of a circle"/>
37 <sketch-2dpoint_selector id="ArcStartPoint" title="Start point" tooltip="Start point"/>
38 <sketch-2dpoint_selector id="ArcEndPoint" title="End point" tooltip="End point"/>
39 <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
40 <validator id="GeomValidators_Different" parameters="ArcCenter,ArcStartPoint,ArcEndPoint"/>
44 <group id="Constraints">
45 <!-- SketchConstraintDistance -->
47 id="SketchConstraintDistance"
49 tooltip="Set fixed distance from a point to an object"
50 icon=":icons/distance.png">
51 <label title="Select objects for distance definition. Following objects can be accepted: point, line or arc end point, center of circle or arc."/>
52 <sketch_shape_selector
53 id="ConstraintEntityA"
55 tooltip="Select point, line end point, line, center of circle or arc."
56 shape_types="edge vertex">
57 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
58 <validator id="PartSet_DifferentObjects"/>
59 <validator id="GeomValidators_ShapeType" parameters="vertex,line"/>
60 </sketch_shape_selector>
61 <sketch_shape_selector
62 id="ConstraintEntityB"
64 tooltip="Select point, line end point, line, center of circle or arc."
65 shape_types="edge vertex">
66 <validator id="PartSet_DifferentObjects"/>
67 <validator id="SketchPlugin_DistanceAttr" parameters="ConstraintEntityA"/>
68 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
69 <validator id="GeomValidators_ShapeType" parameters="vertex,line"/>
70 </sketch_shape_selector>
71 <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
73 <doublevalue_editor label="Value" tooltip="Distance" id="ConstraintValue" default="computed" min="0">
74 <validator id="GeomValidators_Positive"/>
77 <validator id="PartSet_DistanceSelection"/>
80 <!-- SketchConstraintLength -->
81 <feature id="SketchConstraintLength" title="Length" tooltip="Set fixed length of a line segment" icon=":icons/length.png">
82 <label title="Select a line on which to calculate length" tooltip="Select a line on which to calculate length"/>
83 <shape_selector id="ConstraintEntityA" label="Line" tooltip="Select an line" shape_types="edge" >
84 <validator id="GeomValidators_ShapeType" parameters="line"/>
86 <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
87 <doublevalue_editor label="Value" tooltip="Length" id="ConstraintValue" default="computed">
88 <validator id="GeomValidators_Positive"/>
90 <validator id="PartSet_LengthSelection"/>
93 <!-- SketchConstraintRadius -->
94 <feature id="SketchConstraintRadius" title="Radius" tooltip="Set fixed radius of a circle or an arc" icon=":icons/radius_constr.png">
95 <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"/>
96 <shape_selector id="ConstraintEntityA" label="Circle or Arc" tooltip="Select a circle or an arc"
98 <validator id="GeomValidators_ShapeType" parameters="circle"/>
100 <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
101 <doublevalue_editor label="Value" tooltip="Radius" id="ConstraintValue" default="computed"/>
102 <validator id="PartSet_RadiusSelection"/>
105 <!-- SketchConstraintParallel -->
106 <feature id="SketchConstraintParallel" title="Parallel" tooltip="Create constraint defining two parallel lines" icon=":icons/parallel.png">
107 <sketch_shape_selector id="ConstraintEntityA"
108 label="First line" tooltip="Select a line" shape_types="edge">
109 <validator id="GeomValidators_ShapeType" parameters="line"/>
110 <validator id="PartSet_DifferentObjects"/>
111 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
112 </sketch_shape_selector>
114 <sketch_shape_selector id="ConstraintEntityB" label="Second line" tooltip="Select a line"
116 <validator id="GeomValidators_ShapeType" parameters="line"/>
117 <validator id="PartSet_DifferentObjects"/>
118 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
119 </sketch_shape_selector>
120 <validator id="PartSet_ParallelSelection"/>
123 <!-- SketchConstraintPerpendicular -->
124 <feature id="SketchConstraintPerpendicular" title="Perpendicular"
125 tooltip="Create constraint defining two perpendicular lines"
126 icon=":icons/perpendicular.png">
127 <sketch_shape_selector id="ConstraintEntityA"
128 label="First line" tooltip="Select an line"
130 <validator id="PartSet_DifferentObjects"/>
131 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
132 <validator id="GeomValidators_ShapeType" parameters="line"/>
133 </sketch_shape_selector>
135 <sketch_shape_selector id="ConstraintEntityB"
136 label="Second line" tooltip="Select an line"
138 <validator id="PartSet_DifferentObjects"/>
139 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
140 <validator id="GeomValidators_ShapeType" parameters="line"/>
141 </sketch_shape_selector>
142 <validator id="PartSet_PerpendicularSelection"/>
145 <!-- SketchConstraintCoincedence -->
146 <feature id="SketchConstraintCoincidence" title="Coincident" tooltip="Create constraint for the coincidence of two points or point on line or circle" icon=":icons/coincedence.png">
147 <sketch_shape_selector id="ConstraintEntityA" label="First object" tooltip="Select a first object" shape_types="vertex edge">
148 <validator id="PartSet_DifferentObjects"/>
149 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
150 </sketch_shape_selector>
151 <sketch_shape_selector id="ConstraintEntityB" label="Second object" tooltip="Select a second object" shape_types="vertex edge">
152 <validator id="PartSet_DifferentObjects"/>
153 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
154 <validator id="SketchPlugin_CoincidenceAttr" parameters="ConstraintEntityA"/>
155 </sketch_shape_selector>
156 <validator id="PartSet_CoincidentSelection"/>
159 <!-- SketchConstraintRigid -->
160 <feature id="SketchConstraintRigid" title="Fixed" tooltip="Fix an object" icon=":icons/fixed.png">
161 <sketch_shape_selector id="ConstraintEntityA" label="Object"
162 tooltip="Select point, line end point, line, center of circle or arc."
163 shape_types="edge vertex">
164 <validator id="GeomValidators_ShapeType" parameters="vertex,line,circle"/>
165 <validator id="SketchPlugin_NotFixed"/>
166 </sketch_shape_selector>
167 <validator id="PartSet_RigidSelection"/>
170 <!-- SketchConstraintHorizontal -->
171 <feature id="SketchConstraintHorizontal" title="Horizontal" tooltip="Create constraint defining horizontal line" icon=":icons/horisontal.png">
172 <sketch_shape_selector id="ConstraintEntityA"
173 label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
174 <validator id="GeomValidators_ShapeType" parameters="line"/>
175 </sketch_shape_selector>
176 <validator id="PartSet_HVDirSelection"/>
179 <!-- SketchConstraintVertical -->
180 <feature id="SketchConstraintVertical" title="Vertical" tooltip="Create constraint defining vertical line" icon=":icons/vertical.png">
181 <sketch_shape_selector id="ConstraintEntityA"
182 label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
183 <validator id="GeomValidators_ShapeType" parameters="line"/>
184 </sketch_shape_selector>
185 <validator id="PartSet_HVDirSelection"/>
188 <!-- SketchConstraintEqual -->
189 <feature id="SketchConstraintEqual" title="Equal"
190 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"
191 icon=":icons/equal.png">
192 <sketch_shape_selector id="ConstraintEntityA"
193 label="First object" tooltip="Select line, circle or arc" shape_types="edge">
194 <validator id="PartSet_DifferentObjects"/>
195 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
196 </sketch_shape_selector>
198 <sketch_shape_selector id="ConstraintEntityB"
199 label="Second object" tooltip="Select line, circle or arc" shape_types="edge">
200 <validator id="SketchPlugin_EqualAttr" parameters="ConstraintEntityA"/>
201 <validator id="PartSet_DifferentObjects"/>
202 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
203 </sketch_shape_selector>
206 <!-- SketchConstraintTangent -->
207 <feature id="SketchConstraintTangent" title="Tangent" tooltip="Create constraint defining tangency of two objects" icon=":icons/tangent.png">
208 <sketch_shape_selector id="ConstraintEntityA"
209 label="First object" tooltip="Select line or arc" shape_types="edge">
210 <validator id="PartSet_CoincidentAttr" parameters="ConstraintEntityB"/>
211 <validator id="PartSet_DifferentObjects"/>
212 </sketch_shape_selector>
214 <sketch_shape_selector id="ConstraintEntityB"
215 label="Second object" tooltip="Select line or arc" shape_types="edge">
216 <validator id="PartSet_CoincidentAttr" parameters="ConstraintEntityA"/>
217 <validator id="SketchPlugin_TangentAttr" parameters="ConstraintEntityA"/>
218 <validator id="PartSet_DifferentObjects"/>
219 </sketch_shape_selector>
220 <validator id="PartSet_TangentSelection"/>
224 <!-- SketchConstraintAngle -->
225 <feature id="SketchConstraintAngle" title="Angle" tooltip="Set fixed angle between two line segments">
226 <shape_selector id="ConstraintEntityA" label="Line" tooltip="Select an line" shape_types="edge" >
227 <validator id="GeomValidators_ShapeType" parameters="line"/>
228 <validator id="PartSet_DifferentObjects"/>
229 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
231 <shape_selector id="ConstraintEntityB" label="Line" tooltip="Select an line" shape_types="edge" >
232 <validator id="GeomValidators_ShapeType" parameters="line"/>
233 <validator id="PartSet_DifferentObjects"/>
234 <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
236 <doublevalue_editor label="Value" tooltip="Angle" id="ConstraintValue" default="computed" />
237 <validator id="PartSet_AngleSelection"/>
244 <!-- SketchConstraintFillet -->
245 <feature id="SketchConstraintFillet" title="Fillet" tooltip="Create constraint defining fillet between two objects" icon=":icons/fillet.png">
246 <sketch_shape_selector id="ConstraintEntityA"
247 label="First object" tooltip="Select line or arc" shape_types="edge">
248 <validator id="PartSet_DifferentObjects"/>
249 <validator id="PartSet_CoincidentAttr" parameters="ConstraintEntityB"/>
250 </sketch_shape_selector>
252 <sketch_shape_selector id="ConstraintEntityB"
253 label="Second object" tooltip="Select line or arc" shape_types="edge">
254 <validator id="PartSet_DifferentObjects"/>
255 <validator id="PartSet_CoincidentAttr" parameters="ConstraintEntityA"/>
256 </sketch_shape_selector>
258 <doublevalue label="Value" tooltip="Fillet radius" id="ConstraintValue" min="0" default="1" use_reset="false">
259 <validator id="GeomValidators_Positive"/>
261 <validator id="PartSet_FilletSelection"/>
264 <!-- SketchConstraintMirror -->
266 id="SketchConstraintMirror"
267 title="Mirror" icon=":icons/mirror.png"
268 tooltip="Create constraint, mirroring group of objects">
269 <sketch_shape_selector id="ConstraintEntityA"
270 label="Mirror line" tooltip="Select mirror line" shape_types="edge">
271 <validator id="GeomValidators_ShapeType" parameters="line"/>
272 </sketch_shape_selector>
273 <sketch_multi_selector id="ConstraintMirrorList"
275 tooltip="Select list of mirroring objects"
278 <validator id="SketchPlugin_MirrorAttr" />
279 </sketch_multi_selector>
282 <!-- SketchMultiTranslation -->
284 id="SketchMultiTranslation"
285 title="Translation" icon=":icons/translate.png"
286 tooltip="Multiple translation">
287 <sketch_multi_selector id="MultiTranslationList"
289 tooltip="Select list of translating objects"
292 <validator id="SketchPlugin_CopyValidator" />
293 </sketch_multi_selector>
294 <groupbox title="Direction">
295 <sketch-2dpoint_selector
296 id="MultiTranslationStartPoint"
298 tooltip="Start point of translation"/>
299 <sketch-2dpoint_selector
300 id="MultiTranslationEndPoint"
302 tooltip="Final point of translation"/>
304 <integervalue id="MultiTranslationCopies"
305 label="Number of copies"
306 tooltip="Number of copies"
307 default="1" min="1" use_reset="false">
308 <validator id="GeomValidators_Positive"/>
312 <!-- SketchMultiRotation -->
314 id="SketchMultiRotation"
315 title="Rotation" icon=":icons/rotate.png"
316 tooltip="Multiple rotation">
317 <sketch_multi_selector id="MultiRotationList"
319 tooltip="Select list of rotating objects"
322 <validator id="SketchPlugin_CopyValidator" />
323 </sketch_multi_selector>
324 <sketch-2dpoint_selector
325 id="MultiRotationCenter"
326 title="Center of rotation"
327 tooltip="Center of rotation"/>
328 <point2dangle id="MultiRotationAngle"
329 first_point="MultiRotationCenter"
331 icon=":icons/angle.png"
332 tooltip="Rotation angle"
334 <integervalue id="MultiRotationCopies"
335 label="Number of copies"
336 tooltip="Number of copies"
337 default="1" min="1" use_reset="false">
338 <validator id="GeomValidators_Positive"/>