Salome HOME
Merge branch 'origin/fixes_for_960'
[modules/shaper.git] / src / ConstructionPlugin / plane_widget.xml
index 7600c1b19808c6db8f505ea22b511053d1bf114d..b9e777555003b0ea4e5115d31c43f50a028aeff6 100644 (file)
-<!-- Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
-
 <source>
-  <switch id="CreationMethod">
-    <case id="PlaneByFaceAndDistance" title="On some distance from a face">
-      <shape_selector id="planeFace"
-                      label="Plane face"
-                      tooltip="Select a planar face"
-                      shape_types="face">
-        <selection_filter id="FaceFilter" parameters="plane"/>
-      </shape_selector>
-      <doublevalue id="distance" 
-                   label="Distance" 
-                   tooltip="Distance from selected face to plane" 
-               default="0" />
-    </case>
-    <case id="PlaneByGeneralEquation" title="By palne equation parameters">
-      <doublevalue id="A" 
-                   label="A:" 
-                   tooltip="The A parameter from general plane equation (Ax+By+Cz+D=0)" 
-                   default="0" />
-      <doublevalue id="B" 
-                   label="B:" 
-                   tooltip="The B parameter from general plane equation (Ax+By+Cz+D=0)" 
-                   default="0" />
-      <doublevalue id="C" 
-                   label="C:" 
-                   tooltip="The C parameter from general plane equation (Ax+By+Cz+D=0)" 
-                   default="0" />
-      <doublevalue id="D" 
-                   label="D:" 
-                   tooltip="The D parameter from general plane equation (Ax+By+Cz+D=0)" 
-                   default="0" />
-    </case>
-  </switch>
+  <toolbox id="creation_method">
+    <box id="by_three_points"
+         title="By three points"
+         tooltip="Plane by three points."
+         icon="icons/Construction/plane_by_three_points_32x32.png">
+      <shape_selector id="point1"
+                      label="1st point"
+                      tooltip="First point."
+                      icon="icons/Construction/point.png"
+                      shape_types="vertex">
+        <validator id="ConstructionPlugin_ValidatorPlaneThreePoints" parameters="point2,point3"/>
+      </shape_selector>
+      <shape_selector id="point2"
+                      label="2nd point"
+                      tooltip="Second point."
+                      icon="icons/Construction/point.png"
+                      shape_types="vertex">
+        <validator id="ConstructionPlugin_ValidatorPlaneThreePoints" parameters="point1,point3"/>
+      </shape_selector>
+      <shape_selector id="point3"
+                      label="3rd point"
+                      tooltip="Third point."
+                      icon="icons/Construction/point.png"
+                      shape_types="vertex">
+        <validator id="ConstructionPlugin_ValidatorPlaneThreePoints" parameters="point1,point2"/>
+      </shape_selector>
+    </box>
+    <box id="by_line_and_point"
+         title="By line and point"
+         tooltip="Plane by line and point."
+         icon="icons/Construction/plane_by_line_and_point_32x32.png">
+      <shape_selector id="line"
+                      label="Line"
+                      tooltip="Select line."
+                      icon="icons/Construction/edge.png"
+                      shape_types="edge"
+                      geometrical_selection="true">
+        <validator id="GeomValidators_ShapeType" parameters="line"/>
+        <validator id="ConstructionPlugin_ValidatorPlaneLinePoint" parameters="point,perpendicular"/>
+      </shape_selector>
+      <shape_selector id="point"
+                      label="Point"
+                      tooltip="Select point."
+                      icon="icons/Construction/point.png"
+                      shape_types="vertex">
+        <validator id="ConstructionPlugin_ValidatorPlaneLinePoint" parameters="line,perpendicular"/>
+      </shape_selector>
+      <boolvalue id="perpendicular"
+           label="Perpendicular "
+           tooltip="Makes the plane perpendicular to the selected line."
+           default="false"/>
+    </box>
+    <box id="by_other_plane"
+         title="By other plane"
+         tooltip="Plane by other plane with different options."
+         icon="icons/Construction/plane_by_other_plane_32x32.png">
+      <shape_selector id="plane"
+                      label="Plane"
+                      tooltip="Select a planar face."
+                      icon="icons/Construction/face.png"
+                      shape_types="face"
+                      geometrical_selection="true">
+        <validator id="GeomValidators_Face" parameters="plane"/>
+      </shape_selector>
+      <toolbox id="by_other_plane_option">
+        <box id="by_distance_from_other"
+             title="By distance from other"
+             tooltip="Plane by distance from other plane."
+             icon="icons/Construction/plane_by_distance_from_other_24x24.png">
+          <doublevalue id="distance"
+                       label="Distance"
+                       tooltip="Distance from selected face to plane."
+                       icon="icons/Construction/distance_value.png"
+                       min="0"
+                       default="10">
+          </doublevalue>
+          <boolvalue id="reverse"
+                     label="Reverse"
+                     tooltip="Checked means on the other side of the selected plane."
+                     default="false"/>
+        </box>
+        <box id="by_coincident_to_point"
+             title="By coincident to point"
+             tooltip="Plane by coincident to point."
+             icon="icons/Construction/plane_by_coincident_to_point_24x24.png">
+          <shape_selector id="coincident_point"
+                          label="Point"
+                          tooltip="Select point."
+                          icon="icons/Construction/point.png"
+                          shape_types="vertex">
+          </shape_selector>
+        </box>
+        <box id="by_rotation"
+             title="By rotation"
+             tooltip="Plane by rotation around axis."
+             icon="icons/Construction/plane_by_rotation_24x24.png">
+          <shape_selector id="axis"
+                          label="Axis"
+                          tooltip="Select line for axis."
+                          icon="icons/Construction/axis.png"
+                          shape_types="edge"
+                          geometrical_selection="true">
+            <validator id="GeomValidators_ShapeType" parameters="line"/>
+          </shape_selector>
+          <doublevalue id="angle"
+                       label="Angle"
+                       tooltip="Angle for rotation around axis."
+                       icon="icons/Construction/angle.png"
+                       min="0"
+                       default="45">
+            <validator id="GeomValidators_Positive"/>
+          </doublevalue>
+        </box>
+      </toolbox>
+    </box>
+    <box id="by_two_parallel_planes"
+         title="By two parallel planes"
+         tooltip="Plane equidistant from 2 parallel planes."
+         icon="icons/Construction/plane_by_two_parallel_planes_32x32.png">
+      <shape_selector id="plane1"
+                      label="1st plane"
+                      tooltip="Select a planar face."
+                      icon="icons/Construction/face.png"
+                      shape_types="face"
+                      geometrical_selection="true">
+        <validator id="GeomValidators_Face" parameters="plane"/>
+        <validator id="ConstructionPlugin_ValidatorPlaneTwoParallelPlanes" parameters="plane2"/>
+      </shape_selector>
+      <shape_selector id="plane2"
+                      label="2nd plane"
+                      tooltip="Select a planar face."
+                      icon="icons/Construction/face.png"
+                      shape_types="face"
+                      geometrical_selection="true">
+        <validator id="GeomValidators_Face" parameters="plane"/>
+        <validator id="ConstructionPlugin_ValidatorPlaneTwoParallelPlanes" parameters="plane1"/>
+      </shape_selector>
+    </box>
+  </toolbox>
 </source>