Salome HOME
9eb94b38ff2f2fa300e0c0d0a16e4beedfc10f46
[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         <boolvalue id="Construction" label="Construction" default="false" tooltip="Construction element" obligatory="0"/>
23       </feature>
24       <feature id="SketchCircle" title="Circle" tooltip="Create a new circle" icon=":icons/circle.png">
25         <sketch-2dpoint_selector id="CircleCenter" title="Center" tooltip="Center coordinates"/>
26         <point2ddistance id="CircleRadius" first_point="CircleCenter" label="Radius:" min="0" step="1.0" default="0" icon=":icons/radius.png" tooltip="Set radius">
27           <validator id="GeomValidators_Positive"/>
28         </point2ddistance>
29       </feature>
30       <feature id="SketchArc" title="Arc" tooltip="Create a new arc" icon=":icons/arc.png">
31         <sketch-2dpoint_selector id="ArcCenter" title="Center" tooltip="Center of a circle"/>
32         <sketch-2dpoint_selector id="ArcStartPoint" title="Start point" tooltip="Start point"/>
33         <sketch-2dpoint_selector id="ArcEndPoint" title="End point" tooltip="End point"/>
34       </feature>
35     </group>
36       
37     <group id="Constraints">
38       <feature
39         id="SketchConstraintCoincidence"
40         title="Coincident"
41         tooltip="Create constraint for the coincidence of two points"
42         internal="1" />
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_ShapeValidator" parameters="ConstraintEntityB"/>
56           <selection_filter id="MultiFilter" parameters="line,vertex"/>
57         </sketch_shape_selector>/>
58         <sketch_shape_selector 
59           id="ConstraintEntityB" 
60           label="Last 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_ShapeValidator" parameters="ConstraintEntityB"/>
66           <selection_filter id="MultiFilter" parameters="line,vertex"/>
67     </sketch_shape_selector>
68         
69         <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt"  default="computed" internal="1" obligatory="0"/>
70         
71         <doublevalue_editor label="Value" tooltip="Distance" id="ConstraintValue" default="computed" min="0">
72           <validator id="GeomValidators_Positive"/>
73         </doublevalue_editor>
74         
75         <validator id="PartSet_DistanceValidator"/>
76       </feature>
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="SketchPlugin_ResultLine"/>
83       <selection_filter id="EdgeFilter" parameters="line"/>
84       <validator id="SketchPlugin_ResultLine"/>
85     </shape_selector>
86         <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
87         <doublevalue_editor label="Value" tooltip="Length" id="ConstraintValue" default="computed">
88           <validator id="GeomValidators_Positive"/>
89         </doublevalue_editor>
90         <validator id="PartSet_LengthValidator"/>
91       </feature>
92     <!--  SketchConstraintRadius  -->
93       <feature id="SketchConstraintRadius" title="Radius" tooltip="Set fixed radius of a circle or an arc" icon=":icons/radius_constr.png">
94         <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"/>
95         <shape_selector id="ConstraintEntityA" label="Circle or Arc" tooltip="Select a circle or an arc" 
96             shape_types="edge">
97             <validator id="SketchPlugin_ResultArc"/>
98             <selection_filter id="EdgeFilter" 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             <selection_filter id="EdgeFilter" 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             <selection_filter id="EdgeFilter" parameters="line"/>
115             <validator id="PartSet_DifferentObjects"/>
116             <validator id="SketchPlugin_ShapeValidator" parameters="ConstraintEntityA"/>
117         </sketch_constraint_shape_selector>
118         
119         <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt" internal="1" obligatory="0"/>
120         <validator id="PartSet_ParallelValidator"/>
121       </feature>
122     <!--  SketchConstraintPerpendicular  -->
123       <feature id="SketchConstraintPerpendicular" title="Perpendicular" tooltip="Create constraint defining two perpendicular lines" icon=":icons/perpendicular.png">
124         <sketch_constraint_shape_selector id="ConstraintEntityA" 
125             label="First line" tooltip="Select an line" 
126             shape_types="edge">
127           <validator id="SketchPlugin_ShapeValidator" parameters="ConstraintEntityB"/>
128           <selection_filter id="EdgeFilter" parameters="line"/>
129     </sketch_constraint_shape_selector>
130         
131         <sketch_constraint_shape_selector id="ConstraintEntityB" 
132             label="Last line" tooltip="Select an line" 
133             shape_types="edge">
134             <validator id="PartSet_DifferentObjects"/>
135           <validator id="SketchPlugin_ShapeValidator" parameters="ConstraintEntityA"/>
136           <selection_filter id="EdgeFilter" parameters="line"/>
137     </sketch_constraint_shape_selector>
138         <validator id="PartSet_PerpendicularValidator"/>
139       </feature>
140     <!--  SketchConstraintRigid  -->
141       <feature id="SketchConstraintRigid" title="Fixed" tooltip="Fix an object" icon=":icons/fixed.png">
142         <shape_selector id="ConstraintEntityA" label="Object" tooltip="Select an object" 
143             shape_types="edge vertex">
144                <validator id="SketchPlugin_ResultPoint"/>
145             <validator id="SketchPlugin_ResultLine"/>
146             <validator id="SketchPlugin_ResultArc"/>
147         </shape_selector>
148         <validator id="PartSet_RigidValidator"/>
149       </feature>
150     </group>
151   </workbench>
152 </plugin>