Salome HOME
cc23f8e008231950cec71b37267a609564b6379e
[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"
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       </feature>
19       <feature id="SketchLine" title="Line" tooltip="Create a new line" icon=":icons/line.png">
20         <sketch-2dpoint_selector id="StartPoint" title="Start point" tooltip="Start point coordinates" previous_feature_param="EndPoint"/>
21         <sketch-2dpoint_selector id="EndPoint" title="End point" tooltip="End point coordinates"/>
22       </feature>
23       <feature id="SketchCircle" title="Circle" tooltip="Create a new circle" icon=":icons/circle.png">
24         <sketch-2dpoint_selector id="CircleCenter" title="Center" tooltip="Center coordinates"/>
25         <point2ddistance id="CircleRadius" first_point="CircleCenter" label="Radius:" min="0" step="1.0" default="0" icon=":icons/radius.png" tooltip="Set radius">
26           <validator id="GeomValidators_Positive"/>
27         </point2ddistance>
28       </feature>
29       <feature id="SketchArc" title="Arc" tooltip="Create a new arc" icon=":icons/arc.png">
30         <sketch-2dpoint_selector id="ArcCenter" title="Center" tooltip="Center of a circle"/>
31         <sketch-2dpoint_selector id="ArcStartPoint" title="Start point" tooltip="Start point"/>
32         <sketch-2dpoint_selector id="ArcEndPoint" title="End point" tooltip="End point"/>
33       </feature>
34     </group>
35       
36     <group id="Constraints">
37       <feature
38         id="SketchConstraintCoincidence"
39         title="Coincident"
40         tooltip="Create constraint for the coincidence of two points"
41         internal="1" />
42     <!--  SketchConstraintDistance  -->
43       <feature
44         id="SketchConstraintDistance"
45         title="Distance"
46         tooltip="Set fixed distance from a point to an object"
47         icon=":icons/distance.png">
48         <label title="Select objects for distance definition. Following objects can be accepted: point, line or arc end point, center of circle or arc."/>
49         <sketch_shape_selector
50               id="ConstraintEntityA"
51               label="First object"
52               tooltip="Select point, line end point, line, center of circle or arc."
53               shape_types="edge vertex">
54           <selection_filter id="MultiFilter" parameters="line,vertex"/>
55         </sketch_shape_selector>/>
56         <sketch_shape_selector 
57           id="ConstraintEntityB" 
58           label="Last object" 
59           tooltip="Select point, line end point, line, center of circle or arc." 
60                 shape_types="edge vertex">
61             <validator id="SketchPlugin_DifferentObjects"/>
62       <validator id="SketchPlugin_DistanceAttr" parameters="ConstraintEntityA"/>
63       <selection_filter id="MultiFilter" parameters="line,vertex"/>
64     </sketch_shape_selector>
65         
66         <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt"  default="computed" internal="1" obligatory="0"/>
67         
68         <doublevalue_editor label="Value" tooltip="Distance" id="ConstraintValue" default="computed" min="0">
69           <validator id="GeomValidators_Positive"/>
70         </doublevalue_editor>
71         
72         <validator id="PartSet_DistanceValidator"/>
73       </feature>
74     <!--  SketchConstraintLength  -->      
75       <feature id="SketchConstraintLength" title="Length" tooltip="Set fixed length of a line segment" icon=":icons/length.png">
76         <label title="Select a line on which to calculate length" tooltip="Select a line on which to calculate length"/>
77         <shape_selector id="ConstraintEntityA" label="Line" tooltip="Select an line" 
78             shape_types="edge" >
79             <validator id="SketchPlugin_ResultLine"/>
80       <selection_filter id="EdgeFilter" parameters="line"/>
81       <validator id="SketchPlugin_ResultLine"/>
82     </shape_selector>
83         <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
84         <doublevalue_editor label="Value" tooltip="Length" id="ConstraintValue" default="computed">
85           <validator id="GeomValidators_Positive"/>
86         </doublevalue_editor>
87         <validator id="PartSet_LengthValidator"/>
88       </feature>
89     <!--  SketchConstraintRadius  -->
90       <feature id="SketchConstraintRadius" title="Radius" tooltip="Set fixed radius of a circle or an arc" icon=":icons/radius_constr.png">
91         <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"/>
92         <shape_selector id="ConstraintEntityA" label="Circle or Arc" tooltip="Select a circle or an arc" 
93             shape_types="edge">
94             <validator id="SketchPlugin_ResultArc"/>
95             <selection_filter id="EdgeFilter" parameters="circle"/>
96         </shape_selector>
97         <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt"  default="computed" internal="1" obligatory="0"/>
98         <doublevalue_editor label="Value" tooltip="Radius" id="ConstraintValue" default="computed"/>
99         <validator id="PartSet_RadiusValidator"/>
100       </feature>
101     <!--  SketchConstraintParallel  -->
102       <feature id="SketchConstraintParallel" title="Parallel" tooltip="Create constraint defining two parallel lines" icon=":icons/parallel.png">
103         <sketch_constraint_shape_selector id="ConstraintEntityA" 
104             label="First line" tooltip="Select a line" shape_types="edge">
105             <selection_filter id="EdgeFilter" parameters="line"/>
106         </sketch_constraint_shape_selector>
107         
108         <sketch_constraint_shape_selector id="ConstraintEntityB" label="Last line" tooltip="Select a line" 
109             shape_types="edge">
110             <selection_filter id="EdgeFilter" parameters="line"/>
111             <validator id="SketchPlugin_DifferentObjects"/>
112         </sketch_constraint_shape_selector>
113         
114         <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt" internal="1" obligatory="0"/>
115         <validator id="PartSet_ParallelValidator"/>
116       </feature>
117     <!--  SketchConstraintPerpendicular  -->
118       <feature id="SketchConstraintPerpendicular" title="Perpendicular" tooltip="Create constraint defining two perpendicular lines" icon=":icons/perpendicular.png">
119         <sketch_constraint_shape_selector id="ConstraintEntityA" 
120             label="First line" tooltip="Select an line" 
121             shape_types="edge">
122       <selection_filter id="EdgeFilter" parameters="line"/>
123     </sketch_constraint_shape_selector>
124         
125         <sketch_constraint_shape_selector id="ConstraintEntityB" 
126             label="Last line" tooltip="Select an line" 
127             shape_types="edge">
128             <validator id="SketchPlugin_DifferentObjects"/>
129       <selection_filter id="EdgeFilter" parameters="line"/>
130     </sketch_constraint_shape_selector>
131         <validator id="PartSet_PerpendicularValidator"/>
132       </feature>
133     <!--  SketchConstraintRigid  -->
134       <feature id="SketchConstraintRigid" title="Fixed" tooltip="Fix an object" icon=":icons/fixed.png">
135         <shape_selector id="ConstraintEntityA" label="Object" tooltip="Select an object" 
136             shape_types="edge vertex">
137                <validator id="SketchPlugin_ResultPoint"/>
138             <validator id="SketchPlugin_ResultLine"/>
139             <validator id="SketchPlugin_ResultArc"/>
140         </shape_selector>
141         <validator id="PartSet_RigidValidator"/>
142       </feature>
143     </group>
144   </workbench>
145 </plugin>