Salome HOME
Merge branch 'Dev_1.2.0' of newgeom:newgeom.git into Dev_1.2.0
[modules/shaper.git] / src / SketchPlugin / plugin-Sketch.xml
index 87f4cf32482a9f7df50a48bb90fe7c743f5aa536..97830f944a99f256685bb442bf106db239ecf5f0 100644 (file)
@@ -5,7 +5,7 @@
     <group id="Basic">
       <feature
         id="Sketch"
-        nested="SketchPoint SketchLine SketchCircle SketchArc SketchConstraintLength SketchConstraintRadius SketchConstraintDistance SketchConstraintParallel SketchConstraintPerpendicular SketchConstraintRigid SketchConstraintHorizontal SketchConstraintVertical SketchConstraintEqual SketchConstraintTangent SketchConstraintFillet SketchConstraintCoincidence SketchConstraintMirror"
+        nested="SketchPoint SketchLine SketchCircle SketchArc SketchConstraintLength SketchConstraintRadius SketchConstraintDistance SketchConstraintParallel SketchConstraintPerpendicular SketchConstraintRigid SketchConstraintHorizontal SketchConstraintVertical SketchConstraintEqual SketchConstraintTangent SketchConstraintFillet SketchConstraintCoincidence SketchConstraintMirror SketchMultiRotation SketchMultiTranslation"
         when_nested="accept abort"
         title="Sketch"
         tooltip="Create sketch"
@@ -54,7 +54,7 @@
               shape_types="edge vertex">
           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
           <validator id="PartSet_DifferentObjects"/>
-          <validator id="GeomValidators_EdgeOrVertex"/>
+          <validator id="GeomValidators_ShapeType" parameters="vertex,line"/>
         </sketch_shape_selector>/>
         <sketch_shape_selector 
           id="ConstraintEntityB" 
@@ -64,7 +64,7 @@
           <validator id="PartSet_DifferentObjects"/>
           <validator id="SketchPlugin_DistanceAttr" parameters="ConstraintEntityA"/>
           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
-          <validator id="GeomValidators_EdgeOrVertex"/>
+          <validator id="GeomValidators_ShapeType" parameters="vertex,line"/>
         </sketch_shape_selector>
         <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt"  default="computed" internal="1" obligatory="0"/>
         
@@ -80,7 +80,7 @@
         <label title="Select a line on which to calculate length" tooltip="Select a line on which to calculate length"/>
         <shape_selector id="ConstraintEntityA" label="Line" tooltip="Select an line" 
             shape_types="edge" >
-        <validator id="GeomValidators_Edge" parameters="line"/>
+        <validator id="GeomValidators_ShapeType" parameters="line"/>
     </shape_selector>
         <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt" default="computed" internal="1" obligatory="0"/>
         <doublevalue_editor label="Value" tooltip="Length" id="ConstraintValue" default="computed">
@@ -94,7 +94,7 @@
         <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"/>
         <shape_selector id="ConstraintEntityA" label="Circle or Arc" tooltip="Select a circle or an arc" 
             shape_types="edge">
-            <validator id="GeomValidators_Edge" parameters="circle"/>
+            <validator id="GeomValidators_ShapeType" parameters="circle"/>
         </shape_selector>
         <sketch-2dpoint_selector id="ConstraintFlyoutValuePnt"  default="computed" internal="1" obligatory="0"/>
         <doublevalue_editor label="Value" tooltip="Radius" id="ConstraintValue" default="computed"/>
       <feature id="SketchConstraintParallel" title="Parallel" tooltip="Create constraint defining two parallel lines" icon=":icons/parallel.png">
         <sketch_shape_selector id="ConstraintEntityA" 
             label="First line" tooltip="Select a line" shape_types="edge">
-          <validator id="GeomValidators_Edge" parameters="line"/>
+          <validator id="GeomValidators_ShapeType" parameters="line"/>
           <validator id="PartSet_DifferentObjects"/>
           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
         </sketch_shape_selector>
         
         <sketch_shape_selector id="ConstraintEntityB" label="Second line" tooltip="Select a line" 
             shape_types="edge">
-            <validator id="GeomValidators_Edge" parameters="line"/>
+            <validator id="GeomValidators_ShapeType" parameters="line"/>
             <validator id="PartSet_DifferentObjects"/>
             <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
         </sketch_shape_selector>
             shape_types="edge">
           <validator id="PartSet_DifferentObjects"/>
           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
-            <validator id="GeomValidators_Edge" parameters="line"/>
+            <validator id="GeomValidators_ShapeType" parameters="line"/>
         </sketch_shape_selector>
         
         <sketch_shape_selector id="ConstraintEntityB" 
             shape_types="edge">
             <validator id="PartSet_DifferentObjects"/>
           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
-            <validator id="GeomValidators_Edge" parameters="line"/>
+            <validator id="GeomValidators_ShapeType" parameters="line"/>
         </sketch_shape_selector>
         <validator id="PartSet_PerpendicularSelection"/>
       </feature>
 
       <!--  SketchConstraintCoincedence  -->
-      <feature id="SketchConstraintCoincidence" title="Coincident" tooltip="Create constraint for the coincidence of two points" icon=":icons/coincedence.png">
-        <sketch_shape_selector id="ConstraintEntityA" label="First point" tooltip="Select a first point" shape_types="vertex">
+      <feature id="SketchConstraintCoincidence" title="Coincident" tooltip="Create constraint for the coincidence of two points or point on line or circle" icon=":icons/coincedence.png">
+        <sketch_shape_selector id="ConstraintEntityA" label="First object" tooltip="Select a first object" shape_types="vertex edge">
           <validator id="PartSet_DifferentObjects"/>
           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
         </sketch_shape_selector>
