Salome HOME
Task #3005 : To be able to create a group on a whole result
[modules/shaper.git] / src / SketchPlugin / plugin-Sketch.xml
index 35a8e7a76107fda527e6900103fe66d767980579..9c930341cb3ea630209f22454d6e8afafea2fde5 100644 (file)
@@ -5,6 +5,7 @@
         id="Sketch"
         nested="SketchPoint SketchIntersectionPoint SketchLine
                 SketchCircle SketchMacroCircle SketchArc SketchMacroArc
+                SketchEllipse SketchMacroEllipse
                 SketchRectangle
                 SketchProjection
                 SketchConstraintLength SketchConstraintRadius SketchConstraintDistance SketchConstraintDistanceHorizontal SketchConstraintDistanceVertical
@@ -12,7 +13,7 @@
                 SketchConstraintRigid SketchConstraintHorizontal SketchConstraintVertical
                 SketchConstraintEqual SketchConstraintTangent
                 SketchFillet SketchSplit SketchTrim
-                SketchConstraintCoincidence
+                SketchConstraintCoincidence SketchConstraintCoincidenceInternal
                 SketchConstraintMirror SketchConstraintAngle
                 SketchMultiRotation SketchMultiTranslation
                 SketchConstraintCollinear SketchConstraintMiddle"
       <!--  SketchFillet  -->
       <feature id="SketchFillet"
                title="Fillet"
-               tooltip="Create constraint defining fillet between two objects"
+               tooltip="Create constraint defining fillet between two connected segments"
                icon="icons/Sketch/fillet.png"
                helpfile="filletFeature.html">
         <sketch_shape_selector id="fillet_point"
       </feature>
     </group>
 
-<excluded>
     <group id="Elliptic geometry">
       <!-- SketchEllipse is a hidden feature. It is created inside SketchMacroEllipse. -->
       <feature id="SketchEllipse"
                                  tooltip="Center coordinates"
                                  accept_expressions="0"
                                  enable_value="enable_by_preferences"/>
-        <sketch-2dpoint_selector id="ellipse_focus"
-                                 title="Focus"
+        <sketch-2dpoint_selector id="ellipse_first_focus"
+                                 title="First focus"
                                  tooltip="Focus coordinates"
                                  accept_expressions="0"
                                  enable_value="enable_by_preferences"/>
+        <sketch-2dpoint_selector id="ellipse_second_focus"
+                                 title="Second focus"
+                                 tooltip="Focus coordinates"
+                                 accept_expressions="0"
+                                 enable_value="enable_by_preferences"/>
+        <sketch-2dpoint_selector id="ellipse_major_axis_start_point"
+                                 title="Major axis start"
+                                 tooltip="Coordinates of point on negative direction of major axis"
+                                 accept_expressions="0"
+                                 enable_value="enable_by_preferences"/>
+        <sketch-2dpoint_selector id="ellipse_major_axis_end_point"
+                                 title="Major axis end"
+                                 tooltip="Coordinates of point on positive direction of major axis"
+                                 accept_expressions="0"
+                                 enable_value="enable_by_preferences"/>
+        <sketch-2dpoint_selector id="ellipse_minor_axis_start_point"
+                                 title="Minor axis start"
+                                 tooltip="Coordinates of point on negative direction of minor axis"
+                                 accept_expressions="0"
+                                 enable_value="enable_by_preferences"/>
+        <sketch-2dpoint_selector id="ellipse_minor_axis_end_point"
+                                 title="Minor axis end"
+                                 tooltip="Coordinates of point on positive direction of minor axis"
+                                 accept_expressions="0"
+                                 enable_value="enable_by_preferences"/>
         <labelvalue id="ellipse_major_radius"
-                    icon="icons/Sketch/radius.png"
+                    icon="icons/Sketch/radius_major.png"
                     label="Major radius:"
                     tooltip="Set major radius"
                     default="computed"
                     enable_value="enable_by_preferences">
         </labelvalue>
         <labelvalue id="ellipse_minor_radius"
-                    icon="icons/Sketch/radius.png"
+                    icon="icons/Sketch/radius_minor.png"
                     label="Minor radius:"
                     tooltip="Set minor radius"
                     default="computed"
                title="Ellipse"
                tooltip="Create ellipse"
                helpfile="ellipseFeature.html">
