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