Salome HOME
Tangency constraint between circle and linear segment
[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" accept_expressions="0" 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" accept_expressions="0" title="Start point" tooltip="Start point coordinates" previous_feature_param="EndPoint"/>
26         <sketch-2dpoint_selector id="EndPoint" accept_expressions="0" 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" accept_expressions="0" title="Center" tooltip="Center coordinates"/>
32         <point2ddistance id="CircleRadius" accept_expressions="0" 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" accept_expressions="0" title="Center" tooltip="Center of a circle"/>
39         <sketch-2dpoint_selector id="ArcStartPoint" accept_expressions="0" title="Start point" tooltip="Start point"/>
40         <sketch-2dpoint_selector id="ArcEndPoint" accept_expressions="0" 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" accept_expressions="0" min="0" default="1" use_reset="false">
51           <validator id="GeomValidators_Positive"/>
52         </doublevalue>
53         <validator id="PartSet_FilletSelection"/>
54       </feature>
55     </group>
56       
57     <group id="Constraints">
58     <!--  SketchConstraintDistance  -->
59       <feature
60         id="SketchConstraintDistance"
61         title="Distance"
62         tooltip="Set fixed distance from a point to an object"
63         icon=":icons/distance.png">
64         <label title="Select objects for distance definition. Following objects can be accepted: point, line or arc end point, center of circle or arc."/>
65         <sketch_shape_selector
66               id="ConstraintEntityA"
67               label="First object"
68               tooltip="Select point, line end point, line, center of circle or arc."
69               shape_types="edge vertex">
70           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
71           <validator id="PartSet_DifferentObjects"/>
72           <validator id="GeomValidators_ShapeType" parameters="vertex,line"/>
73         </sketch_shape_selector>
74         <sketch_shape_selector 
75           id="ConstraintEntityB" 
76           label="Second object" 
77           tooltip="Select point, line end point, line, center of circle or arc." 
78           shape_types="edge vertex">
79           <validator id="PartSet_DifferentObjects"/>
80           <validator id="SketchPlugin_DistanceAttr" parameters="ConstraintEntityA"/>
81           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
82           <validator id="GeomValidators_ShapeType" parameters="vertex,line"/>
83         </sketch_shape_selector>
84         <sketch-2dpoint_flyout_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_DistanceSelection"/>
91       </feature>
92       
93     <!--  SketchConstraintLength  -->      
94       <feature id="SketchConstraintLength" title="Length" tooltip="Set fixed length of a line segment" icon=":icons/length.png">
95         <label title="Select a line on which to calculate length" tooltip="Select a line on which to calculate length"/>
96         <shape_selector id="ConstraintEntityA" label="Line" tooltip="Select an line" shape_types="edge" >
97           <validator id="GeomValidators_ShapeType" parameters="line"/>
98         </shape_selector>
99         <sketch-2dpoint_flyout_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_LengthSelection"/>
104       </feature>
105       
106     <!--  SketchConstraintRadius  -->
107       <feature id="SketchConstraintRadius" title="Radius" tooltip="Set fixed radius of a circle or an arc" icon=":icons/radius_constr.png">
108         <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"/>
109         <shape_selector id="ConstraintEntityA" label="Circle or Arc" tooltip="Select a circle or an arc" 
110             shape_types="edge">
111             <validator id="GeomValidators_ShapeType" parameters="circle"/>
112         </shape_selector>
113         <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt"  default="computed" internal="1" obligatory="0"/>
114         <doublevalue_editor label="Value" tooltip="Radius" id="ConstraintValue" default="computed">
115           <validator id="GeomValidators_Positive"/>
116         </doublevalue_editor>
117         <validator id="PartSet_RadiusSelection"/>
118       </feature>
119
120       <!--  SketchConstraintAngle  -->
121       <feature id="SketchConstraintAngle" title="Angle" tooltip="Set fixed angle between two line segments" icon=":icons/angle_constr.png">
122         <sketch_shape_selector id="ConstraintEntityA" label="Line 1" tooltip="Select an line" shape_types="edge" >
123           <validator id="GeomValidators_ShapeType" parameters="line"/>
124           <validator id="PartSet_DifferentObjects"/>
125           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
126         </sketch_shape_selector>
127         <sketch_shape_selector id="ConstraintEntityB" label="Line 2" tooltip="Select an line" shape_types="edge" >
128           <validator id="GeomValidators_ShapeType" parameters="line"/>
129           <validator id="PartSet_DifferentObjects"/>
130           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
131         </sketch_shape_selector>
132         <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt"  default="computed" internal="1" obligatory="0"/>
133         <doublevalue_editor label="Value" tooltip="Angle" id="ConstraintValue" default="computed" min="0" max="180" />
134         <validator id="PartSet_AngleSelection"/>
135       </feature>
136
137       <!--  SketchConstraintParallel  -->
138       <feature id="SketchConstraintParallel" title="Parallel" tooltip="Create constraint defining two parallel lines" icon=":icons/parallel.png">
139         <sketch_shape_selector id="ConstraintEntityA" 
140             label="First line" tooltip="Select a line" shape_types="edge">
141           <validator id="GeomValidators_ShapeType" parameters="line"/>
142           <validator id="PartSet_DifferentObjects"/>
143           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
144         </sketch_shape_selector>
145         
146         <sketch_shape_selector id="ConstraintEntityB" label="Second line" tooltip="Select a line" 
147             shape_types="edge">
148             <validator id="GeomValidators_ShapeType" parameters="line"/>
149             <validator id="PartSet_DifferentObjects"/>
150             <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
151         </sketch_shape_selector>
152         <validator id="PartSet_ParallelSelection"/>
153       </feature>
154       
155     <!--  SketchConstraintPerpendicular  -->
156       <feature id="SketchConstraintPerpendicular" title="Perpendicular" 
157         tooltip="Create constraint defining two perpendicular lines" 
158         icon=":icons/perpendicular.png">
159         <sketch_shape_selector id="ConstraintEntityA" 
160             label="First line" tooltip="Select an line" 
161             shape_types="edge">
162           <validator id="PartSet_DifferentObjects"/>
163           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
164             <validator id="GeomValidators_ShapeType" parameters="line"/>
165         </sketch_shape_selector>
166         
167         <sketch_shape_selector id="ConstraintEntityB" 
168             label="Second line" tooltip="Select an line" 
169             shape_types="edge">
170             <validator id="PartSet_DifferentObjects"/>
171           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
172             <validator id="GeomValidators_ShapeType" parameters="line"/>
173         </sketch_shape_selector>
174         <validator id="PartSet_PerpendicularSelection"/>
175       </feature>
176
177       <!--  SketchConstraintCoincedence  -->
178       <feature id="SketchConstraintCoincidence" title="Coincident" tooltip="Create constraint for the coincidence of two points or point on line or circle" icon=":icons/coincedence.png">
179         <sketch_shape_selector id="ConstraintEntityA" label="First object" tooltip="Select a first object" shape_types="vertex edge">
180           <validator id="PartSet_DifferentObjects"/>
181           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
182         </sketch_shape_selector>
183         <sketch_shape_selector id="ConstraintEntityB" label="Second object" tooltip="Select a second object" shape_types="vertex edge">
184           <validator id="PartSet_DifferentObjects"/>
185           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
186           <validator id="SketchPlugin_CoincidenceAttr" parameters="ConstraintEntityA"/>
187         </sketch_shape_selector>
188         <validator id="PartSet_CoincidentSelection"/>
189       </feature>
190
191       <!--  SketchConstraintRigid  -->
192       <feature id="SketchConstraintRigid" title="Fixed" tooltip="Fix an object" icon=":icons/fixed.png">
193         <sketch_shape_selector id="ConstraintEntityA" label="Object"
194                         tooltip="Select point, line end point, line, center of circle or arc."
195                         shape_types="edge vertex">
196           <validator id="GeomValidators_ShapeType" parameters="vertex,line,circle"/>
197           <validator id="SketchPlugin_NotFixed"/>
198         </sketch_shape_selector>
199         <validator id="PartSet_RigidSelection"/>
200       </feature>
201
202       <!--  SketchConstraintHorizontal  -->
203       <feature id="SketchConstraintHorizontal" title="Horizontal" tooltip="Create constraint defining horizontal line" icon=":icons/horisontal.png">
204         <sketch_shape_selector id="ConstraintEntityA" 
205             label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
206             <validator id="GeomValidators_ShapeType" parameters="line"/>
207         </sketch_shape_selector>
208         <validator id="PartSet_HVDirSelection"/>
209       </feature>
210       
211     <!--  SketchConstraintVertical  -->
212       <feature id="SketchConstraintVertical" title="Vertical" tooltip="Create constraint defining vertical line" icon=":icons/vertical.png">
213         <sketch_shape_selector id="ConstraintEntityA" 
214             label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
215             <validator id="GeomValidators_ShapeType" parameters="line"/>
216         </sketch_shape_selector>
217         <validator id="PartSet_HVDirSelection"/>
218       </feature>
219       
220     <!--  SketchConstraintEqual  -->
221       <feature id="SketchConstraintEqual" title="Equal"
222         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"
223         icon=":icons/equal.png">
224         <sketch_shape_selector id="ConstraintEntityA" 
225             label="First object" tooltip="Select line, circle or arc" shape_types="edge">
226           <validator id="PartSet_DifferentObjects"/>
227           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
228         </sketch_shape_selector>
229         
230         <sketch_shape_selector id="ConstraintEntityB"
231             label="Second object" tooltip="Select line, circle or arc" shape_types="edge">
232           <validator id="SketchPlugin_EqualAttr" parameters="ConstraintEntityA"/>
233           <validator id="PartSet_DifferentObjects"/>
234           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
235         </sketch_shape_selector>
236         <validator id="PartSet_EqualSelection"/>
237       </feature>
238       
239     <!--  SketchConstraintTangent  -->
240       <feature id="SketchConstraintTangent" title="Tangent" tooltip="Create constraint defining tangency of two objects with common coincident point" icon=":icons/tangent.png">
241         <sketch_shape_selector id="ConstraintEntityA" 
242             label="First object" tooltip="Select line or arc" shape_types="edge">
243           <validator id="SketchPlugin_TangentAttr" parameters="ConstraintEntityB"/>
244           <validator id="PartSet_DifferentObjects"/>
245         </sketch_shape_selector>
246         
247         <sketch_shape_selector id="ConstraintEntityB"
248             label="Second object" tooltip="Select line or arc" shape_types="edge">
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_shape_selector
292                     id="MultiTranslationStartPoint"
293                     label="Start point"
294                     tooltip="Start point of translation"
295                     shape_types="vertex">
296                 <validator id="PartSet_DifferentObjects"/>
297                 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
298               </sketch_shape_selector>
299               <sketch_shape_selector
300                     id="MultiTranslationEndPoint"
301                     label="End point"
302                     tooltip="Final point of translation"
303                     shape_types="vertex">
304                 <validator id="PartSet_DifferentObjects"/>
305                 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
306               </sketch_shape_selector>
307             </groupbox>
308           </box>
309           <box id="FullValue" title="Full value" icon=":icons/translate_full_32x32.png">
310             <groupbox title="Direction">
311               <sketch_shape_selector
312                     id="MultiTranslationStartPoint"
313                     label="Start point"
314                     tooltip="Start point of translation"
315                     shape_types="vertex">
316                 <validator id="PartSet_DifferentObjects"/>
317                 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
318               </sketch_shape_selector>
319               <sketch_shape_selector
320                     id="MultiTranslationEndPoint"
321                     label="End point"
322                     tooltip="Final point of translation"
323                     shape_types="vertex">
324                 <validator id="PartSet_DifferentObjects"/>
325                 <validator id="GeomValidators_ShapeType" parameters="vertex"/>
326               </sketch_shape_selector>
327             </groupbox>
328           </box>
329         </toolbox>
330         <integervalue id="MultiTranslationObjects"
331             label="Total number of objects"
332             tooltip="Total number of objects"
333             default="2" min="2" use_reset="false">
334           <validator id="GeomValidators_Positive"/>
335         </integervalue>
336       </feature>
337
338       <!--  SketchMultiRotation  -->
339       <feature
340         id="SketchMultiRotation"
341         title="Rotation" icon=":icons/rotate.png"
342         tooltip="Multiple rotation">
343         <sketch_multi_selector id="MultiRotationList"
344             label="Segments:"
345             tooltip="Select list of rotating objects"
346             type_choice="Edges"
347             use_external="true">
348           <validator id="SketchPlugin_CopyValidator" />
349         </sketch_multi_selector>
350         <sketch_shape_selector
351               id="MultiRotationCenter"
352               label="Center of rotation"
353               tooltip="Center of rotation"
354               shape_types="vertex">
355           <validator id="GeomValidators_ShapeType" parameters="vertex"/>
356         </sketch_shape_selector>
357         <toolbox id="AngleType">
358           <box id="SingleAngle" title="Single angle" icon=":icons/angle_up_32x32.png">
359             <doublevalue id="MultiRotationAngle"
360                          label="Angle"
361                          icon=":icons/angle.png"
362                          tooltip="Rotation angle"
363                          default="90" use_reset="false"/>
364           </box>
365           <box id="FullAngle" title="Full angle" icon=":icons/angle_up_full_32x32.png">
366             <doublevalue id="MultiRotationAngle"
367                          label="Angle"
368                          icon=":icons/angle.png"
369                          tooltip="Rotation angle"
370                          default="90" use_reset="false"/>
371           </box>
372         </toolbox>
373         <integervalue id="MultiRotationObjects"
374             label="Total number of objects"
375             tooltip="Total number of objects" 
376             default="2" min="2" use_reset="false">
377           <validator id="GeomValidators_Positive"/>
378         </integervalue>
379       </feature>
380     </group>
381   </workbench>
382 </plugin>