Salome HOME
Union of validator and filter functionalities.
[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         <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt"  default="computed" internal="1" obligatory="0"/>
75         
76         <doublevalue_editor label="Value" tooltip="Distance" id="ConstraintValue" default="computed" min="0">
77           <validator id="GeomValidators_Positive"/>
78         </doublevalue_editor>
79         
80         <validator id="PartSet_DistanceValidator"/>
81       </feature>
82     <!--  SketchConstraintLength  -->      
83       <feature id="SketchConstraintLength" title="Length" tooltip="Set fixed length of a line segment" icon=":icons/length.png">
84         <label title="Select a line on which to calculate length" tooltip="Select a line on which to calculate length"/>
85         <shape_selector id="ConstraintEntityA" label="Line" tooltip="Select an line" 
86             shape_types="edge" >
87         <validator id="GeomValidators_Edge" parameters="line"/>
88     </shape_selector>
89         <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
90         <doublevalue_editor label="Value" tooltip="Length" id="ConstraintValue" default="computed">
91           <validator id="GeomValidators_Positive"/>
92         </doublevalue_editor>
93         <validator id="PartSet_LengthValidator"/>
94       </feature>
95     <!--  SketchConstraintRadius  -->
96       <feature id="SketchConstraintRadius" title="Radius" tooltip="Set fixed radius of a circle or an arc" icon=":icons/radius_constr.png">
97         <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"/>
98         <shape_selector id="ConstraintEntityA" label="Circle or Arc" tooltip="Select a circle or an arc" 
99             shape_types="edge">
100             <validator id="GeomValidators_Edge" parameters="circle"/>
101         </shape_selector>
102         <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt"  default="computed" internal="1" obligatory="0"/>
103         <doublevalue_editor label="Value" tooltip="Radius" id="ConstraintValue" default="computed"/>
104         <validator id="PartSet_RadiusValidator"/>
105       </feature>
106     <!--  SketchConstraintParallel  -->
107       <feature id="SketchConstraintParallel" title="Parallel" tooltip="Create constraint defining two parallel lines" icon=":icons/parallel.png">
108         <sketch_constraint_shape_selector id="ConstraintEntityA" 
109             label="First line" tooltip="Select a line" shape_types="edge">
110             <validator id="GeomValidators_Edge" parameters="line"/>
111             <validator id="SketchPlugin_ShapeValidator" parameters="ConstraintEntityB"/>
112         </sketch_constraint_shape_selector>
113         
114         <sketch_constraint_shape_selector id="ConstraintEntityB" label="Last line" tooltip="Select a line" 
115             shape_types="edge">
116             <validator id="GeomValidators_Edge" parameters="line"/>
117             <validator id="PartSet_DifferentObjects"/>
118             <validator id="SketchPlugin_ShapeValidator" parameters="ConstraintEntityA"/>
119         </sketch_constraint_shape_selector>
120         
121         <validator id="PartSet_ParallelValidator"/>
122       </feature>
123     <!--  SketchConstraintPerpendicular  -->
124       <feature id="SketchConstraintPerpendicular" title="Perpendicular" tooltip="Create constraint defining two perpendicular lines" icon=":icons/perpendicular.png">
125         <sketch_constraint_shape_selector id="ConstraintEntityA" 
126             label="First line" tooltip="Select an line" 
127             shape_types="edge">
128           <validator id="SketchPlugin_ShapeValidator" parameters="ConstraintEntityB"/>
129             <validator id="GeomValidators_Edge" parameters="line"/>
130         </sketch_constraint_shape_selector>
131         
132         <sketch_constraint_shape_selector id="ConstraintEntityB" 
133             label="Last line" tooltip="Select an line" 
134             shape_types="edge">
135             <validator id="PartSet_DifferentObjects"/>
136           <validator id="SketchPlugin_ShapeValidator" parameters="ConstraintEntityA"/>
137             <validator id="GeomValidators_Edge" parameters="line"/>
138         </sketch_constraint_shape_selector>
139         <validator id="PartSet_PerpendicularValidator"/>
140       </feature>
141     <!--  SketchConstraintRigid  -->
142       <feature id="SketchConstraintRigid" title="Fixed" tooltip="Fix an object" icon=":icons/fixed.png">
143         <shape_selector id="ConstraintEntityA" label="Object" tooltip="Select an object" 
144             shape_types="edge vertex">
145           <validator id="PartSet_SketchEntityValidator" parameters="SketchPoint,SketchLine,SketchCircle,SketchArc"/>
146         </shape_selector>
147         <validator id="PartSet_RigidValidator"/>
148       </feature>
149     <!--  SketchConstraintHorizontal  -->
150       <feature id="SketchConstraintHorizontal" title="Horizontal" tooltip="Create constraint defining horizontal line" icon=":icons/horisontal.png">
151         <sketch_constraint_shape_selector id="ConstraintEntityA" 
152             label="Line" tooltip="Select a line" shape_types="edge">
153             <validator id="GeomValidators_Edge" parameters="line"/>
154         </sketch_constraint_shape_selector>
155       </feature>
156     <!--  SketchConstraintVertical  -->
157       <feature id="SketchConstraintVertical" title="Vertical" tooltip="Create constraint defining vertical line" icon=":icons/vertical.png">
158         <sketch_constraint_shape_selector id="ConstraintEntityA" 
159             label="Line" tooltip="Select a line" shape_types="edge">
160             <validator id="GeomValidators_Edge" parameters="line"/>
161         </sketch_constraint_shape_selector>
162       </feature>
163     <!--  SketchConstraintEqual  -->
164       <feature id="SketchConstraintEqual" title="Equal" tooltip="Create constraint defining equality of two objects" icon=":icons/equal.png">
165         <sketch_constraint_shape_selector id="ConstraintEntityA" 
166             label="First object" tooltip="Select line, circle or arc" shape_types="edge">
167         </sketch_constraint_shape_selector>
168         
169         <sketch_constraint_shape_selector id="ConstraintEntityB"
170             label="Last object" tooltip="Select line, circle or arc" shape_types="edge">
171         </sketch_constraint_shape_selector>
172       </feature>
173     <!--  SketchConstraintTangent  -->
174       <feature id="SketchConstraintTangent" title="Tangent" tooltip="Create constraint defining tangency of two objects" icon=":icons/tangent.png">
175         <sketch_constraint_shape_selector id="ConstraintEntityA" 
176             label="First object" tooltip="Select line or arc" shape_types="edge">
177         </sketch_constraint_shape_selector>
178         
179         <sketch_constraint_shape_selector id="ConstraintEntityB"
180             label="Last object" tooltip="Select line or arc" shape_types="edge">
181         </sketch_constraint_shape_selector>
182       </feature>
183     <!--  SketchConstraintMirror  -->
184       <feature
185         id="SketchConstraintMirror"
186         title="Mirror"
187         tooltip="Create constraint mirroring group of objects"
188         internal="1" />
189     </group>
190     <group id="Edit">
191       <!--  SketchConstraintFillet  -->
192       <feature id="SketchConstraintFillet" title="Fillet" tooltip="Create constraint defining fillet between two objects" icon=":icons/fillet.png">
193         <sketch_constraint_shape_selector id="ConstraintEntityA" 
194             label="First object" tooltip="Select line or arc" shape_types="edge">
195         </sketch_constraint_shape_selector>
196
197         <sketch_constraint_shape_selector id="ConstraintEntityB"
198             label="Last object" tooltip="Select line or arc" shape_types="edge">
199         </sketch_constraint_shape_selector>
200
201         <doublevalue_editor label="Value" tooltip="Fillet radius" id="ConstraintValue" default="0" min="0">
202           <validator id="GeomValidators_Positive"/>
203         </doublevalue_editor>
204       </feature>
205     </group>
206   </workbench>
207 </plugin>