X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchAPI%2FSketchAPI_SketchEntity.cpp;h=189c1f6e080b56c7115540188ce317b75ee18bd4;hb=d5c7ad3c50f89a2ddc2de1866ffb7f09397f3be2;hp=55e4a3bb4d31e0ef8728dd6a00531646b01872a9;hpb=2532fb2df83ee1ddd9ff3e8b381d3788eaa15b69;p=modules%2Fshaper.git diff --git a/src/SketchAPI/SketchAPI_SketchEntity.cpp b/src/SketchAPI/SketchAPI_SketchEntity.cpp index 55e4a3bb4..189c1f6e0 100644 --- a/src/SketchAPI/SketchAPI_SketchEntity.cpp +++ b/src/SketchAPI/SketchAPI_SketchEntity.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// Copyright (C) 2014-2019 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -12,14 +12,17 @@ // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #include "SketchAPI_SketchEntity.h" #include +#include #include +#include +#include #include #include #include @@ -28,7 +31,9 @@ #include #include +#include #include +#include #include #include #include @@ -81,7 +86,8 @@ bool SketchAPI_SketchEntity::isCopy() const { // check the feature is a copy of another entity AttributeBooleanPtr isCopy = feature()->boolean(SketchPlugin_SketchEntity::COPY_ID()); - return isCopy.get() && isCopy->value(); + AttributeReferencePtr hasParent = feature()->reference(SketchPlugin_SketchEntity::PARENT_ID()); + return (isCopy.get() && isCopy->value()) || (hasParent && hasParent->value()); } std::list > @@ -96,6 +102,16 @@ SketchAPI_SketchEntity::wrap(const std::list > aResult.push_back(std::shared_ptr(new SketchAPI_Arc(*anIt))); else if ((*anIt)->getKind() == SketchPlugin_Circle::ID()) aResult.push_back(std::shared_ptr(new SketchAPI_Circle(*anIt))); + else if ((*anIt)->getKind() == SketchPlugin_Ellipse::ID()) + aResult.push_back(std::shared_ptr(new SketchAPI_Ellipse(*anIt))); + else if ((*anIt)->getKind() == SketchPlugin_EllipticArc::ID()) + aResult.push_back(std::shared_ptr(new SketchAPI_EllipticArc(*anIt))); + else if ((*anIt)->getKind() == SketchPlugin_BSpline::ID()) + aResult.push_back(std::shared_ptr(new SketchAPI_BSpline(*anIt))); + else if ((*anIt)->getKind() == SketchPlugin_BSplinePeriodic::ID()) { + aResult.push_back( + std::shared_ptr(new SketchAPI_BSplinePeriodic(*anIt))); + } else if ((*anIt)->getKind() == SketchPlugin_Point::ID()) aResult.push_back(std::shared_ptr(new SketchAPI_Point(*anIt))); else if ((*anIt)->getKind() == SketchPlugin_IntersectionPoint::ID())