All the basics functions you need to tesselate any Dtk brep data structures. To better control the tesselation process, see section Tesselation options. More...
Functions | |
| 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) |
| Tesselate a body. Generates one mesh per shell in the body. More... | |
| void | tess_EndTesselation () |
| Free the data used by tesselation library. More... | |
| Dtk_ErrorStatus | tess_FacesArrayToMesh (Dtk_tab< Dtk_FacePtr > &inTabFace, Dtk_MeshPtr &outMesh, Dtk_Int32 *outIsSolid) |
| Tesselate an array of Faces. More... | |
| Dtk_ErrorStatus | tess_FaceToMesh (Dtk_FacePtr &inFace, Dtk_MeshPtr &outMesh) |
| Tesselate a single face. More... | |
| void | tess_getBoundariesFromMeshFace (const Dtk_MeshPtr &mesh, const Dtk_mesh_face *inFace, Dtk_tab< Dtk_tab< Dtk_PolylinePtr >> &outBoundaries) |
| Get the boundaries (outer and inner) of a mesh face as polylines. Each shell yields a Dtk_mesh, each face of the shell yields a Dtk_mesh_face in the Dtk_mesh, and each edge of the face yields a Dtk_Polyline that you can get with this function. To get the body indice of the corresponding edge, use polyline->get_info()->FindAttribute("TOPO_ID_EDGE",dtk_val) where dtk_val is an integer value containing the TopoId of the edge. The first polyline is the outer boundary, the others are inner boundaries (holes). More... | |
| int | tess_InitTesselation () |
| Init the tesselation library with parameters suited for most visualisation purposes Linear tolerance is deactivated, and angular tolerance set to 10 degrees. More... | |
| int | tess_InitTesselation (Dtk_string inWorkingDirectory, double inTolerance) |
| Init the tesselation library. More... | |
| Dtk_ErrorStatus | tess_ShellToMesh (const Dtk_ShellPtr &inShell, Dtk_MeshPtr &outMesh, Dtk_Int32 *outIsSolid) |
| Tesselate a shell. More... | |
| Dtk_ErrorStatus | TesselationIsStarted () |
| Return current status of tesselation started. More... | |
All the basics functions you need to tesselate any Dtk brep data structures. To better control the tesselation process, see section Tesselation options.
| 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 |
||
| ) |
Tesselate a body. Generates one mesh per shell in the body.
| [in] | inBodyToWrite | : Body to be tessellate |
| [out] | outMeshes | : Result meshes, one Dtk_MeshPtr per shell |
| [out] | outIsSolid | : Info on each mesh topology. 0 if open, 1 if closed |
| [in] | inTessWireframe | : Enable the tesselation of wireframes contained in the body's shell. See Dtk_Shell::GetNumWireSet() |
| [in] | inApplyRenderInfos | : Enable the application of render infos from body to mesh |
| void tess_EndTesselation | ( | ) |
Free the data used by tesselation library.
| Dtk_ErrorStatus tess_FacesArrayToMesh | ( | Dtk_tab< Dtk_FacePtr > & | inTabFace, |
| Dtk_MeshPtr & | outMesh, | ||
| Dtk_Int32 * | outIsSolid | ||
| ) |
Tesselate an array of Faces.
| [in] | inTabFace | : Faces to be tesselate |
| [out] | outMesh | : Result mesh |
| [out] | outIsSolid | : Info on mesh topology. 0 if open, 1 if closed |
| Dtk_ErrorStatus tess_FaceToMesh | ( | Dtk_FacePtr & | inFace, |
| Dtk_MeshPtr & | outMesh | ||
| ) |
Tesselate a single face.
| [in] | inFace | : Face to be tesselate |
| [out] | outMesh | : Result mesh |
| void tess_getBoundariesFromMeshFace | ( | const Dtk_MeshPtr & | mesh, |
| const Dtk_mesh_face * | inFace, | ||
| Dtk_tab< Dtk_tab< Dtk_PolylinePtr >> & | outBoundaries | ||
| ) |
Get the boundaries (outer and inner) of a mesh face as polylines. Each shell yields a Dtk_mesh, each face of the shell yields a Dtk_mesh_face in the Dtk_mesh, and each edge of the face yields a Dtk_Polyline that you can get with this function. To get the body indice of the corresponding edge, use polyline->get_info()->FindAttribute("TOPO_ID_EDGE",dtk_val) where dtk_val is an integer value containing the TopoId of the edge. The first polyline is the outer boundary, the others are inner boundaries (holes).
| [in] | mesh | |
| [in] | inFace = face to be processed | |
| [out] | outBoundaries = result function Sample: Dtk_MeshPtr mesh;
Dtk_Size_t nbFace =mesh->get_nb_mesh_face();
for ( int iFace = 0; iFace < nbFace; iFace++ )
{
Dtk_mesh_face * meshFace = mesh->get_mesh_face(iFace);
Dtk_tab<Dtk_tab<Dtk_PolylinePtr>> boundaries;
tess_getBoundariesFromMeshFace(mesh, meshFace, boundaries);
for ( Dtk_Size_t iLoop = 0; iLoop < nbloop; iLoop++)
{
Dtk_tab<Dtk_PolylinePtr> loop = boundaries[iLoop];
{
Dtk_PolylinePtr polyline = loop[iEdge];
Dtk_Val edgeIdInOriginalBody;
polyline->get_info()->FindAttribute("TOPO_ID_EDGE",edgeIdInOriginalBody);
}
}
}
|
| int tess_InitTesselation | ( | ) |
Init the tesselation library with parameters suited for most visualisation purposes Linear tolerance is deactivated, and angular tolerance set to 10 degrees.
| int tess_InitTesselation | ( | Dtk_string | inWorkingDirectory, |
| double | inTolerance | ||
| ) |
Init the tesselation library.
| [in] | inWorkingDirectory | : Directory for temporary file used for tesselation |
| [in] | inTolerance(mm) | : Maximum accepted chordal error between the CAD surface and the tesselated mesh |
| Dtk_ErrorStatus tess_ShellToMesh | ( | const Dtk_ShellPtr & | inShell, |
| Dtk_MeshPtr & | outMesh, | ||
| Dtk_Int32 * | outIsSolid | ||
| ) |
Tesselate a shell.
| [in] | inShell | : Shell to be tesselate |
| [out] | outMesh | : Result mesh |
| [out] | outIsSolid | : Info on mesh topology. 0 if open, 1 if closed |
| Dtk_ErrorStatus TesselationIsStarted | ( | ) |
Return current status of tesselation started.