]> SALOME platform Git repositories - modules/shaper.git/blob - src/SketchPlugin/plugin-Sketch.xml
Salome HOME
d1ab44b6c7375624d3904a08117c34ade6a3dac5
[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       <!--icon=":pictures/x_point.png"-->
17       </feature>
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"/>
21       </feature>
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"/>
27       </feature>
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"/>
32         </point2ddistance>
33         <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
34       </feature>
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"/>
41       </feature>
42     </group>
43       
44     <group id="Constraints">
45     <!--  SketchConstraintDistance  -->
46       <feature
47         id="SketchConstraintDistance"
48         title="Distance"
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"
54               label="First object"
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" 
63           label="Second object" 
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"/>
72         
73         <doublevalue_editor label="Value" tooltip="Distance" id="ConstraintValue" default="computed" min="0">
74           <validator id="GeomValidators_Positive"/>
75         </doublevalue_editor>
76         
77         <validator id="PartSet_DistanceSelection"/>
78       </feature>
79       
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"/>
85         </shape_selector>
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"/>
89         </doublevalue_editor>
90         <validator id="PartSet_LengthSelection"/>
91       </feature>
92       
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" 
97             shape_types="edge">
98             <validator id="GeomValidators_ShapeType" parameters="circle"/>
99         </shape_selector>
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="GeomValidators_Positive"/>
103         </doublevalue_editor>
104         <validator id="PartSet_RadiusSelection"/>
105       </feature>
106
107       <!--  SketchConstraintAngle  -->
108       <feature id="SketchConstraintAngle" title="Angle" tooltip="Set fixed angle between two line segments" icon=":icons/angle_constr.png">
109         <shape_selector id="ConstraintEntityA" label="Line" tooltip="Select an line" shape_types="edge" >
110           <validator id="GeomValidators_ShapeType" parameters="line"/>
111           <validator id="PartSet_DifferentObjects"/>
112           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
113         </shape_selector>
114         <shape_selector id="ConstraintEntityB" label="Line" tooltip="Select an line" shape_types="edge" >
115           <validator id="GeomValidators_ShapeType" parameters="line"/>
116           <validator id="PartSet_DifferentObjects"/>
117           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
118         </shape_selector>
119         <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt"  default="computed" internal="1" obligatory="0"/>
120         <doublevalue_editor label="Value" tooltip="Angle" id="ConstraintValue" default="computed" />
121         <validator id="PartSet_AngleSelection"/>
122       </feature>
123
124       <!--  SketchConstraintParallel  -->
125       <feature id="SketchConstraintParallel" title="Parallel" tooltip="Create constraint defining two parallel lines" icon=":icons/parallel.png">
126         <sketch_shape_selector id="ConstraintEntityA" 
127             label="First line" tooltip="Select a line" shape_types="edge">
128           <validator id="GeomValidators_ShapeType" parameters="line"/>
129           <validator id="PartSet_DifferentObjects"/>
130           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
131         </sketch_shape_selector>
132         
133         <sketch_shape_selector id="ConstraintEntityB" label="Second line" tooltip="Select a line" 
134             shape_types="edge">
135             <validator id="GeomValidators_ShapeType" parameters="line"/>
136             <validator id="PartSet_DifferentObjects"/>
137             <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
138         </sketch_shape_selector>
139         <validator id="PartSet_ParallelSelection"/>
140       </feature>
141       
142     <!--  SketchConstraintPerpendicular  -->
143       <feature id="SketchConstraintPerpendicular" title="Perpendicular" 
144         tooltip="Create constraint defining two perpendicular lines" 
145         icon=":icons/perpendicular.png">
146         <sketch_shape_selector id="ConstraintEntityA" 
147             label="First line" tooltip="Select an line" 
148             shape_types="edge">
149           <validator id="PartSet_DifferentObjects"/>
150           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
151             <validator id="GeomValidators_ShapeType" parameters="line"/>
152         </sketch_shape_selector>
153         
154         <sketch_shape_selector id="ConstraintEntityB" 
155             label="Second line" tooltip="Select an line" 
156             shape_types="edge">
157             <validator id="PartSet_DifferentObjects"/>
158           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
159             <validator id="GeomValidators_ShapeType" parameters="line"/>
160         </sketch_shape_selector>
161         <validator id="PartSet_PerpendicularSelection"/>
162       </feature>
163
164       <!--  SketchConstraintCoincedence  -->
165       <feature id="SketchConstraintCoincidence" title="Coincident" tooltip="Create constraint for the coincidence of two points or point on line or circle" icon=":icons/coincedence.png">
166         <sketch_shape_selector id="ConstraintEntityA" label="First object" tooltip="Select a first object" shape_types="vertex edge">
167           <validator id="PartSet_DifferentObjects"/>
168           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
169         </sketch_shape_selector>
170         <sketch_shape_selector id="ConstraintEntityB" label="Second object" tooltip="Select a second object" shape_types="vertex edge">
171           <validator id="PartSet_DifferentObjects"/>
172           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
173           <validator id="SketchPlugin_CoincidenceAttr" parameters="ConstraintEntityA"/>
174         </sketch_shape_selector>
175         <validator id="PartSet_CoincidentSelection"/>
176       </feature>
177
178       <!--  SketchConstraintRigid  -->
179       <feature id="SketchConstraintRigid" title="Fixed" tooltip="Fix an object" icon=":icons/fixed.png">
180         <sketch_shape_selector id="ConstraintEntityA" label="Object"
181                         tooltip="Select point, line end point, line, center of circle or arc."
182                         shape_types="edge vertex">
183           <validator id="GeomValidators_ShapeType" parameters="vertex,line,circle"/>
184           <validator id="SketchPlugin_NotFixed"/>
185         </sketch_shape_selector>
186         <validator id="PartSet_RigidSelection"/>
187       </feature>
188
189       <!--  SketchConstraintHorizontal  -->
190       <feature id="SketchConstraintHorizontal" title="Horizontal" tooltip="Create constraint defining horizontal line" icon=":icons/horisontal.png">
191         <sketch_shape_selector id="ConstraintEntityA" 
192             label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
193             <validator id="GeomValidators_ShapeType" parameters="line"/>
194         </sketch_shape_selector>
195         <validator id="PartSet_HVDirSelection"/>
196       </feature>
197       
198     <!--  SketchConstraintVertical  -->
199       <feature id="SketchConstraintVertical" title="Vertical" tooltip="Create constraint defining vertical line" icon=":icons/vertical.png">
200         <sketch_shape_selector id="ConstraintEntityA" 
201             label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
202             <validator id="GeomValidators_ShapeType" parameters="line"/>
203         </sketch_shape_selector>
204         <validator id="PartSet_HVDirSelection"/>
205       </feature>
206       
207     <!--  SketchConstraintEqual  -->
208       <feature id="SketchConstraintEqual" title="Equal"
209         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"
210         icon=":icons/equal.png">
211         <sketch_shape_selector id="ConstraintEntityA" 
212             label="First object" tooltip="Select line, circle or arc" shape_types="edge">
213           <validator id="PartSet_DifferentObjects"/>
214           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
215         </sketch_shape_selector>
216         
217         <sketch_shape_selector id="ConstraintEntityB"
218             label="Second object" tooltip="Select line, circle or arc" shape_types="edge">
219           <validator id="SketchPlugin_EqualAttr" parameters="ConstraintEntityA"/>
220           <validator id="PartSet_DifferentObjects"/>
221           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
222         </sketch_shape_selector>
223       </feature>
224       
225     <!--  SketchConstraintTangent  -->
226       <feature id="SketchConstraintTangent" title="Tangent" tooltip="Create constraint defining tangency of two objects with common coincident point" icon=":icons/tangent.png">
227         <sketch_shape_selector id="ConstraintEntityA" 
228             label="First object" tooltip="Select line or arc" shape_types="edge">
229           <validator id="PartSet_CoincidentAttr" parameters="ConstraintEntityB"/>
230           <validator id="PartSet_DifferentObjects"/>
231         </sketch_shape_selector>
232         
233         <sketch_shape_selector id="ConstraintEntityB"
234             label="Second object" tooltip="Select line or arc" shape_types="edge">
235           <validator id="PartSet_CoincidentAttr" parameters="ConstraintEntityA"/>
236           <validator id="SketchPlugin_TangentAttr" parameters="ConstraintEntityA"/>
237           <validator id="PartSet_DifferentObjects"/>
238         </sketch_shape_selector>
239         <validator id="PartSet_TangentSelection"/>
240       </feature>
241          
242     </group>
243     
244     <group id="Edit">
245       <!--  SketchConstraintFillet  -->
246       <feature id="SketchConstraintFillet" title="Fillet" tooltip="Create constraint defining fillet between two objects" icon=":icons/fillet.png">
247         <sketch_shape_selector id="ConstraintEntityA" 
248             label="First object" tooltip="Select line or arc" shape_types="edge">
249           <validator id="PartSet_DifferentObjects"/>
250           <validator id="PartSet_CoincidentAttr" parameters="ConstraintEntityB"/>
251         </sketch_shape_selector>
252
253         <sketch_shape_selector id="ConstraintEntityB"
254             label="Second object" tooltip="Select line or arc" shape_types="edge">
255           <validator id="PartSet_DifferentObjects"/>
256           <validator id="PartSet_CoincidentAttr" parameters="ConstraintEntityA"/>
257         </sketch_shape_selector>
258
259         <doublevalue label="Value" tooltip="Fillet radius" id="ConstraintValue" min="0" default="1" use_reset="false">
260           <validator id="GeomValidators_Positive"/>
261         </doublevalue>
262         <validator id="PartSet_FilletSelection"/>
263       </feature>
264       
265       <!--  SketchConstraintMirror  -->
266       <feature
267         id="SketchConstraintMirror"
268         title="Mirror" icon=":icons/mirror.png"
269         tooltip="Create constraint, mirroring group of objects">
270         <sketch_shape_selector id="ConstraintEntityA"
271             label="Mirror line" tooltip="Select mirror line" shape_types="edge">
272             <validator id="GeomValidators_ShapeType" parameters="line"/>
273         </sketch_shape_selector>
274         <sketch_multi_selector id="ConstraintMirrorList"
275             label="Segments:"
276             tooltip="Select list of mirroring objects"
277             type_choice="Edges"
278             use_external="true">
279             <validator id="SketchPlugin_MirrorAttr" />
280         </sketch_multi_selector>
281       </feature>
282       
283       <!--  SketchMultiTranslation  -->
284       <feature
285         id="SketchMultiTranslation"
286         title="Translation" icon=":icons/translate.png"
287         tooltip="Multiple translation">
288         <sketch_multi_selector id="MultiTranslationList"
289             label="Segments:"
290             tooltip="Select list of translating objects"
291             type_choice="Edges"
292             use_external="true">
293           <validator id="SketchPlugin_CopyValidator" />
294         </sketch_multi_selector>
295         <groupbox title="Direction">
296           <sketch-2dpoint_selector
297               id="MultiTranslationStartPoint"
298               title="Start point"
299               tooltip="Start point of translation"/>
300           <sketch-2dpoint_selector
301               id="MultiTranslationEndPoint"
302               title="End point"
303               tooltip="Final point of translation"/>
304         </groupbox>
305         <integervalue id="MultiTranslationCopies"
306             label="Number of copies"
307             tooltip="Number of copies" 
308             default="1" min="1" use_reset="false">
309           <validator id="GeomValidators_Positive"/>
310         </integervalue>
311       </feature>
312       
313       <!--  SketchMultiRotation  -->
314       <feature
315         id="SketchMultiRotation"
316         title="Rotation" icon=":icons/rotate.png"
317         tooltip="Multiple rotation">
318         <sketch_multi_selector id="MultiRotationList"
319             label="Segments:"
320             tooltip="Select list of rotating objects"
321             type_choice="Edges"
322             use_external="true">
323           <validator id="SketchPlugin_CopyValidator" />
324         </sketch_multi_selector>
325         <sketch-2dpoint_selector
326             id="MultiRotationCenter"
327             title="Center of rotation"
328             tooltip="Center of rotation"/>
329         <point2dangle id="MultiRotationAngle"
330                          first_point="MultiRotationCenter"
331                          label="Angle"
332                          icon=":icons/angle.png"
333                          tooltip="Rotation angle"
334                          default="90"/>
335         <integervalue id="MultiRotationCopies"
336             label="Number of copies"
337             tooltip="Number of copies" 
338             default="1" min="1" use_reset="false">
339           <validator id="GeomValidators_Positive"/>
340         </integervalue>
341       </feature>
342     </group>
343   </workbench>
344 </plugin>