Open CASCADE Technology Reference Manual 8.0.2
Loading...
Searching...
No Matches
GC_MakeLine2d Class Reference

This class implements construction algorithms for lines in the plane. The result is a Geom2d_Line. A GC_MakeLine2d object provides a framework for: More...

#include <GC_MakeLine2d.hxx>

Inheritance diagram for GC_MakeLine2d:

Public Member Functions

 GC_MakeLine2d (const gp_Ax2d &theAxis)
 Creates a line from an axis placement.
 GC_MakeLine2d (const gp_Lin2d &theLine)
 Creates a line from a non-persistent line from package gp.
 GC_MakeLine2d (const gp_Pnt2d &thePoint, const gp_Dir2d &theDir)
 Constructs a line from origin and direction.
 GC_MakeLine2d (const gp_Lin2d &theLine, const gp_Pnt2d &thePoint)
 Constructs a line parallel to input line and passing through a point.
 GC_MakeLine2d (const gp_Lin2d &theLine, const double theDist)
 Constructs a line parallel to input line at signed distance.
 GC_MakeLine2d (const gp_Pnt2d &theP1, const gp_Pnt2d &theP2)
 Constructs a line passing through two points.
const occ::handle< Geom2d_Line > & Value () const
 Returns the constructed line. Exceptions StdFail_NotDone if no line is constructed.
 operator const occ::handle< Geom2d_Line > & () const
 Conversion operator returning the constructed object.
Public Member Functions inherited from GC_Root
bool IsDone () const
 Returns true if the construction is successful.
bool IsError () const
 Returns true if the construction has failed.
gce_ErrorType Status () const
 Returns the status of the construction:

Additional Inherited Members

Protected Attributes inherited from GC_Root
gce_ErrorType TheError

Detailed Description

This class implements construction algorithms for lines in the plane. The result is a Geom2d_Line. A GC_MakeLine2d object provides a framework for:

  • defining the construction parameters;
  • running the construction algorithm;
  • querying the construction status and the resulting line via Value(). Supported constructions include:
  • line from axis placement;
  • line from existing gp_Lin2d;
  • line from point and direction;
  • line parallel to input line through a point;
  • line parallel to input line at signed distance;
  • line through two points.

Constructor & Destructor Documentation

◆ GC_MakeLine2d() [1/6]

GC_MakeLine2d::GC_MakeLine2d ( const gp_Ax2d & theAxis)

Creates a line from an axis placement.

Parameters
[in]theAxisaxis placement
Note
The location of theAxis is the line origin.

◆ GC_MakeLine2d() [2/6]

GC_MakeLine2d::GC_MakeLine2d ( const gp_Lin2d & theLine)

Creates a line from a non-persistent line from package gp.

Parameters
[in]theLinesource line

◆ GC_MakeLine2d() [3/6]

GC_MakeLine2d::GC_MakeLine2d ( const gp_Pnt2d & thePoint,
const gp_Dir2d & theDir )

Constructs a line from origin and direction.

Parameters
[in]thePointpoint on line
[in]theDirdirection

◆ GC_MakeLine2d() [4/6]

GC_MakeLine2d::GC_MakeLine2d ( const gp_Lin2d & theLine,
const gp_Pnt2d & thePoint )

Constructs a line parallel to input line and passing through a point.

Parameters
[in]theLinesource line
[in]thePointpoint on resulting line

◆ GC_MakeLine2d() [5/6]

GC_MakeLine2d::GC_MakeLine2d ( const gp_Lin2d & theLine,
const double theDist )

Constructs a line parallel to input line at signed distance.

Parameters
[in]theLinesource line
[in]theDistsigned distance

◆ GC_MakeLine2d() [6/6]

GC_MakeLine2d::GC_MakeLine2d ( const gp_Pnt2d & theP1,
const gp_Pnt2d & theP2 )

Constructs a line passing through two points.

Parameters
[in]theP1first point
[in]theP2second point
Note
Status is gce_ConfusedPoints if points are coincident.

Member Function Documentation

◆ operator const occ::handle< Geom2d_Line > &()

GC_MakeLine2d::operator const occ::handle< Geom2d_Line > & ( ) const
inline

Conversion operator returning the constructed object.

Returns
resulting line

◆ Value()

const occ::handle< Geom2d_Line > & GC_MakeLine2d::Value ( ) const

Returns the constructed line. Exceptions StdFail_NotDone if no line is constructed.

Returns
resulting line

The documentation for this class was generated from the following file: