DATAKIT API  V2025.1
tess.h
Go to the documentation of this file.
1 #ifndef _TESS_H
2 #define _TESS_H
3 
5 
66 
68 
80  int tess_InitTesselation(Dtk_string inWorkingDirectory,double inTolerance);
81 
82 
96 
97 
98 
110 
111  // New functions End of October 2006
112 
113 
125  Dtk_tab<Dtk_MeshPtr> & outMeshes,Dtk_tab<Dtk_Int32> & outIsSolid,Dtk_bool inTessWireframe = DTK_FALSE, Dtk_bool inApplyRenderInfos = DTK_FALSE );
126 
140 Dtk_ErrorStatus tess_ShellToMesh(const Dtk_ShellPtr &inShell, Dtk_MeshPtr &outMesh, Dtk_Int32 *outIsSolid);
141 
142 
143 
144 
153 
154 
160 //DTK_TOREMOVE_START
161 #ifdef AF51BDA7E49648f8AB95949F4CA52EF8
162 Dtk_ErrorStatus tess_FaceToMesh(Dtk_FacePtr &inTabFace, Dtk_MeshPtr &outMesh, Dtk_bool inOrientation = DTK_TRUE );
163 #else
164 //DTK_TOREMOVE_END
166 //DTK_TOREMOVE_START
167 #endif
168 //DTK_TOREMOVE_END
169 
176 
177 
179 
194 {
197 };
198 
199 
202 
217 
224 
225 
226 
227 //
234 extern int tess_InitLocalTess();
236 extern int tess_TesselateMemo(Dtk_MeshPtr &outMesh, int *outIsSolid);
237 
238 
239 
240 
253  void tess_set_Ratio(double tol);
254 
255 
263  double tess_get_Ratio();
264 
265 
275  void tess_set_MaxSize(double tol);
276 
277 
289 
290 
291 
307  void tess_set_optimize_mesh(int ival);
308 
309 
321 
322 
335 
336 
349 
361  int end_stl_fic(int *ient);
362 
363 
364 
376 void tess_set_linear(double tol);
377 
378 
387 
395 void tess_set_angular(double angle);
396 
403 
409 
415 
422 
429 
430 
467  Dtk_tab<Dtk_tab<Dtk_PolylinePtr> > &outBoundaries);
468 
469 
471 {
472 private :
473  Dtk_tab<Dtk_PolylinePtr> outerpln;
475  Dtk_ErrorStatus status;
476 
477 public :
480  Dtk_ErrorStatus Create( Dtk_FacePtr &inFace,const double inTolBound);
481  void Delete();
483  Dtk_Size_t Get_Nbinner() { return(innerpln.size()) ;};
485  Dtk_ErrorStatus CheckStatus() { return (status); };
486 };
487 
488 
494 
495 
501 
502 
508 
516 
517 
525 void Dtk_SetMailleFacesVerif(int bval);
526 
535 
536 
544 
551 
552 
559 
563 
568 
569 
573 
574 
575 //DTK_TOREMOVE_START
576 #ifdef AF51BDA7E49648f8AB95949F4CA52EF8
577 void tess_set_ErCorde(double tol);
578 void tess_set_Discretisation(double tol);
579 #endif
580 //DTK_TOREMOVE_END
581 
582 
589 
590 
596 
603 
604 
610 
617 
618 
625 void get_tesselation_activateSplitMode(int &outmode, double &outratio);
626 
631 // iratio = value to trigger the split , depend on mode selected
635 void set_tesselation_activateSplitMode(const int inmode, const double inratio);
636 
645 
649 
650 
651 
652 
654  Dtk_tab<Dtk_tab<Dtk_MeshPolylinePtr> > &outBoundaries);
655 
656 
657 
665 
666 
674 
675 #endif
tess_get_Ratio
double tess_get_Ratio()
: return the current ratio
get_TesselateSurfaceMethod
int get_TesselateSurfaceMethod()
: return current computation method for surface tesselation available values : 0 = usual method 1 = f...
tess_AddFace
Dtk_ErrorStatus tess_AddFace(Dtk_OrientedFaceStr &inFace)
: overwriteing of tess_AddFace with an Dtk_OrientedFace in place of Dtk_Face,
Dtk_mesh_face
This is a high level face class.
Definition: util_mesh_dtk.hpp:870
init_stl_write
int init_stl_write(Dtk_string sfic)
: Open and initialize the STL File
Dtk_OrientedFaceStr::_orientation
Dtk_bool _orientation
Definition: tess.h:196
FaceBoundariesToPolylines::FaceBoundariesToPolylines
FaceBoundariesToPolylines()
get_tesselationSuppressDuplicateFace
Dtk_bool get_tesselationSuppressDuplicateFace()
: return current status of suppress duplicate face option default value is enable to deactivate this ...
tess_set_optimize_mesh
void tess_set_optimize_mesh(int ival)
: Activate or not the optimization of the vertex map
tess_get_MaxSize
double tess_get_MaxSize()
: gets maximum size of triangles
set_activationSplitModeFromConfig
void set_activationSplitModeFromConfig()
: memorize option for splitting of surfaces before tessellation
tess_get_Wireframe_Discretisation
double tess_get_Wireframe_Discretisation()
: return current linear tolerance for Wrireframe entities
tess_set_Ratio
void tess_set_Ratio(double tol)
: define a ratio
tess_ShellToMesh
Dtk_ErrorStatus tess_ShellToMesh(const Dtk_ShellPtr &inShell, Dtk_MeshPtr &outMesh, Dtk_Int32 *outIsSolid)
: Make Tesselation from a Dtk_shell and create a Dtk_MeshPtr if available
DTK_TRUE
#define DTK_TRUE
Definition: define.h:727
Dtk_string
This is a high level string class.
Definition: dtk_string.hpp:58
Dtk_Size_t
size_t Dtk_Size_t
Definition: define.h:712
tess_set_Wireframe_Discretisation
void tess_set_Wireframe_Discretisation(double tol)
: Set tolerance for linear tolerance method for Wireframe entities
tess_InitLocalTess
int tess_InitLocalTess()
: method of tesselation by memorization the first call is tess_InitLocalTess(); to initialize memory ...
DTK_FALSE
#define DTK_FALSE
Definition: define.h:728
Dtk_bool
char Dtk_bool
Definition: define.h:725
tess_InitTesselation
int tess_InitTesselation(Dtk_string inWorkingDirectory, double inTolerance)
Init the tesselation library.
tess_get_optimize_mesh
int tess_get_optimize_mesh()
: return status of the optimization of the vertex map in the detk_mesh class
get_tesselation_activateSplitMode
void get_tesselation_activateSplitMode(int &outmode, double &outratio)
: read value of splitting of surface
Dtk_OrientedFaceStr::_face
Dtk_FacePtr _face
Definition: tess.h:195
FaceBoundariesToPolylines::Get_outer
Dtk_ErrorStatus Get_outer(Dtk_tab< Dtk_PolylinePtr > &outpln)
tess_AddNaturalBoundariesForUnBounded
int tess_AddNaturalBoundariesForUnBounded()
: return status of option add natural external boundary for an unbounded surface
tess_getBoundariesFromMeshFace
void tess_getBoundariesFromMeshFace(const Dtk_MeshPtr &mesh, const Dtk_mesh_face *inFace, Dtk_tab< Dtk_tab< Dtk_PolylinePtr > > &outBoundaries)
: reorder the polylines of a Dtk_mesh_face into correct loop
tess_ComputeNormalesFromSurface
int tess_ComputeNormalesFromSurface()
: Check value of option compute normales of vertex from real surface
Dtk_Int32
int32_t Dtk_Int32
Definition: define.h:687
TesselationIsStarted
Dtk_ErrorStatus TesselationIsStarted()
: Check if tesselation is initialized
tess_get_linear
double tess_get_linear()
: return current linear tolerance
FaceBoundariesToPolylines::~FaceBoundariesToPolylines
~FaceBoundariesToPolylines()
Dtk_ErrorStatus
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
Dtk_SmartPtr
Definition: util_ptr_dtk.hpp:37
set_tesselationSuppressDuplicateFace
void set_tesselationSuppressDuplicateFace(Dtk_bool inBval)
: Enable or disable the suppression of duplicate face before tessellation
reinit_SplitMode
void reinit_SplitMode()
: disable splitting of surface
tess_FacesArrayToMesh
Dtk_ErrorStatus tess_FacesArrayToMesh(Dtk_tab< Dtk_FacePtr > &inTabFace, Dtk_MeshPtr &outMesh, Dtk_Int32 *outIsSolid)
: Make Tesselation from a Dtk_tab of faces and create a Dtk_mesh if available
end_stl_fic
int end_stl_fic(int *ient)
Close the STL File.
tess_disableTolAngular
Dtk_bool tess_disableTolAngular()
: return state of Angular tolerance method
set_TesselateSurfaceMethod
void set_TesselateSurfaceMethod(int ival)
: select computation method for surface tesselation
tess_TesselateMemo
int tess_TesselateMemo(Dtk_MeshPtr &outMesh, int *outIsSolid)
CheckUseEdgeTolerance
Dtk_bool CheckUseEdgeTolerance()
: return current status of if we use the tolerance of edge and face read from the part available valu...
FaceBoundariesToPolylines::Get_inner
Dtk_ErrorStatus Get_inner(Dtk_tab< Dtk_PolylinePtr > &outpln, Dtk_Size_t number)
tess_TesselateFeature_to_dtk_mesh
Dtk_ErrorStatus tess_TesselateFeature_to_dtk_mesh(Dtk_FeaturePtr &feat, Dtk_MeshPtr &outMesh)
: Tesselate a Feature entity
FaceBoundariesToPolylines::Delete
void Delete()
tess_BodyToMeshes
Dtk_ErrorStatus tess_BodyToMeshes(const Dtk_BodyPtr &inBodyToWrite, Dtk_tab< Dtk_MeshPtr > &outMeshes, Dtk_tab< Dtk_Int32 > &outIsSolid, Dtk_bool inTessWireframe=DTK_FALSE, Dtk_bool inApplyRenderInfos=DTK_FALSE)
: Make Tesselation from a Dtk_body and create a Set of Dtk_mesh if available
tess_ComputeBoundariesFromMesh
int tess_ComputeBoundariesFromMesh()
: Check value of option memorize noundaries of mesh
Dtk_tab
This is a high level array class.
Definition: util_stl_dtk.hpp:85
Dtk_tab::size
Dtk_Size_t size() const
Returns the size of the array.
Definition: util_stl_dtk.hpp:502
write_mesh_solid
int write_mesh_solid(const Dtk_MeshPtr &tm)
Write a Dtk_mesh into the STL file.
tess_set_angular
void tess_set_angular(double angle)
: Set angle for cord heigh ratio method
CheckAutoSurfaceIsSpring
Dtk_bool CheckAutoSurfaceIsSpring()
: return current status of automatically check of surface is periodic available values : 0 = disable ...
tess_EndTesselation
void tess_EndTesselation()
Free the data used by tesselation library.
tess_set_MaxSize
void tess_set_MaxSize(double tol)
: sets maximum size of triangles
tess_disableTolLinear
Dtk_bool tess_disableTolLinear()
: return state of linear tolerance method
Dtk_OrientedFaceStr
: This structure contain a pointer to a Dtk_Face and the Value of orientation of this face from shell...
Definition: tess.h:194
FaceBoundariesToPolylines::Create
Dtk_ErrorStatus Create(Dtk_FacePtr &inFace, const double inTolBound)
set_tesselation_activateSplitMode
void set_tesselation_activateSplitMode(const int inmode, const double inratio)
: memorize option for splitting of surfaces before tessellation
tess_get_angular
double tess_get_angular()
: return the current Angle used for cord heigh ratio
Dtk_SetMailleFacesVerif
void Dtk_SetMailleFacesVerif(int bval)
: enable or disable control of faces
Dtk_GetMailleFacesVerif
int Dtk_GetMailleFacesVerif()
: return status of control of face/boundaries
tess_set_linear
void tess_set_linear(double tol)
: Set tolerance for linear tolerance method
tess_FaceToMesh
Dtk_ErrorStatus tess_FaceToMesh(Dtk_FacePtr &inTabFace, Dtk_MeshPtr &outMesh)
: Tesselate a Face from a Dtk_body
FaceBoundariesToPolylines::CheckStatus
Dtk_ErrorStatus CheckStatus()
Definition: tess.h:485
FaceBoundariesToPolylines
Definition: tess.h:471
FaceBoundariesToPolylines::Get_Nbinner
Dtk_Size_t Get_Nbinner()
Definition: tess.h:483