SHAPER  9.12.0
GeomAPI_Edge Class Reference

Interface to the edge object. More...

Inheritance diagram for GeomAPI_Edge:
Inheritance graph

Public Types

enum  ShapeType {
  COMPOUND , COMPSOLID , SOLID , SHELL ,
  FACE , WIRE , EDGE , VERTEX ,
  SHAPE
}
 Shape type enum. More...
 
enum  Orientation { FORWARD , REVERSED , INTERNAL , EXTERNAL }
 Shape orientation. More...
 

Public Member Functions

GEOMAPI_EXPORT GeomAPI_Edge ()
 Makes an undefined Edge (no geometry). More...
 
GEOMAPI_EXPORT GeomAPI_Edge (const std::shared_ptr< GeomAPI_Shape > &theShape)
 Creation of edge by the edge-shape. More...
 
GEOMAPI_EXPORT void vertices (std::shared_ptr< GeomAPI_Vertex > &theStartVertex, std::shared_ptr< GeomAPI_Vertex > &theEndVertex) const
 Return vertices of the edge;. More...
 
virtual GEOMAPI_EXPORT bool isSameGeometry (const std::shared_ptr< GeomAPI_Shape > theShape) const
 Returns true if edges have same underlying curve. More...
 
GEOMAPI_EXPORT bool isLine () const
 Verifies that the edge is a line. More...
 
GEOMAPI_EXPORT bool isCircle () const
 Verifies that the edge is a circle. More...
 
GEOMAPI_EXPORT bool isArc () const
 Verifies that the edge is an arc of circle. More...
 
GEOMAPI_EXPORT bool isEllipse () const
 Verifies that the edge is an arc of circle. More...
 
GEOMAPI_EXPORT bool isBSpline () const
 Verifies that the edge is based on a B-spline curve. More...
 
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_PntfirstPoint ()
 Returns the first vertex coordinates of the edge. More...
 
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_PntlastPoint ()
 Returns the Last vertex coordinates of the edge. More...
 
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Circcircle () const
 Returns a circle if edge is based on the circle curve. More...
 
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Ellipseellipse () const
 Returns an ellipse if edge is based on the ellipse curve. More...
 
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Linline () const
 Returns a line if edge is based on the linear curve. More...
 
GEOMAPI_EXPORT bool isEqual (const std::shared_ptr< GeomAPI_Shape > theEdge) const
 Returns true if the current edge is geometrically equal to the given edge. More...
 
GEOMAPI_EXPORT void setRange (const double &theFirst, const double &theLast)
 Change parametric range of the curve. More...
 
GEOMAPI_EXPORT void getRange (double &theFirst, double &theLast) const
 Returns range of parameter on the curve. More...
 
GEOMAPI_EXPORT bool isInPlane (const std::shared_ptr< GeomAPI_Pln > thePlane) const
 Returns true, if the edge is fully placed in the specified plane. More...
 
GEOMAPI_EXPORT void intersectWithPlane (const std::shared_ptr< GeomAPI_Pln > thePlane, std::list< std::shared_ptr< GeomAPI_Pnt > > &theResult) const
 Returns list of intersection points if the edge has intersections with the given plane. More...
 
GEOMAPI_EXPORT double length () const
 Returns edge length. More...
 
GEOMAPI_EXPORT bool isClosed () const
 Returns true if the edge is closed (like full circle) More...
 
GEOMAPI_EXPORT bool isDegenerated () const
 Returns true if the edge is degenerated (has no 3D curve) More...
 
GEOMAPI_EXPORT void setFirstPointTolerance (const double theTolerance)
 
GEOMAPI_EXPORT void setLastPointTolerance (const double theTolerance)
 
GEOMAPI_EXPORT double firstPointTolerance () const
 
GEOMAPI_EXPORT double lastPointTolerance () const
 
virtual GEOMAPI_EXPORT std::shared_ptr< GeomAPI_PntmiddlePoint () const
 Return middle point on the edge. More...
 
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_ShapeemptyCopied () const
 
GEOMAPI_EXPORT bool isNull () const
 Returns true if the underlied shape is null. More...
 
virtual GEOMAPI_EXPORT bool isSame (const std::shared_ptr< GeomAPI_Shape > theShape) const
 Returns whether the shapes are same. More...
 
