Salome HOME
Merge branch 'Dev_1.1.0' of newgeom:newgeom into Dev_1.1.0
[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 title="Select a plane on which to create a sketch" tooltip="Select a plane on which to create a sketch"/> 
14       <!--icon=":pictures/x_point.png"-->
15       </feature>
16       <feature id="SketchPoint" title="Point" tooltip="Create a new point" icon=":icons/point.png">
17         <sketch-2dpoint_selector id="PointCoordindates" title="Point" tooltip="Point coordinates"/>
18         <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
19       </feature>
20       <feature id="SketchLine" title="Line" tooltip="Create a new line" icon=":icons/line.png">
21         <sketch-2dpoint_selector id="StartPoint" title="Start point" tooltip="Start point coordinates" previous_feature_param="EndPoint"/>
22         <sketch-2dpoint_selector id="EndPoint" title="End point" tooltip="End point coordinates"/>
23         <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
24       </feature>
25       <feature id="SketchCircle" title="Circle" tooltip="Create a new circle" icon=":icons/circle.png">
26         <sketch-2dpoint_selector id="CircleCenter" title="Center" tooltip="Center coordinates"/>
27         <point2ddistance id="CircleRadius" first_point="CircleCenter" label="Radius:" min="0" step="1.0" default="0" icon=":icons/radius.png" tooltip="Set radius">
28           <validator id="GeomValidators_Positive"/>
29         </point2ddistance>
30         <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
31       </feature>
32       <feature id="SketchArc" title="Arc" tooltip="Create a new arc" icon=":icons/arc.png">
33         <sketch-2dpoint_selector id="ArcCenter" title="Center" tooltip="Center of a circle"/>
34         <sketch-2dpoint_selector id="ArcStartPoint" title="Start point" tooltip="Start point"/>
35         <sketch-2dpoint_selector id="ArcEndPoint" title="End point" tooltip="End point"/>
36         <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
37       </feature>
38     </group>
39       
40     <group id="Constraints">
41       <feature
42         id="SketchConstraintCoincidence"
43         title="Coincident"
44         tooltip="Create constraint for the coincidence of two points"
45         internal="1" />
46     <!--  SketchConstraintDistance  -->
47       <feature
48         id="SketchConstraintDistance"
49         title="Distance"
50         tooltip="Set fixed distance from a point to an object"
51         icon=":icons/distance.png">
52         <label title="Select objects for distance definition. Following objects can be accepted: point, line or arc end point, center of circle or arc."/>
53         <sketch_shape_selector
54               id="ConstraintEntityA"
55               label="First object"
56               tooltip="Select point, line end point, line, center of circle or arc."
57               shape_types="edge vertex">
58           <validator id="SketchPlugin_ShapeValidator" parameters="ConstraintEntityB"/>
59           <validator id="ModuleBase_ValidatorLinearEdgeOrVertex"/>
60         </sketch_shape_selector>/>
61         <sketch_shape_selector 
62           id="ConstraintEntityB" 
63           label="Last object" 
64           tooltip="Select point, line end point, line, center of circle or arc." 
65                 shape_types="edge vertex">
66           <validator id="PartSet_DifferentObjects"/>
67           <validator id="SketchPlugin_DistanceAttr" parameters="ConstraintEntityA"/>
68           <validator id="SketchPlugin_ShapeValidator" parameters="ConstraintEntityB"/>
69           <validator id="ModuleBase_ValidatorLinearEdgeOrVertex"/>
70         </sketch_shape_selector>
71         
72         <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt"  default="computed" internal="1" obligatory="0"/>
73         
74         <doublevalue_editor label="Value" tooltip="Distance" id="ConstraintValue" default="computed" min="0">
75           <validator id="GeomValidators_Positive"/>
76         </doublevalue_editor>
77         
78         <validator id="PartSet_DistanceValidator"/>
79       </feature>
80     <!--  SketchConstraintLength  -->      
81       <feature id="SketchConstraintLength" title="Length" tooltip="Set fixed length of a line segment" icon=":icons/length.png">
82         <label title="Select a line on which to calculate length" tooltip="Select a line on which to calculate length"/>
83         <shape_selector id="ConstraintEntityA" label="Line" tooltip="Select an line" 
84             shape_types="edge" >
85         <validator id="ModuleBase_ValidatorLinearEdge" parameters="line"/>
86     </shape_selector>
87         <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
88         <doublevalue_editor label="Value" tooltip="Length" id="ConstraintValue" default="computed">
89           <validator id="GeomValidators_Positive"/>
90         </doublevalue_editor>
91         <validator id="PartSet_LengthValidator"/>
92       </feature>
93     <!--  SketchConstraintRadius  -->
94       <feature id="SketchConstraintRadius" title="Radius" tooltip="Set fixed radius of a circle or an arc" icon=":icons/radius_constr.png">
95         <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"/>
96         <shape_selector id="ConstraintEntityA" label="Circle or Arc" tooltip="Select a circle or an arc" 
97             shape_types="edge">
98             <validator id="ModuleBase_ValidatorLinearEdge" parameters="circle"/>
99         </shape_selector>
100         <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt"  default="computed" internal="1" obligatory="0"/>
101         <doublevalue_editor label="Value" tooltip="Radius" id="ConstraintValue" default="computed"/>
102         <validator id="PartSet_RadiusValidator"/>
103       </feature>
104     <!--  SketchConstraintParallel  -->
105       <feature id="SketchConstraintParallel" title="Parallel" tooltip="Create constraint defining two parallel lines" icon=":icons/parallel.png">
106         <sketch_constraint_shape_selector id="ConstraintEntityA" 
107             label="First line" tooltip="Select a line" shape_types="edge">
108             <validator id="ModuleBase_ValidatorLinearEdge" parameters="line"/>
109             <validator id="SketchPlugin_ShapeValidator" parameters="ConstraintEntityB"/>
110         </sketch_constraint_shape_selector>
111         
112         <sketch_constraint_shape_selector id="ConstraintEntityB" label="Last line" tooltip="Select a line" 
113             shape_types="edge">
114             <validator id="ModuleBase_ValidatorLinearEdge" parameters="line"/>
115             <validator id="PartSet_DifferentObjects"/>
116             <validator id="SketchPlugin_ShapeValidator" parameters="ConstraintEntityA"/>
117         </sketch_constraint_shape_selector>
118         
119         <validator id="PartSet_ParallelValidator"/>
120       </feature>
121     <!--  SketchConstraintPerpendicular  -->
122       <feature id="SketchConstraintPerpendicular" title="Perpendicular" tooltip="Create constraint defining two perpendicular lines" icon=":icons/perpendicular.png">
123         <sketch_constraint_shape_selector id="ConstraintEntityA" 
124             label="First line" tooltip="Select an line" 
125             shape_types="edge">
126           <validator id="SketchPlugin_ShapeValidator" parameters="ConstraintEntityB"/>
127             <validator id="ModuleBase_ValidatorLinearEdge" parameters="line"/>
128         </sketch_constraint_shape_selector>
129         
130         <sketch_constraint_shape_selector id="ConstraintEntityB" 
131             label="Last line" tooltip="Select an line" 
132             shape_types="edge">
133             <validator id="PartSet_DifferentObjects"/>
134           <validator id="SketchPlugin_ShapeValidator" parameters="ConstraintEntityA"/>
135             <validator id="ModuleBase_ValidatorLinearEdge" parameters="line"/>
136         </sketch_constraint_shape_selector>
137         <validator id="PartSet_PerpendicularValidator"/>
138       </feature>
139     <!--  SketchConstraintRigid  -->
140       <feature id="SketchConstraintRigid" title="Fixed" tooltip="Fix an object" icon=":icons/fixed.png">
141         <shape_selector id="ConstraintEntityA" label="Object" tooltip="Select an object" 
142             shape_types="edge vertex">
143           <validator id="PartSet_SketchEntityValidator" parameters="SketchPoint,SketchLine,SketchCircle,SketchArc"/>
144         </shape_selector>
145         <validator id="PartSet_RigidValidator"/>
146       </feature>
147     <!--  SketchConstraintHorizontal  -->
148       <feature id="SketchConstraintHorizontal" title="Horizontal" tooltip="Create constraint defining horizontal line" icon=":icons/horisontal.png">
149         <sketch_constraint_shape_selector id="ConstraintEntityA" 
150             label="Line" tooltip="Select a line" shape_types="edge">
151             <validator id="ModuleBase_ValidatorLinearEdge" parameters="line"/>
152         </sketch_constraint_shape_selector>
153       </feature>
154     <!--  SketchConstraintVertical  -->
155       <feature id="SketchConstraintVertical" title="Vertical" tooltip="Create constraint defining vertical line" icon=":icons/vertical.png">
156         <sketch_constraint_shape_selector id="ConstraintEntityA" 
157             label="Line" tooltip="Select a line" shape_types="edge">
158             <validator id="ModuleBase_ValidatorLinearEdge" parameters="line"/>
159         </sketch_constraint_shape_selector>
160       </feature>
161     <!--  SketchConstraintEqual  -->
162       <feature id="SketchConstraintEqual" title="Equal" tooltip="Create constraint defining equality of two objects" icon=":icons/equal.png">
163         <sketch_constraint_shape_selector id="ConstraintEntityA" 
164             label="First object" tooltip="Select line, circle or arc" shape_types="edge">
165         </sketch_constraint_shape_selector>
166         
167         <sketch_constraint_shape_selector id="ConstraintEntityB"
168             label="Last object" tooltip="Select line, circle or arc" shape_types="edge">
169         </sketch_constraint_shape_selector>
170       </feature>
171     <!--  SketchConstraintTangent  -->
172       <feature id="SketchConstraintTangent" title="Tangent" tooltip="Create constraint defining tangency of two objects" icon=":icons/tangent.png">
173         <sketch_constraint_shape_selector id="ConstraintEntityA" 
174             label="First object" tooltip="Select line or arc" shape_types="edge">
175         </sketch_constraint_shape_selector>
176         
177         <sketch_constraint_shape_selector id="ConstraintEntityB"
178             label="Last object" tooltip="Select line or arc" shape_types="edge">
179         </sketch_constraint_shape_selector>
180       </feature>
181     <!--  SketchConstraintMirror  -->
182       <feature
183         id="SketchConstraintMirror"
184         title="Mirror"
185         tooltip="Create constraint mirroring group of objects"
186         internal="1" />
187     <!--  SketchConstraintFillet  -->
188       <feature id="SketchConstraintFillet" title="Fillet" tooltip="Create constraint defining fillet between two objects">
189         <sketch_constraint_shape_selector id="ConstraintEntityA" 
190             label="First object" tooltip="Select line or arc" shape_types="edge">
191         </sketch_constraint_shape_selector>
192
193         <sketch_constraint_shape_selector id="ConstraintEntityB"
194             label="Last object" tooltip="Select line or arc" shape_types="edge">
195         </sketch_constraint_shape_selector>
196
197         <doublevalue_editor label="Value" tooltip="Fillet radius" id="ConstraintValue" default="0" min="0">
198           <validator id="GeomValidators_Positive"/>
199         </doublevalue_editor>
200       </feature>
201     </group>
202   </workbench>
203 </plugin>