From: dbv Date: Mon, 16 Jan 2017 14:06:26 +0000 (+0300) Subject: Fix for projection dump. X-Git-Tag: V_2.7.0~324 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ea88ab037c92a455f6a8dee8ccde46f7fad77e8f;p=modules%2Fshaper.git Fix for projection dump. --- diff --git a/src/SketchAPI/SketchAPI_Projection.cpp b/src/SketchAPI/SketchAPI_Projection.cpp index 1291a8099..d67149d02 100644 --- a/src/SketchAPI/SketchAPI_Projection.cpp +++ b/src/SketchAPI/SketchAPI_Projection.cpp @@ -7,7 +7,14 @@ //-------------------------------------------------------------------------------------- #include "SketchAPI_Projection.h" -//-------------------------------------------------------------------------------------- + +#include +#include + +#include +#include +#include + #include #include #include @@ -60,12 +67,19 @@ void SketchAPI_Projection::setByExternalName(const std::string& theExternalName) } //-------------------------------------------------------------------------------------- -std::shared_ptr SketchAPI_Projection::createdFeature() const +std::shared_ptr SketchAPI_Projection::createdFeature() const { AttributeRefAttrPtr aProjectedRefAttr = projectedFeature(); FeaturePtr aProjectedFeature = ModelAPI_Feature::feature(aProjectedRefAttr->object()); - return std::shared_ptr(new ModelHighAPI_Interface(aProjectedFeature)); + std::shared_ptr anEntity; + aProjectedFeature->getKind() == SketchPlugin_Line::ID() ? + anEntity.reset(new SketchAPI_Line(aProjectedFeature)) : + aProjectedFeature->getKind() == SketchPlugin_Circle::ID() ? + anEntity.reset(new SketchAPI_Circle(aProjectedFeature)) : + anEntity.reset(new SketchAPI_Arc(aProjectedFeature)); + + return anEntity; } //-------------------------------------------------------------------------------------- diff --git a/src/SketchAPI/SketchAPI_Projection.h b/src/SketchAPI/SketchAPI_Projection.h index b8c3ff397..e3870de4e 100644 --- a/src/SketchAPI/SketchAPI_Projection.h +++ b/src/SketchAPI/SketchAPI_Projection.h @@ -58,7 +58,7 @@ public: /// Returns created feature SKETCHAPI_EXPORT - std::shared_ptr createdFeature() const; + std::shared_ptr createdFeature() const; /// Dump wrapped feature SKETCHAPI_EXPORT