virtual GEOMAPI_EXPORT bool isVertex () const
 Returns whether the shape is a vertex. More...
 
virtual GEOMAPI_EXPORT bool isEdge () const
 Returns whether the shape is an edge. More...
 
virtual GEOMAPI_EXPORT bool isWire () const
 Returns whether the shape is a wire. More...
 
virtual GEOMAPI_EXPORT bool isFace () const
 Returns whether the shape is a face. More...
 
virtual GEOMAPI_EXPORT bool isShell () const
 Returns whether the shape is a shell. More...
 
virtual GEOMAPI_EXPORT bool isCompound () const
 Returns whether the shape is a compound. More...
 
virtual GEOMAPI_EXPORT bool isCompoundOfSolids () const
 Returns whether the shape is a compound of solids. More...
 
virtual GEOMAPI_EXPORT bool isCollectionOfSolids () const
 Returns true, if the shape contains only solids, compsolids and compounds of solids and compsolids of any nesting depth. More...
 
virtual GEOMAPI_EXPORT bool isConnectedTopology () const
 Returns whether the shape is a compound where all elements are topologically connected. More...
 
virtual GEOMAPI_EXPORT bool isSolid () const
 Returns whether the shape is a solid. More...
 
virtual GEOMAPI_EXPORT bool isCompSolid () const
 Returns whether the shape is a compsolid. More...
 
virtual GEOMAPI_EXPORT bool isPlanar () const
 Returns whether the shape is planar. More...
 
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Vertexvertex () const
 Returns vertex or empty shape. More...
 
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Edgeedge () const
 Returns edge or empty shape. More...
 
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Wirewire () const
 Returns wire or empty shape. More...
 
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Faceface () const
 Returns face or empty shape. More...
 
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Shellshell () const
 Returns shell or empty shape. More...
 
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Solidsolid () const
 Returns solid or empty shape. More...
 
GEOMAPI_EXPORT std::list< std::shared_ptr< GeomAPI_Shape > > subShapes (const ShapeType theSubShapeType, const bool theOnlyUnique=false) const
 Returns list of sub-shapes of the given type. More...
 
virtual GEOMAPI_EXPORT ShapeType shapeType () const
 Returns the shape type. More...
 
virtual GEOMAPI_EXPORT std::string shapeTypeStr () const
 
virtual GEOMAPI_EXPORT Orientation orientation () const
 
virtual GEOMAPI_EXPORT void setOrientation (const Orientation theOrientation)
 Sets the shape orientation. More...
 
virtual GEOMAPI_EXPORT void reverse ()
 Reverse shape. More...
 
virtual GEOMAPI_EXPORT bool isSubShape (const std::shared_ptr< GeomAPI_Shape > theShape, const bool theCheckOrientation=true) const
 
GEOMAPI_EXPORT bool computeSize (double &theXmin, double &theYmin, double &theZmin, double &theXmax, double &theYmax, double &theZmax) const
 Computes boundary dimensions of the shape Returns False if it is not possible. More...
 
GEOMAPI_EXPORT std::string getShapeStream (const bool theWithTriangulation=true) const
 Returns the shape as BRep stream. More...
 
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Shapeintersect (const std::shared_ptr< GeomAPI_Shape > theShape) const
 Returns intersection of shapes. More...
 
GEOMAPI_EXPORT bool isIntersect (const std::shared_ptr< GeomAPI_Shape > theShape) const
 Returns true if min distance between shapes < tolerance. More...
 
GEOMAPI_EXPORT void translate (const std::shared_ptr< GeomAPI_Dir > theDir, const double theOffset)
 Translates the shape along the direction for the given offset. More...
 
GEOMAPI_EXPORT void move (const std::shared_ptr< GeomAPI_Trsf > theTransformation)
 Moves the shape with the given transformation matrix. More...
 
GEOMAPI_EXPORT ShapeType typeOfCompoundShapes () const
 Returns type of shapes in the compound. More...
 
GEOMAPI_EXPORT bool isSelfIntersected (const int theLevelOfCheck=9) const
 Returns true if shape have self-intersections. More...
 
template<class T >
T * implPtr ()
 Returns the pointer to the impl. More...
 
template<class T >
const T * implPtr () const
 Returns the pointer to the impl. More...
 
template<class T >
const T & impl () const
 Returns the reference object of the impl. More...
 
