X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchAPI%2FSketchAPI_Sketch.h;h=5f3b4e430134d03fa47208f6d5938ef34b91eb2d;hb=d53cd037401ca37f75e19e59201e1b816f251c6a;hp=319884404b8ceccbde704104bff6b76590ad0bc1;hpb=50a8df0c6a66da8067b16155e5ae39f8f26a7ebc;p=modules%2Fshaper.git diff --git a/src/SketchAPI/SketchAPI_Sketch.h b/src/SketchAPI/SketchAPI_Sketch.h index 319884404..5f3b4e430 100644 --- a/src/SketchAPI/SketchAPI_Sketch.h +++ b/src/SketchAPI/SketchAPI_Sketch.h @@ -28,13 +28,13 @@ #include #include +#include #include #include #include //-------------------------------------------------------------------------------------- class ModelAPI_CompositeFeature; class ModelAPI_Object; -class ModelHighAPI_Double; class ModelHighAPI_Integer; class ModelHighAPI_RefAttr; class ModelHighAPI_Reference; @@ -50,11 +50,13 @@ class SketchAPI_BSpline; class SketchAPI_IntersectionPoint; class SketchAPI_Line; class SketchAPI_Mirror; +class SketchAPI_Offset; class SketchAPI_Point; class SketchAPI_Projection; class SketchAPI_Rectangle; class SketchAPI_Rotation; class SketchAPI_Translation; + //-------------------------------------------------------------------------------------- typedef std::pair, ModelHighAPI_RefAttr> PointOrReference; //-------------------------------------------------------------------------------------- @@ -139,7 +141,7 @@ public: std::shared_ptr addPoint(const ModelHighAPI_Selection & theExternal); /// Add point SKETCHAPI_EXPORT - std::shared_ptr addPoint(const std::string & theExternalName); + std::shared_ptr addPoint(const std::wstring & theExternalName); /// Add intersection point SKETCHAPI_EXPORT @@ -149,7 +151,7 @@ public: /// Add point SKETCHAPI_EXPORT std::shared_ptr - addIntersectionPoint(const std::string & theExternalName, + addIntersectionPoint(const std::wstring & theExternalName, bool theKeepResult = false); /// Add line @@ -166,7 +168,7 @@ public: std::shared_ptr addLine(const ModelHighAPI_Selection & theExternal); /// Add line SKETCHAPI_EXPORT - std::shared_ptr addLine(const std::string & theExternalName); + std::shared_ptr addLine(const std::wstring & theExternalName); /// Add rectangle SKETCHAPI_EXPORT @@ -177,6 +179,11 @@ public: std::shared_ptr addRectangle( const std::shared_ptr & theStartPoint, const std::shared_ptr & theEndPoint); + /// Add rectangle + SKETCHAPI_EXPORT + std::shared_ptr addRectangleCentered( + const std::pair, ModelHighAPI_RefAttr> & theCenter, + const std::pair, ModelHighAPI_RefAttr> & theCorner); /// Add circle SKETCHAPI_EXPORT @@ -215,7 +222,7 @@ public: std::shared_ptr addCircle(const ModelHighAPI_Selection & theExternal); /// Add circle SKETCHAPI_EXPORT - std::shared_ptr addCircle(const std::string & theExternalName); + std::shared_ptr addCircle(const std::wstring & theExternalName); /// Add arc SKETCHAPI_EXPORT @@ -269,7 +276,7 @@ public: /// Add arc SKETCHAPI_EXPORT - std::shared_ptr addArc(const std::string & theExternalName); + std::shared_ptr addArc(const std::wstring & theExternalName); /// Add ellipse SKETCHAPI_EXPORT @@ -302,7 +309,7 @@ public: std::shared_ptr addEllipse(const ModelHighAPI_Selection & theExternal); /// Add ellipse SKETCHAPI_EXPORT - std::shared_ptr addEllipse(const std::string & theExternalName); + std::shared_ptr addEllipse(const std::wstring & theExternalName); /// Add elliptic arc SKETCHAPI_EXPORT @@ -325,7 +332,7 @@ public: std::shared_ptr addEllipticArc(const ModelHighAPI_Selection & theExternal); /// Add elliptic arc SKETCHAPI_EXPORT - std::shared_ptr addEllipticArc(const std::string & theExternalName); + std::shared_ptr addEllipticArc(const std::wstring & theExternalName); /// Add B-spline SKETCHAPI_EXPORT @@ -338,16 +345,27 @@ public: const std::list& multiplicities = std::list(), const bool periodic = false); - /// Add projection + /// Add interpolation feature SKETCHAPI_EXPORT - std::shared_ptr addProjection( - const ModelHighAPI_Selection & theExternalFeature, - bool theKeepResult = false); + std::shared_ptr addInterpolation( + const std::list& points, + const bool periodic = false, + const bool closed = false); + + /// Add approximation feature + SKETCHAPI_EXPORT + std::shared_ptr addApproximation( + const std::list& points, + const ModelHighAPI_Double& precision = ModelHighAPI_Double(1.e-3), + const bool periodic = false, + const bool closed = false); /// Add projection SKETCHAPI_EXPORT - std::shared_ptr addProjection(const std::string & theExternalName, - bool theKeepResult = false); + std::shared_ptr addProjection( + const ModelHighAPI_Selection & theExternalFeature, + bool keepResult = false, + bool keepRefToOriginal = true); /// Add mirror SKETCHAPI_EXPORT @@ -355,6 +373,13 @@ public: const ModelHighAPI_RefAttr & theMirrorLine, const std::list > & theObjects); + /// Add offset + SKETCHAPI_EXPORT + std::shared_ptr addOffset( + const std::list > & theObjects, + const ModelHighAPI_Double & theValue, + const bool theReversed); + /// Add translation SKETCHAPI_EXPORT std::shared_ptr addTranslation( @@ -581,7 +606,7 @@ SketchPtr addSketch(const std::shared_ptr & thePart, */ SKETCHAPI_EXPORT SketchPtr addSketch(const std::shared_ptr & thePart, - const std::string & theExternalName); + const std::wstring & theExternalName); /**\ingroup CPPHighAPI * \brief Create Sketch feature