The Facet helper class The MeshFacet class provides an interface for the MeshFacetPy class for convenient access to the Mesh data structure. More...

#include <Facet.h>

Public Member Functions

 Facet (const MeshCore::MeshFacet &face=MeshCore::MeshFacet(), MeshObject *obj=0, unsigned long index=ULONG_MAX)
 
 Facet (const Facet &f)
 
bool isBound (void) const
 
void operator= (const Facet &f)
 
 ~Facet ()
 
- Public Member Functions inherited from MeshCore::MeshGeomFacet
void AdjustCirculationDirection (void)
 Adjusts the facet's orientation to its normal. More...
 
float Area () const
 Calculates the area of a facet. More...
 
void ArrangeNormal (const Base::Vector3f &rclN)
 Arrange the facet normal so the both vectors have the same orientation. More...
 
void CalcNormal (void)
 Calculates the facet normal for storing internally. More...
 
float CenterOfCircumCircle (Base::Vector3f &rclCenter) const
 Calculates the center and radius of the circum circle of the facet. More...
 
float CenterOfInscribedCircle (Base::Vector3f &rclCenter) const
 Calculates the center and radius of the inscribed circle of the facet. More...
 
bool ContainedByOrIntersectBoundingBox (const Base::BoundBox3f &rcBB) const
 Checks if the facet is inside the bounding box or intersects with it. More...
 
float DistancePlaneToPoint (const Base::Vector3f &rclPoint) const
 Calculates the distance of a point to the plane defined by the triangle. More...
 
float DistanceToLineSegment (const Base::Vector3f &rcP1, const Base::Vector3f &rcP2) const
 Calculates the shortest distance from the line segment defined by rcP1 and rcP2 to this facet. More...
 
float DistanceToPoint (const Base::Vector3f &rcPt) const
 Calculates the shortest distance from the point rcPt to the facet. More...
 
float DistanceToPoint (const Base::Vector3f &rclPt, Base::Vector3f &rclNt) const
 Calculates the shortest distance from the point rcPt to the facet. More...
 
void Enlarge (float fDist)
 Enlarges the triangle. More...
 
bool Foraminate (const Base::Vector3f &rclPt, const Base::Vector3f &rclDir, Base::Vector3f &rclRes, float fMaxAngle=F_PI) const
 Calculates the intersection point of the line defined by the base rclPt and the direction rclDir with the facet. More...
 
Base::BoundBox3f GetBoundBox (void) const
 Returns the wrapping bounding box. More...
 
Base::Vector3f GetGravityPoint (void) const
 Calculates the facet's gravity point. More...
 
Base::Vector3f GetNormal (void) const
 Returns the normal of the facet. More...
 
bool IntersectBoundingBox (const Base::BoundBox3f &rclBB) const
 Checks if the facet intersects with the given bounding box. More...
 
bool IntersectPlaneWithLine (const Base::Vector3f &rclBase, const Base::Vector3f &rclNormal, Base::Vector3f &rclRes) const
 Checks if the plane defined by the facet rclFacet intersects with the line defined by the base rclBase and the direction rclNormal and returns the intersection point rclRes if possible. More...
 
bool IntersectWithFacet (const MeshGeomFacet &rclFacet) const
 This method checks if both facets intersect. More...
 
int IntersectWithFacet (const MeshGeomFacet &facet, Base::Vector3f &rclPt0, Base::Vector3f &rclPt1) const
 Intersect the facet with the other facet The result is line given by two points (if intersected). 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 facet. More...
 
bool IntersectWithPlane (const Base::Vector3f &rclBase, const Base::Vector3f &rclNormal, Base::Vector3f &rclP1, Base::Vector3f &rclP2) const
 Checks if the facet intersects with the plane defined by the base rclBase and the normal rclNormal and returns true if two points are found, false otherwise. More...
 
bool IntersectWithPlane (const Base::Vector3f &rclBase, const Base::Vector3f &rclNormal) const
 Checks if the facet intersects with the plane defined by the base rclBase and the normal rclNormal. More...
 
