void SketchPlugin_ConstraintPerpendicular::initAttributes()
{
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::type());
- data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::type());
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
+ data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
}
void SketchPlugin_ConstraintPerpendicular::execute()
if (!sketch())
return thePrevious;
- AISObjectPtr anAIS = thePrevious;
- if (!anAIS) {
- anAIS = SketcherPrs_Factory::perpendicularConstraint(this, sketch()->coordinatePlane());
- }
+ AISObjectPtr anAIS = SketcherPrs_Factory::perpendicularConstraint(this,
+ sketch()->coordinatePlane(), thePrevious);
return anAIS;
}