template<class T >
void setImpl (T *theImpl)
 Updates the impl (deletes the old one) More...
 
GEOMAPI_EXPORT bool empty () const
 Returns true if the impl is empty. More...
 

Static Public Member Functions

static GEOMAPI_EXPORT ShapeType shapeTypeByStr (std::string theType)
 Returns the type enumeration by the string-type. More...
 

Detailed Description

Interface to the edge object.

Member Enumeration Documentation

◆ ShapeType

enum GeomAPI_Shape::ShapeType
inherited

Shape type enum.

◆ Orientation

Shape orientation.

Constructor & Destructor Documentation

◆ GeomAPI_Edge() [1/2]

GeomAPI_Edge::GeomAPI_Edge ( )

Makes an undefined Edge (no geometry).

◆ GeomAPI_Edge() [2/2]

GeomAPI_Edge::GeomAPI_Edge ( const std::shared_ptr< GeomAPI_Shape > &  theShape)

Creation of edge by the edge-shape.

Member Function Documentation

◆ vertices()

void GeomAPI_Edge::vertices ( std::shared_ptr< GeomAPI_Vertex > &  theStartVertex,
std::shared_ptr< GeomAPI_Vertex > &  theEndVertex 
) const

Return vertices of the edge;.

◆ isSameGeometry()

bool GeomAPI_Edge::isSameGeometry ( const std::shared_ptr< GeomAPI_Shape theShape) const
virtual

Returns true if edges have same underlying curve.

Reimplemented from GeomAPI_Shape.

◆ isLine()

bool GeomAPI_Edge::isLine ( ) const

Verifies that the edge is a line.

◆ isCircle()

bool GeomAPI_Edge::isCircle ( ) const

Verifies that the edge is a circle.

◆ isArc()

bool GeomAPI_Edge::isArc ( ) const

Verifies that the edge is an arc of circle.

◆ isEllipse()

bool GeomAPI_Edge::isEllipse ( ) const

Verifies that the edge is an arc of circle.

◆ isBSpline()

bool GeomAPI_Edge::isBSpline ( ) const

Verifies that the edge is based on a B-spline curve.

◆ firstPoint()

std::shared_ptr< GeomAPI_Pnt > GeomAPI_Edge::firstPoint ( )

Returns the first vertex coordinates of the edge.

◆ lastPoint()

std::shared_ptr< GeomAPI_Pnt > GeomAPI_Edge::lastPoint ( )

Returns the Last vertex coordinates of the edge.

◆ circle()

std::shared_ptr< GeomAPI_Circ > GeomAPI_Edge::circle ( ) const

Returns a circle if edge is based on the circle curve.

◆ ellipse()

std::shared_ptr< GeomAPI_Ellipse > GeomAPI_Edge::ellipse ( ) const

Returns an ellipse if edge is based on the ellipse curve.

◆ line()

std::shared_ptr< GeomAPI_Lin > GeomAPI_Edge::line ( ) const

Returns a line if edge is based on the linear curve.

◆ isEqual()

bool GeomAPI_Edge::isEqual ( const std::shared_ptr< GeomAPI_Shape theEdge) const
virtual

Returns true if the current edge is geometrically equal to the given edge.

Reimplemented from GeomAPI_Shape.

◆ setRange()

void GeomAPI_Edge::setRange ( const double &  theFirst,
const double &  theLast 
)

Change parametric range of the curve.

◆ getRange()

void GeomAPI_Edge::getRange ( double &  theFirst,
double &  theLast 
) const

Returns range of parameter on the curve.

◆ isInPlane()

bool GeomAPI_Edge::isInPlane ( const std::shared_ptr< GeomAPI_Pln thePlane) const

Returns true, if the edge is fully placed in the specified plane.

Parameters
thePlanea plane for intersection

◆ intersectWithPlane()

void GeomAPI_Edge::intersectWithPlane ( const std::shared_ptr< GeomAPI_Pln thePlane,
std::list< std::shared_ptr< GeomAPI_Pnt > > &  theResult 
) const

Returns list of intersection points if the edge has intersections with the given plane.

Parameters
thePlanea plane for intersection

◆ length()

double GeomAPI_Edge::length ( ) const

Returns edge length.

◆ isClosed()

bool GeomAPI_Edge::isClosed ( ) const

Returns true if the edge is closed (like full circle)