bool IsDeformed (float fCosOfMinAngle, float fCosOfMaxAngle) const
 Checks whether the triangle is deformed. More...
 
bool IsDegenerated (float epsilon) const
 Checks whether the triangle is degenerated. More...
 
bool IsFlag (MeshFacet::TFlagType tF) const
 Query the flag state of the facet. More...
 
bool IsPointOf (const Base::Vector3f &rclPoint, float fDistance) const
 Checks if the point is part of the facet. More...
 
bool IsPointOf (const Base::Vector3f &rclPoint) const
 Checks if the point is inside or at the border of the facet. More...
 
bool IsPointOfFace (const Base::Vector3f &rclP, float fDistance) const
 Checks whether the given point is inside the facet with tolerance fDistance. More...
 
bool IsPointOfSphere (const Base::Vector3f &rP) const
 The center and radius of the circum circle define a sphere in 3D. More...
 
bool IsPointOfSphere (const MeshGeomFacet &rFacet) const
 This is an overloaded member function, provided for convenience. More...
 
float MaximumAngle () const
 Calculates the maximum angle of a facet. More...
 
unsigned short NearestEdgeToPoint (const Base::Vector3f &rclPt) const
 Returns the edge number of the facet that is nearest to the point rclPt. More...
 
void NearestEdgeToPoint (const Base::Vector3f &rclPt, float &fDistance, unsigned short &side) const
 Returns the edge number side of the facet and the distance to the edge that is nearest to the point rclPt. More...
 
void NormalInvalid (void)
 Checks if the normal is not yet calculated. More...
 
float Perimeter () const
 Calculates the perimeter of the facet. More...
 
void ProjectFacetToPlane (MeshGeomFacet &rclFacet) const
 Calculates the projection of a facet onto the plane defined by the triangle. More...
 
void ProjectPointToPlane (const Base::Vector3f &rclPoint, Base::Vector3f &rclProj) const
 Calculates the projection of a point onto the plane defined by the triangle. More...
 
void ResetFlag (MeshFacet::TFlagType tF)
 Reset flag state. More...
 
void SetFlag (MeshFacet::TFlagType tF)
 Set flag state. More...
 
void SetNormal (const Base::Vector3f &rclNormal)
 Sets the facet's normal. More...
 
void SubSample (float fStep, std::vector< Base::Vector3f > &rclPoints) const
 Subsamples the facet into points with resolution fStep. More...
 
float VolumeOfPrism (const MeshGeomFacet &rclF) const
 Calculates the volume of the prism defined by two facets. More...
 
bool Weights (const Base::Vector3f &rclP, float &w0, float &w1, float &w2) const
 Calculates the weights w1, ..., w3 of the corners to get the point rclP, i.e. More...
 
 MeshGeomFacet (void)
 default constructor More...
 
 MeshGeomFacet (const Base::Vector3f &v1, const Base::Vector3f &v2, const Base::Vector3f &v3)
 Constructor with the corner points. More...
 
 ~MeshGeomFacet (void)
 Destruction. More...
 

Public Attributes

unsigned long Index
 
Base::Reference< MeshObjectMesh
 
unsigned long NIndex [3]
 
unsigned long PIndex [3]
 

Detailed Description

The Facet helper class The MeshFacet class provides an interface for the MeshFacetPy class for convenient access to the Mesh data structure.

This class should not be used for programming algorithms in C++. Use Mesh Core classes instead!

Constructor & Destructor Documentation

Facet::Facet ( const MeshCore::MeshFacet face = MeshCore::MeshFacet(),
MeshObject obj = 0,
unsigned long  index = ULONG_MAX 
)
Facet::Facet ( const Facet f)

References NIndex, and PIndex.

Facet::~Facet ( )

Member Function Documentation

void Facet::operator= ( const Facet f)

References Index, Mesh, NIndex, and PIndex.

Member Data Documentation

unsigned long Mesh::Facet::NIndex[3]
unsigned long Mesh::Facet::PIndex[3]

The documentation for this class was generated from the following files:
  • src/src/Mod/Mesh/App/Facet.h
  • src/src/Mod/Mesh/App/Facet.cpp