-// 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_
/// Add intersection point
SKETCHAPI_EXPORT
std::shared_ptr<SketchAPI_IntersectionPoint>
- addIntersectionPoint(const ModelHighAPI_Selection & theExternal);
+ addIntersectionPoint(const ModelHighAPI_Selection & theExternal,
+ bool theKeepResult = false);
/// Add point
SKETCHAPI_EXPORT
std::shared_ptr<SketchAPI_IntersectionPoint>
- addIntersectionPoint(const std::string & theExternalName);
+ addIntersectionPoint(const std::string & theExternalName,
+ bool theKeepResult = false);
/// Add line
SKETCHAPI_EXPORT
/// Add projection
SKETCHAPI_EXPORT
std::shared_ptr<SketchAPI_Projection> addProjection(
- const ModelHighAPI_Selection & theExternalFeature);
+ const ModelHighAPI_Selection & theExternalFeature,
+ bool theKeepResult = false);
/// Add projection
SKETCHAPI_EXPORT
- std::shared_ptr<SketchAPI_Projection> addProjection(const std::string & theExternalName);
+ std::shared_ptr<SketchAPI_Projection> addProjection(const std::string & theExternalName,
+ bool theKeepResult = false);
/// Add mirror
SKETCHAPI_EXPORT
const ModelHighAPI_RefAttr & theCenter,
const ModelHighAPI_Double & theAngle,
const ModelHighAPI_Integer & theNumberOfObjects,
- bool theFullValue = false);
+ bool theFullValue = false,
+ bool theReversed = false);
/// Add split
SKETCHAPI_EXPORT
/// Set distance
SKETCHAPI_EXPORT
std::shared_ptr<ModelHighAPI_Interface> setDistance(
+ const ModelHighAPI_RefAttr & thePoint,
+ const ModelHighAPI_RefAttr & thePointOrLine,
+ const ModelHighAPI_Double & theValue,
+ bool isSigned = false);
+
+ /// Set signed distance
+ SKETCHAPI_EXPORT
+ std::shared_ptr<ModelHighAPI_Interface> setSignedDistance(
+ const ModelHighAPI_RefAttr & thePoint,
+ const ModelHighAPI_RefAttr & thePointOrLine,
+ const ModelHighAPI_Double & theValue);
+
+ /// Set unsigned distance
+ SKETCHAPI_EXPORT
+ std::shared_ptr<ModelHighAPI_Interface> setUnsignedDistance(
const ModelHighAPI_RefAttr & thePoint,
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(
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);