]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/SketchPlugin/plugin-Sketch.xml
Salome HOME
Issue #2024: Redesign of circle and arc of circle
[modules/shaper.git] / src / SketchPlugin / plugin-Sketch.xml
index e2492432ad546b74767f4ff964ede119dd1cdffd..cf97eaa2110ee81ef8939f8c5f2c86c3b15804a9 100644 (file)
@@ -6,7 +6,7 @@
       <feature
         id="Sketch"
         nested="SketchPoint SketchIntersectionPoint SketchLine
-                SketchCircle SketchMacroCircle SketchArc
+                SketchCircle SketchMacroCircle SketchArc SketchMacroArc
                 SketchRectangle
                 SketchProjection
                 SketchConstraintLength SketchConstraintRadius SketchConstraintDistance
@@ -36,7 +36,7 @@
                                  enable_value="enable_by_preferences"/>
         <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
       </feature>
-      
+
       <!-- SketchLine -->
       <feature id="SketchLine" title="Line" tooltip="Create line" icon="icons/Sketch/line.png">
         <sketch-2dpoint_selector id="StartPoint" accept_expressions="0" title="Start point" tooltip="Start point coordinates"
         <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
       </feature>
 
+      <!-- SketchMacroArc -->
+      <feature
+        id="SketchMacroArc"
+        title="Arc"
+        tooltip="Create arc"
+        icon="icons/Sketch/arc.png">
+        <toolbox id="arc_type">
+          <box id="by_center_and_points"
+               icon="icons/Sketch/arc_base_32x32.png"
+               title="Center and two points">
+            <sketch-2dpoint_selector id="center_point"
+                                     reference_attribute="center_point_ref"
+                                     title="Center point"
+                                     tooltip="Center of a circle"
+                                     accept_expressions="0"
+                                     enable_value="enable_by_preferences" />
+            <sketch-2dpoint_selector id="start_point_1"
+                                     reference_attribute="start_point_ref"
+                                     title="Start point"
+                                     tooltip="Start point"
+                                     accept_expressions="0"
+                                     enable_value="enable_by_preferences"/>
+            <sketch-2dpoint_selector id="end_point_1"
+                                     reference_attribute="end_point_ref"
+                                     title="End point"
+                                     tooltip="End point"
+                                     accept_expressions="0"
+                                     enable_value="enable_by_preferences"/>
+            <validator id="GeomValidators_Different" parameters="center_point,start_point_1,end_point_1"/>
+          </box>
+          <box id="by_three_points"
+               icon="icons/Sketch/arc_3pt_32x32.png"
+               title="Three points on arc">
+            <sketch-2dpoint_selector id="start_point_2"
+                                     reference_attribute="start_point_ref"
+                                     title="Start point"
+                                     tooltip="Start point"
+                                     accept_expressions="0"
+                                     enable_value="enable_by_preferences"/>
+            <sketch-2dpoint_selector id="end_point_2"
+                                     reference_attribute="end_point_ref"
+                                     title="End point"
+                                     tooltip="End point"
+                                     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"
+                                     accept_expressions="0"
+                                     enable_value="enable_by_preferences"/>
+            <validator id="GeomValidators_Different" parameters="start_point_2,end_point_2,passed_point"/>
+          </box>
+          <box id="by_tangent_edge"
+               icon="icons/Sketch/arc_tang_32x32.png"
+               title="Tangent with edge">
+            <sketch_shape_selector id="tangent_point"
+                                   label="Tangent point"
+                                   tooltip="Select point on line"
+                                   shape_types="vertex">
+              <!--<validator id="SketchPlugin_ArcTangentPoint"/>-->
+            </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"/>
+          </box>
+        </toolbox>
+        <labelvalue id="radius"
+                    icon="icons/Sketch/radius.png"
+                    label="Radius:"
+                    tooltip="Set radius"
+                    accept_expressions="0"
+                    min="0"
+                    default="0"
+                    obligatory="0"
+                    enable_value="enable_by_preferences">
+        </labelvalue>
+        <labelvalue id="angle"
+                    icon="icons/Sketch/angle.png"
+                    label="Angle:"
+                    tooltip="Set angle"
+                    default="0"
+                    use_reset="false"
+                    obligatory="0"
+                    enable_value="enable_by_preferences"/>
+        <boolvalue id="Auxiliary"
+                   label="Auxiliary"
+                   tooltip="Construction element"
+                   default="false"
+                   obligatory="0"/>
+      </feature>
+
       <!--  SketchFillet  -->
       <feature id="SketchFillet"
                title="Fillet"
           <validator id="PartSet_DifferentObjects"/>
           <validator id="GeomValidators_ShapeType" parameters="vertex,line"/>
         </sketch_shape_selector>
