X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchAPI%2FSketchAPI_Sketch.h;h=993e6ef901536e95e39316e17c17c648863da9bd;hb=a75b67fb7c1a4d8bf4acec94ecd441a48415634d;hp=3f77ba084436c0afeaefd27af859123405ebbf83;hpb=3c9bfdce3bd7cef0b5e5a23277acd064fb760af8;p=modules%2Fshaper.git diff --git a/src/SketchAPI/SketchAPI_Sketch.h b/src/SketchAPI/SketchAPI_Sketch.h index 3f77ba084..993e6ef90 100644 --- a/src/SketchAPI/SketchAPI_Sketch.h +++ b/src/SketchAPI/SketchAPI_Sketch.h @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2020 CEA/DEN, EDF R&D +// Copyright (C) 2014-2023 CEA, EDF // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -27,6 +27,7 @@ #include #include +#include #include #include @@ -56,6 +57,7 @@ class SketchAPI_Projection; class SketchAPI_Rectangle; class SketchAPI_Rotation; class SketchAPI_Translation; +class SketchAPI_MacroMiddlePoint; //-------------------------------------------------------------------------------------- typedef std::pair, ModelHighAPI_RefAttr> PointOrReference; @@ -181,13 +183,9 @@ public: const std::shared_ptr & theEndPoint); /// Add rectangle SKETCHAPI_EXPORT - std::shared_ptr addRectangle( - double theX1, double theY1, double theX2, double theY2, bool isFirstPointCenter); - /// Add rectangle - SKETCHAPI_EXPORT - std::shared_ptr addRectangle( - const std::shared_ptr & theFirstPoint, - const std::shared_ptr & theEndPoint, bool isFirstPointCenter); + std::shared_ptr addRectangleCentered( + const std::pair, ModelHighAPI_RefAttr> & theCenter, + const std::pair, ModelHighAPI_RefAttr> & theCorner); /// Add circle SKETCHAPI_EXPORT @@ -379,10 +377,12 @@ public: /// Add offset SKETCHAPI_EXPORT - std::shared_ptr addOffset( + std::shared_ptr addOffset( const std::list > & theObjects, const ModelHighAPI_Double & theValue, - const bool theReversed); + const bool theReversed = false, + const std::string & theJointType = SketchPlugin_Offset::JOINT_KEEP_DISTANCE(), + const bool theApprox = false); /// Add translation SKETCHAPI_EXPORT @@ -524,6 +524,11 @@ public: const ModelHighAPI_RefAttr & thePoint, const ModelHighAPI_RefAttr & theLine); + /// Set middle + SKETCHAPI_EXPORT + std::shared_ptr setMiddlePoint( + const ModelHighAPI_RefAttr& theLine); + /// Set parallel SKETCHAPI_EXPORT std::shared_ptr setParallel(