Salome HOME
updated copyright message
[modules/shaper.git] / src / SketchAPI / SketchAPI_MacroArc.cpp
index 1f8027c8af2e9e43e67f44d85e6c86a098c3ca29..0685a5f38f27e8eb56c22a0bd2ceaa861fa73f62 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017  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
@@ -12,9 +12,9 @@
 //
 // 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
+// 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>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
 #include "SketchAPI_MacroArc.h"
@@ -29,9 +29,6 @@
 #include <SketchPlugin_ConstraintCoincidence.h>
 #include <SketchPlugin_ConstraintTangent.h>
 
-/// Obtain constraints prepared by tangent arc
-static std::list<FeaturePtr> tangentArcConstraints(const FeaturePtr& theArc);
-
 //================================================================================================
 SketchAPI_MacroArc::SketchAPI_MacroArc(const std::shared_ptr<ModelAPI_Feature> & theFeature)
 : SketchAPI_SketchEntity(theFeature)
@@ -201,3 +198,29 @@ void SketchAPI_MacroArc::setByTangent(const ModelHighAPI_RefAttr& theTangentPoin
 
   execute();
 }
+
+//================================================================================================
+void SketchAPI_MacroArc::setByTransversal(const ModelHighAPI_RefAttr& theTransversalPoint,
+                                          double theEndX, double theEndY,
+                                          bool theInversed)
+{
+  fillAttribute(SketchPlugin_MacroArc::ARC_TYPE_BY_TRANSVERSAL_LINE(), myarcType);
+  fillAttribute(theTransversalPoint, mytransversalPoint);
+  fillAttribute(endPoint4(), theEndX, theEndY);
+  fillAttribute(theInversed, myreversed);
+
+  execute();
+}
+
+//================================================================================================
+void SketchAPI_MacroArc::setByTransversal(const ModelHighAPI_RefAttr& theTransversalPoint,
+                                          const std::shared_ptr<GeomAPI_Pnt2d>& theEnd,
+                                          bool theInversed)
+{
+  fillAttribute(SketchPlugin_MacroArc::ARC_TYPE_BY_TRANSVERSAL_LINE(), myarcType);
+  fillAttribute(theTransversalPoint, mytransversalPoint);
+  fillAttribute(theEnd, myendPoint4);
+  fillAttribute(theInversed, myreversed);
+
+  execute();
+}