-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-// Name : SketchAPI_Sketch.h
-// Purpose:
+// Copyright (C) 2014-2017 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
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or
+// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
//
-// History:
-// 07/06/16 - Sergey POKHODENKO - Creation of the file
#ifndef SRC_SKETCHAPI_SKETCHAPI_SKETCH_H_
#define SRC_SKETCHAPI_SKETCHAPI_SKETCH_H_
class ModelHighAPI_Reference;
class ModelHighAPI_Selection;
class SketchAPI_Arc;
+class SketchAPI_MacroArc;
class SketchAPI_Circle;
+class SketchAPI_MacroCircle;
class SketchAPI_IntersectionPoint;
class SketchAPI_Line;
class SketchAPI_Mirror;
double theRadius);
/// Add circle
SKETCHAPI_EXPORT
- std::shared_ptr<SketchAPI_Circle> addCircle(
+ std::shared_ptr<SketchAPI_MacroCircle> addCircle(
+ double theCenterX, double theCenterY,
+ double thePassedX, double thePassedY);
+ /// Add circle
+ SKETCHAPI_EXPORT
+ std::shared_ptr<SketchAPI_MacroCircle> addCircle(
+ const std::shared_ptr<GeomAPI_Pnt2d>& theCenterPoint,
+ const std::shared_ptr<GeomAPI_Pnt2d>& thePassedPoint);
+ /// Add circle
+ SKETCHAPI_EXPORT
+ std::shared_ptr<SketchAPI_MacroCircle> addCircle(
double theX1, double theY1,
double theX2, double theY2,
double theX3, double theY3);
/// Add circle
SKETCHAPI_EXPORT
- std::shared_ptr<SketchAPI_Circle> addCircle(
+ std::shared_ptr<SketchAPI_MacroCircle> addCircle(
const std::shared_ptr<GeomAPI_Pnt2d>& thePoint1,
const std::shared_ptr<GeomAPI_Pnt2d>& thePoint2,
const std::shared_ptr<GeomAPI_Pnt2d>& thePoint3);
/// Add arc
SKETCHAPI_EXPORT
- std::shared_ptr<SketchAPI_Arc> addArc(
+ std::shared_ptr<SketchAPI_MacroArc> addArc(
double theStartX, double theStartY,
double theEndX, double theEndY,
double thePassedX, double thePassedY);
/// Add arc
SKETCHAPI_EXPORT
- std::shared_ptr<SketchAPI_Arc> addArc(
+ std::shared_ptr<SketchAPI_MacroArc> addArc(
const std::shared_ptr<GeomAPI_Pnt2d>& theStart,
const std::shared_ptr<GeomAPI_Pnt2d>& theEnd,
const std::shared_ptr<GeomAPI_Pnt2d>& thePassed);
/// Add arc
SKETCHAPI_EXPORT
- std::shared_ptr<SketchAPI_Arc> addArc(
+ std::shared_ptr<SketchAPI_MacroArc> addArc(
const ModelHighAPI_RefAttr& theTangentPoint,
double theEndX, double theEndY,
bool theInversed);
/// Add arc
SKETCHAPI_EXPORT
- std::shared_ptr<SketchAPI_Arc> addArc(
+ std::shared_ptr<SketchAPI_MacroArc> addArc(
const ModelHighAPI_RefAttr& theTangentPoint,
const std::shared_ptr<GeomAPI_Pnt2d>& theEnd,
bool theInversed);
SKETCHAPI_EXPORT
std::shared_ptr<ModelHighAPI_Interface> addSplit(
const ModelHighAPI_Reference& theFeature,
- const ModelHighAPI_RefAttr& thePoint1,
- const ModelHighAPI_RefAttr& thePoint2);
+ const std::shared_ptr<GeomAPI_Pnt2d>& thePositionPoint);
/// Add trim
SKETCHAPI_EXPORT
const ModelHighAPI_RefAttr & thePointOrLine,
const ModelHighAPI_Double & theValue);
+ /// Set horizontal distance
+ SKETCHAPI_EXPORT
+ std::shared_ptr<ModelHighAPI_Interface> setHorizontalDistance(
+ const ModelHighAPI_RefAttr & thePoint1,
+ const ModelHighAPI_RefAttr & thePoint2,
+ const ModelHighAPI_Double & theValue);
+
+ /// Set vertical distance
+ SKETCHAPI_EXPORT
+ std::shared_ptr<ModelHighAPI_Interface> setVerticalDistance(
+ const ModelHighAPI_RefAttr & thePoint1,
+ const ModelHighAPI_RefAttr & thePoint2,
+ const ModelHighAPI_Double & theValue);
+
/// Set equal
SKETCHAPI_EXPORT
std::shared_ptr<ModelHighAPI_Interface> setEqual(
/// Set fillet
SKETCHAPI_EXPORT
std::shared_ptr<ModelHighAPI_Interface> setFillet(
- const std::list<ModelHighAPI_RefAttr> & thePoints,
+ const ModelHighAPI_RefAttr & thePoint);
+
+ /// Set fillet with additional radius constraint
+ SKETCHAPI_EXPORT
+ std::shared_ptr<ModelHighAPI_Interface> setFilletWithRadius(
+ const ModelHighAPI_RefAttr & thePoint,
const ModelHighAPI_Double & theRadius);
/// Set fixed
const std::shared_ptr<ModelHighAPI_Interface> & theConstraint,
const ModelHighAPI_Double & theValue);
+ /// Move point or sketch feature
+ SKETCHAPI_EXPORT
+ void move(const ModelHighAPI_RefAttr& theMovedEntity,
+ const std::shared_ptr<GeomAPI_Pnt2d>& theTargetPoint);
+
+ /// Move point or sketch feature
+ SKETCHAPI_EXPORT
+ void move(const ModelHighAPI_RefAttr& theMovedEntity,
+ double theTargetX, double theTargetY);
+
+ SKETCHAPI_EXPORT
+ std::shared_ptr<GeomAPI_Pnt2d> to2D(const std::shared_ptr<GeomAPI_Pnt>& thePoint);
+
// TODO(spo): rename to selectFaces() or faces() (or add faces() -> list to SWIG)
/// Select face
SKETCHAPI_EXPORT