]> SALOME platform Git repositories - modules/shaper.git/blob - src/SketchPlugin/plugin-Sketch.xml
Salome HOME
e728cf7cc7d982755e524c961e0aa119050888b5
[modules/shaper.git] / src / SketchPlugin / plugin-Sketch.xml
1 <!-- Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 <plugin>
4   <workbench id="Sketch">
5     <group id="Basic">
6       <feature
7         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"
10         title="Sketch"
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"/>
15         </sketch-start-label>
16         <error_label id="SolverError"/>
17         <validator id="SketchPlugin_SolverErrorValidator"/>
18       <!--icon=":pictures/x_point.png"-->
19       </feature>
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"/>
23       </feature>
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"/>
29       </feature>
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"/>
34         </point2ddistance>
35         <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
36       </feature>
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"/>
43       </feature>
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" min="0" default="1" use_reset="false">
51           <validator id="GeomValidators_Positive"/>
52         </doublevalue>
53       </feature>
54     </group>
55       
56     <group id="Constraints">
57     <!--  SketchConstraintDistance  -->
58       <feature
59         id="SketchConstraintDistance"
60         title="Distance"
61         tooltip="Set fixed distance from a point to an object"
62         icon=":icons/distance.png">
63         <label title="Select objects for distance definition. Following objects can be accepted: point, line or arc end point, center of circle or arc."/>
64         <sketch_shape_selector
65               id="ConstraintEntityA"
66               label="First object"
67               tooltip="Select point, line end point, line, center of circle or arc."
68               shape_types="edge vertex">
69           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
70           <validator id="PartSet_DifferentObjects"/>
71           <validator id="GeomValidators_ShapeType" parameters="vertex,line"/>
72         </sketch_shape_selector>
73         <sketch_shape_selector 
74           id="ConstraintEntityB" 
75           label="Second object" 
76           tooltip="Select point, line end point, line, center of circle or arc." 
77           shape_types="edge vertex">
78           <validator id="PartSet_DifferentObjects"/>
79           <validator id="SketchPlugin_DistanceAttr" parameters="ConstraintEntityA"/>
80           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
81           <validator id="GeomValidators_ShapeType" parameters="vertex,line"/>
82         </sketch_shape_selector>
83         <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt"  default="computed" internal="1" obligatory="0"/>
84         
85         <doublevalue_editor label="Value" tooltip="Distance" id="ConstraintValue" default="computed" min="0">
86           <validator id="GeomValidators_Positive"/>
87         </doublevalue_editor>
88         
89         <validator id="PartSet_DistanceSelection"/>
90       </feature>
91       
92     <!--  SketchConstraintLength  -->      
93       <feature id="SketchConstraintLength" title="Length" tooltip="Set fixed length of a line segment" icon=":icons/length.png">
94         <label title="Select a line on which to calculate length" tooltip="Select a line on which to calculate length"/>
95         <shape_selector id="ConstraintEntityA" label="Line" tooltip="Select an line" shape_types="edge" >
96           <validator id="GeomValidators_ShapeType" parameters="line"/>
97         </shape_selector>
98         <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
99         <doublevalue_editor label="Value" tooltip="Length" id="ConstraintValue" default="computed">
100           <validator id="GeomValidators_Positive"/>
101         </doublevalue_editor>
102         <validator id="PartSet_LengthSelection"/>
103       </feature>
104       
105     <!--  SketchConstraintRadius  -->
106       <feature id="SketchConstraintRadius" title="Radius" tooltip="Set fixed radius of a circle or an arc" icon=":icons/radius_constr.png">
107         <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"/>
108         <shape_selector id="ConstraintEntityA" label="Circle or Arc" tooltip="Select a circle or an arc" 
109             shape_types="edge">
110             <validator id="GeomValidators_ShapeType" parameters="circle"/>
111         </shape_selector>
112         <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt"  default="computed" internal="1" obligatory="0"/>
113         <doublevalue_editor label="Value" tooltip="Radius" id="ConstraintValue" default="computed">
114           <validator id="GeomValidators_Positive"/>
115         </doublevalue_editor>
116         <validator id="PartSet_RadiusSelection"/>
117       </feature>
118
119       <!--  SketchConstraintAngle  -->
120       <feature id="SketchConstraintAngle" title="Angle" tooltip="Set fixed angle between two line segments" icon=":icons/angle_constr.png">
121         <shape_selector id="ConstraintEntityA" label="Line 1" tooltip="Select an line" shape_types="edge" >
122           <validator id="GeomValidators_ShapeType" parameters="line"/>
123           <validator id="PartSet_DifferentObjects"/>
124           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
125         </shape_selector>
126         <shape_selector id="ConstraintEntityB" label="Line 2" tooltip="Select an line" shape_types="edge" >
127           <validator id="GeomValidators_ShapeType" parameters="line"/>
128           <validator id="PartSet_DifferentObjects"/>
129           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
130         </shape_selector>
131         <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt"  default="computed" internal="1" obligatory="0"/>
132         <doublevalue_editor label="Value" tooltip="Angle" id="ConstraintValue" default="computed" min="0" max="180" />
133         <validator id="PartSet_AngleSelection"/>
134       </feature>
135
136       <!--  SketchConstraintParallel  -->
137       <feature id="SketchConstraintParallel" title="Parallel" tooltip="Create constraint defining two parallel lines" icon=":icons/parallel.png">
138         <sketch_shape_selector id="ConstraintEntityA" 
139             label="First line" tooltip="Select a line" shape_types="edge">
140           <validator id="GeomValidators_ShapeType" parameters="line"/>
141           <validator id="PartSet_DifferentObjects"/>
142           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
143         </sketch_shape_selector>
144         
145         <sketch_shape_selector id="ConstraintEntityB" label="Second line" tooltip="Select a line" 
146             shape_types="edge">
147             <validator id="GeomValidators_ShapeType" parameters="line"/>
148             <validator id="PartSet_DifferentObjects"/>
149             <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
150         </sketch_shape_selector>
151         <validator id="PartSet_ParallelSelection"/>
152       </feature>
153       
154     <!--  SketchConstraintPerpendicular  -->
155       <feature id="SketchConstraintPerpendicular" title="Perpendicular" 
156         tooltip="Create constraint defining two perpendicular lines" 
157         icon=":icons/perpendicular.png">
158         <sketch_shape_selector id="ConstraintEntityA" 
159             label="First line" tooltip="Select an line" 
160             shape_types="edge">
161           <validator id="PartSet_DifferentObjects"/>
162           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
163             <validator id="GeomValidators_ShapeType" parameters="line"/>
164         </sketch_shape_selector>
165         
166         <sketch_shape_selector id="ConstraintEntityB" 
167             label="Second line" tooltip="Select an line" 
168             shape_types="edge">
169             <validator id="PartSet_DifferentObjects"/>
170           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
171             <validator id="GeomValidators_ShapeType" parameters="line"/>
172         </sketch_shape_selector>
173         <validator id="PartSet_PerpendicularSelection"/>
174       </feature>
175
176       <!--  SketchConstraintCoincedence  -->
177       <feature id="SketchConstraintCoincidence" title="Coincident" tooltip="Create constraint for the coincidence of two points or point on line or circle" icon=":icons/coincedence.png">
178         <sketch_shape_selector id="ConstraintEntityA" label="First object" tooltip="Select a first object" shape_types="vertex edge">
179           <validator id="PartSet_DifferentObjects"/>
180           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
181         </sketch_shape_selector>
182         <sketch_shape_selector id="ConstraintEntityB" label="Second object" tooltip="Select a second object" shape_types="vertex edge">
183           <validator id="PartSet_DifferentObjects"/>
184           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
185           <validator id="SketchPlugin_CoincidenceAttr" parameters="ConstraintEntityA"/>
186         </sketch_shape_selector>
187         <validator id="PartSet_CoincidentSelection"/>
188       </feature>
189
190       <!--  SketchConstraintRigid  -->
191       <feature id="SketchConstraintRigid" title="Fixed" tooltip="Fix an object" icon=":icons/fixed.png">
192         <sketch_shape_selector id="ConstraintEntityA" label="Object"
193                         tooltip="Select point, line end point, line, center of circle or arc."
194                         shape_types="edge vertex">
195           <validator id="GeomValidators_ShapeType" parameters="vertex,line,circle"/>
196           <validator id="SketchPlugin_NotFixed"/>
197         </sketch_shape_selector>
198         <validator id="PartSet_RigidSelection"/>
199       </feature>
200
201       <!--  SketchConstraintHorizontal  -->
202       <feature id="SketchConstraintHorizontal" title="Horizontal" tooltip="Create constraint defining horizontal line" icon=":icons/horisontal.png">
203         <sketch_shape_selector id="ConstraintEntityA" 
204             label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
205             <validator id="GeomValidators_ShapeType" parameters="line"/>
206         </sketch_shape_selector>
207         <validator id="PartSet_HVDirSelection"/>
208       </feature>
209       
210     <!--  SketchConstraintVertical  -->
211       <feature id="SketchConstraintVertical" title="Vertical" tooltip="Create constraint defining vertical line" icon=":icons/vertical.png">
212         <sketch_shape_selector id="ConstraintEntityA" 
213             label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
214             <validator id="GeomValidators_ShapeType" parameters="line"/>
215         </sketch_shape_selector>
216         <validator id="PartSet_HVDirSelection"/>
217       </feature>
218       
219     <!--  SketchConstraintEqual  -->
220       <feature id="SketchConstraintEqual" title="Equal"
221         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"
222         icon=":icons/equal.png">
223         <sketch_shape_selector id="ConstraintEntityA" 
224             label="First object" tooltip="Select line, circle or arc" shape_types="edge">
225           <validator id="PartSet_DifferentObjects"/>
226           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
227         </sketch_shape_selector>
228         
229         <sketch_shape_selector id="ConstraintEntityB"
230             label="Second object" tooltip="Select line, circle or arc" shape_types="edge">
231           <validator id="SketchPlugin_EqualAttr" parameters="ConstraintEntityA"/>
232           <validator id="PartSet_DifferentObjects"/>
233           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
234         </sketch_shape_selector>
235         <validator id="PartSet_EqualSelection"/>
236       </feature>
237       
238     <!--  SketchConstraintTangent  -->
239       <feature id="SketchConstraintTangent" title="Tangent" tooltip="Create constraint defining tangency of two objects with common coincident point" icon=":icons/tangent.png">
240         <sketch_shape_selector id="ConstraintEntityA" 
241             label="First object" tooltip="Select line or arc" shape_types="edge">
242           <validator id="PartSet_CoincidentAttr" parameters="ConstraintEntityB"/>
243           <validator id="PartSet_DifferentObjects"/>
244         </sketch_shape_selector>
245         
246         <sketch_shape_selector id="ConstraintEntityB"
247             label="Second object" tooltip="Select line or arc" shape_types="edge">
248           <validator id="PartSet_CoincidentAttr" parameters="ConstraintEntityA"/>
249           <validator id="SketchPlugin_TangentAttr" parameters="ConstraintEntityA"/>
250           <validator id="PartSet_DifferentObjects"/>
251         </sketch_shape_selector>
252         <validator id="PartSet_TangentSelection"/>
253       </feature>
254          
255     </group>
256     
257     <group id="Edit">
258       <!--  SketchConstraintMirror  -->
259       <feature
260         id="SketchConstraintMirror"
261         title="Mirror" icon=":icons/mirror.png"
262         tooltip="Create constraint, mirroring group of objects">
263         <sketch_shape_selector id="ConstraintEntityA"
264             label="Mirror line" tooltip="Select mirror line" shape_types="edge">
265             <validator id="GeomValidators_ShapeType" parameters="line"/>
266         </sketch_shape_selector>
267         <sketch_multi_selector id="ConstraintMirrorList"
268             label="Segments:"
269             tooltip="Select list of mirroring objects"
270             type_choice="Edges"
271             use_external="true">
272             <validator id="SketchPlugin_MirrorAttr" />
273         </sketch_multi_selector>
274       </feature>
275       
276       <!--  SketchMultiTranslation  -->
277       <feature
278         id="SketchMultiTranslation"
279         title="Translation" icon=":icons/translate.png"
280         tooltip="Multiple translation">
281         <sketch_multi_selector id="MultiTranslationList"
282             label="Segments:"
283             tooltip="Select list of translating objects"
284             type_choice="Edges"
285             use_external="true">
286           <validator id="SketchPlugin_CopyValidator" />
287         </sketch_multi_selector>
288         <toolbox id="ValueType">
289           <box id="SingleValue" title="Single value" icon=":icons/translate_32x32.png">
290             <groupbox title="Direction">
291               <sketch-2dpoint_selector
292                   id="MultiTranslationStartPoint"
293                   title="Start point"
294                   tooltip="Start point of translation"/>
295               <sketch-2dpoint_selector
296                   id="MultiTranslationEndPoint"
297                   title="End point"
298                   tooltip="Final point of translation"/>
299             </groupbox>
300           </box>
301           <box id="FullValue" title="Full value" icon=":icons/translate_full_32x32.png">
302             <groupbox title="Direction">
303               <sketch-2dpoint_selector
304                   id="MultiTranslationStartPoint"
305                   title="Start point"
306                   tooltip="Start point of translation"/>
307               <sketch-2dpoint_selector
308                   id="MultiTranslationFullEndPoint"
309                   title="End point"
310                   tooltip="Final point of translation"/>
311             </groupbox>
312           </box>
313         </toolbox>
314         <integervalue id="MultiTranslationObjects"
315             label="Total number of objects"
316             tooltip="Total number of objects" 
317             default="2" min="2" use_reset="false">
318           <validator id="GeomValidators_Positive"/>
319         </integervalue>
320       </feature>
321       
322       <!--  SketchMultiRotation  -->
323       <feature
324         id="SketchMultiRotation"
325         title="Rotation" icon=":icons/rotate.png"
326         tooltip="Multiple rotation">
327         <sketch_multi_selector id="MultiRotationList"
328             label="Segments:"
329             tooltip="Select list of rotating objects"
330             type_choice="Edges"
331             use_external="true">
332           <validator id="SketchPlugin_CopyValidator" />
333         </sketch_multi_selector>
334         <sketch-2dpoint_selector
335             id="MultiRotationCenter"
336             title="Center of rotation"
337             tooltip="Center of rotation"
338             default="0"/>
339         <toolbox id="AngleType">
340           <box id="SingleAngle" title="Single angle" icon=":icons/angle_up_32x32.png">
341             <point2dangle id="MultiRotationAngle"
342                          first_point="MultiRotationCenter"
343                          label="Angle"
344                          icon=":icons/angle.png"
345                          tooltip="Rotation angle"
346                          default="90"/>
347           </box>
348           <box id="FullAngle" title="Full angle" icon=":icons/angle_up_full_32x32.png">
349             <point2dangle id="MultiRotationFullAngle"
350                          first_point="MultiRotationCenter"
351                          label="Full angle"
352                          icon=":icons/angle.png"
353                          tooltip="Rotation angle"/>
354           </box>
355         </toolbox>
356         <integervalue id="MultiRotationObjects"
357             label="Total number of objects"
358             tooltip="Total number of objects" 
359             default="2" min="2" use_reset="false">
360           <validator id="GeomValidators_Positive"/>
361         </integervalue>
362       </feature>
363     </group>
364   </workbench>
365 </plugin>