<group id="Basic">
<feature
id="Sketch"
- nested="SketchPoint SketchLine SketchCircle SketchArc SketchConstraintLength SketchConstraintRadius SketchConstraintDistance SketchConstraintParallel SketchConstraintPerpendicular SketchConstraintRigid SketchConstraintHorizontal SketchConstraintVertical SketchConstraintEqual SketchConstraintTangent SketchConstraintFillet SketchConstraintCoincidence SketchConstraintMirror SketchConstraintAngle SketchMultiRotation SketchMultiTranslation SketchConstraintCollinear"
+ nested="SketchPoint SketchLine SketchCircle SketchArc SketchRectangle SketchConstraintLength SketchConstraintRadius SketchConstraintDistance SketchConstraintParallel SketchConstraintPerpendicular SketchConstraintRigid SketchConstraintHorizontal SketchConstraintVertical SketchConstraintEqual SketchConstraintTangent SketchConstraintFillet SketchConstraintCoincidence SketchConstraintMirror SketchConstraintAngle SketchMultiRotation SketchMultiTranslation SketchConstraintCollinear SketchConstraintMiddle"
when_nested="accept abort"
title="Sketch"
tooltip="Create sketch"
<boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
<validator id="GeomValidators_Different" parameters="StartPoint,EndPoint"/>
</feature>
- <feature id="SketchCircle" title="Circle" tooltip="Create circle" icon=":icons/circle.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/radius.png" tooltip="Set radius">
- <validator id="GeomValidators_Positive"/>
- </point2ddistance>
- <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
+
+ <!-- SketchCircle -->
+ <feature
+ id="SketchCircle"
+ title="Circle"
+ tooltip="Create circle"
+ icon=":icons/circle.png">
+ <toolbox id="CircleType">
+ <box id="CenterRadius" title="Center and radius" icon=":icons/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/radius.png" tooltip="Set radius">
+ <validator id="GeomValidators_Positive"/>
+ </point2ddistance>
+ <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
+ </box>
+ <box id="ThreePoints" title="Three points" icon=":icons/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"/>
+ <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
+ </box>
+ </toolbox>
</feature>
- <feature id="SketchArc" title="Arc" tooltip="Create arc" icon=":icons/arc.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"/>
- <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
- <validator id="GeomValidators_Different" parameters="ArcCenter,ArcStartPoint,ArcEndPoint"/>
+
+ <!-- SketchArc -->
+ <feature
+ id="SketchArc"
+ title="Arc"
+ tooltip="Create arc"
+ icon=":icons/arc.png">
+ <toolbox id="ArcType">
+ <box id="CenterStartEnd" title="Center and two points" icon=":icons/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"/>
+ <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
+ <validator id="GeomValidators_Different" parameters="ArcCenter,ArcStartPoint,ArcEndPoint"/>
+ </box>
+ <box id="ThreePoints" title="Three points on arc" icon=":icons/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"/>
+ <doublevalue id="ArcRadius" accept_expressions="0" label="Radius:" default="computed" icon=":icons/radius.png" tooltip="Set radius" obligatory="1">
+ <validator id="GeomValidators_Positive"/>
+ </doublevalue>
+ <doublevalue id="ArcAngle" label="Angle:" icon=":icons/angle.png" tooltip="Set angle" default="90" use_reset="false" obligatory="1"/>
+ <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
+ <validator id="GeomValidators_Different" parameters="ArcStartPoint,ArcEndPoint,ArcPassedPoint"/>
+ </box>
+ <box id="Tangent" title="Tangent with edge" icon=":icons/arc_tang_32x32.png">
+ <sketch_shape_selector id="ArcTangentPoint" label="Start 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"/>
+ <doublevalue id="ArcRadius" accept_expressions="0" label="Radius:" default="computed" icon=":icons/radius.png" tooltip="Set radius" obligatory="1">
+ <validator id="GeomValidators_Positive"/>
+ </doublevalue>
+ <doublevalue id="ArcAngle" label="Angle:" icon=":icons/angle.png" tooltip="Set angle" default="90" use_reset="false" obligatory="1"/>
+ <boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
+ </box>
+ </toolbox>
</feature>
+ </group>
+
+ <group id="Macro">
<!-- SketchConstraintFillet -->
<feature id="SketchConstraintFillet" title="Fillet" tooltip="Create constraint defining fillet between two objects" icon=":icons/fillet.png">
- <sketch_shape_selector id="ConstraintEntityA"
+ <!--<sketch_shape_selector id="ConstraintEntityA"
label="Point" tooltip="Select point for fillet (should be shared by two entities only)" shape_types="vertex">
<validator id="SketchPlugin_FilletVertexValidator"/>
- </sketch_shape_selector>
- <doublevalue label="Radius" tooltip="Fillet arc radius" id="ConstraintValue" accept_expressions="0" min="0" default="1" use_reset="false">
+ </sketch_shape_selector>-->
+ <sketch_multi_selector id="ConstraintEntityA"
+ label="Points:"
+ tooltip="Select points for fillets"
+ type_choice="Vertices">
+ <validator id="SketchPlugin_FilletVertexValidator"/>
+ </sketch_multi_selector>
+ <doublevalue label="Radius" tooltip="Fillet arc radius" id="ConstraintValue" accept_expressions="0" min="0" use_reset="false">
<validator id="GeomValidators_Positive"/>
</doublevalue>
<validator id="PartSet_FilletSelection"/>
<validator id="PartSet_PerpendicularSelection"/>
</feature>
- <!-- SketchConstraintCoincedence -->
+ <!-- SketchConstraintCoincidence -->
<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"/>
</sketch_shape_selector>
<validator id="PartSet_CollinearSelection"/>
</feature>
+
+ <!-- SketchConstraintMiddle -->
+ <feature id="SketchConstraintMiddle" title="Middle point" tooltip="Create constraint for setting middle point on a line" icon=":icons/middlepoint.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"/>
+ <validator id="SketchPlugin_MiddlePointAttr" parameters="ConstraintEntityB"/>
+ </sketch_shape_selector>
+ <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_MiddlePointAttr" parameters="ConstraintEntityA"/>
+ </sketch_shape_selector>
+ <validator id="PartSet_MiddlePointSelection"/>
+ </feature>
</group>