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 Facet &f) | |
Facet (const MeshCore::MeshFacet &face=MeshCore::MeshFacet(), MeshObject *obj=0, unsigned long index=ULONG_MAX) | |
bool isBound (void) const | |
void operator= (const Facet &f) | |
~Facet () | |
![]() | |
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... | |
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 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... | |
float DistancePlaneToPoint (const Base::Vector3f &rclPoint) const | |
Calculates the distance of a point to 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 ProjectFacetToPlane (MeshGeomFacet &rclFacet) const | |
Calculates the projection of a facet onto the plane defined by the triangle. More... | |
bool IsDegenerated (float epsilon) const | |
Checks whether the triangle is degenerated. More... | |
bool IsDeformed (float fCosOfMinAngle, float fCosOfMaxAngle) const | |
Checks whether the triangle is deformed. More... | |
void Enlarge (float fDist) | |
Enlarges the triangle. More... | |
void CalcNormal (void) | |
Calculates the facet normal for storing internally. More... | |
void ArrangeNormal (const Base::Vector3f &rclN) | |
Arrange the facet normal so the both vectors have the same orientation. More... | |
void AdjustCirculationDirection (void) | |
Adjusts the facet's orientation to its normal. More... | |
void NormalInvalid (void) | |
Invalidate the normal. More... | |
bool IsFlag (MeshFacet::TFlagType tF) const | |
Query the flag state of the facet. More... | |
void SetFlag (MeshFacet::TFlagType tF) | |
Set flag state. More... | |
void ResetFlag (MeshFacet::TFlagType tF) | |
Reset flag state. 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... | |
void SetNormal (const Base::Vector3f &rclNormal) | |
Sets the facet's normal. More... | |
Base::BoundBox3f GetBoundBox (void) const | |
Returns the wrapping bounding box. More... | |
float Perimeter () const | |
Calculates the perimeter of the facet. More... | |
float Area () const | |
Calculates the area of a facet. More... | |
float MaximumAngle () const | |
Calculates the maximum angle of a facet. More... | |
float MinimumAngle () const | |
Calculates the minimum angle of a facet. More... | |
bool ContainedByOrIntersectBoundingBox (const Base::BoundBox3f &rcBB) const | |
Checks if the facet is inside the bounding box or intersects with it. More... | |
bool IntersectBoundingBox (const Base::BoundBox3f &rclBB) const | |
Checks if the facet intersects with the given bounding box. 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... | |
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... | |
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 Foraminate (const Base::Vector3f &rclPt, const Base::Vector3f &rclDir, Base::Vector3f &rclRes, float fMaxAngle=Mathf::PI) 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 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... | |
float VolumeOfPrism (const MeshGeomFacet &rclF) const | |
Calculates the volume of the prism defined by two facets. More... | |
void SubSample (float fStep, std::vector< Base::Vector3f > &rclPoints) const | |
Subsamples the facet into points with resolution fStep. More... | |
float CenterOfInscribedCircle (Base::Vector3f &rclCenter) const | |
Calculates the center and radius of the inscribed circle of the facet. More... | |
float CenterOfCircumCircle (Base::Vector3f &rclCenter) const | |
Calculates the center and radius of the circum circle of the 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... | |
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 AspectRatio () const | |
The aspect ratio is the longest edge length divided by its height. More... | |
float AspectRatio2 () const | |
The alternative aspect ration is the ratio of the radius of the circum-circle and twice the radius of the in-circle. More... | |
float Roundness () const | |
The roundness is in the range between 0.0 (colinear) and 1.0 (equilateral). More... | |
void Transform (const Base::Matrix4D &) | |
Apply a transformation on the triangle. More... | |
Public Attributes | |
unsigned long Index | |
Base::Reference< MeshObject > Mesh | |
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() [1/2]
Facet::Facet | ( | const MeshCore::MeshFacet & | face = MeshCore::MeshFacet() , |
MeshObject * | obj = 0 , |
||
unsigned long | index = ULONG_MAX |
||
) |
◆ Facet() [2/2]
◆ ~Facet()
Facet::~Facet | ( | ) |
Member Function Documentation
◆ isBound()
bool Mesh::Facet::isBound | ( | void | ) | const |
Referenced by Mesh::FacetPy::getArea(), Mesh::FacetPy::getAspectRatio(), Mesh::FacetPy::getAspectRatio2(), Mesh::FacetPy::getCircumCircle(), Mesh::FacetPy::getInCircle(), Mesh::FacetPy::getNeighbourIndices(), Mesh::FacetPy::getPointIndices(), Mesh::FacetPy::getRoundness(), Mesh::FacetPy::isDeformed(), Mesh::FacetPy::isDegenerated(), and Mesh::FacetPy::representation().
◆ operator=()
Member Data Documentation
◆ Index
unsigned long Mesh::Facet::Index |
◆ Mesh
Base::Reference<MeshObject> Mesh::Facet::Mesh |
Referenced by Mesh::FacetPy::unbound().
◆ NIndex
unsigned long Mesh::Facet::NIndex[3] |
Referenced by Facet(), operator=(), and Mesh::FacetPy::representation().
◆ PIndex
unsigned long Mesh::Facet::PIndex[3] |
Referenced by Facet(), operator=(), and Mesh::FacetPy::representation().
The documentation for this class was generated from the following files:
- src/Mod/Mesh/App/Facet.h
- src/Mod/Mesh/App/Facet.cpp