Salome HOME
Issue #1834: Fix length of lines
[modules/shaper.git] / src / SketchPlugin / plugin-Sketch.xml
index 0d2eb9c05d5115cd62df5e95864cb1d78c2d707e..bc8d02f5b6216cf49b5ff24a49f212bd4c88414f 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"
@@ -31,9 +31,8 @@
                                  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"/>
-        <!--LINE_LENGHT_BLOCKED
         <doublevalue id="LineLength" accept_expressions="0" label="Length:" default="computed" icon="icons/Sketch/distance_value.png"
-                     tooltip="Line length" obligatory="0" enable_value="false"/> -->
+                     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>
           <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"
                                      enable_value="enable_by_preferences"/>
-            <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>
           </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"
                                      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>
 
         </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">
               label="Edge"
               tooltip="Select external edge."
               shape_types="edge"
-              use_external="false"
+              use_external="true"
+              can_create_external="false"
               use_sketch_plane="false">
           <validator id="SketchPlugin_ProjectionValidator"/>
         </sketch_shape_selector>