]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/SketchAPI/SketchAPI_Sketch.h
Salome HOME
rectangle feature: complete rectangle type by center and end points
[modules/shaper.git] / src / SketchAPI / SketchAPI_Sketch.h
index 9e6a2dc206895b3f31b7cfe13a0b8a52b48f0222..3f77ba084436c0afeaefd27af859123405ebbf83 100644 (file)
@@ -1,4 +1,4 @@
-// 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
@@ -56,6 +56,7 @@ class SketchAPI_Projection;
 class SketchAPI_Rectangle;
 class SketchAPI_Rotation;
 class SketchAPI_Translation;
+
 //--------------------------------------------------------------------------------------
 typedef std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr> PointOrReference;
 //--------------------------------------------------------------------------------------
@@ -178,6 +179,15 @@ public:
   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
@@ -358,12 +368,8 @@ public:
   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::wstring & theExternalName,
-                                                      bool theKeepResult = false);
+      bool keepResult = false,
+      bool keepRefToOriginal = true);
 
   /// Add mirror
   SKETCHAPI_EXPORT