DATAKIT API  V2025.3
tess.h
Go to the documentation of this file.
1 #ifndef _TESS_H
2 #define _TESS_H
4 #include "util/util_mesh_dtk.hpp"
5 #include "util/error_dtk.hpp"
7 #include "def/define.h"
8 #include "util/dtk_maindoc.hpp"
9 #include "util/util_stl_dtk.hpp"
10 
12 
73 
75 
87  int tess_InitTesselation(Dtk_string inWorkingDirectory,double inTolerance);
88 
89 
103 
104 
105 
117 
118  // New functions End of October 2006
119 
120 
132  Dtk_tab<Dtk_MeshPtr> & outMeshes,Dtk_tab<Dtk_Int32> & outIsSolid,Dtk_bool inTessWireframe = DTK_FALSE, Dtk_bool inApplyRenderInfos = DTK_FALSE );
133 
147 Dtk_ErrorStatus tess_ShellToMesh(const Dtk_ShellPtr &inShell, Dtk_MeshPtr &outMesh, Dtk_Int32 *outIsSolid);
148 
149 
150 
151 
160 
161 
167 //DTK_TOREMOVE_START
168 #ifdef AF51BDA7E49648f8AB95949F4CA52EF8
169 Dtk_ErrorStatus tess_FaceToMesh(Dtk_FacePtr &inTabFace, Dtk_MeshPtr &outMesh, Dtk_bool inOrientation = DTK_TRUE );
170 #else
171 //DTK_TOREMOVE_END
173 //DTK_TOREMOVE_START
174 #endif
175 //DTK_TOREMOVE_END
176 
183 
184 
186 
201 {
204 };
205 
206 
209 
224 
231 
232 
233 
234 //
241 extern int tess_InitLocalTess();
243 extern int tess_TesselateMemo(Dtk_MeshPtr &outMesh, int *outIsSolid);
244 
245 
246 
247 
260  void tess_set_Ratio(double tol);
261 
262 
270  double tess_get_Ratio();
271 
272 
282  void tess_set_MaxSize(double tol);
283 
284 
296 
297 
298 
314  void tess_set_optimize_mesh(int ival);
315 
316 
328 
329 
342 
343 
356 
368  int end_stl_fic(int *ient);
369 
370 
371 
383 void tess_set_linear(double tol);
384 
385 
394 
402 void tess_set_angular(double angle);
403 
410 
416 
422 
429 
436 
437 
474  Dtk_tab<Dtk_tab<Dtk_PolylinePtr> > &outBoundaries);
475 
476 
478 {
479 private :
480  Dtk_tab<Dtk_PolylinePtr> outerpln;
482  Dtk_ErrorStatus status;
483 
484 public :
487  Dtk_ErrorStatus Create( Dtk_FacePtr &inFace,const double inTolBound);
488  void Delete();
490  Dtk_Size_t Get_Nbinner() { return(innerpln.size()) ;};
492  Dtk_ErrorStatus CheckStatus() { return (status); };
493 };
494 
495 
501 
502 
508 
509 
515 
523 
524 
532 void Dtk_SetMailleFacesVerif(int bval);
533 
542 
543 
551 
558 
559 
566 
570 
575 
576 
580 
581 
582 //DTK_TOREMOVE_START
583 #ifdef AF51BDA7E49648f8AB95949F4CA52EF8
584 void tess_set_ErCorde(double tol);
585 void tess_set_Discretisation(double tol);
586 #endif
587 //DTK_TOREMOVE_END
588 
589 
596 
597 
603 
610 
611 
617 
624 
625 
632 void get_tesselation_activateSplitMode(int &outmode, double &outratio);
633 
638 // iratio = value to trigger the split , depend on mode selected
642 void set_tesselation_activateSplitMode(const int inmode, const double inratio);
643 
652 
656 
657 
658 
659 
661  Dtk_tab<Dtk_tab<Dtk_MeshPolylinePtr> > &outBoundaries);
662 
663 
664 
672 
673 
681 
682 #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:865
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:203
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:202
FaceBoundariesToPolylines::Get_outer
Dtk_ErrorStatus Get_outer(Dtk_tab< Dtk_PolylinePtr > &outpln)
util_mesh_dtk.hpp
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
util_topology_ptr_dtk.hpp
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()
error_dtk.hpp
Dtk_ErrorStatus
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
Dtk_SmartPtr
Definition: util_ptr_dtk.hpp:37
dtk_maindoc.hpp
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)
util_stl_dtk.hpp
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
define.h
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:504
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.
util_geom_ptr_dtk.hpp
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:201
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:492
FaceBoundariesToPolylines
Definition: tess.h:478
FaceBoundariesToPolylines::Get_Nbinner
Dtk_Size_t Get_Nbinner()
Definition: tess.h:490