Salome HOME
Issue #1652 Add a real widget displaying the length of the line in the panel: correct...
[modules/shaper.git] / src / SketchPlugin / plugin-Sketch.xml
index 592f7503def0a01bf4435b921a30bf7787fce94b..d6d7d909c5ed4b781616e190a5706fed688dee26 100644 (file)
@@ -5,7 +5,7 @@
     <group id="Linear geometry">
       <feature
         id="Sketch"
-        nested="SketchPoint SketchIntersectionPoint SketchLine SketchCircle SketchArc SketchRectangle SketchProjection SketchConstraintLength SketchConstraintRadius SketchConstraintDistance SketchConstraintParallel SketchConstraintPerpendicular SketchConstraintRigid SketchConstraintHorizontal SketchConstraintVertical SketchConstraintEqual SketchConstraintTangent SketchConstraintFillet SketchConstraintCoincidence SketchConstraintMirror SketchConstraintAngle SketchMultiRotation SketchMultiTranslation SketchConstraintCollinear SketchConstraintMiddle"
+        nested="SketchPoint SketchIntersectionPoint SketchLine SketchCircle SketchArc SketchRectangle SketchProjection SketchConstraintLength SketchConstraintRadius SketchConstraintDistance SketchConstraintParallel SketchConstraintPerpendicular SketchConstraintRigid SketchConstraintHorizontal SketchConstraintVertical SketchConstraintEqual SketchConstraintTangent SketchConstraintFillet SketchConstraintSplit SketchConstraintCoincidence SketchConstraintMirror SketchConstraintAngle SketchMultiRotation SketchMultiTranslation SketchConstraintCollinear SketchConstraintMiddle"
         when_nested="accept abort"
         title="Sketch"
         tooltip="Create sketch"
 
       <!-- SketchPoint -->
       <feature id="SketchPoint" title="Point" tooltip="Create point" icon="icons/Sketch/point.png">
-        <sketch-2dpoint_selector id="PointCoordindates" accept_expressions="0" title="Point" tooltip="Point coordinates"/>
+        <sketch-2dpoint_selector id="PointCoordindates" accept_expressions="0" title="Point" tooltip="Point coordinates"
+                                 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" previous_feature_param="EndPoint"/>
-        <sketch-2dpoint_selector id="EndPoint" accept_expressions="0" title="End point" tooltip="End point coordinates"/>
+        <sketch-2dpoint_selector id="StartPoint" accept_expressions="0" title="Start point" tooltip="Start point coordinates"
+                                 enable_value="enable_by_preferences"/>
+        <sketch-2dpoint_selector id="EndPoint" accept_expressions="0" title="End point" tooltip="End point coordinates"
+                                 enable_value="enable_by_preferences"/>
+        <doublevalue id="LineLength" accept_expressions="0" label="Length:" default="computed" icon="icons/Sketch/distance_value.png"
+                     tooltip="Line length" obligatory="0" enable_value="false"/>
         <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
         <validator id="GeomValidators_Different" parameters="StartPoint,EndPoint"/>
       </feature>
         icon="icons/Sketch/circle.png">
         <toolbox id="CircleType">
           <box id="CenterRadius" title="Center and radius" icon="icons/Sketch/circle_pt_rad_32x32.png">
-            <sketch-2dpoint_selector id="CircleCenter" accept_expressions="0" title="Center" tooltip="Center coordinates"/>
-            <point2ddistance id="CircleRadius" accept_expressions="0" first_point="CircleCenter" label="Radius:" min="0" step="1.0" default="0" icon="icons/Sketch/radius.png" tooltip="Set radius">
-              <validator id="GeomValidators_Positive"/>
-            </point2ddistance>
+            <sketch-2dpoint_selector id="CircleCenter" accept_expressions="0" title="Center" tooltip="Center coordinates"
+                                     enable_value="enable_by_preferences"/>
           </box>
           <box id="ThreePoints" title="Three points" icon="icons/Sketch/circle_3pt_32x32.png">
-            <sketch-2dpoint_selector id="FirstPoint" accept_expressions="0" title="First point" tooltip="First point"/>
-            <sketch-2dpoint_selector id="SecondPoint" accept_expressions="0" title="Second point" tooltip="Second point"/>
-            <sketch-2dpoint_selector id="ThirdPoint" accept_expressions="0" title="Third point" tooltip="Third point"/>
+            <sketch-2dpoint_selector id="FirstPoint" accept_expressions="0" title="First point" tooltip="First point"
+                                     enable_value="enable_by_preferences"/>
+            <sketch-2dpoint_selector id="SecondPoint" accept_expressions="0" title="Second point" tooltip="Second point"
+                                     enable_value="enable_by_preferences"/>
+            <sketch-2dpoint_selector id="ThirdPoint" accept_expressions="0" title="Third point" tooltip="Third point"
+                                     enable_value="enable_by_preferences"/>
           </box>
         </toolbox>
+        <point2ddistance id="CircleRadius" accept_expressions="0" first_point="CircleCenter" label="Radius:" min="0" step="1.0"
+                         default="0" icon="icons/Sketch/radius.png" tooltip="Set radius"
+                         enable_value="enable_by_preferences">
+          <validator id="GeomValidators_Positive"/>
+        </point2ddistance>
         <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
       </feature>
 
         icon="icons/Sketch/arc.png">
         <toolbox id="ArcType">
           <box id="CenterStartEnd" title="Center and two points" icon="icons/Sketch/arc_base_32x32.png">
