data()->addAttribute(EXTERNAL_ID(), ModelAPI_AttributeSelection::typeId());
ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), EXTERNAL_ID());
+
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), AUXILIARY_ID());
}
void SketchPlugin_Projection::execute()
computeProjection(theID);
myIsComputing = false;
}
- else if (theID == AUXILIARY_ID())
- {
- AttributeRefAttrPtr aRefAttr = data()->refattr(PROJECTED_FEATURE_ID());
- if (!aRefAttr || !aRefAttr->isInitialized())
- return;
- FeaturePtr aProjection = ModelAPI_Feature::feature(aRefAttr->object());
- if (!aProjection)
- return;
- aProjection->boolean(AUXILIARY_ID())->setValue(boolean(AUXILIARY_ID())->value());
- }
}
void SketchPlugin_Projection::computeProjection(const std::string& theID)
<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 -->
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>