45 #pragma package(smart_init)
51 : _seg(__seg), _mcaa(__mcaa), _mesh(__mesh), _startSeg(__startSeg), _normalOffset(NULL)
61 for (
unsigned i=0; i<3; i++)
63 _P[i] = .5*(x[0][i]+x[1][i]);
64 _N[i] = x[1][i]-
_P[i];
87 if ( __reconstructNormalOffset
97 int nb_pts = pl.size();
116 for (
unsigned i=0; i<2; i++)
123 for (
int j = 0; j < 2; j++)
125 for (
int i = 0; i+1 < nb_pts; i++)
132 if (k[1] < 0 || k[1] >= nb_pts)
139 if (k[1] < 0 || k[1] >= nb_pts)
148 for (
unsigned l = 0; l < 2; l++)
169 dl = (xyz[0] - xyz[1]).get_longueur();
178 double * segStart = pl[0].X, * segEnd = pl[nb_pts-1].X;
179 for (
unsigned i=0;i<3;i++)
199 double criterionFaceWidth;
205 criterionFaceWidth = 1 -
_faceWidth / limitFaceWidth;
207 criterionFaceWidth = .05 * (1 -
_faceWidth / limitFaceWidth);
210 criterionFaceWidth = -.05;
212 return criterionFaceWidth;
217 double criterionAngle;
225 return criterionAngle;
230 int i, NB_CRITERIA = 0;
244 for (i=0;i<NB_CRITERIA;i++)
258 for (
int i=0; i<3; i++)
259 __vec3f[i] = vec3d[i];
270 std::ostringstream out;
272 unsigned char rgb[3];
277 for (
unsigned j=0; j<2; j++)
281 out <<
"\nSeparator { #sep1 \n";
282 out <<
"\n Coordinate3 {\n point [ \n";
283 out << pl[i].X[0] <<
" " <<pl[i].X[1] <<
" " << pl[i].X[2] <<
" \n";
285 out <<
"PolygonOffset { \n";
286 out <<
"styles POINTS \n";
287 out <<
"factor 4.0 \n";
288 out <<
"units 1.0 \n";
290 out <<
"DrawStyle {\npointSize 4\n}\n";
291 out <<
"BaseColor { \n rgb 1.0 0.0 0.0\n }\n";
292 out <<
"PointSet {\nstartIndex "<<0<<
"\nnumPoints "<<1<<
"\n}\n";
293 out <<
"} # end Sep1 \n";
329 if (__segment == NULL)
333 unsigned nb_pts = pl.size();
336 for (
unsigned i = 0; i < nb_pts; i++)
340 if (seg == __segment)
348 if (__segment == NULL)
354 return (pl[o].E == __segment);
359 if (__index >= 0 && __index < 2)
363 printf(
"Error GetTouchingEdge: __index = %d\n", __index);
370 if (__index >= 0 && __index < 2)
374 printf(
"Error GetLengthToTouchingEdge: __index = %d\n", __index);
394 if (__index >= 0 && __index < 2)
398 printf(
"Error GetLengthToTouchingEdge: __index = %d\n", __index);
405 int nb_pts = pl.size();
408 for (
int j = 0; j < 2; j++)
410 for (
int i = 0; i+1 < nb_pts; i++)
417 if (k[1] < 0 || k[1] >= nb_pts)
424 if (k[1] < 0 || k[1] >= nb_pts)
433 for (
unsigned l = 0; l < 2; l++)
444 printf(
"The MC Tessellation does not contains a segment crossed by LEC's polyline !\n");
462 unsigned nb_pts = pl.size();
465 for (
unsigned i = 0; i < nb_pts; i++)
static void jetColorMap(unsigned char *rgb, double value, double min, double max)
void SetColor(unsigned char __rgb[3])
unsigned GetOriginIndex()
std::string InventorText()
std::vector< Vertex > & GetPolyline()
void InitSetOfTouchingEdges()
void Update(bool __reconstructNormalOffset=true)
std::set< MCEdge * > _setTouchingEdge
double DeletionScore_DeviationAngle() const
MG_SEGMENT * GetSegment()
void GetPolylineVertex(int i, float *__vec3f) const
double * GetClosestTouchingEdgePoint()
bool IsTouchingEdge(MCEdge *__mcEdge)
double DeletionScore_FaceWidth() const
MCEdge * _oppositeEdges[2]
std::string InventorText()
double DeletionScore() const
double GetDeviationAngle()
MCEdge * GetClosestTouchingEdge()
unsigned GetPolylineVerticesCount() const
LocalEdgeCriteria(MG_SEGMENT *, MCAA *__mcaa, MG_MAILLAGE *__mesh, MG_SEGMENT *__startSeg)
bool IsStartSegment(MG_SEGMENT *__segment)
double _lengthToOppositeEdges[2]
MCEdge * GetTouchingEdge(int)
bool IsTouchingSegment(MG_SEGMENT *__segment)
double * GetTouchingEdgePoint(int __index)
int _oppositeEdgesPolylineIndices[2]
double GetLengthToTouchingEdge(int)
Intersection_Plane_MG_MAILLAGE * _normalOffset
MCBody * GetMCBody() const
double GetMaxOverdensity()
double GetSize(double xyz[3])
MG_MAILLAGE * GetMCTess() const
bool CheckIfTopoExists(MG_ELEMENT_TOPOLOGIQUE *topo)
Graph::Graph * G21() const
MG_ELEMENT_TOPOLOGIQUE * get_lien_topologie(void)
virtual int get_nb_ccf(void)
virtual int get_dimension(void)=0
bool contient(MG_IDENTIFICATEUR *id)
virtual MG_NOEUD * get_noeud1(void)
virtual MG_NOEUD * get_noeud2(void)
static void MG_NOEUD_GET_XYZ(MG_NOEUD *node, double *xyz)
static double Angle3D_Segment_Segment(double __v0[3], double __v1[3], double __v2[3])
static double Dist3D_Point_Segment(double a[3], double b[3], double c[3])