-            <sketch-2dpoint_selector id="ArcCenter" accept_expressions="0" title="Center" tooltip="Center of a circle"/>
-            <sketch-2dpoint_selector id="ArcStartPoint" accept_expressions="0" title="Start point" tooltip="Start point"/>
-            <sketch-2dpoint_selector id="ArcEndPoint" accept_expressions="0" title="End point" tooltip="End point"/>
+            <sketch-2dpoint_selector id="ArcCenter" accept_expressions="0" title="Center" tooltip="Center of a circle"
+                                     enable_value="enable_by_preferences"/>
+            <sketch-2dpoint_selector id="ArcStartPoint" accept_expressions="0" title="Start point" tooltip="Start point"
+                                     enable_value="enable_by_preferences"/>
+            <sketch-2dpoint_selector id="ArcEndPoint" accept_expressions="0" title="End point" tooltip="End point"
+                                     enable_value="enable_by_preferences"/>
             <validator id="GeomValidators_Different" parameters="ArcCenter,ArcStartPoint,ArcEndPoint"/>
           </box>
           <box id="ThreePoints" title="Three points on arc" icon="icons/Sketch/arc_3pt_32x32.png">
-            <sketch-2dpoint_selector id="ArcStartPoint" accept_expressions="0" title="Start point" tooltip="Start point"/>
-            <sketch-2dpoint_selector id="ArcEndPoint" accept_expressions="0" title="End point" tooltip="End point"/>
-            <sketch-2dpoint_selector id="ArcPassedPoint" accept_expressions="0" title="Passed point" tooltip="Passed point"/>
+            <sketch-2dpoint_selector id="ArcStartPoint" accept_expressions="0" title="Start point" tooltip="Start point"
+                                     enable_value="enable_by_preferences"/>
+            <sketch-2dpoint_selector id="ArcEndPoint" accept_expressions="0" title="End point" tooltip="End point"
+                                     enable_value="enable_by_preferences"/>
+            <sketch-2dpoint_selector id="ArcPassedPoint" accept_expressions="0" title="Passed point" tooltip="Passed point"
+                                     enable_value="enable_by_preferences"/>
             <validator id="GeomValidators_Different" parameters="ArcStartPoint,ArcEndPoint,ArcPassedPoint"/>
           </box>
           <box id="Tangent" title="Tangent with edge" icon="icons/Sketch/arc_tang_32x32.png">
-            <sketch_shape_selector id="ArcTangentPoint" label="Start point" tooltip="Select point on line" shape_types="vertex">
+            <sketch_shape_selector id="ArcTangentPoint" label="Tangent point" tooltip="Select point on line" shape_types="vertex">
               <validator id="SketchPlugin_ArcTangentPoint" parameters="" />
             </sketch_shape_selector>
-            <sketch-2dpoint_selector id="ArcEndPoint" accept_expressions="0" title="End point" tooltip="End point"/>
+            <sketch-2dpoint_selector id="ArcEndPoint" accept_expressions="0" title="End point" tooltip="End point"
+                                     enable_value="enable_by_preferences"/>
           </box>
         </toolbox>
-        <doublevalue id="ArcRadius" accept_expressions="0" label="Radius:" default="computed" icon="icons/Sketch/radius.png" tooltip="Set radius" obligatory="0">
+        <doublevalue id="ArcRadius" accept_expressions="0" label="Radius:" default="computed" icon="icons/Sketch/radius.png"
+                     tooltip="Set radius" obligatory="0" enable_value="enable_by_preferences">
           <validator id="GeomValidators_Positive"/>
         </doublevalue>
-        <doublevalue id="ArcAngle" label="Angle:" icon="icons/Sketch/angle.png" tooltip="Set angle" default="90" use_reset="false" obligatory="0"/>
-        <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
+        <doublevalue id="ArcAngle" label="Angle:" icon="icons/Sketch/angle.png" tooltip="Set angle" default="90" use_reset="false" obligatory="0"
+                     enable_value="enable_by_preferences"/>
+        <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"
+                   enable_value="enable_by_preferences"/>
       </feature>
 
       <!--  SketchConstraintFillet  -->
             label="Points:"
             tooltip="Select points for fillets"
             type_choice="Vertices"
-            greed ="true">
+            greed = "true"
+            clear_in_neutral_point="false">
           <validator id="SketchPlugin_FilletVertexValidator"/>
         </sketch_multi_selector>
-        <doublevalue label="Radius" tooltip="Fillet arc radius" id="ConstraintValue" accept_expressions="0" min="0" use_reset="false">
+        <doublevalue label="Radius" tooltip="Fillet arc radius" id="ConstraintValue" accept_expressions="0" min="0" use_reset="false"
+                     enable_value="enable_by_preferences">
           <validator id="GeomValidators_Positive"/>
         </doublevalue>
         <validator id="PartSet_FilletSelection"/>
       </feature>
+      <!--  SketchConstraintSplit  -->
+      <feature id="SketchConstraintSplit" title="Split" tooltip="Create constraints defining split of linear segment, arc or circle" icon="icons/Sketch/split.png">
+        <sketch_sub_shape_selector
+            id="ConstraintValue"
+            label="Split feature"
+            tooltip="Select feature for split"
+            shape_types="edge"
+            use_external="false">
+          <validator id="SketchPlugin_SplitValidator"/>
+        </sketch_sub_shape_selector>
+      </feature>
     </group>
 
     <group id="Projection">
           <validator id="GeomValidators_ShapeType" parameters="line"/>
           <validator id="SketchPlugin_IntersectionValidator"/>
         </sketch_shape_selector>
-        <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
       </feature -->
 
       <!-- Projected feature -->
               label="Edge"
               tooltip="Select external edge."
               shape_types="edge"
+              use_external="false"
               use_sketch_plane="false">
           <validator id="SketchPlugin_ProjectionValidator"/>
         </sketch_shape_selector>
-        <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
       </feature>
     </group>