Options to better control the tesselation process. Main functions are in section Tesselation main functions. More...
Functions | |
| Dtk_bool | CheckAutoSurfaceIsSpring () |
| Get automatic surface spring check option. Returns 1 if enabled, 0 if disabled. More... | |
| void | CheckAutoSurfaceIsSpring (Dtk_bool inBval) |
| Set automatic surface spring check option. If enabled, all periodic surface will be tesselated more accurately using set_TesselateSurfaceMethod(1). Manual activation of set_TesselateSurfaceMethod(1) is not necessary anymore because of this option. More... | |
| Dtk_bool | CheckUseEdgeTolerance () |
| Get usage of edge tolerance to guide the tesselation. Returns 1 if enabled, 0 if disabled. More... | |
| void | CheckUseEdgeTolerance (Dtk_bool inBval) |
| Set usage of edge tolerance to guide the tesselation. Default value is disabled (0). More... | |
| int | Dtk_GetMailleFacesVerif () |
| Get status of additional verification of face/boundaries before tesselation. Returns 1 if enabled, 0 if disabled. More... | |
| void | Dtk_SetMailleFacesVerif (int bval) |
| Set additional verification of face/boundaries before tesselation. Default false (0). More... | |
| Dtk_bool | get_tesselationSuppressDuplicateFace () |
| Get face duplication option. Returns 1 if enabled, 0 if disabled. More... | |
| void | set_tesselationSuppressDuplicateFace (Dtk_bool inBval) |
| Set face duplication option. Default value is enabled (1). More... | |
| int | tess_AddNaturalBoundariesForUnBounded () |
| Get boundaries computation option. Returns 1 if enabled, 0 if disabled. More... | |
| void | tess_AddNaturalBoundariesForUnBounded (int value) |
| Set boundaries computation option. Default value is enabled (1). See tess_getBoundariesFromMeshFace(). More... | |
| int | tess_ComputeBoundariesFromMesh () |
| Get boundaries computation from mesh option. Returns 1 if enabled, 0 if disabled. More... | |
| void | tess_ComputeBoundariesFromMesh (int value) |
| Set boundaries computation from mesh option. Default value is enabled (1). See tess_getBoundariesFromMeshFace(). More... | |
| int | tess_ComputeNormalesFromSurface () |
| Get normales computation option. Returns 1 if enabled, 0 if disabled. More... | |
| void | tess_ComputeNormalesFromSurface (int value) |
| Set normales computation from surface option. Enabled by default. If enabled, the normals of each vertex are computed from the CAD surface (smooth, more precise), otherwise they are computed from the triangles. More... | |
| Dtk_bool | tess_disableTolAngular () |
| Return angular tolerance activation. DTK_TRUE if angular tolerance is disabled. More... | |
| void | tess_disableTolAngular (Dtk_bool bval) |
| Set activation of angular tolerance. More... | |
| Dtk_bool | tess_disableTolLinear () |
| Return linear tolerance activation. DTK_TRUE if linear tolerance is disabled. More... | |
| void | tess_disableTolLinear (Dtk_bool bval) |
| Set activation of linear tolerance. More... | |
| double | tess_get_angular () |
| Get the current angular tolerance. See tess_set_angular(). More... | |
| double | tess_get_linear () |
| Get the current linear tolerance. See tess_set_linear(). More... | |
| double | tess_get_MaxSize () |
| Get the current maximum size of a triangle edge. See tess_set_MaxSize(). More... | |
| int | tess_get_optimize_mesh () |
| Get the current state of the vertex map optimisation. See tess_set_optimize_mesh(). More... | |
| double | tess_get_Ratio () |
| Get the current maximum ratio between longest and shortest edge of each triangle. See tess_set_Ratio(). More... | |
| double | tess_get_Wireframe_Discretisation () |
| Get the current linear tolerance for Wireframe tessellation. See tess_set_Wireframe_Discretisation(). More... | |
| void | tess_set_angular (double angle) |
| Set angular tolerance (radian). Default value: 10°. Maximum angle between a triangle and the CAD surface. This tolerance is independent of the model size, therefore a single value can be used for any model. It is well suited for visualisation purposes. More... | |
| void | tess_set_linear (double tol) |
| Set linear tolerance (mm). Maximum chordal error accepted between the CAD surface and the tesselated mesh. Smaller value produces finer mesh, greater value produces coarser mesh. For visualization the constraint is purely visual, so an exact distance per model is unnecessary. In this case, using only an angular tolerance is sufficient. For engineering workflows (CFD, FEM, etc.), stricter geometric control is required, and a linear tolerance must be specified. A common guideline is to set it to a proportion of the model bbox diagonal. Note that angular tolerance is still relevant when linear tolerance is set, to avoids loosing details in areas with small details, like high curvature zones. More... | |
| void | tess_set_MaxSize (double tol) |
| Set the maximum size of a triangle edge. Default value: inf (mm) More... | |
| void | tess_set_optimize_mesh (int ival) |
| Set a vertex map optimisation that reduces the mesh memory footprint (the geometry stay the same). Enabled by default. If enabled, two vertices of the same face that have the same coordinates will be stored only once, and shared by index. For example if you tesselate a cube ( 6 faces ): More... | |
| void | tess_set_Ratio (double tol) |
| Set a maximum ratio between longest and shortest edge of each triangle. With 1.0 only equilateral triangles are generated. With 2.0, the longest edge can be at most twice the shortest edge, etc. Example with ratio= 1.0 More... | |
| void | tess_set_Wireframe_Discretisation (double tol) |
| Set linear tolerance for Wireframe tessellation. Default value is 0.001 (mm). Smaller value produces finer wireframes, greater value produces coarser wireframes. More... | |
Options to better control the tesselation process. Main functions are in section Tesselation main functions.
| Dtk_bool CheckAutoSurfaceIsSpring | ( | ) |
Get automatic surface spring check option. Returns 1 if enabled, 0 if disabled.
| void CheckAutoSurfaceIsSpring | ( | Dtk_bool | inBval | ) |
Set automatic surface spring check option. If enabled, all periodic surface will be tesselated more accurately using set_TesselateSurfaceMethod(1). Manual activation of set_TesselateSurfaceMethod(1) is not necessary anymore because of this option.
| Dtk_bool CheckUseEdgeTolerance | ( | ) |
Get usage of edge tolerance to guide the tesselation. Returns 1 if enabled, 0 if disabled.
| void CheckUseEdgeTolerance | ( | Dtk_bool | inBval | ) |
Set usage of edge tolerance to guide the tesselation. Default value is disabled (0).
| int Dtk_GetMailleFacesVerif | ( | ) |
Get status of additional verification of face/boundaries before tesselation. Returns 1 if enabled, 0 if disabled.
| void Dtk_SetMailleFacesVerif | ( | int | bval | ) |
Set additional verification of face/boundaries before tesselation. Default false (0).
| Dtk_bool get_tesselationSuppressDuplicateFace | ( | ) |
Get face duplication option. Returns 1 if enabled, 0 if disabled.
| void set_tesselationSuppressDuplicateFace | ( | Dtk_bool | inBval | ) |
Set face duplication option. Default value is enabled (1).
| int tess_AddNaturalBoundariesForUnBounded | ( | ) |
Get boundaries computation option. Returns 1 if enabled, 0 if disabled.
| void tess_AddNaturalBoundariesForUnBounded | ( | int | value | ) |
Set boundaries computation option. Default value is enabled (1). See tess_getBoundariesFromMeshFace().
| int tess_ComputeBoundariesFromMesh | ( | ) |
Get boundaries computation from mesh option. Returns 1 if enabled, 0 if disabled.
| void tess_ComputeBoundariesFromMesh | ( | int | value | ) |
Set boundaries computation from mesh option. Default value is enabled (1). See tess_getBoundariesFromMeshFace().
| int tess_ComputeNormalesFromSurface | ( | ) |
Get normales computation option. Returns 1 if enabled, 0 if disabled.
| void tess_ComputeNormalesFromSurface | ( | int | value | ) |
Set normales computation from surface option. Enabled by default. If enabled, the normals of each vertex are computed from the CAD surface (smooth, more precise), otherwise they are computed from the triangles.
| Dtk_bool tess_disableTolAngular | ( | ) |
Return angular tolerance activation. DTK_TRUE if angular tolerance is disabled.
| void tess_disableTolAngular | ( | Dtk_bool | bval | ) |
Set activation of angular tolerance.
| Dtk_bool tess_disableTolLinear | ( | ) |
Return linear tolerance activation. DTK_TRUE if linear tolerance is disabled.
| void tess_disableTolLinear | ( | Dtk_bool | bval | ) |
Set activation of linear tolerance.
| double tess_get_angular | ( | ) |
Get the current angular tolerance. See tess_set_angular().
| double tess_get_linear | ( | ) |
Get the current linear tolerance. See tess_set_linear().
| double tess_get_MaxSize | ( | ) |
Get the current maximum size of a triangle edge. See tess_set_MaxSize().
| int tess_get_optimize_mesh | ( | ) |
Get the current state of the vertex map optimisation. See tess_set_optimize_mesh().
| double tess_get_Ratio | ( | ) |
Get the current maximum ratio between longest and shortest edge of each triangle. See tess_set_Ratio().
| double tess_get_Wireframe_Discretisation | ( | ) |
Get the current linear tolerance for Wireframe tessellation. See tess_set_Wireframe_Discretisation().
| void tess_set_angular | ( | double | angle | ) |
Set angular tolerance (radian). Default value: 10°. Maximum angle between a triangle and the CAD surface. This tolerance is independent of the model size, therefore a single value can be used for any model. It is well suited for visualisation purposes.
| void tess_set_linear | ( | double | tol | ) |
Set linear tolerance (mm). Maximum chordal error accepted between the CAD surface and the tesselated mesh. Smaller value produces finer mesh, greater value produces coarser mesh. For visualization the constraint is purely visual, so an exact distance per model is unnecessary. In this case, using only an angular tolerance is sufficient. For engineering workflows (CFD, FEM, etc.), stricter geometric control is required, and a linear tolerance must be specified. A common guideline is to set it to a proportion of the model bbox diagonal. Note that angular tolerance is still relevant when linear tolerance is set, to avoids loosing details in areas with small details, like high curvature zones.
| void tess_set_MaxSize | ( | double | tol | ) |
Set the maximum size of a triangle edge. Default value: inf (mm)
| [in] | tol(mm) | : maximum size of a triangle edge |
| void tess_set_optimize_mesh | ( | int | ival | ) |
Set a vertex map optimisation that reduces the mesh memory footprint (the geometry stay the same). Enabled by default. If enabled, two vertices of the same face that have the same coordinates will be stored only once, and shared by index. For example if you tesselate a cube ( 6 faces ):
| void tess_set_Ratio | ( | double | tol | ) |
Set a maximum ratio between longest and shortest edge of each triangle. With 1.0 only equilateral triangles are generated. With 2.0, the longest edge can be at most twice the shortest edge, etc. Example with ratio= 1.0
Example with ratio= 1000.0 (no constraint)
| void tess_set_Wireframe_Discretisation | ( | double | tol | ) |
Set linear tolerance for Wireframe tessellation. Default value is 0.001 (mm). Smaller value produces finer wireframes, greater value produces coarser wireframes.