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"
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           <validator id="SketchPlugin_ShapeValidator" parameters="ConstraintEntityB"/>
107         </sketch_constraint_shape_selector>
108         
109         <sketch_constraint_shape_selector id="ConstraintEntityB" label="Last line" tooltip="Select a line" 
110             shape_types="edge">
111             <selection_filter id="EdgeFilter" parameters="line"/>
112             <validator id="SketchPlugin_DifferentObjects"/>
113             <validator id="SketchPlugin_ShapeValidator" parameters="ConstraintEntityA"/>
114         </sketch_constraint_shape_selector>
115         
116         <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt" internal="1" obligatory="0"/>
117         <validator id="PartSet_ParallelValidator"/>
118       </feature>
119     <!--  SketchConstraintPerpendicular  -->
120       <feature id="SketchConstraintPerpendicular" title="Perpendicular" tooltip="Create constraint defining two perpendicular lines" icon=":icons/perpendicular.png">
121         <sketch_constraint_shape_selector id="ConstraintEntityA" 
122             label="First line" tooltip="Select an line" 
123             shape_types="edge">
124           <validator id="SketchPlugin_ShapeValidator" parameters="ConstraintEntityB"/>
125           <selection_filter id="EdgeFilter" parameters="line"/>
126     </sketch_constraint_shape_selector>
127         
128         <sketch_constraint_shape_selector id="ConstraintEntityB" 
129             label="Last line" tooltip="Select an line" 
130             shape_types="edge">
131             <validator id="SketchPlugin_DifferentObjects"/>
132           <validator id="SketchPlugin_ShapeValidator" parameters="ConstraintEntityA"/>
133           <selection_filter id="EdgeFilter" parameters="line"/>
134     </sketch_constraint_shape_selector>
135         <validator id="PartSet_PerpendicularValidator"/>
136       </feature>
137     <!--  SketchConstraintRigid  -->
138       <feature id="SketchConstraintRigid" title="Fixed" tooltip="Fix an object" icon=":icons/fixed.png">
139         <shape_selector id="ConstraintEntityA" label="Object" tooltip="Select an object" 
140             shape_types="edge vertex">
141                <validator id="SketchPlugin_ResultPoint"/>
142             <validator id="SketchPlugin_ResultLine"/>
143             <validator id="SketchPlugin_ResultArc"/>
144         </shape_selector>
145         <validator id="PartSet_RigidValidator"/>
146       </feature>
147     </group>
148   </workbench>
149 </plugin>