X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FSketchAPI%2FSketchAPI_SketchEntity.cpp;h=4cfb5de3d058f0adeb5714bbd9494003d18df013;hb=4d139bda8e931e65bf1a63b12e6b13d26ae9b205;hp=5c7202268073dcc4c6ccf77d3c07d332229863ea;hpb=d74c5f916e2c7d0eb1ee2fa128f0458c3d22675f;p=modules%2Fshaper.git diff --git a/src/SketchAPI/SketchAPI_SketchEntity.cpp b/src/SketchAPI/SketchAPI_SketchEntity.cpp index 5c7202268..4cfb5de3d 100644 --- a/src/SketchAPI/SketchAPI_SketchEntity.cpp +++ b/src/SketchAPI/SketchAPI_SketchEntity.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2019 CEA/DEN, EDF R&D +// Copyright (C) 2014-2022 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 @@ -19,8 +19,10 @@ #include "SketchAPI_SketchEntity.h" #include +#include #include #include +#include #include #include #include @@ -29,6 +31,7 @@ #include #include +#include #include #include #include @@ -83,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 > @@ -100,6 +104,14 @@ SketchAPI_SketchEntity::wrap(const std::list > 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())