-void SketchPlugin_Constraint::addConstrainedObject(
- const std::string& theAttrID,
- const boost::shared_ptr<ModelAPI_AttributeRefAttr>& theReference)
-{
- if (!data()->attribute(theAttrID).get())
- data()->addAttribute(theAttrID, theReference->type());
- boost::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(
- data()->attribute(theAttrID))->setValue(theReference->value());
-}
-
-void SketchPlugin_Constraint::getSketchParameters(
- std::list< boost::shared_ptr<ModelAPI_Attribute> >& theParams)
-{
- theParams.push_back(sketch()->data()->attribute(SKETCH_ATTR_ORIGIN));
- theParams.push_back(sketch()->data()->attribute(SKETCH_ATTR_DIRX));
- theParams.push_back(sketch()->data()->attribute(SKETCH_ATTR_DIRY));
- theParams.push_back(sketch()->data()->attribute(SKETCH_ATTR_NORM));