Version: 9.16.0
SMESH_MeshAlgos::Intersector Class Reference

Cut faces of a triangular mesh. More...

#include <SMESH_MeshAlgos.hxx>

Data Structures

struct  Algo
 Intersect faces of a mesh. More...
 

Public Types

typedef std::vector< SMESH_NodeXYZTFace
 

Public Member Functions

 Intersector (SMDS_Mesh *mesh, double tol, const std::vector< gp_XYZ > &normals)
 
 ~Intersector ()
 
void Cut (const SMDS_MeshElement *face1, const SMDS_MeshElement *face2, const int nbCommonNodes=-1)
 Compute cut of two faces of the mesh. More...
 
void Cut (const SMDS_MeshElement *face, SMESH_NodeXYZ &lineEnd1, int edgeIndex1, SMESH_NodeXYZ &lineEnd2, int edgeIndex2)
 Store a face cut by a line given by its ends lying either on face edges or inside the face. More...
 
void MakeNewFaces (SMESH_MeshAlgos::TElemIntPairVec &theNew2OldFaces, SMESH_MeshAlgos::TNodeIntPairVec &theNew2OldNodes, const double theSign=1., const bool theOptimize=false)
 Split all faces intersected by Cut() methods. More...
 

Static Public Member Functions

static bool CutByPlanes (const SMDS_MeshElement *face, const std::vector< gp_Ax1 > &planes, const double tol, std::vector< TFace > &newFaceConnectivity)
 Cut a face by planes, whose normals point to parts to keep. More...
 

Private Attributes

AlgomyAlgo
 

Detailed Description

Cut faces of a triangular mesh.

Usage work-flow: 1) call Cut() methods as many times as needed 2) call MakeNewFaces() to really modify the mesh faces

Member Typedef Documentation

◆ TFace

Constructor & Destructor Documentation

◆ Intersector()

SMESH_MeshAlgos::Intersector::Intersector ( SMDS_Mesh mesh,
double  tol,
const std::vector< gp_XYZ > &  normals 
)

References myAlgo.

◆ ~Intersector()

SMESH_MeshAlgos::Intersector::~Intersector ( )

References myAlgo.

Member Function Documentation

◆ Cut() [1/2]

void SMESH_MeshAlgos::Intersector::Cut ( const SMDS_MeshElement face,
SMESH_NodeXYZ lineEnd1,
int  edgeIndex1,
SMESH_NodeXYZ lineEnd2,
int  edgeIndex2 
)

Store a face cut by a line given by its ends lying either on face edges or inside the face.

store a face cut by a line given by its ends

References SMESH_MeshAlgos::Intersector::Algo::Cut(), and myAlgo.

◆ Cut() [2/2]

void SMESH_MeshAlgos::Intersector::Cut ( const SMDS_MeshElement face1,
const SMDS_MeshElement face2,
const int  nbCommonNodes = -1 
)

Compute cut of two faces of the mesh.

compute cut of two faces of the mesh

References SMESH_MeshAlgos::Intersector::Algo::Cut(), and myAlgo.

Referenced by SMESH_MeshAlgos::MakeOffset(), and SMESH_MeshAlgos::MakeSlot().

◆ CutByPlanes()

◆ MakeNewFaces()

void SMESH_MeshAlgos::Intersector::MakeNewFaces ( SMESH_MeshAlgos::TElemIntPairVec theNew2OldFaces,
SMESH_MeshAlgos::TNodeIntPairVec theNew2OldNodes,
const double  theSign = 1.,
const bool  theOptimize = false 
)

Split all faces intersected by Cut() methods.

split all face intersected by Cut() methods

References SMESH_MeshAlgos::Intersector::Algo::MakeNewFaces(), and myAlgo.

Referenced by SMESH_MeshAlgos::MakeOffset(), and SMESH_MeshAlgos::MakeSlot().

Field Documentation

◆ myAlgo

Algo* SMESH_MeshAlgos::Intersector::myAlgo
private