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