20 #ifndef SRC_SKETCHAPI_SKETCHAPI_LINE_H_
21 #define SRC_SKETCHAPI_SKETCHAPI_LINE_H_
24 #include "SketchAPI.h"
26 #include <GeomDataAPI_Point2D.h>
28 #include <SketchPlugin_Line.h>
30 #include "SketchAPI_SketchEntity.h"
43 explicit SketchAPI_Line(
const std::shared_ptr<ModelAPI_Feature> & theFeature);
46 SketchAPI_Line(
const std::shared_ptr<ModelAPI_Feature> & theFeature,
47 double theX1,
double theY1,
double theX2,
double theY2);
50 SketchAPI_Line(
const std::shared_ptr<ModelAPI_Feature> & theFeature,
51 const std::shared_ptr<GeomAPI_Pnt2d> & theStartPoint,
52 const std::shared_ptr<GeomAPI_Pnt2d> & theEndPoint);
55 SketchAPI_Line(
const std::shared_ptr<ModelAPI_Feature> & theFeature,
59 SketchAPI_Line(
const std::shared_ptr<ModelAPI_Feature> & theFeature,
60 const std::wstring & theExternalName);
76 void setByCoordinates(
double theX1,
double theY1,
double theX2,
double theY2);
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 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 Line feature.
Definition: SketchAPI_Line.h:39
void setByExternal(const ModelHighAPI_Selection &theExternal)
Set by external.
Definition: SketchAPI_Line.cpp:101
void setByExternalName(const std::wstring &theExternalName)
Set by external name.
Definition: SketchAPI_Line.cpp:108
void setEndPoint(double theX, double theY)
Set end point.
Definition: SketchAPI_Line.cpp:128
void setByPoints(const std::shared_ptr< GeomAPI_Pnt2d > &theStartPoint, const std::shared_ptr< GeomAPI_Pnt2d > &theEndPoint)
Set by points.
Definition: SketchAPI_Line.cpp:91
void setStartPoint(double theX, double theY)
Set start point.
Definition: SketchAPI_Line.cpp:116
virtual std::shared_ptr< ModelAPI_AttributeSelection > external() const
External.
Definition: SketchAPI_Line.h:72
virtual std::shared_ptr< GeomDataAPI_Point2D > startPoint() const
Start point.
Definition: SketchAPI_Line.h:72
virtual ~SketchAPI_Line()
Destructor.
Definition: SketchAPI_Line.cpp:76
virtual void dump(ModelHighAPI_Dumper &theDumper) const
Dump wrapped feature.
Definition: SketchAPI_Line.cpp:143
void setByCoordinates(double theX1, double theY1, double theX2, double theY2)
Set by coordinates.
Definition: SketchAPI_Line.cpp:82
virtual std::shared_ptr< GeomDataAPI_Point2D > endPoint() const
End point.
Definition: SketchAPI_Line.h:72
SketchAPI_Line(const std::shared_ptr< ModelAPI_Feature > &theFeature)
Constructor without values.
Definition: SketchAPI_Line.cpp:28
Base class for Sketch feature interfaces.
Definition: SketchAPI_SketchEntity.h:38
static const std::string & ID()
Arc feature kind.
Definition: SketchPlugin_Line.h:41
static const std::string & END_ID()
End 2D point of the line.
Definition: SketchPlugin_Line.h:53
static const std::string & START_ID()
Start 2D point of the line.
Definition: SketchPlugin_Line.h:47
static const std::string & EXTERNAL_ID()
Reference to the external edge or vertex as a AttributeSelection.
Definition: SketchPlugin_SketchEntity.h:55