◆ isDegenerated()

bool GeomAPI_Edge::isDegenerated ( ) const

Returns true if the edge is degenerated (has no 3D curve)

◆ middlePoint()

GeomPointPtr GeomAPI_Edge::middlePoint ( ) const
virtual

Return middle point on the edge.

Reimplemented from GeomAPI_Shape.

◆ emptyCopied()

std::shared_ptr< GeomAPI_Shape > GeomAPI_Shape::emptyCopied ( ) const
inherited
Returns
a new Shape with the same Orientation and Location and a new TShape with the same geometry and no sub-shapes.

◆ isNull()

bool GeomAPI_Shape::isNull ( ) const
inherited

Returns true if the underlied shape is null.

◆ isSame()

bool GeomAPI_Shape::isSame ( const std::shared_ptr< GeomAPI_Shape theShape) const
virtualinherited

Returns whether the shapes are same.

◆ isVertex()

bool GeomAPI_Shape::isVertex ( ) const
virtualinherited

Returns whether the shape is a vertex.

Reimplemented in GeomAPI_PlanarEdges.

◆ isEdge()

bool GeomAPI_Shape::isEdge ( ) const
virtualinherited

Returns whether the shape is an edge.

Reimplemented in GeomAPI_PlanarEdges.

◆ isWire()

bool GeomAPI_Shape::isWire ( ) const
virtualinherited

Returns whether the shape is a wire.

◆ isFace()

bool GeomAPI_Shape::isFace ( ) const
virtualinherited

Returns whether the shape is a face.

◆ isShell()

bool GeomAPI_Shape::isShell ( ) const
virtualinherited

Returns whether the shape is a shell.

◆ isCompound()

bool GeomAPI_Shape::isCompound ( ) const
virtualinherited

Returns whether the shape is a compound.

◆ isCompoundOfSolids()

bool GeomAPI_Shape::isCompoundOfSolids ( ) const
virtualinherited

Returns whether the shape is a compound of solids.

◆ isCollectionOfSolids()

bool GeomAPI_Shape::isCollectionOfSolids ( ) const
virtualinherited

Returns true, if the shape contains only solids, compsolids and compounds of solids and compsolids of any nesting depth.

◆ isConnectedTopology()

bool GeomAPI_Shape::isConnectedTopology ( ) const
virtualinherited

Returns whether the shape is a compound where all elements are topologically connected.

◆ isSolid()

bool GeomAPI_Shape::isSolid ( ) const
virtualinherited

Returns whether the shape is a solid.

◆ isCompSolid()

bool GeomAPI_Shape::isCompSolid ( ) const
virtualinherited

Returns whether the shape is a compsolid.

◆ isPlanar()

bool GeomAPI_Shape::isPlanar ( ) const
virtualinherited

Returns whether the shape is planar.

Reimplemented in GeomAPI_PlanarEdges.

◆ vertex()

std::shared_ptr< GeomAPI_Vertex > GeomAPI_Shape::vertex ( ) const
inherited

Returns vertex or empty shape.

◆ edge()

std::shared_ptr< GeomAPI_Edge > GeomAPI_Shape::edge ( ) const
inherited

Returns edge or empty shape.

◆ wire()

std::shared_ptr< GeomAPI_Wire > GeomAPI_Shape::wire ( ) const
inherited

Returns wire or empty shape.

◆ face()

std::shared_ptr< GeomAPI_Face > GeomAPI_Shape::face ( ) const
inherited

Returns face or empty shape.

◆ shell()

std::shared_ptr< GeomAPI_Shell > GeomAPI_Shape::shell ( ) const
inherited

Returns shell or empty shape.

◆ solid()

std::shared_ptr< GeomAPI_Solid > GeomAPI_Shape::solid ( ) const
inherited

Returns solid or empty shape.

◆ subShapes()

std::list< std::shared_ptr< GeomAPI_Shape > > GeomAPI_Shape::subShapes ( const ShapeType  theSubShapeType,
const bool  theOnlyUnique = false 
) const
inherited

Returns list of sub-shapes of the given type.

Parameters
theSubShapeTypetype of sub-shapes to search.
theOnlyUniqueset it to true to omit subsequent inclusions of the same sub-shape. By default it is false.

◆ shapeType()

