SHAPER 9.16.0
SketchAPI_EllipticArc.h
1// Copyright (C) 2014-2026 CEA, EDF
2//
3// This library is free software; you can redistribute it and/or
4// modify it under the terms of the GNU Lesser General Public
5// License as published by the Free Software Foundation; either
6// version 2.1 of the License, or (at your option) any later version.
7//
8// This library is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11// Lesser General Public License for more details.
12//
13// You should have received a copy of the GNU Lesser General Public
14// License along with this library; if not, write to the Free Software
15// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16//
17// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18//
19
20#ifndef SketchAPI_EllipticArc_H_
21#define SketchAPI_EllipticArc_H_
22
23#include "SketchAPI.h"
24#include "SketchAPI_SketchEntity.h"
25
26#include <SketchPlugin_EllipticArc.h>
27
29
34{
35public:
37 SKETCHAPI_EXPORT
38 explicit SketchAPI_EllipticArc(const std::shared_ptr<ModelAPI_Feature>& theFeature);
39
41 SKETCHAPI_EXPORT
42 SketchAPI_EllipticArc(const std::shared_ptr<ModelAPI_Feature>& theFeature,
43 double theCenterX, double theCenterY,
44 double theFocusX, double theFocusY,
45 double theStartX, double theStartY,
46 double theEndX, double theEndY,
47 bool theInversed);
48
50 SKETCHAPI_EXPORT
51 SketchAPI_EllipticArc(const std::shared_ptr<ModelAPI_Feature>& theFeature,
52 const std::shared_ptr<GeomAPI_Pnt2d>& theCenter,
53 const std::shared_ptr<GeomAPI_Pnt2d>& theFocus,
54 const std::shared_ptr<GeomAPI_Pnt2d>& theStart,
55 const std::shared_ptr<GeomAPI_Pnt2d>& theEnd,
56 bool theInversed);
57
59 SKETCHAPI_EXPORT
60 SketchAPI_EllipticArc(const std::shared_ptr<ModelAPI_Feature>& theFeature,
61 const ModelHighAPI_Selection& theExternal);
62
64 SKETCHAPI_EXPORT
65 SketchAPI_EllipticArc(const std::shared_ptr<ModelAPI_Feature>& theFeature,
66 const std::wstring& theExternalName);
67
69 SKETCHAPI_EXPORT
70 virtual ~SketchAPI_EllipticArc();
71
72 INTERFACE_13(SketchPlugin_EllipticArc::ID(),
99
100
101 SKETCHAPI_EXPORT
102 void setByCenterFocusAndPoints(double theCenterX, double theCenterY,
103 double theFocusX, double theFocusY,
104 double theStartX, double theStartY,
105 double theEndX, double theEndY,
106 bool theInversed);
107
109 SKETCHAPI_EXPORT
110 void setByCenterFocusAndPoints(const std::shared_ptr<GeomAPI_Pnt2d>& theCenter,
111 const std::shared_ptr<GeomAPI_Pnt2d>& theFocus,
112 const std::shared_ptr<GeomAPI_Pnt2d>& theStart,
113 const std::shared_ptr<GeomAPI_Pnt2d>& theEnd,
114 bool theInversed);
115
117 SKETCHAPI_EXPORT
118 void setByExternal(const ModelHighAPI_Selection& theExternal);
119
121 SKETCHAPI_EXPORT
122 void setByExternalName(const std::wstring& theExternalName);
123
125 SKETCHAPI_EXPORT
126 void setCenter(double theX, double theY);
127
129 SKETCHAPI_EXPORT
130 void setCenter(const std::shared_ptr<GeomAPI_Pnt2d> & theCenter);
131
133 SKETCHAPI_EXPORT
134 void setFocus(double theX, double theY);
135
137 SKETCHAPI_EXPORT
138 void setFocus(const std::shared_ptr<GeomAPI_Pnt2d> & theFocus);
139
144 SKETCHAPI_EXPORT
145 std::list<std::shared_ptr<SketchAPI_SketchEntity> > construction(
146 const std::wstring& center = std::wstring(),
147 const std::wstring& firstFocus = std::wstring(),
148 const std::wstring& secondFocus = std::wstring(),
149 const std::wstring& majorAxisStart = std::wstring(),
150 const std::wstring& majorAxisEnd = std::wstring(),
151 const std::wstring& minorAxisStart = std::wstring(),
152 const std::wstring& minorAxisEnd = std::wstring(),
153 const std::wstring& majorAxis = std::wstring(),
154 const std::wstring& minorAxis = std::wstring()) const;
155
157 SKETCHAPI_EXPORT
158 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
159};
160
162typedef std::shared_ptr<SketchAPI_EllipticArc> EllipticArcPtr;
163
164#endif // SketchAPI_EllipticArc_H_
2D point defined by two coordinates
Definition: GeomAPI_Pnt2d.h:36
Attribute that contains 2D point coordinates.
Definition: GeomDataAPI_Point2D.h:37
Attribute that contains boolean value.
Definition: ModelAPI_AttributeBoolean.h:31
Attribute that contains real value with double precision.
Definition: ModelAPI_AttributeDouble.h:34
Attribute that contains reference to the sub-shape of some result, the selected shape.
Definition: ModelAPI_AttributeSelection.h:35
Dump engine for the model.
Definition: ModelHighAPI_Dumper.h:81
Class for filling ModelAPI_AttributeSelection.
Definition: ModelHighAPI_Selection.h:49
Interface for Elliptic Arc feature.
Definition: SketchAPI_EllipticArc.h:34
virtual ~SketchAPI_EllipticArc()
Destructor.
Definition: SketchAPI_EllipticArc.cpp:85
virtual std::shared_ptr< GeomDataAPI_Point2D > majorAxisNegative() const
Start point of major axis.
Definition: SketchAPI_EllipticArc.h:98
void setCenter(double theX, double theY)
Set center.
Definition: SketchAPI_EllipticArc.cpp:134
virtual std::shared_ptr< ModelAPI_AttributeDouble > majorRadius() const
Major radius.
Definition: SketchAPI_EllipticArc.h:98
SketchAPI_EllipticArc(const std::shared_ptr< ModelAPI_Feature > &theFeature)
Constructor without values.
Definition: SketchAPI_EllipticArc.cpp:34
void setByExternal(const ModelHighAPI_Selection &theExternal)
Set by external.
Definition: SketchAPI_EllipticArc.cpp:122
void setFocus(double theX, double theY)
Set focus.
Definition: SketchAPI_EllipticArc.cpp:146
virtual std::shared_ptr< GeomDataAPI_Point2D > minorAxisPositive() const
End point of minor axis.
Definition: SketchAPI_EllipticArc.h:98
virtual std::shared_ptr< GeomDataAPI_Point2D > firstFocus() const
Focus in positive direction of a major axis.
Definition: SketchAPI_EllipticArc.h:98
virtual std::shared_ptr< ModelAPI_AttributeSelection > external() const
External.
Definition: SketchAPI_EllipticArc.h:98
virtual std::shared_ptr< GeomDataAPI_Point2D > majorAxisPositive() const
End point of major axis.
Definition: SketchAPI_EllipticArc.h:98
void setByCenterFocusAndPoints(double theCenterX, double theCenterY, double theFocusX, double theFocusY, double theStartX, double theStartY, double theEndX, double theEndY, bool theInversed)
Set by center, focus and radius.
Definition: SketchAPI_EllipticArc.cpp:89
virtual std::shared_ptr< GeomDataAPI_Point2D > startPoint() const
Start point of elliptic arc.
Definition: SketchAPI_EllipticArc.h:98
virtual void dump(ModelHighAPI_Dumper &theDumper) const
Dump wrapped feature.
Definition: SketchAPI_EllipticArc.cpp:207
std::list< std::shared_ptr< SketchAPI_SketchEntity > > construction(const std::wstring &center=std::wstring(), const std::wstring &firstFocus=std::wstring(), const std::wstring &secondFocus=std::wstring(), const std::wstring &majorAxisStart=std::wstring(), const std::wstring &majorAxisEnd=std::wstring(), const std::wstring &minorAxisStart=std::wstring(), const std::wstring &minorAxisEnd=std::wstring(), const std::wstring &majorAxis=std::wstring(), const std::wstring &minorAxis=std::wstring()) const
Create construction elements (focuses, axes etc.).
Definition: SketchAPI_EllipticArc.cpp:180
virtual std::shared_ptr< GeomDataAPI_Point2D > secondFocus() const
Focus in negative direction of a major axis.
Definition: SketchAPI_EllipticArc.h:98
virtual std::shared_ptr< ModelAPI_AttributeBoolean > reversed() const
Inversed flag.
Definition: SketchAPI_EllipticArc.h:98
virtual std::shared_ptr< ModelAPI_AttributeDouble > minorRadius() const
Minor radius.
Definition: SketchAPI_EllipticArc.h:98
virtual std::shared_ptr< GeomDataAPI_Point2D > center() const
Center point.
Definition: SketchAPI_EllipticArc.h:98
void setByExternalName(const std::wstring &theExternalName)
Set by external name.
Definition: SketchAPI_EllipticArc.cpp:128
virtual std::shared_ptr< GeomDataAPI_Point2D > endPoint() const
End point of elliptic arc.
Definition: SketchAPI_EllipticArc.h:98
virtual std::shared_ptr< GeomDataAPI_Point2D > minorAxisNegative() const
Start point of minor axis.
Definition: SketchAPI_EllipticArc.h:98
Base class for Sketch feature interfaces.
Definition: SketchAPI_SketchEntity.h:38
static const std::string & MINOR_AXIS_END_ID()
2D point - end point of minor axis
Definition: SketchPlugin_EllipticArc.h:93
static const std::string & REVERSED_ID()
Flag the arc is reversed.
Definition: SketchPlugin_EllipticArc.h:114
static const std::string & MAJOR_RADIUS_ID()
Major radius of the ellipse.
Definition: SketchPlugin_EllipticArc.h:100
static const std::string & MAJOR_AXIS_START_ID()
2D point - start point of major axis
Definition: SketchPlugin_EllipticArc.h:74
static const std::string & END_POINT_ID()
2D point - end point of elliptic arc
Definition: SketchPlugin_EllipticArc.h:54
static const std::string & MINOR_RADIUS_ID()
Minor radius of the ellipse.
Definition: SketchPlugin_EllipticArc.h:107
static const std::string & FIRST_FOCUS_ID()
2D point - focus of the ellipse
Definition: SketchPlugin_EllipticArc.h:61
static const std::string & START_POINT_ID()
2D point - start point of elliptic arc
Definition: SketchPlugin_EllipticArc.h:48
static const std::string & MAJOR_AXIS_END_ID()
2D point - end point of major axis
Definition: SketchPlugin_EllipticArc.h:80
static const std::string & SECOND_FOCUS_ID()
2D point - second focus of the ellipse
Definition: SketchPlugin_EllipticArc.h:67
static const std::string & ID()
Ellipse feature kind.
Definition: SketchPlugin_EllipticArc.h:34
static const std::string & CENTER_ID()
2D point - center of the ellipse
Definition: SketchPlugin_EllipticArc.h:41
static const std::string & MINOR_AXIS_START_ID()
2D point - start point of minor axis
Definition: SketchPlugin_EllipticArc.h:87
static const std::string & EXTERNAL_ID()
Reference to the external edge or vertex as a AttributeSelection.
Definition: SketchPlugin_SketchEntity.h:55