-// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2020 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
class SketchAPI_Rectangle;
class SketchAPI_Rotation;
class SketchAPI_Translation;
+
//--------------------------------------------------------------------------------------
typedef std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr> PointOrReference;
//--------------------------------------------------------------------------------------
std::shared_ptr<SketchAPI_Point> addPoint(const ModelHighAPI_Selection & theExternal);
/// Add point
SKETCHAPI_EXPORT
- std::shared_ptr<SketchAPI_Point> addPoint(const std::string & theExternalName);
+ std::shared_ptr<SketchAPI_Point> addPoint(const std::wstring & theExternalName);
/// Add intersection point
SKETCHAPI_EXPORT
/// Add point
SKETCHAPI_EXPORT
std::shared_ptr<SketchAPI_IntersectionPoint>
- addIntersectionPoint(const std::string & theExternalName,
+ addIntersectionPoint(const std::wstring & theExternalName,
bool theKeepResult = false);
/// Add line
std::shared_ptr<SketchAPI_Line> addLine(const ModelHighAPI_Selection & theExternal);
/// Add line
SKETCHAPI_EXPORT
- std::shared_ptr<SketchAPI_Line> addLine(const std::string & theExternalName);
+ std::shared_ptr<SketchAPI_Line> addLine(const std::wstring & theExternalName);
/// Add rectangle
SKETCHAPI_EXPORT
std::shared_ptr<SketchAPI_Rectangle> addRectangle(
const std::shared_ptr<GeomAPI_Pnt2d> & theStartPoint,
const std::shared_ptr<GeomAPI_Pnt2d> & theEndPoint);
+ /// Add rectangle
+ SKETCHAPI_EXPORT
+ std::shared_ptr<SketchAPI_Rectangle> addRectangle(
+ double theX1, double theY1, double theX2, double theY2, bool isFirstPointCenter);
+ /// Add rectangle
+ SKETCHAPI_EXPORT
+ std::shared_ptr<SketchAPI_Rectangle> addRectangle(
+ const std::shared_ptr<GeomAPI_Pnt2d> & theFirstPoint,
+ const std::shared_ptr<GeomAPI_Pnt2d> & theEndPoint, bool isFirstPointCenter);
/// Add circle
SKETCHAPI_EXPORT
std::shared_ptr<SketchAPI_Circle> addCircle(const ModelHighAPI_Selection & theExternal);
/// Add circle
SKETCHAPI_EXPORT
- std::shared_ptr<SketchAPI_Circle> addCircle(const std::string & theExternalName);
+ std::shared_ptr<SketchAPI_Circle> addCircle(const std::wstring & theExternalName);
/// Add arc
SKETCHAPI_EXPORT
/// Add arc
SKETCHAPI_EXPORT
- std::shared_ptr<SketchAPI_Arc> addArc(const std::string & theExternalName);
+ std::shared_ptr<SketchAPI_Arc> addArc(const std::wstring & theExternalName);
/// Add ellipse
SKETCHAPI_EXPORT
std::shared_ptr<SketchAPI_Ellipse> addEllipse(const ModelHighAPI_Selection & theExternal);
/// Add ellipse
SKETCHAPI_EXPORT
- std::shared_ptr<SketchAPI_Ellipse> addEllipse(const std::string & theExternalName);
+ std::shared_ptr<SketchAPI_Ellipse> addEllipse(const std::wstring & theExternalName);
/// Add elliptic arc
SKETCHAPI_EXPORT
std::shared_ptr<SketchAPI_EllipticArc> addEllipticArc(const ModelHighAPI_Selection & theExternal);
/// Add elliptic arc
SKETCHAPI_EXPORT
- std::shared_ptr<SketchAPI_EllipticArc> addEllipticArc(const std::string & theExternalName);
+ std::shared_ptr<SketchAPI_EllipticArc> addEllipticArc(const std::wstring & theExternalName);
/// Add B-spline
SKETCHAPI_EXPORT
SKETCHAPI_EXPORT
std::shared_ptr<SketchAPI_Projection> addProjection(
const ModelHighAPI_Selection & theExternalFeature,
- bool theKeepResult = false);
-
- /// Add projection
- SKETCHAPI_EXPORT
- std::shared_ptr<SketchAPI_Projection> addProjection(const std::string & theExternalName,
- bool theKeepResult = false);
+ bool keepResult = false,
+ bool keepRefToOriginal = true);
/// Add mirror
SKETCHAPI_EXPORT
std::shared_ptr<SketchAPI_Offset> addOffset(
const std::list<std::shared_ptr<ModelAPI_Object> > & theObjects,
const ModelHighAPI_Double & theValue,
- const bool theReversed,
- const bool theAuxiliary);
+ const bool theReversed);
/// Add translation
SKETCHAPI_EXPORT
*/
SKETCHAPI_EXPORT
SketchPtr addSketch(const std::shared_ptr<ModelAPI_Document> & thePart,
- const std::string & theExternalName);
+ const std::wstring & theExternalName);
/**\ingroup CPPHighAPI
* \brief Create Sketch feature