-        <sketch_shape_selector id="ConstraintEntityB" label="Second point" tooltip="Select a second point" shape_types="vertex">
+        <sketch_shape_selector id="ConstraintEntityB" label="Second object" tooltip="Select a second object" shape_types="vertex edge">
           <validator id="PartSet_DifferentObjects"/>
           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
+          <validator id="SketchPlugin_CoincidenceAttr" parameters="ConstraintEntityA"/>
         </sketch_shape_selector>
         <validator id="PartSet_CoincidentSelection"/>
       </feature>
 
       <!--  SketchConstraintRigid  -->
       <feature id="SketchConstraintRigid" title="Fixed" tooltip="Fix an object" icon=":icons/fixed.png">
-        <shape_selector id="ConstraintEntityA" label="Object" tooltip="Select an object" 
-            shape_types="edge vertex">
-          <validator id="PartSet_SketchEntityValidator" parameters="SketchPoint,SketchLine,SketchCircle,SketchArc"/>
+        <sketch_shape_selector id="ConstraintEntityA" label="Object"
+                        tooltip="Select point, line end point, line, center of circle or arc."
+                        shape_types="edge vertex">
+          <validator id="GeomValidators_ShapeType" parameters="vertex,line,circle"/>
           <validator id="SketchPlugin_NotFixed"/>
-        </shape_selector>
+        </sketch_shape_selector>
         <validator id="PartSet_RigidSelection"/>
       </feature>
-      
-    <!--  SketchConstraintHorizontal  -->
+
+      <!--  SketchConstraintHorizontal  -->
       <feature id="SketchConstraintHorizontal" title="Horizontal" tooltip="Create constraint defining horizontal line" icon=":icons/horisontal.png">
         <sketch_shape_selector id="ConstraintEntityA" 
             label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
-            <validator id="GeomValidators_Edge" parameters="line"/>
+            <validator id="GeomValidators_ShapeType" parameters="line"/>
         </sketch_shape_selector>
         <validator id="PartSet_HVDirSelection"/>
       </feature>
       <feature id="SketchConstraintVertical" title="Vertical" tooltip="Create constraint defining vertical line" icon=":icons/vertical.png">
         <sketch_shape_selector id="ConstraintEntityA" 
             label="Line" tooltip="Select a line" shape_types="edge" use_external="false">
-            <validator id="GeomValidators_Edge" parameters="line"/>
+            <validator id="GeomValidators_ShapeType" parameters="line"/>
         </sketch_shape_selector>
         <validator id="PartSet_HVDirSelection"/>
       </feature>
         tooltip="Create constraint, mirroring group of objects">
         <sketch_shape_selector id="ConstraintEntityA"
             label="Mirror line" tooltip="Select mirror line" shape_types="edge">
-            <validator id="GeomValidators_Edge" parameters="line"/>
+            <validator id="GeomValidators_ShapeType" parameters="line"/>
         </sketch_shape_selector>
         <sketch_multi_selector id="ConstraintMirrorList"
             label="List of objects"
             <validator id="SketchPlugin_MirrorAttr" />
         </sketch_multi_selector>
       </feature>
+      <!--  SketchMultiTranslation  -->
+      <feature
+        id="SketchMultiTranslation"
+        title="Translation" icon=":icons/translate.png"
+        tooltip="Make a number of shifted copies of a group of objects">
+        <sketch_multi_selector id="MultiTranslationList"
+            label="List of objects"
+            tooltip="Select list of translating objects"
+            type_choice="Edges"
+            use_external="true">
+          <validator id="SketchPlugin_CopyValidator" />
+        </sketch_multi_selector>
+        <groupbox title="Direction">
+          <sketch-2dpoint_selector
+              id="MultiTranslationStartPoint"
+              title="Start point"
+              tooltip="Start point of translation"/>
+          <sketch-2dpoint_selector
+              id="MultiTranslationEndPoint"
+              title="End point"
+              tooltip="Final point of translation"/>
+        </groupbox>
+        <integervalue id="MultiTranslationCopies"
+            label="Number of copies"
+            tooltip="Number of copies" 
+            default="1" min="1">
+          <validator id="GeomValidators_Positive"/>
+        </integervalue>
+      </feature>
+      <!--  SketchMultiRotation  -->
+      <feature
+        id="SketchMultiRotation"
+        title="Rotation" icon=":icons/rotate.png"
+        tooltip="Make a number of rotated copies of a group of objects">
+        <sketch_multi_selector id="MultiRotationList"
+            label="List of objects"
+            tooltip="Select list of rotating objects"
+            type_choice="Edges"
+            use_external="true">
+          <validator id="SketchPlugin_CopyValidator" />
+        </sketch_multi_selector>
+        <sketch-2dpoint_selector
+            id="MultiRotationCenter"
+            title="Center of rotation"
+            tooltip="Center of rotation"/>
+        <point2dangle id="MultiRotationAngle"
+                         first_point="MultiRotationCenter"
+                         label="Angle"
+                         icon=":icons/angle.png"
+                         tooltip="Rotation angle"
+                         default="90"/>
+        <integervalue id="MultiRotationCopies"
+            label="Number of copies"
+            tooltip="Number of copies" 
+            default="1" min="1">
+          <validator id="GeomValidators_Positive"/>
+        </integervalue>
+      </feature>
     </group>
   </workbench>
 </plugin>