Salome HOME
Task #3005 : To be able to create a group on a whole result
[modules/shaper.git] / src / SketchPlugin / plugin-Sketch.xml
index e44cc0171af97a581976aa6f2ea8de897435034e..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"
@@ -21,7 +22,7 @@
         tooltip="Create sketch"
         icon="icons/Sketch/sketch.png"
         helpfile="SketchPlugin.html">
-        <sketch-start-label id="External" title="Select a plane on which to create a sketch" tooltip="Select a plane on which to create a sketch">
+        <sketch-start-label id="External" geometrical_selection="true" title="Select a plane on which to create a sketch" tooltip="Select a plane on which to create a sketch">
           <validator id="GeomValidators_Face" parameters="plane"/>
         </sketch-start-label>
         <label id="SolverDOF"/>
               <validator id="SketchPlugin_ArcEndPointValidator" parameters="end_point_ref"/>
             </sketch-2dpoint_selector>
           </box>
+          <box id="by_transversal_line"
+               icon="icons/Sketch/arc_perp_32x32.png"
+               title="Perpendicular to line">
+            <sketch_shape_selector id="tangent_point"
+                                   label="Transversal point"
+                                   tooltip="Select point on line"
+                                   shape_types="vertex">
+              <validator id="SketchPlugin_ArcTransversalPoint"/>
+            </sketch_shape_selector>
+            <sketch-2dpoint_selector id="end_point_3"
+                                     reference_attribute="end_point_ref"
+                                     title="End point"
+                                     tooltip="End point"
+                                     accept_expressions="0"
+                                     enable_value="enable_by_preferences">
+              <validator id="SketchPlugin_ArcEndPointValidator" parameters="end_point_ref"/>
+            </sketch-2dpoint_selector>
+          </box>
         </toolbox>
         <labelvalue id="radius"
                     icon="icons/Sketch/radius.png"
       <!--  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" />
     </group>
 
     <group id="Dimensional constraints">
-    <!--  SketchConstraintDistance  -->
+      <!--  SketchConstraintDistance  -->
       <feature
         id="SketchConstraintDistance"
         title="Distance"
         <validator id="PartSet_ParallelSelection"/>
       </feature>
 
-    <!--  SketchConstraintPerpendicular  -->
+      <!--  SketchConstraintPerpendicular  -->
       <feature id="SketchConstraintPerpendicular" title="Perpendicular"
-               tooltip="Create constraint defining two perpendicular lines"
+               tooltip="Create constraint defining two orthogonal objects"
                icon="icons/Sketch/perpendicular.png"
                helpfile="perpendicularFeature.html">
         <sketch_shape_selector id="ConstraintEntityA"
-            label="First line" tooltip="Select a line"
+            label="First object" tooltip="Select line or arc"
             shape_types="edge">
           <validator id="PartSet_DifferentObjects"/>
           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
-            <validator id="GeomValidators_ShapeType" parameters="line"/>
+          <validator id="SketchPlugin_PerpendicularAttr" parameters="ConstraintEntityB"/>
+          <validator id="GeomValidators_ShapeType" parameters="line,circle"/>
         </sketch_shape_selector>
 
         <sketch_shape_selector id="ConstraintEntityB"
-            label="Second line" tooltip="Select a line"
+            label="Second object" tooltip="Select line or arc"
             shape_types="edge">
-            <validator id="PartSet_DifferentObjects"/>
+          <validator id="PartSet_DifferentObjects"/>
           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
-            <validator id="GeomValidators_ShapeType" parameters="line"/>
+          <validator id="SketchPlugin_PerpendicularAttr" parameters="ConstraintEntityA"/>
+          <validator id="GeomValidators_ShapeType" parameters="line,circle"/>
         </sketch_shape_selector>
         <validator id="PartSet_PerpendicularSelection"/>
       </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"
         <validator id="PartSet_EqualSelection"/>
       </feature>
 
-    <!--  SketchConstraintCollinear  -->
+      <!--  SketchConstraintCollinear  -->
       <feature id="SketchConstraintCollinear" title="Collinear" tooltip="Create constraint defining collinearity of two lines"
                icon="icons/Sketch/collinear.png"
                helpfile="collinearFeature.html">