-        <sketch-2dpoint_selector id="center_point"
-                                 reference_attribute="center_point_ref"
-                                 title="Center point"
-                                 tooltip="Center point coordinates"
-                                 accept_expressions="0"
-                                 enable_value="enable_by_preferences"/>
-        <sketch-2dpoint_selector id="major_axis_point"
-                                 reference_attribute="major_axis_point_ref"
-                                 title="Major axis point"
-                                 tooltip="Major axis point coordinates"
-                                 accept_expressions="0"
-                                 enable_value="enable_by_preferences"/>
-        <sketch-2dpoint_selector id="passed_point"
-                                 reference_attribute="passed_point_ref"
-                                 title="Passed point"
-                                 tooltip="Passed point coordinates"
-                                 accept_expressions="0"
-                                 enable_value="enable_by_preferences">
-<!--          <validator id="SketchPlugin_CirclePassedPointValidator"/> -->
-        </sketch-2dpoint_selector>
+        <toolbox id="ellipse_type" modified_in_edit="edit_ellipse_type">
+          <box id="by_center_axis_point"
+               icon="icons/Sketch/ellipse_cent_rad_32x32.png"
+               title="Center, major semi-axis and passing point">
+            <sketch-2dpoint_selector id="first_point"
+                                     reference_attribute="first_point_ref"
+                                     title="Center point"
+                                     tooltip="Center point coordinates"
+                                     accept_expressions="0"
+                                     enable_value="enable_by_preferences"/>
+            <sketch-2dpoint_selector id="second_point"
+                                     reference_attribute="second_point_ref"
+                                     title="Major axis point"
+                                     tooltip="Major axis point coordinates"
+                                     accept_expressions="0"
+                                     enable_value="enable_by_preferences"/>
+            <sketch-2dpoint_selector id="passed_point"
+                                     reference_attribute="passed_point_ref"
+                                     title="Passed point"
+                                     tooltip="Passed point coordinates"
+                                     accept_expressions="0"
+                                     enable_value="enable_by_preferences">
+              <!--          <validator id="SketchPlugin_CirclePassedPointValidator"/> -->
+            </sketch-2dpoint_selector>
+          </box>
+          <box id="by_major_axis_and_point"
+               icon="icons/Sketch/ellipse_axes_32x32.png"
+               title="Major axis and passing point">
+            <sketch-2dpoint_selector id="first_point"
+                                     reference_attribute="first_point_ref"
+                                     title="Major axis start point"
+                                     tooltip="Major axis start point coordinates"
+                                     accept_expressions="0"
+                                     enable_value="enable_by_preferences"/>
+            <sketch-2dpoint_selector id="second_point"
+                                     reference_attribute="second_point_ref"
+                                     title="Major axis end point"
+                                     tooltip="Major axis end point coordinates"
+                                     accept_expressions="0"
+                                     enable_value="enable_by_preferences"/>
+            <sketch-2dpoint_selector id="passed_point"
+                                     reference_attribute="passed_point_ref"
+                                     title="Passed point"
+                                     tooltip="Passed point coordinates"
+                                     accept_expressions="0"
+                                     enable_value="enable_by_preferences"/>
+          </box>
+        </toolbox>
 <!--        <validator id="GeomValidators_Different" parameters="center_point_ref,passed_point_ref"/> -->
-        <labelvalue id="ellipse_major_radius"
-                    icon="icons/Sketch/radius.png"
+        <labelvalue id="major_radius"
+                    icon="icons/Sketch/radius_major.png"
                     label="Major radius:"
                     tooltip="Set major radius"
                     default="computed"
                     enable_value="enable_by_preferences">
           <validator id="GeomValidators_Positive"/>
         </labelvalue>
-        <labelvalue id="ellipse_minor_radius"
-                    icon="icons/Sketch/radius.png"
+        <labelvalue id="minor_radius"
+                    icon="icons/Sketch/radius_minor.png"
                     label="Minor radius:"
                     tooltip="Set minor radius"
                     default="computed"
                    obligatory="0"/>
       </feature>
     </group>
-</excluded>
 
     <group id="Projection">
       <!-- Projected feature -->
         <sketch_multi_selector id="ConstraintMirrorList"
             label="Segments:"
             tooltip="Select list of objects to be mirrored"
-            type_choice="Edges"
+            shape_types="Edges"
             use_external="true"
             greed ="true">
           <validator id="SketchPlugin_MirrorAttr" />
         <sketch_multi_selector id="MultiTranslationList"
             label="Segments:"
             tooltip="Select list of objects to be translated"
-            type_choice="Edges"
+            shape_types="Edges"
             use_external="true"
             greed ="true">
           <validator id="SketchPlugin_CopyValidator" />
         <sketch_multi_selector id="MultiRotationList"
             label="Segments:"
             tooltip="Select list of objects to be rotated"
-            type_choice="Edges"
+            shape_types="Edges"
             use_external="true"
             greed ="true">
           <validator id="SketchPlugin_CopyValidator" />
       </feature>
 
       <!--  SketchConstraintTangent  -->
-      <feature id="SketchConstraintTangent" title="Tangent" tooltip="Create constraint defining tangency of two objects with common coincident point" icon="icons/Sketch/tangent.png"
+      <feature id="SketchConstraintTangent" title="Tangent" tooltip="Create constraint defining tangency of two segments with common coincident point" icon="icons/Sketch/tangent.png"
                helpfile="tangentFeature.html">
         <sketch_shape_selector id="ConstraintEntityA"
             label="First object" tooltip="Select line or arc" shape_types="edge">
         </sketch_shape_selector>
         <validator id="PartSet_CoincidentSelection"/>
       </feature>
+      <!--  SketchConstraintCoincidenceInternal  -->
+      <feature id="SketchConstraintCoincidenceInternal" title="Internal Coincidence" tooltip="Internal coincidence" icon="icons/Sketch/coincedence.png"
+               helpfile="coincedenceFeature.html" internal="1">
+        <sketch_shape_selector id="ConstraintEntityA" label="First object" tooltip="Select a first object" shape_types="vertex">
+          <validator id="PartSet_DifferentObjects"/>
+          <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
+        </sketch_shape_selector>
+        <sketch_shape_selector id="ConstraintEntityB" label="Second object" tooltip="Select a second object" shape_types="vertex">
+          <validator id="PartSet_DifferentObjects"/>
+          <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
+          <validator id="SketchPlugin_CoincidenceAttr" parameters="ConstraintEntityA"/>
+        </sketch_shape_selector>
+        <validator id="PartSet_CoincidentSelection"/>
+      </feature>
 
       <!--  SketchConstraintMiddle  -->
       <feature id="SketchConstraintMiddle" title="Middle point" tooltip="Create constraint for setting middle point on a line"