Version: 9.12.0
MESHCUT Namespace Reference

Data Structures

class  Carre
 
class  Cube
 
class  Maillage
 

Enumerations

enum  TYPE_MAILLE {
  POI1 , SEG2 , SEG3 , TRIA3 ,
  TRIA6 , QUAD4 , QUAD8 , TETRA4 ,
  TETRA10 , PYRAM5 , PYRAM13 , PENTA6 ,
  PENTA15 , HEXA8 , HEXA20
}
 

Functions

void cas1 (int VN[6], int it4)
 Le cas 1 traduit le fait que deux des sommets du T4 initial sont dans le plan de coupe. More...
 
void cas2 (int VN[6], int it4)
 Deux points d'intersection Le cas 2 traduit le fait qu'un des sommets du T4 est dans le plan de coupe. More...
 
void cas3 (int VN[6], int it4)
 Trois points d'intersection ATTENTION: pour les PENTA6 on adopte la convention d'orientation SALOME : More...
 
void cas4 (int VN[6], int it4)
 Quatre points d'intersection. More...
 
float longueurSegment (int ngA, int ngB)
 
float distanceNoeudPlan (float point[3])
 
float distanceNoeudPlan (int ng)
 
int positionNoeudPlan (int indiceNoeud)
 
int intersectionSegmentPlan (int it4, int na)
 Equation paramétrique de la droite AB: OP = OA + lambda AB. More...
 
bool estUnTypeMaille (std::string S)
 
void ERREUR (const char *msg)
 
char * string2char (std::string str)
 
std::string int2string (int k)
 
float char2float (const char *ch)
 
std::string float2string (float f)
 
bool appartient (std::string e, std::string tableau[], int taille)
 
float arrondi (float x)
 
int numNoeudPointe (std::string b1, std::string b2, std::string b3)
 
std::string strip (std::string S)
 
std::string entierSur10_g (int i)
 
std::string entierSur10_d (int i)
 
std::string typeEnsight (std::string type)
 
int Nnoeuds (TYPE_MAILLE type)
 
int NnoeudsGeom (TYPE_MAILLE type)
 
int codeGMSH (std::string type)
 
std::string floatEnsight (float x)
 
bool typeComplexe (std::string type)
 
std::string ASTER8 (std::string s)
 
float dObservateur (float a, float b, float c)
 Distance à laquelle doit se tenir l'observateur sur un axe pour voir sous 90° un objet centré de dimensions a et b selon les deux autres axes. More...
 
int copieFichier (std::string source, std::string cible)
 
med_geometry_type InstanceMGE (TYPE_MAILLE TYPE)
 
int salome_chrono ()
 
TYPE_MAILLE typeMaille (std::string type)
 
std::string MGE2string (med_geometry_type MGE)
 
std::string TM2string (TYPE_MAILLE MGE)
 
TYPE_MAILLE string2TM (std::string stm)
 
std::string coordIndex_ILS (TYPE_MAILLE tm)
 
std::string coordIndex_IFS (TYPE_MAILLE tm)
 
std::string SIGNE (double x)
 
void champType (std::string type, med_entity_type MEM, med_geometry_type MGE, med_idt fid, med_idt fidout, char *maa, char *nomChamp, char *nomChampMoy, med_field_type typeChamp, char *compChamp, char *unitChamp, med_int nCompChamp, std::map< std::string, int > REFGAUSS, int ichamp)
 
std::string nomMaille (TYPE_MAILLE tm, int nl)
 
bool appartientVN (int n, std::vector< int > V)
 
float distance2 (float x1, float y1, float z1, float x2, float y2, float z2)
 
void conversionCNX (med_int *CNXtm, TYPE_MAILLE tm, int N)
 Conversion HL-MED d'une table de connectivités. More...
 

Variables

std::map< std::string, int > intersections
 Table des points d'intersection calculés. More...
 
int indexNouvellesMailles
 
int indexNouveauxNoeuds
 
int offsetMailles
 
std::string str_id_GMplus
 
std::string str_id_GMmoins
 
MaillageMAILLAGE1
 
MaillageMAILLAGE2
 
std::vector< float > newXX
 
std::vector< float > newYY
 
std::vector< float > newZZ
 
std::map< TYPE_MAILLE, std::vector< int > > newCNX
 
std::map< TYPE_MAILLE, int > cptNouvellesMailles
 
std::map< TYPE_MAILLE, std::vector< int > > GMplus
 
