X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchPlugin%2FSketchPlugin_ConstraintCoincidence.cpp;h=85a255bfb8fa924fa459ec9bbb82439fb9e35009;hb=74e9ba33303efc2282db1261706e904efa36b255;hp=e052d1acee3838ab90e0b28e60d8ce68018a0238;hpb=29dc792755900920f8d355a87dd0c31fd26bfe50;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/SketchPlugin_ConstraintCoincidence.cpp b/src/SketchPlugin/SketchPlugin_ConstraintCoincidence.cpp index e052d1ace..85a255bfb 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintCoincidence.cpp +++ b/src/SketchPlugin/SketchPlugin_ConstraintCoincidence.cpp @@ -1,12 +1,18 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D --> + // File: SketchPlugin_ConstraintCoincidence.cpp // Created: 08 May 2014 // Author: Artem ZHIDKOV #include "SketchPlugin_ConstraintCoincidence.h" +#include + #include #include #include +#include +#include SketchPlugin_ConstraintCoincidence::SketchPlugin_ConstraintCoincidence() { @@ -14,11 +20,22 @@ SketchPlugin_ConstraintCoincidence::SketchPlugin_ConstraintCoincidence() void SketchPlugin_ConstraintCoincidence::initAttributes() { - data()->addAttribute(CONSTRAINT_ATTR_ENTITY_A, ModelAPI_AttributeRefAttr::type()); - data()->addAttribute(CONSTRAINT_ATTR_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_ConstraintCoincidence::execute() { } +AISObjectPtr SketchPlugin_ConstraintCoincidence::getAISObject(AISObjectPtr thePrevious) +{ + if (!sketch()) + return thePrevious; + + AISObjectPtr anAIS = thePrevious; + if (!anAIS) { + anAIS = SketcherPrs_Factory::coincidentConstraint(this, sketch()->coordinatePlane()); + } + return anAIS; +}