]> SALOME platform Git repositories - modules/shaper.git/blob - src/SketchPlugin/plugin-Sketch.xml
Salome HOME
8fe582a60b816534580f73e40f225606755c4a8d
[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 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       </feature>
27       <feature id="SketchCircle" title="Circle" tooltip="Create circle" icon=":icons/circle.png">
28         <sketch-2dpoint_selector id="CircleCenter" title="Center" tooltip="Center coordinates"/>
29         <point2ddistance id="CircleRadius" first_point="CircleCenter" label="Radius:" min="0" step="1.0" default="0" icon=":icons/radius.png" tooltip="Set radius">
30           <validator id="GeomValidators_Positive"/>
31         </point2ddistance>
32         <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
33       </feature>
34       <feature id="SketchArc" title="Arc" tooltip="Create arc" icon=":icons/arc.png">
35         <sketch-2dpoint_selector id="ArcCenter" title="Center" tooltip="Center of a circle"/>
36         <sketch-2dpoint_selector id="ArcStartPoint" title="Start point" tooltip="Start point"/>
37         <sketch-2dpoint_selector id="ArcEndPoint" title="End point" tooltip="End point"/>
38         <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
39       </feature>
40     </group>
41       
42     <group id="Constraints">
43     <!--  SketchConstraintDistance  -->
44       <feature
45         id="SketchConstraintDistance"
46         title="Distance"
47         tooltip="Set fixed distance from a point to an object"
48         icon=":icons/distance.png">
49         <label title="Select objects for distance definition. Following objects can be accepted: point, line or arc end point, center of circle or arc."/>
50         <sketch_shape_selector
51               id="ConstraintEntityA"
52               label="First object"
53               tooltip="Select point, line end point, line, center of circle or arc."
54               shape_types="edge vertex">
55           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
56           <validator id="PartSet_DifferentObjects"/>
57           <validator id="GeomValidators_EdgeOrVertex"/>
58         </sketch_shape_selector>/>
59         <sketch_shape_selector 
60           id="ConstraintEntityB" 
61           label="Second object" 
62           tooltip="Select point, line end point, line, center of circle or arc." 
63           shape_types="edge vertex">
64           <validator id="PartSet_DifferentObjects"/>
65           <validator id="SketchPlugin_DistanceAttr" parameters="ConstraintEntityA"/>
66           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
67           <validator id="GeomValidators_EdgeOrVertex"/>
68         </sketch_shape_selector>
69         <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt"  default="computed" internal="1" obligatory="0"/>
70         
71         <doublevalue_editor label="Value" tooltip="Distance" id="ConstraintValue" default="computed" min="0">
72           <validator id="GeomValidators_Positive"/>
73         </doublevalue_editor>
74         
75         <validator id="PartSet_DistanceSelection"/>
76       </feature>
77       
78     <!--  SketchConstraintLength  -->      
79       <feature id="SketchConstraintLength" title="Length" tooltip="Set fixed length of a line segment" icon=":icons/length.png">
80         <label title="Select a line on which to calculate length" tooltip="Select a line on which to calculate length"/>
81         <shape_selector id="ConstraintEntityA" label="Line" tooltip="Select an line" 
82             shape_types="edge" >
83         <validator id="GeomValidators_Edge" parameters="line"/>
84     </shape_selector>
85         <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
86         <doublevalue_editor label="Value" tooltip="Length" id="ConstraintValue" default="computed">
87           <validator id="GeomValidators_Positive"/>
88         </doublevalue_editor>
89         <validator id="PartSet_LengthSelection"/>
90       </feature>
91       
92     <!--  SketchConstraintRadius  -->
93       <feature id="SketchConstraintRadius" title="Radius" tooltip="Set fixed radius of a circle or an arc" icon=":icons/radius_constr.png">
94         <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"/>
95         <shape_selector id="ConstraintEntityA" label="Circle or Arc" tooltip="Select a circle or an arc" 
96             shape_types="edge">
97             <validator id="GeomValidators_Edge" parameters="circle"/>
98         </shape_selector>
99         <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt"  default="computed" internal="1" obligatory="0"/>
100         <doublevalue_editor label="Value" tooltip="Radius" id="ConstraintValue" default="computed"/>
101         <validator id="PartSet_RadiusSelection"/>
102       </feature>
103       
104     <!--  SketchConstraintParallel  -->
105       <feature id="SketchConstraintParallel" title="Parallel" tooltip="Create constraint defining two parallel lines" icon=":icons/parallel.png">
106         <sketch_shape_selector id="ConstraintEntityA" 
107             label="First line" tooltip="Select a line" shape_types="edge">
108           <validator id="GeomValidators_Edge" parameters="line"/>
109           <validator id="PartSet_DifferentObjects"/>
110           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
111         </sketch_shape_selector>
112         
113         <sketch_shape_selector id="ConstraintEntityB" label="Second line" tooltip="Select a line" 
114             shape_types="edge">
115             <validator id="GeomValidators_Edge" parameters="line"/>
116             <validator id="PartSet_DifferentObjects"/>
117             <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
118         </sketch_shape_selector>
119         <validator id="PartSet_ParallelSelection"/>
120       </feature>
121       
122     <!--  SketchConstraintPerpendicular  -->
123       <feature id="SketchConstraintPerpendicular" title="Perpendicular" 
124         tooltip="Create constraint defining two perpendicular lines" 
125         icon=":icons/perpendicular.png">
126         <sketch_shape_selector id="ConstraintEntityA" 
127             label="First line" tooltip="Select an line" 
128             shape_types="edge">
129           <validator id="PartSet_DifferentObjects"/>
130           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
131             <validator id="GeomValidators_Edge" parameters="line"/>
132         </sketch_shape_selector>
133         
134         <sketch_shape_selector id="ConstraintEntityB" 
135             label="Second line" tooltip="Select an line" 
136             shape_types="edge">
137             <validator id="PartSet_DifferentObjects"/>
138           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
139             <validator id="GeomValidators_Edge" parameters="line"/>
140         </sketch_shape_selector>
141         <validator id="PartSet_PerpendicularSelection"/>
142       </feature>
143
144       <!--  SketchConstraintCoincedence  -->
145       <feature id="SketchConstraintCoincidence" title="Coincident" tooltip="Create constraint for the coincidence of two points or point on line or circle" icon=":icons/coincedence.png">
146         <sketch_shape_selector id="ConstraintEntityA" label="First object" tooltip="Select a first object" shape_types="vertex edge">
147           <validator id="PartSet_DifferentObjects"/>
148           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
149         </sketch_shape_selector>
150         <sketch_shape_selector id="ConstraintEntityB" label="Second object" tooltip="Select a second object" shape_types="vertex edge">
151           <validator id="PartSet_DifferentObjects"/>
152           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
153           <validator id="SketchPlugin_CoincidenceAttr" parameters="ConstraintEntityA"/>
154         </sketch_shape_selector>
155         <validator id="PartSet_CoincidentSelection"/>
156       </feature>
157
158       <!--  SketchConstraintRigid  -->
159       <feature id="SketchConstraintRigid" title="Fixed" tooltip="Fix an object" icon=":icons/fixed.png">
160         <sketch_shape_selector id="ConstraintEntityA" label="Object"
161                         tooltip="Select point, line end point, line, center of circle or arc."
162                         shape_types="edge vertex">
163           <!--<validator id="PartSet_SketchEntityValidator" parameters="SketchPoint,SketchLine,SketchCircle,SketchArc"/>-->
164           <validator id="GeomValidators_EdgeOrVertex"/>
165           <validator id="SketchPlugin_NotFixed"/>
166         </sketch_shape_selector>
167         <validator id="PartSet_RigidSelection"/>
168       </feature>
169
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_Edge" parameters="line"/>
175         </sketch_shape_selector>
176         <validator id="PartSet_HVDirSelection"/>
177       </feature>
178       
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_Edge" parameters="line"/>
184         </sketch_shape_selector>
185         <validator id="PartSet_HVDirSelection"/>
186       </feature>
187       
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>
197         
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>
204       </feature>
205       
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_DifferentObjects"/>
211         </sketch_shape_selector>
212         
213         <sketch_shape_selector id="ConstraintEntityB"
214             label="Second object" tooltip="Select line or arc" shape_types="edge">
215         <validator id="SketchPlugin_TangentAttr" parameters="ConstraintEntityA"/>
216         <validator id="PartSet_DifferentObjects"/>
217         </sketch_shape_selector>
218         <validator id="PartSet_TangentSelection"/>
219       </feature>
220       
221          
222     </group>
223     
224     <group id="Edit">
225       <!--  SketchConstraintFillet  -->
226       <feature id="SketchConstraintFillet" title="Fillet" tooltip="Create constraint defining fillet between two objects" icon=":icons/fillet.png">
227         <sketch_shape_selector id="ConstraintEntityA" 
228             label="First object" tooltip="Select line or arc" shape_types="edge">
229           <validator id="PartSet_DifferentObjects"/>
230         </sketch_shape_selector>
231
232         <sketch_shape_selector id="ConstraintEntityB"
233             label="Second object" tooltip="Select line or arc" shape_types="edge">
234           <validator id="PartSet_DifferentObjects"/>
235         </sketch_shape_selector>
236
237         <doublevalue label="Value" tooltip="Fillet radius" id="ConstraintValue" min="0">
238           <validator id="GeomValidators_Positive"/>
239         </doublevalue>
240         <validator id="PartSet_FilletSelection"/>
241       </feature>
242       
243       <!--  SketchConstraintMirror  -->
244       <feature
245         id="SketchConstraintMirror"
246         title="Mirror" icon=":icons/mirror.png"
247         tooltip="Create constraint, mirroring group of objects">
248         <sketch_shape_selector id="ConstraintEntityA"
249             label="Mirror line" tooltip="Select mirror line" shape_types="edge">
250             <validator id="GeomValidators_Edge" parameters="line"/>
251         </sketch_shape_selector>
252         <sketch_multi_selector id="ConstraintMirrorList"
253             label="List of objects"
254             tooltip="Select list of mirroring objects"
255             type_choice="Edges"
256             use_external="true">
257             <validator id="SketchPlugin_MirrorAttr" />
258         </sketch_multi_selector>
259       </feature>
260       <!--  SketchMultiTranslation  -->
261       <feature
262         id="SketchMultiTranslation"
263         title="Translation" icon=":icons/translate.png"
264         tooltip="Make a number of shifted copies of a group of objects">
265         <sketch_multi_selector id="MultiTranslationList"
266             label="List of objects"
267             tooltip="Select list of translating objects"
268             type_choice="Edges"
269             use_external="true">
270           <validator id="SketchPlugin_CopyValidator" />
271         </sketch_multi_selector>
272         <groupbox title="Direction">
273           <sketch-2dpoint_selector
274               id="MultiTranslationStartPoint"
275               title="Start point"
276               tooltip="Start point of translation"/>
277           <sketch-2dpoint_selector
278               id="MultiTranslationEndPoint"
279               title="End point"
280               tooltip="Final point of translation"/>
281         </groupbox>
282         <integervalue id="MultiTranslationCopies"
283             label="Number of copies"
284             tooltip="Number of copies" 
285             default="1" min="1">
286           <validator id="GeomValidators_Positive"/>
287         </integervalue>
288       </feature>
289       <!--  SketchMultiRotation  -->
290       <feature
291         id="SketchMultiRotation"
292         title="Rotation" icon=":icons/rotate.png"
293         tooltip="Make a number of rotated copies of a group of objects">
294         <sketch_multi_selector id="MultiRotationList"
295             label="List of objects"
296             tooltip="Select list of rotating objects"
297             type_choice="Edges"
298             use_external="true">
299           <validator id="SketchPlugin_CopyValidator" />
300         </sketch_multi_selector>
301         <sketch-2dpoint_selector
302             id="MultiRotationCenter"
303             title="Center of rotation"
304             tooltip="Center of rotation"/>
305         <doublevalue id="MultiRotationAngle"
306             label="Angle"
307             tooltip="Rotation angle"/>
308         <integervalue id="MultiRotationCopies"
309             label="Number of copies"
310             tooltip="Number of copies" 
311             default="1" min="1">
312           <validator id="GeomValidators_Positive"/>
313         </integervalue>
314       </feature>
315     </group>
316   </workbench>
317 </plugin>