Salome HOME
af51a5dd6164706a677181ba402fd625d2910d1c
[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"
9         when_nested="accept abort"
10         title="Sketch"
11         tooltip="Create a new 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 a new 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 a new 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 a new 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 a new 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       <feature
44         id="SketchConstraintCoincidence"
45         title="Coincident"
46         tooltip="Create constraint for the coincidence of two points"
47         internal="1" />
48     <!--  SketchConstraintDistance  -->
49       <feature
50         id="SketchConstraintDistance"
51         title="Distance"
52         tooltip="Set fixed distance from a point to an object"
53         icon=":icons/distance.png">
54         <label title="Select objects for distance definition. Following objects can be accepted: point, line or arc end point, center of circle or arc."/>
55         <sketch_shape_selector
56               id="ConstraintEntityA"
57               label="First object"
58               tooltip="Select point, line end point, line, center of circle or arc."
59               shape_types="edge vertex">
60           <validator id="SketchPlugin_ShapeValidator" parameters="ConstraintEntityB"/>
61           <validator id="GeomValidators_EdgeOrVertex"/>
62         </sketch_shape_selector>/>
63         <sketch_shape_selector 
64           id="ConstraintEntityB" 
65           label="Last object" 
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_ShapeValidator" parameters="ConstraintEntityA"/>
71           <validator id="GeomValidators_EdgeOrVertex"/>
72         </sketch_shape_selector>
73  <!--
74  TODO(nds): v1.0.2, master  
75                             shape_types="edge vertex">
76                         <validator id="PartSet_DifferentObjects"/>
77       <validator id="SketchPlugin_DistanceAttr" parameters="ConstraintEntityA"/>
78       <selection_filter id="MultiFilter" parameters="line,vertex"/>
79     </sketch_shape_selector>
80                 
81         <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt" internal="1" obligatory="0"/>
82  -->
83         
84         <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt"  default="computed" internal="1" obligatory="0"/>
85         
86         <doublevalue_editor label="Value" tooltip="Distance" id="ConstraintValue" default="computed" min="0">
87           <validator id="GeomValidators_Positive"/>
88         </doublevalue_editor>
89         
90         <validator id="PartSet_DistanceValidator"/>
91       </feature>
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" 
96             shape_types="edge" >
97         <validator id="GeomValidators_Edge" parameters="line"/>
98     </shape_selector>
99         <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
100         <doublevalue_editor label="Value" tooltip="Length" id="ConstraintValue" default="computed">
101           <validator id="GeomValidators_Positive"/>
102         </doublevalue_editor>
103         <validator id="PartSet_LengthValidator"/>
104       </feature>
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_Edge" parameters="circle"/>
111         </shape_selector>
112         <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt"  default="computed" internal="1" obligatory="0"/>
113         <doublevalue_editor label="Value" tooltip="Radius" id="ConstraintValue" default="computed"/>
114         <validator id="PartSet_RadiusValidator"/>
115       </feature>
116     <!--  SketchConstraintParallel  -->
117       <feature id="SketchConstraintParallel" title="Parallel" tooltip="Create constraint defining two parallel lines" icon=":icons/parallel.png">
118         <sketch_constraint_shape_selector id="ConstraintEntityA" 
119             label="First line" tooltip="Select a line" shape_types="edge">
120             <validator id="GeomValidators_Edge" parameters="line"/>
121             <validator id="SketchPlugin_ShapeValidator" parameters="ConstraintEntityB"/>
122         </sketch_constraint_shape_selector>
123         
124         <sketch_constraint_shape_selector id="ConstraintEntityB" label="Last line" tooltip="Select a line" 
125             shape_types="edge">
126             <validator id="GeomValidators_Edge" parameters="line"/>
127             <validator id="PartSet_DifferentObjects"/>
128             <validator id="SketchPlugin_ShapeValidator" parameters="ConstraintEntityA"/>
129         </sketch_constraint_shape_selector>
130         
131 <!--  
132   TODO(nds): v1.0.2, master  
133                 <sketch_constraint_shape_selector id="ConstraintEntityA" 
134                         label="First line" tooltip="Select a line" shape_types="edge">
135                         <selection_filter id="EdgeFilter" parameters="line"/>
136                 </sketch_constraint_shape_selector>
137                 
138                 <sketch_constraint_shape_selector id="ConstraintEntityB" label="Last line" tooltip="Select a line" 
139                         shape_types="edge">
140                         <selection_filter id="EdgeFilter" parameters="line"/>
141                         <validator id="PartSet_DifferentObjects"/>
142                 </sketch_constraint_shape_selector>
143                 
144         <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt" internal="1" obligatory="0"/>
145 -->
146         <validator id="PartSet_ParallelValidator"/>
147       </feature>
148     <!--  SketchConstraintPerpendicular  -->
149       <feature id="SketchConstraintPerpendicular" title="Perpendicular" 
150         tooltip="Create constraint defining two perpendicular lines" 
151         icon=":icons/perpendicular.png">
152         <sketch_constraint_shape_selector id="ConstraintEntityA" 
153             label="First line" tooltip="Select an line" 
154             shape_types="edge">
155           <validator id="SketchPlugin_ShapeValidator" parameters="ConstraintEntityB"/>
156             <validator id="GeomValidators_Edge" parameters="line"/>
157         </sketch_constraint_shape_selector>
158         
159         <sketch_constraint_shape_selector id="ConstraintEntityB" 
160             label="Last line" tooltip="Select an line" 
161             shape_types="edge">
162             <validator id="PartSet_DifferentObjects"/>
163           <validator id="SketchPlugin_ShapeValidator" parameters="ConstraintEntityA"/>
164             <validator id="GeomValidators_Edge" parameters="line"/>
165         </sketch_constraint_shape_selector>
166 <!--  
167   TODO(nds): v1.0.2, master
168                 <sketch_constraint_shape_selector id="ConstraintEntityA" 
169                         label="First line" tooltip="Select an line" 
170                         shape_types="edge">
171       <selection_filter id="EdgeFilter" parameters="line"/>
172     </sketch_constraint_shape_selector>
173                 
174                 <sketch_constraint_shape_selector id="ConstraintEntityB" 
175                         label="Last line" tooltip="Select an line" 
176                         shape_types="edge">
177                         <validator id="PartSet_DifferentObjects"/>
178       <selection_filter id="EdgeFilter" parameters="line"/>
179     </sketch_constraint_shape_selector>
180 -->
181         <validator id="PartSet_PerpendicularValidator"/>
182       </feature>
183     <!--  SketchConstraintRigid  -->
184       <feature id="SketchConstraintRigid" title="Fixed" tooltip="Fix an object" icon=":icons/fixed.png">
185         <shape_selector id="ConstraintEntityA" label="Object" tooltip="Select an object" 
186             shape_types="edge vertex">
187           <validator id="PartSet_SketchEntityValidator" parameters="SketchPoint,SketchLine,SketchCircle,SketchArc"/>
188         </shape_selector>
189         <validator id="PartSet_RigidValidator"/>
190       </feature>
191     <!--  SketchConstraintHorizontal  -->
192       <feature id="SketchConstraintHorizontal" title="Horizontal" tooltip="Create constraint defining horizontal line" icon=":icons/horisontal.png">
193         <sketch_constraint_shape_selector id="ConstraintEntityA" 
194             label="Line" tooltip="Select a line" shape_types="edge">
195             <validator id="GeomValidators_Edge" parameters="line"/>
196         </sketch_constraint_shape_selector>
197       </feature>
198     <!--  SketchConstraintVertical  -->
199       <feature id="SketchConstraintVertical" title="Vertical" tooltip="Create constraint defining vertical line" icon=":icons/vertical.png">
200         <sketch_constraint_shape_selector id="ConstraintEntityA" 
201             label="Line" tooltip="Select a line" shape_types="edge">
202             <validator id="GeomValidators_Edge" parameters="line"/>
203         </sketch_constraint_shape_selector>
204       </feature>
205     <!--  SketchConstraintEqual  -->
206       <feature id="SketchConstraintEqual" title="Equal" tooltip="Create constraint defining equality of two objects" icon=":icons/equal.png">
207         <sketch_constraint_shape_selector id="ConstraintEntityA" 
208             label="First object" tooltip="Select line, circle or arc" shape_types="edge">
209         </sketch_constraint_shape_selector>
210         
211         <sketch_constraint_shape_selector id="ConstraintEntityB"
212             label="Last object" tooltip="Select line, circle or arc" shape_types="edge">
213         </sketch_constraint_shape_selector>
214       </feature>
215     <!--  SketchConstraintTangent  -->
216       <feature id="SketchConstraintTangent" title="Tangent" tooltip="Create constraint defining tangency of two objects" icon=":icons/tangent.png">
217         <sketch_constraint_shape_selector id="ConstraintEntityA" 
218             label="First object" tooltip="Select line or arc" shape_types="edge">
219         </sketch_constraint_shape_selector>
220         
221         <sketch_constraint_shape_selector id="ConstraintEntityB"
222             label="Last object" tooltip="Select line or arc" shape_types="edge">
223         </sketch_constraint_shape_selector>
224       </feature>
225     <!--  SketchConstraintMirror  -->
226       <feature
227         id="SketchConstraintMirror"
228         title="Mirror"
229         tooltip="Create constraint mirroring group of objects"
230         internal="1" />
231     </group>
232     <group id="Edit">
233       <!--  SketchConstraintFillet  -->
234       <feature id="SketchConstraintFillet" title="Fillet" tooltip="Create constraint defining fillet between two objects" icon=":icons/fillet.png">
235         <sketch_constraint_shape_selector id="ConstraintEntityA" 
236             label="First object" tooltip="Select line or arc" shape_types="edge">
237         </sketch_constraint_shape_selector>
238
239         <sketch_constraint_shape_selector id="ConstraintEntityB"
240             label="Last object" tooltip="Select line or arc" shape_types="edge">
241         </sketch_constraint_shape_selector>
242
243         <doublevalue_editor label="Value" tooltip="Fillet radius" id="ConstraintValue" default="0" min="0">
244           <validator id="GeomValidators_Positive"/>
245         </doublevalue_editor>
246       </feature>
247     </group>
248   </workbench>
249 </plugin>