Salome HOME
A crash fix for creation a coincidence constraint with using an external point; an...
[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"
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     <!--  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="GeomValidators_EdgeOrVertex"/>
57         </sketch_shape_selector>/>
58         <sketch_shape_selector 
59           id="ConstraintEntityB" 
60           label="Second object" 
61           tooltip="Select point, line end point, line, center of circle or arc." 
62           shape_types="edge vertex">
63           <validator id="PartSet_DifferentObjects"/>
64           <validator id="SketchPlugin_DistanceAttr" parameters="ConstraintEntityA"/>
65           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
66           <validator id="GeomValidators_EdgeOrVertex"/>
67         </sketch_shape_selector>
68         <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt"  default="computed" internal="1" obligatory="0"/>
69         
70         <doublevalue_editor label="Value" tooltip="Distance" id="ConstraintValue" default="computed" min="0">
71           <validator id="GeomValidators_Positive"/>
72         </doublevalue_editor>
73         
74         <validator id="PartSet_DistanceSelection"/>
75       </feature>
76       
77     <!--  SketchConstraintLength  -->      
78       <feature id="SketchConstraintLength" title="Length" tooltip="Set fixed length of a line segment" icon=":icons/length.png">
79         <label title="Select a line on which to calculate length" tooltip="Select a line on which to calculate length"/>
80         <shape_selector id="ConstraintEntityA" label="Line" tooltip="Select an line" 
81             shape_types="edge" >
82         <validator id="GeomValidators_Edge" parameters="line"/>
83     </shape_selector>
84         <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
85         <doublevalue_editor label="Value" tooltip="Length" id="ConstraintValue" default="computed">
86           <validator id="GeomValidators_Positive"/>
87         </doublevalue_editor>
88         <validator id="PartSet_LengthSelection"/>
89       </feature>
90       
91     <!--  SketchConstraintRadius  -->
92       <feature id="SketchConstraintRadius" title="Radius" tooltip="Set fixed radius of a circle or an arc" icon=":icons/radius_constr.png">
93         <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"/>
94         <shape_selector id="ConstraintEntityA" label="Circle or Arc" tooltip="Select a circle or an arc" 
95             shape_types="edge">
96             <validator id="GeomValidators_Edge" parameters="circle"/>
97         </shape_selector>
98         <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt"  default="computed" internal="1" obligatory="0"/>
99         <doublevalue_editor label="Value" tooltip="Radius" id="ConstraintValue" default="computed"/>
100         <validator id="PartSet_RadiusSelection"/>
101       </feature>
102       
103     <!--  SketchConstraintParallel  -->
104       <feature id="SketchConstraintParallel" title="Parallel" tooltip="Create constraint defining two parallel lines" icon=":icons/parallel.png">
105         <sketch_shape_selector id="ConstraintEntityA" 
106             label="First line" tooltip="Select a line" shape_types="edge">
107           <validator id="GeomValidators_Edge" parameters="line"/>
108           <validator id="PartSet_DifferentObjects"/>
109           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
110         </sketch_shape_selector>
111         
112         <sketch_shape_selector id="ConstraintEntityB" label="Second line" tooltip="Select a line" 
113             shape_types="edge">
114             <validator id="GeomValidators_Edge" parameters="line"/>
115             <validator id="PartSet_DifferentObjects"/>
116             <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
117         </sketch_shape_selector>
118         <validator id="PartSet_ParallelSelection"/>
119       </feature>
120       
121     <!--  SketchConstraintPerpendicular  -->
122       <feature id="SketchConstraintPerpendicular" title="Perpendicular" 
123         tooltip="Create constraint defining two perpendicular lines" 
124         icon=":icons/perpendicular.png">
125         <sketch_shape_selector id="ConstraintEntityA" 
126             label="First line" tooltip="Select an line" 
127             shape_types="edge">
128           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
129             <validator id="GeomValidators_Edge" parameters="line"/>
130         </sketch_shape_selector>
131         
132         <sketch_shape_selector id="ConstraintEntityB" 
133             label="Second line" tooltip="Select an line" 
134             shape_types="edge">
135             <validator id="PartSet_DifferentObjects"/>
136           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
137             <validator id="GeomValidators_Edge" parameters="line"/>
138         </sketch_shape_selector>
139         <validator id="PartSet_PerpendicularSelection"/>
140       </feature>
141
142       <!--  SketchConstraintCoincedence  -->
143       <feature id="SketchConstraintCoincidence" title="Coincident" tooltip="Create constraint for the coincidence of two points" icon=":icons/coincedence.png">
144         <sketch_shape_selector id="ConstraintEntityA" label="First point" tooltip="Select a first point" shape_types="vertex">
145           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
146         </sketch_shape_selector>
147         <sketch_shape_selector id="ConstraintEntityB" label="Second point" tooltip="Select a second point" shape_types="vertex">
148           <validator id="PartSet_DifferentObjects"/>
149           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
150         </sketch_shape_selector>
151         <validator id="PartSet_CoincidentSelection"/>
152       </feature>
153
154       <!--  SketchConstraintRigid  -->
155       <feature id="SketchConstraintRigid" title="Fixed" tooltip="Fix an object" icon=":icons/fixed.png">
156         <shape_selector id="ConstraintEntityA" label="Object" tooltip="Select an object" 
157             shape_types="edge vertex">
158           <validator id="PartSet_SketchEntityValidator" parameters="SketchPoint,SketchLine,SketchCircle,SketchArc"/>
159           <validator id="SketchPlugin_NotFixed"/>
160         </shape_selector>
161         <validator id="PartSet_RigidSelection"/>
162       </feature>
163       
164     <!--  SketchConstraintHorizontal  -->
165       <feature id="SketchConstraintHorizontal" title="Horizontal" tooltip="Create constraint defining horizontal line" icon=":icons/horisontal.png">
166         <sketch_shape_selector id="ConstraintEntityA" 
167             label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
168             <validator id="GeomValidators_Edge" parameters="line"/>
169         </sketch_shape_selector>
170         <validator id="PartSet_HVDirSelection"/>
171       </feature>
172       
173     <!--  SketchConstraintVertical  -->
174       <feature id="SketchConstraintVertical" title="Vertical" tooltip="Create constraint defining vertical line" icon=":icons/vertical.png">
175         <sketch_shape_selector id="ConstraintEntityA" 
176             label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
177             <validator id="GeomValidators_Edge" parameters="line"/>
178         </sketch_shape_selector>
179         <validator id="PartSet_HVDirSelection"/>
180       </feature>
181       
182     <!--  SketchConstraintEqual  -->
183       <feature id="SketchConstraintEqual" title="Equal"
184         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"
185         icon=":icons/equal.png">
186         <sketch_shape_selector id="ConstraintEntityA" 
187             label="First object" tooltip="Select line, circle or arc" shape_types="edge">
188           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
189         </sketch_shape_selector>
190         
191         <sketch_shape_selector id="ConstraintEntityB"
192             label="Second object" tooltip="Select line, circle or arc" shape_types="edge">
193           <validator id="SketchPlugin_EqualAttr" parameters="ConstraintEntityA"/>
194           <validator id="PartSet_DifferentObjects"/>
195           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
196         </sketch_shape_selector>
197       </feature>
198       
199     <!--  SketchConstraintTangent  -->
200       <feature id="SketchConstraintTangent" title="Tangent" tooltip="Create constraint defining tangency of two objects" icon=":icons/tangent.png">
201         <sketch_shape_selector id="ConstraintEntityA" 
202             label="First object" tooltip="Select line or arc" shape_types="edge">
203         </sketch_shape_selector>
204         
205         <sketch_shape_selector id="ConstraintEntityB"
206             label="Second object" tooltip="Select line or arc" shape_types="edge">
207         <validator id="SketchPlugin_TangentAttr" parameters="ConstraintEntityA"/>
208         <validator id="PartSet_DifferentObjects"/>
209         </sketch_shape_selector>
210         <validator id="PartSet_TangentSelection"/>
211       </feature>
212       
213          
214     </group>
215     
216     <group id="Edit">
217       <!--  SketchConstraintFillet  -->
218       <feature id="SketchConstraintFillet" title="Fillet" tooltip="Create constraint defining fillet between two objects" icon=":icons/fillet.png">
219         <sketch_shape_selector id="ConstraintEntityA" 
220             label="First object" tooltip="Select line or arc" shape_types="edge">
221           <validator id="PartSet_DifferentObjects"/>
222         </sketch_shape_selector>
223
224         <sketch_shape_selector id="ConstraintEntityB"
225             label="Second object" tooltip="Select line or arc" shape_types="edge">
226           <validator id="PartSet_DifferentObjects"/>
227         </sketch_shape_selector>
228
229         <doublevalue label="Value" tooltip="Fillet radius" id="ConstraintValue" min="0">
230           <validator id="GeomValidators_Positive"/>
231         </doublevalue>
232         <validator id="PartSet_FilletSelection"/>
233       </feature>
234       
235       <!--  SketchConstraintMirror  -->
236       <feature
237         id="SketchConstraintMirror"
238         title="Mirror" icon=":icons/mirror.png"
239         tooltip="Create constraint, mirroring group of objects">
240         <sketch_shape_selector id="ConstraintEntityA"
241             label="Mirror line" tooltip="Select mirror line" shape_types="edge">
242             <validator id="GeomValidators_Edge" parameters="line"/>
243         </sketch_shape_selector>
244         <multi_selector id="ConstraintMirrorList"
245             label="List of objects"
246             tooltip="Select list of mirroring objects"
247             type_choice="Edges">
248             <validator id="SketchPlugin_MirrorAttr" />
249         </multi_selector>
250       </feature>
251     </group>
252   </workbench>
253 </plugin>