std::map< TYPE_MAILLE, std::vector< int > > GMmoins
 
std::vector< int > cutTetras
 
float * DNP
 Distance Noeud Plan. More...
 
int * POSN
 Version -1/0/+1 du précédent, selon epsilon. More...
 
std::string str_id_maillagenew
 
float normale [3]
 
float pointPlan [3]
 Définition du plan de coupe. More...
 
float d
 coefficient constant de l'équation du plan de coupe More...
 
float epsilon
 distance en dessous de laquelle un point est considéré comme appartenant au plan de coupe More...
 
bool debug
 
int Naretes
 

Enumeration Type Documentation

◆ TYPE_MAILLE

Enumerator
POI1 
SEG2 
SEG3 
TRIA3 
TRIA6 
QUAD4 
QUAD8 
TETRA4 
TETRA10 
PYRAM5 
PYRAM13 
PENTA6 
PENTA15 
HEXA8 
HEXA20 

Function Documentation

◆ appartient()

bool MESHCUT::appartient ( std::string  e,
std::string  tableau[],
int  taille 
)

◆ appartientVN()

bool MESHCUT::appartientVN ( int  n,
std::vector< int >  V 
)

◆ arrondi()

float MESHCUT::arrondi ( float  x)

◆ ASTER8()

std::string MESHCUT::ASTER8 ( std::string  s)

References ERREUR().

◆ cas1()

void MESHCUT::cas1 ( int  VN[6],
int  it4 
)

Le cas 1 traduit le fait que deux des sommets du T4 initial sont dans le plan de coupe.

Le point d'intersection franc trouvé est sur l'arête opposée à ces deux points du T4.

Le T4 initial produit deux nouveaux T4.

References MESHCUT::Maillage::CNX, cptNouvellesMailles, cutTetras, MESHCUT::Maillage::EFFECTIFS_TYPES, ERREUR(), GMmoins, GMplus, MAILLAGE1, newCNX, POSN, and TETRA4.

Referenced by main().

◆ cas2()

void MESHCUT::cas2 ( int  VN[6],
int  it4 
)

Deux points d'intersection Le cas 2 traduit le fait qu'un des sommets du T4 est dans le plan de coupe.

Ce sommet est celui des quatre qui n'appartient à aucune des deux arêtes sur lesquelles un point d'intersection non -1 a été calculé.

Le T4 initial produit un nouveau T4 et un élément PYRAM5.

References MESHCUT::Maillage::CNX, cptNouvellesMailles, cutTetras, MESHCUT::Maillage::EFFECTIFS_TYPES, ERREUR(), GMmoins, GMplus, MAILLAGE1, newCNX, POSN, PYRAM5, and TETRA4.

Referenced by main().

◆ cas3()

void MESHCUT::cas3 ( int  VN[6],
int  it4 
)

Trois points d'intersection ATTENTION: pour les PENTA6 on adopte la convention d'orientation SALOME :

N1 N2 N3 N4 N5 N6

