Salome HOME
2.3.5 Point creation: by geometrical property
[modules/shaper.git] / src / ConstructionPlugin / point_widget.xml
1 <!--
2 Copyright (C) 2014-2017  CEA/DEN, EDF R&D
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with this library; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
18 See http:##www.salome-platform.org/ or
19 email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
20 -->
21
22 <source>
23   <toolbox id="creation_method">
24     <box id="by_xyz"
25          title="By X, Y, Z"
26          tooltip="Point at a given distance from the origin."
27          icon="icons/Construction/point_by_xyz_32x32.png">
28       <doublevalue id="x"
29                    label="X "
30                    tooltip="X coordinate."
31                    icon="icons/Construction/x_size.png"
32                    default="0"/>
33       <doublevalue id="y"
34                    label="Y "
35                    tooltip="Y coordinate."
36                    icon="icons/Construction/y_size.png"
37                    default="0"/>
38       <doublevalue id="z"
39                    label="Z "
40                    tooltip="Z coordinate."
41                    icon="icons/Construction/z_size.png"
42                    default="0"/>
43     </box>
44     <box id="by_distance_on_edge"
45          title="By distance on edge"
46          tooltip="Point on an edge, at a given distance of one of its end."
47          icon="icons/Construction/point_by_distance_on_edge_32x32.png">
48       <shape_selector id="edge"
49                       label="Edge"
50                       tooltip="Edge for creating point on it."
51                       icon="icons/Construction/edge.png"
52                       shape_types="edge">
53         <validator id="GeomValidators_Finite"/>
54       </shape_selector>
55       <radiobox id="offset_type">
56         <radio id="offset_type_by_distance"
57              title="Distance on edge by value"
58              tooltip="Point on an edge, at a given distance specified by value."
59              icon="icons/Construction/point_by_distance_on_edge_24x24.png">
60           <doublevalue id="distance"
61              label="Distance"
62              tooltip="Distance value."
63              min="0.0"
64              default="10">
65           </doublevalue>
66         </radio>
67         <radio id="offset_type_by_ratio"
68              title="Distance on edge by ratio"
69              tooltip="Point on an edge, at a given distance specified by ratio."
70              icon="icons/Construction/point_by_ratio_on_edge_24x24.png">
71           <doublevalue id="ratio"
72              label="Ratio"
73              tooltip="Ratio value."
74              min="0.0"
75              max="1.0"
76              default="0.5">
77           </doublevalue>
78         </radio>
79       </radiobox>
80       <boolvalue id="reverse"
81            label="Reverse"
82            tooltip="Distance from edge end point."
83            default="false"/>
84     </box>
85     <box id="by_projection"
86          title="By projection on edge or plane"
87          tooltip="Point on edge or plane by projection selected point."
88          icon="icons/Construction/point_by_projection_32x32.png">
89       <shape_selector id="point_to_project"
90                       label="Point"
91                       tooltip="Point for projection."
92                       icon="icons/Construction/point.png"
93                       shape_types="vertex">
94       </shape_selector>
95       <toolbox id="projection_type">
96         <box id="projection_type_on_edge"
97              title="By projection on edge"
98              tooltip="Point on edge by projection selected point."
99              icon="icons/Construction/point_by_projection_on_edge_24x24.png">
100           <shape_selector id="edge_for_point_projection"
101                           label="edge"
102                           tooltip="Edge for projection."
103                           icon="icons/Construction/edge.png"
104                           shape_types="edge">
105           </shape_selector>
106         </box>
107         <box id="projection_type_on_face"
108              title="By projection on face"
109              tooltip="Point on face surface by projection selected point."
110              icon="icons/Construction/point_by_projection_on_face_24x24.png">
111           <shape_selector id="face_for_point_projection"
112                           label="face"
113                           tooltip="Face for projection."
114                           icon="icons/Construction/face.png"
115                           shape_types="face">
116             <validator id="GeomValidators_Face" parameters="plane"/>
117           </shape_selector>
118         </box>
119       </toolbox>
120     </box>
121     <box id="by_intersection"
122          title="By intersection of objects"
123          tooltip="Point on intersection of different objects."
124          icon="icons/Construction/point_by_intersection_32x32.png">
125       <toolbox id="intersection_type">
126         <box id="intersection_type_by_lines"
127              title="By two lines intersection"
128              tooltip="Point by intersection of two coplanar lines."
129              icon="icons/Construction/point_by_lines_intersection_24x24.png">
130           <shape_selector id="intersection_line_1"
131                           label="First line"
132                           tooltip="First line."
133                           icon="icons/Construction/edge.png"
134                           shape_types="edge">
135             <validator id="GeomValidators_ShapeType" parameters="line"/>
136             <validator id="ConstructionPlugin_ValidatorPointLines"
137                        parameters="intersection_line_2"/>
138           </shape_selector>
139           <shape_selector id="intersection_line_2"
140                           label="Second line"
141                           tooltip="Second line."
142                           icon="icons/Construction/edge.png"
143                           shape_types="edge">
144             <validator id="GeomValidators_ShapeType" parameters="line"/>
145             <validator id="ConstructionPlugin_ValidatorPointLines"
146                        parameters="intersection_line_1"/>
147           </shape_selector>
148         </box>
149         <box id="intersection_type_by_line_and_plane"
150              title="By line and plane intersection"
151              tooltip="Point by intersection of line and plane."
152              icon="icons/Construction/point_by_line_and_plane_intersection_24x24.png">
153           <shape_selector id="intersection_line"
154                           label="Line"
155                           tooltip="Line for intersection."
156                           icon="icons/Construction/edge.png"
157                           shape_types="edge">
158             <validator id="ConstructionPlugin_ValidatorPointEdgeAndPlaneNotParallel"
159                        parameters="intersection_plane"/>
160           </shape_selector>
161           <shape_selector id="intersection_plane"
162                           label="Plane"
163                           tooltip="Plane for intersection."
164                           icon="icons/Construction/face.png"
165                           shape_types="face">
166             <validator id="GeomValidators_Face" parameters="plane"/>
167             <validator id="ConstructionPlugin_ValidatorPointEdgeAndPlaneNotParallel"
168                        parameters="intersection_line"/>
169           </shape_selector>
170           <optionalbox id="use_offset" title="Offset from the plane">
171             <doublevalue id="offset"
172                          label="Distance "
173                          tooltip="Distance from the plane"
174                          min="0"
175                          default="0"/>
176             <boolvalue id="reverse_offset"
177                        label="Reverse"
178                        tooltip="Reverse offset value"
179                        default="false"/>
180           </optionalbox>
181         </box>
182         <box id="intersection_type_by_planes"
183              title="By three planes intersection"
184              tooltip="Point by intersection of three planes."
185              icon="icons/Construction/point_by_planes_intersection_24x24.png">
186           <shape_selector id="intersection_plane_1"
187                           label="1st plane"
188                           tooltip="Select a planar face."
189                           icon="icons/Construction/face.png"
190                           shape_types="face">
191             <validator id="GeomValidators_Face" parameters="plane"/>
192             <validator id="ConstructionPlugin_ValidatorPointThreeNonParallelPlanes"
193                        parameters="intersection_plane_2, intersection_plane_3"/>
194           </shape_selector>
195           <shape_selector id="intersection_plane_2"
196                           label="2nd plane"
197                           tooltip="Select a planar face."
198                           icon="icons/Construction/face.png"
199                           shape_types="face">
200             <validator id="GeomValidators_Face" parameters="plane"/>
201             <validator id="ConstructionPlugin_ValidatorPointThreeNonParallelPlanes"
202                        parameters="intersection_plane_1, intersection_plane_3"/>
203           </shape_selector>
204           <shape_selector id="intersection_plane_3"
205                           label="3rd plane"
206                           tooltip="Select a planar face."
207                           icon="icons/Construction/face.png"
208                           shape_types="face">
209             <validator id="GeomValidators_Face" parameters="plane"/>
210             <validator id="ConstructionPlugin_ValidatorPointThreeNonParallelPlanes"
211                        parameters="intersection_plane_1, intersection_plane_2"/>
212           </shape_selector>
213         </box>
214         </toolbox>
215     </box>
216     <box id="by_geometrical_property"
217          title="By geometrical property of object"
218          tooltip="Point by center of gravity or center of circle."
219          icon="icons/Construction/point_by_geometrical_property_32x32.png">
220       <toolbox id="geometrical_property_type">
221         <box id="geometrical_property_type_by_center_of_gravity"
222              title="By center of gravity"
223              tooltip="Point by center of gravity."
224              icon="icons/Construction/point_by_center_of_gravity_24x24.png">
225           <shape_selector id="object_for_center_of_gravity"
226                           label="Object"
227                           tooltip="Object for center of gravity."
228                           icon="icons/Construction/shapes.png"
229                           shape_types="vertices edges wires faces shells solids compsolids compounds">
230             <validator id="GeomValidators_Finite"/>
231           </shape_selector>
232         </box>
233         <box id="geometrical_property_type_by_center_of_circle"
234              title="By center of circle"
235              tooltip="Point by center of circle."
236              icon="icons/Construction/point_by_center_of_circle_24x24.png">
237           <shape_selector id="object_for_center_of_circle"
238                           label="Object"
239                           tooltip="Object for center of circle."
240                           icon="icons/Construction/edge.png"
241                           shape_types="edges">
242             <validator id="GeomValidators_ShapeType" parameters="circle"/>
243           </shape_selector>
244         </box>
245       </toolbox>
246     </box>
247   </toolbox>
248 </source>