GeomAPI_Shape::ShapeType GeomAPI_Shape::shapeType ( ) const
virtualinherited

Returns the shape type.

◆ shapeTypeByStr()

GeomAPI_Shape::ShapeType GeomAPI_Shape::shapeTypeByStr ( std::string  theType)
staticinherited

Returns the type enumeration by the string-type.

◆ shapeTypeStr()

std::string GeomAPI_Shape::shapeTypeStr ( ) const
virtualinherited
Returns
the shape type as string.

◆ orientation()

GeomAPI_Shape::Orientation GeomAPI_Shape::orientation ( ) const
virtualinherited
Returns
the shape orientation.

◆ setOrientation()

void GeomAPI_Shape::setOrientation ( const Orientation  theOrientation)
virtualinherited

Sets the shape orientation.

◆ reverse()

void GeomAPI_Shape::reverse ( )
virtualinherited

Reverse shape.

◆ isSubShape()

bool GeomAPI_Shape::isSubShape ( const std::shared_ptr< GeomAPI_Shape theShape,
const bool  theCheckOrientation = true 
) const
virtualinherited
Returns
true if passed shape is a sub-shape of this shape.
Parameters
theShapeshape to search.
theCheckOrientationif false, returns true even if orientation of shape differs

◆ computeSize()

bool GeomAPI_Shape::computeSize ( double &  theXmin,
double &  theYmin,
double &  theZmin,
double &  theXmax,
double &  theYmax,
double &  theZmax 
) const
inherited

Computes boundary dimensions of the shape Returns False if it is not possible.

◆ getShapeStream()

std::string GeomAPI_Shape::getShapeStream ( const bool  theWithTriangulation = true) const
inherited

Returns the shape as BRep stream.

◆ intersect()

GeomShapePtr GeomAPI_Shape::intersect ( const std::shared_ptr< GeomAPI_Shape theShape) const
inherited

Returns intersection of shapes.

◆ isIntersect()

bool GeomAPI_Shape::isIntersect ( const std::shared_ptr< GeomAPI_Shape theShape) const
inherited

Returns true if min distance between shapes < tolerance.

◆ translate()

void GeomAPI_Shape::translate ( const std::shared_ptr< GeomAPI_Dir theDir,
const double  theOffset 
)
inherited

Translates the shape along the direction for the given offset.

◆ move()

void GeomAPI_Shape::move ( const std::shared_ptr< GeomAPI_Trsf theTransformation)
inherited

Moves the shape with the given transformation matrix.

◆ typeOfCompoundShapes()

GeomAPI_Shape::ShapeType GeomAPI_Shape::typeOfCompoundShapes ( ) const
inherited

Returns type of shapes in the compound.

◆ isSelfIntersected()

bool GeomAPI_Shape::isSelfIntersected ( const int  theLevelOfCheck = 9) const
inherited

Returns true if shape have self-intersections.

Parameters
[in]theLevelOfCheckdefines which interferences will be checked:
0 - only V/V;
1 - V/V and V/E;
2 - V/V, V/E and E/E;
3 - V/V, V/E, E/E and V/F;
4 - V/V, V/E, E/E, V/F and E/F;
5 - V/V, V/E, E/E, V/F, E/F and F/F;
6 - V/V, V/E, E/E, V/F, E/F, F/F and V/S;
7 - V/V, V/E, E/E, V/F, E/F, F/F, V/S and E/S;
8 - V/V, V/E, E/E, V/F, E/F, F/F, V/S, E/S and F/S;
9 - V/V, V/E, E/E, V/F, E/F, F/F, V/S, E/S, F/S and S/S - all interferences (Default value)

◆ implPtr() [1/2]

template<class T >
T* GeomAPI_Interface::implPtr ( )
inlineinherited

Returns the pointer to the impl.

◆ implPtr() [2/2]

template<class T >
const T* GeomAPI_Interface::implPtr ( ) const
inlineinherited

Returns the pointer to the impl.

◆ impl()

template<class T >
const T& GeomAPI_Interface::impl ( ) const
inlineinherited

Returns the reference object of the impl.

◆ setImpl()

template<class T >
void GeomAPI_Interface::setImpl ( T *  theImpl)
inlineinherited

Updates the impl (deletes the old one)

◆ empty()

bool GeomAPI_Interface::empty ( ) const
inherited

Returns true if the impl is empty.