où N1 N2 N3 sont les sommets du haut et N4 N5 N6 les sommets du bas (selon l'orientation donnée par le sens des triangles)

References MESHCUT::Maillage::CNX, cptNouvellesMailles, cutTetras, MESHCUT::Maillage::EFFECTIFS_TYPES, ERREUR(), GMmoins, GMplus, MAILLAGE1, newCNX, PENTA6, POSN, and TETRA4.

Referenced by main().

◆ cas4()

void MESHCUT::cas4 ( int  VN[6],
int  it4 
)

Quatre points d'intersection.

ATTENTION: pour les PENTA6 on adopte la convention d'orientation SALOME

N1 N2 N3 N4 N5 N6

où N1 N2 N3 sont les sommets du haut et N4 N5 N6 les sommets du bas (selon l'orientation donnée par le sens des triangles)

References MESHCUT::Maillage::CNX, cptNouvellesMailles, cutTetras, MESHCUT::Maillage::EFFECTIFS_TYPES, ERREUR(), GMmoins, GMplus, MAILLAGE1, newCNX, PENTA6, POSN, and TETRA4.

Referenced by main().

◆ champType()

void MESHCUT::champType ( std::string  type,
med_entity_type  MEM,
med_geometry_type  MGE,
med_idt  fid,
med_idt  fidout,
char *  maa,
char *  nomChamp,
char *  nomChampMoy,
med_field_type  typeChamp,
char *  compChamp,
char *  unitChamp,
med_int  nCompChamp,
std::map< std::string, int >  REFGAUSS,
int  ichamp 
)

References debug, ERREUR(), and MGE2string().

◆ char2float()

float MESHCUT::char2float ( const char *  ch)

Referenced by main().

◆ codeGMSH()

int MESHCUT::codeGMSH ( std::string  type)

References ERREUR().

◆ conversionCNX()

void MESHCUT::conversionCNX ( med_int *  CNXtm,
TYPE_MAILLE  tm,
int  N 
)

Conversion HL-MED d'une table de connectivités.

References HEXA8, Nnoeuds(), PENTA6, PYRAM5, and TETRA4.

Referenced by MESHCUT::Maillage::acquisitionTYPE_inputMED(), and MESHCUT::Maillage::outputMED().

◆ coordIndex_IFS()

std::string MESHCUT::coordIndex_IFS ( TYPE_MAILLE  tm)

◆ coordIndex_ILS()

std::string MESHCUT::coordIndex_ILS ( TYPE_MAILLE  tm)

◆ copieFichier()

int MESHCUT::copieFichier ( std::string  source,
std::string  cible 
)

References string2char().

◆ distance2()

float MESHCUT::distance2 ( float  x1,
float  y1,
float  z1,
float  x2,
float  y2,
float  z2 
)

◆ distanceNoeudPlan() [1/2]

float MESHCUT::distanceNoeudPlan ( float  point[3])

◆ distanceNoeudPlan() [2/2]

float MESHCUT::distanceNoeudPlan ( int  ng)

◆ dObservateur()

float MESHCUT::dObservateur ( float  a,
float  b,
float  c 
)

Distance à laquelle doit se tenir l'observateur sur un axe pour voir sous 90° un objet centré de dimensions a et b selon les deux autres axes.

Si on ne tient pas compte de la dimension de l'objet selon l'axe choisi, la formule d_obs=max(a,b)/2 donne la cote qui permet de voir l'objet plat dans un angle de 90°. A cela il faut ajouter la dimension de l'objet selon l'axe d'observation = c.

Parameters
adimensions de l'objet selon un des axes normal à l'axe d'observation
bdimensions de l'objet selon l'autre axe normal à l'axe d'observation
cest la dimension de l'objet selon l'axe d'observation

◆ entierSur10_d()

std::string MESHCUT::entierSur10_d ( int  i)

References ERREUR(), and int2string().

◆ entierSur10_g()

std::string MESHCUT::entierSur10_g ( int  i)

References ERREUR(), and int2string().

◆ ERREUR()

◆ estUnTypeMaille()

bool MESHCUT::estUnTypeMaille ( std::string  S)

◆ float2string()

std::string MESHCUT::float2string ( float  f)

◆ floatEnsight()

std::string MESHCUT::floatEnsight ( float  x)

◆ InstanceMGE()

◆ int2string()

std::string MESHCUT::int2string ( int  k)

◆ intersectionSegmentPlan()

int MESHCUT::intersectionSegmentPlan ( int  it4,
int  na 
)

Equation paramétrique de la droite AB: OP = OA + lambda AB.

Fonction caractéristique du plan : PI(X,Y,Z) = nx X + ny Y + nz Z + d

Pour un point P de la droite: PI(OP) = PI(OA) + lambda n.AB avec n=(nx,ny,nz), L'intersection AB/plan est donnée par le point P tel que PI(OP)=0.

Il lui correspond la coordonnée lambda = - PI(OA) / n.AB.

Cette intersection est dans le segment si lambda est dans [0,1]

References MESHCUT::Maillage::CNX, debug, distanceNoeudPlan(), ERREUR(), indexNouveauxNoeuds, int2string(), intersections, MAILLAGE1, newXX, newYY, newZZ, normale, TETRA4, MESHCUT::Maillage::XX, MESHCUT::Maillage::YY, and MESHCUT::Maillage::ZZ.

Referenced by main().

◆ longueurSegment()

float MESHCUT::longueurSegment ( int  ngA,
int  ngB 
)

◆ MGE2string()

std::string MESHCUT::MGE2string ( med_geometry_type  MGE)

References ERREUR().

Referenced by champType().

◆ Nnoeuds()

◆ NnoeudsGeom()

◆ nomMaille()

std::string MESHCUT::nomMaille ( TYPE_MAILLE  tm,
int  nl 
)

References int2string(), and TM2string().

◆ numNoeudPointe()

int MESHCUT::numNoeudPointe ( std::string  b1,
std::string  b2,
std::string  b3 
)

◆ positionNoeudPlan()

int MESHCUT::positionNoeudPlan ( int  indiceNoeud)

References distanceNoeudPlan(), and epsilon.

◆ salome_chrono()

int MESHCUT::salome_chrono ( )

Referenced by main().

◆ SIGNE()

std::string MESHCUT::SIGNE ( double  x)

◆ string2char()

char * MESHCUT::string2char ( std::string  str)

◆ string2TM()

TYPE_MAILLE MESHCUT::string2TM ( std::string  stm)

◆ strip()

std::string MESHCUT::strip ( std::string  S)

◆ TM2string()

◆ typeComplexe()

bool MESHCUT::typeComplexe ( std::string  type)

◆ typeEnsight()

std::string MESHCUT::typeEnsight ( std::string  type)

References ERREUR().

◆ typeMaille()

Variable Documentation

◆ cptNouvellesMailles

std::map< TYPE_MAILLE, int > MESHCUT::cptNouvellesMailles
extern

Referenced by cas1(), cas2(), cas3(), cas4(), and main().

◆ cutTetras

std::vector< int > MESHCUT::cutTetras
extern

Referenced by cas1(), cas2(), cas3(), cas4(), and main().

◆ d

◆ debug

bool MESHCUT::debug
extern

◆ DNP

float * MESHCUT::DNP
extern

Distance Noeud Plan.

Referenced by main().

◆ epsilon

float MESHCUT::epsilon
extern

distance en dessous de laquelle un point est considéré comme appartenant au plan de coupe

Referenced by VISCOUS_3D::_LayerEdge::FindIntersection(), SMESHHOMARD_I::GetBoundingBoxInMedFile(), main(), positionNoeudPlan(), and VISCOUS_3D::_LayerEdge::SegTriaInter().

◆ GMmoins

std::map< TYPE_MAILLE, std::vector< int > > MESHCUT::GMmoins

Referenced by cas1(), cas2(), cas3(), cas4(), and main().

◆ GMplus

std::map< TYPE_MAILLE, std::vector< int > > MESHCUT::GMplus
extern

Referenced by cas1(), cas2(), cas3(), cas4(), and main().

◆ indexNouveauxNoeuds

int MESHCUT::indexNouveauxNoeuds

Referenced by intersectionSegmentPlan(), and main().

◆ indexNouvellesMailles

int MESHCUT::indexNouvellesMailles
extern

◆ intersections

std::map< std::string, int > MESHCUT::intersections
extern

Table des points d'intersection calculés.

Si on a calculé une intersection entre le plan et un segment reliant N1 et N2 de numéros globaux n1 et n2, on stocke dans ce tableau, sous les libellés "n1_n2" et "n2_n1", le numéro global du point d'intersection (noeud créé). On évite ainsi de calculer deux fois l'intersection d'une même arête de T4 avec le plan

Referenced by SMESHUtils::createPointsSampleFromSolid(), intersectionSegmentPlan(), and main().

◆ MAILLAGE1

◆ MAILLAGE2

Maillage * MESHCUT::MAILLAGE2

Referenced by main().

◆ Naretes

int MESHCUT::Naretes
extern

◆ newCNX

std::map< TYPE_MAILLE, std::vector< int > > MESHCUT::newCNX
extern

Referenced by cas1(), cas2(), cas3(), cas4(), and main().

◆ newXX

std::vector< float > MESHCUT::newXX
extern

Referenced by intersectionSegmentPlan(), and main().

◆ newYY

std::vector< float > MESHCUT::newYY

Referenced by intersectionSegmentPlan(), and main().

◆ newZZ

std::vector< float > MESHCUT::newZZ

Referenced by intersectionSegmentPlan(), and main().

◆ normale

◆ offsetMailles

int MESHCUT::offsetMailles

◆ pointPlan

float MESHCUT::pointPlan

Définition du plan de coupe.

Referenced by main().

◆ POSN

int * MESHCUT::POSN
extern

Version -1/0/+1 du précédent, selon epsilon.

Referenced by cas1(), cas2(), cas3(), cas4(), and main().

◆ str_id_GMmoins

std::string MESHCUT::str_id_GMmoins

Referenced by main().

◆ str_id_GMplus

std::string MESHCUT::str_id_GMplus
extern

Referenced by main().

◆ str_id_maillagenew

std::string MESHCUT::str_id_maillagenew
extern

Referenced by main().