MeshCore::MeshGeomEdge Class Reference

The MeshGeomEdge class is geometric counterpart to MeshEdge that holds the geometric data points of an edge. More...

#include <Elements.h>

## Public Member Functions

void ClosestPointsToLine (const Base::Vector3f &linePt, const Base::Vector3f &lineDir, Base::Vector3f &rclPnt1, Base::Vector3f &rclPnt2) const
Get the closest points rclPnt1 and rclPnt2 of the line defined by this edge and the line defined by rclPt and rclDir. More...

bool ContainedByOrIntersectBoundingBox (const Base::BoundBox3f &rclBB) const
Checks if the edge is inside the bounding box or intersects with it. More...

Base::BoundBox3f GetBoundBox () const
Returns the bounding box of the edge. More...

bool IntersectBoundingBox (const Base::BoundBox3f &rclBB) const
Checks if the edge intersects with the given bounding box. More...

bool IntersectWithEdge (const MeshGeomEdge &edge, Base::Vector3f &res) const
Calculates the intersection point of an edge with this edge. More...

bool IntersectWithLine (const Base::Vector3f &rclPt, const Base::Vector3f &rclDir, Base::Vector3f &rclRes) const
Calculates the intersection point of the line defined by the base rclPt and the direction rclDir with the edge. More...

bool IntersectWithPlane (const Base::Vector3f &rclPt, const Base::Vector3f &rclDir, Base::Vector3f &rclRes) const
Calculates the intersection point of the plane defined by the base rclPt and the direction rclDir with the edge. More...

bool IsCollinear (const MeshGeomEdge &edge) const
Checks if the two edges are collinear. More...

bool IsParallel (const MeshGeomEdge &edge) const
Checks if the two edges are parallel. More...

bool IsPointOf (const Base::Vector3f &rclPoint, float fDistance) const
Checks if the point is part of the edge. More...

bool IsProjectionPointOf (const Base::Vector3f &point) const
Checks if the projection point of point lies on the edge. More...

MeshGeomEdge ()

void ProjectPointToLine (const Base::Vector3f &rclPoint, Base::Vector3f &rclProj) const
Calculates the projection of a point onto the line defined by the edge. More...

## Detailed Description

The MeshGeomEdge class is geometric counterpart to MeshEdge that holds the geometric data points of an edge.

## ◆ MeshGeomEdge()

 MeshCore::MeshGeomEdge::MeshGeomEdge ( )

## ◆ ClosestPointsToLine()

 void MeshGeomEdge::ClosestPointsToLine ( const Base::Vector3f & linePt, const Base::Vector3f & lineDir, Base::Vector3f & rclPnt1, Base::Vector3f & rclPnt2 ) const

Get the closest points rclPnt1 and rclPnt2 of the line defined by this edge and the line defined by rclPt and rclDir.

If the two points are identical then both lines intersect each other.

## ◆ ContainedByOrIntersectBoundingBox()

 bool MeshGeomEdge::ContainedByOrIntersectBoundingBox ( const Base::BoundBox3f & rclBB ) const

Checks if the edge is inside the bounding box or intersects with it.

## ◆ GetBoundBox()

 Base::BoundBox3f MeshGeomEdge::GetBoundBox ( ) const

Returns the bounding box of the edge.

Referenced by ContainedByOrIntersectBoundingBox(), and MeshCore::MeshEvalPointOnEdge::Evaluate().

## ◆ IntersectBoundingBox()

 bool MeshGeomEdge::IntersectBoundingBox ( const Base::BoundBox3f & rclBB ) const

Checks if the edge intersects with the given bounding box.

Referenced by ContainedByOrIntersectBoundingBox().

## ◆ IntersectWithEdge()

 bool MeshGeomEdge::IntersectWithEdge ( const MeshGeomEdge & edge, Base::Vector3f & res ) const

Calculates the intersection point of an edge with this edge.

The intersection must be inside both edges. If there is no intersection false is returned.

Referenced by MeshCore::MeshGeomFacet::IntersectWithFacet().

## ◆ IntersectWithLine()

 bool MeshGeomEdge::IntersectWithLine ( const Base::Vector3f & rclPt, const Base::Vector3f & rclDir, Base::Vector3f & rclRes ) const

Calculates the intersection point of the line defined by the base rclPt and the direction rclDir with the edge.

The intersection must be inside the edge. If there is no intersection false is returned.

## ◆ IntersectWithPlane()

 bool MeshGeomEdge::IntersectWithPlane ( const Base::Vector3f & rclPt, const Base::Vector3f & rclDir, Base::Vector3f & rclRes ) const

Calculates the intersection point of the plane defined by the base rclPt and the direction rclDir with the edge.

The intersection must be inside the edge. If there is no intersection false is returned.

References Base::Vector3< _Precision >::Dot().

## ◆ IsCollinear()

 bool MeshGeomEdge::IsCollinear ( const MeshGeomEdge & edge ) const

Checks if the two edges are collinear.

Note
Collinear edges always are parallel.

## ◆ IsParallel()

 bool MeshGeomEdge::IsParallel ( const MeshGeomEdge & edge ) const

Checks if the two edges are parallel.

Note
Parallel edges could be collinear.

Referenced by IsCollinear().

## ◆ IsPointOf()

 bool MeshGeomEdge::IsPointOf ( const Base::Vector3f & rclPoint, float fDistance ) const

Checks if the point is part of the edge.

A point is regarded as part of an edge if the distance is lower than fDistance to the projected point of rclPoint on the edge.

References Base::Distance(), and Base::DistanceP2().

Referenced by MeshCore::MeshEvalPointOnEdge::Evaluate().

## ◆ IsProjectionPointOf()

 bool MeshGeomEdge::IsProjectionPointOf ( const Base::Vector3f & point ) const

Checks if the projection point of point lies on the edge.

Referenced by IntersectWithEdge().

## ◆ ProjectPointToLine()

 void MeshGeomEdge::ProjectPointToLine ( const Base::Vector3f & rclPoint, Base::Vector3f & rclProj ) const

Calculates the projection of a point onto the line defined by the edge.

The caller must check if the projection point is inside the edge.

References draftgeoutils.general::vec().

Referenced by ClosestPointsToLine().

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