X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchPlugin%2FSketchPlugin_Constraint.cpp;h=c3d2d00934a6d06569f8e0d46a80126e0db89516;hb=22b8f7fe2eccd1eeee183f52834b191b1e904dc3;hp=e6c9d09fda26d39ef06abb2c1a1d0db7fb03565c;hpb=72fe2af9c04daae44747cdce2f03ec395a4e5511;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/SketchPlugin_Constraint.cpp b/src/SketchPlugin/SketchPlugin_Constraint.cpp index e6c9d09fd..c3d2d0093 100644 --- a/src/SketchPlugin/SketchPlugin_Constraint.cpp +++ b/src/SketchPlugin/SketchPlugin_Constraint.cpp @@ -1,42 +1,12 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D --> + // File: SketchPlugin_Constraint.cpp // Created: 08 May 2014 // Author: Artem ZHIDKOV #include "SketchPlugin_Constraint.h" -#include -#include - -const boost::shared_ptr& SketchPlugin_Constraint::preview() -{ - return getPreview(); -} - -void SketchPlugin_Constraint::addConstrainedObject( - const std::string& theAttrID, - const boost::shared_ptr& theReference) +SketchPlugin_Constraint::SketchPlugin_Constraint() { - if (!data()->attribute(theAttrID).get()) - data()->addAttribute(theAttrID, theReference->type()); - boost::dynamic_pointer_cast( - data()->attribute(theAttrID))->setValue(theReference->value()); -} -void SketchPlugin_Constraint::addConstrainedObject( - const std::string& theAttrID, - const boost::shared_ptr& theReference) -{ - if (!data()->attribute(theAttrID).get()) - data()->addAttribute(theAttrID, theReference->type()); - //boost::dynamic_pointer_cast( - // data()->attribute(theAttrID))->setValue(theReference->value()); -} - -void SketchPlugin_Constraint::getSketchParameters( - std::list< boost::shared_ptr >& 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)); }