-        <sketch_shape_selector 
-          id="ConstraintEntityB" 
-          label="Second object" 
-          tooltip="Select point, line end point, line, center of circle or arc." 
+        <sketch_shape_selector
+          id="ConstraintEntityB"
+          label="Second object"
+          tooltip="Select point, line end point, line, center of circle or arc."
           shape_types="edge vertex">
           <validator id="PartSet_DifferentObjects"/>
           <validator id="SketchPlugin_DistanceAttr" parameters="ConstraintEntityA"/>
           <validator id="GeomValidators_ShapeType" parameters="vertex,line"/>
         </sketch_shape_selector>
         <sketch-2dpoint_flyout_selector id="ConstraintFlyoutValuePnt"  default="computed" internal="1" obligatory="0"/>
-        
+
         <doublevalue_editor label="Value" tooltip="Distance" id="ConstraintValue" default="computed" min="0">
           <validator id="GeomValidators_Positive"/>
         </doublevalue_editor>
-        
+
         <validator id="PartSet_DistanceSelection"/>
       </feature>
-      
-    <!--  SketchConstraintLength  -->      
+
+    <!--  SketchConstraintLength  -->
       <feature id="SketchConstraintLength" title="Length" tooltip="Set fixed length of a line segment" icon="icons/Sketch/length.png">
         <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 a line" shape_types="edge" >
       <!--  SketchConstraintParallel  -->
       <feature id="SketchConstraintParallel" title="Parallel" tooltip="Create constraint defining two parallel lines"
                icon="icons/Sketch/parallel.png">
-        <sketch_shape_selector id="ConstraintEntityA" 
+        <sketch_shape_selector id="ConstraintEntityA"
             label="First line" tooltip="Select a line" shape_types="edge">
           <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" 
+
+        <sketch_shape_selector id="ConstraintEntityB" label="Second line" tooltip="Select a line"
             shape_types="edge">
             <validator id="GeomValidators_ShapeType" parameters="line"/>
             <validator id="PartSet_DifferentObjects"/>
         </sketch_shape_selector>
         <validator id="PartSet_ParallelSelection"/>
       </feature>
-      
+
     <!--  SketchConstraintPerpendicular  -->
-      <feature id="SketchConstraintPerpendicular" title="Perpendicular" 
-        tooltip="Create constraint defining two perpendicular lines" 
+      <feature id="SketchConstraintPerpendicular" title="Perpendicular"
+        tooltip="Create constraint defining two perpendicular lines"
         icon="icons/Sketch/perpendicular.png">
-        <sketch_shape_selector id="ConstraintEntityA" 
-            label="First line" tooltip="Select a line" 
+        <sketch_shape_selector id="ConstraintEntityA"
+            label="First line" tooltip="Select a line"
             shape_types="edge">
           <validator id="PartSet_DifferentObjects"/>
           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
             <validator id="GeomValidators_ShapeType" parameters="line"/>
         </sketch_shape_selector>
-        
-        <sketch_shape_selector id="ConstraintEntityB" 
-            label="Second line" tooltip="Select a line" 
+
+        <sketch_shape_selector id="ConstraintEntityB"
+            label="Second line" tooltip="Select a line"
             shape_types="edge">
             <validator id="PartSet_DifferentObjects"/>
           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
       <feature id="SketchConstraintEqual" title="Equal"
         tooltip="Create constraint defining equal lengths of two lines or line and arc or equal radii of two arcs or two circles or arc and circle"
         icon="icons/Sketch/equal.png">
-        <sketch_shape_selector id="ConstraintEntityA" 
+        <sketch_shape_selector id="ConstraintEntityA"
             label="First object" tooltip="Select line, circle or arc" shape_types="edge">
           <validator id="PartSet_DifferentObjects"/>
           <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
         </sketch_shape_selector>
-        
+
         <sketch_shape_selector id="ConstraintEntityB"
             label="Second object" tooltip="Select line, circle or arc" shape_types="edge">
           <validator id="SketchPlugin_EqualAttr" parameters="ConstraintEntityA"/>
         </sketch_shape_selector>
         <validator id="PartSet_EqualSelection"/>
       </feature>
-      
+
     <!--  SketchConstraintCollinear  -->
       <feature id="SketchConstraintCollinear" title="Collinear" tooltip="Create constraint defining collinearity of two lines" icon="icons/Sketch/collinear.png">
-        <sketch_shape_selector id="ConstraintEntityA" 
+        <sketch_shape_selector id="ConstraintEntityA"
             label="First line" tooltip="Select a line" shape_types="edge">
           <validator id="GeomValidators_ShapeType" parameters="line"/>
           <validator id="PartSet_DifferentObjects"/>
         </sketch_shape_selector>
-        
+
         <sketch_shape_selector id="ConstraintEntityB"
             label="Second line" tooltip="Select a line" shape_types="edge">
           <validator id="GeomValidators_ShapeType" parameters="line"/>
         </sketch_shape_selector>
         <validator id="PartSet_CollinearSelection"/>
       </feature>
-         
+
     </group>
-    
+
   </workbench>
 </plugin>