MeshLib C++ Docs
Loading...
Searching...
No Matches
Mesh Subdivide

Classes

struct  MR::SubdivideSettings
 

Functions

MRMESH_API int MR::subdivideMesh (Mesh &mesh, const SubdivideSettings &settings={})
 
MRMESH_API int MR::subdivideMesh (ObjectMeshData &data, const SubdivideSettings &settings)
 
MRMESH_API Expected< MeshMR::copySubdividePackMesh (const MeshPart &mp, float voxelSize, const ProgressCallback &cb={})
 
MRMESH_API ObjectMeshData MR::makeSubdividedObjectMeshData (const ObjectMesh &obj, const SubdivideSettings &settings)
 returns the data of subdivided mesh given ObjectMesh (which remains unchanged) and subdivision parameters
 

Detailed Description

Function Documentation

◆ copySubdividePackMesh()

MRMESH_API Expected< Mesh > MR::copySubdividePackMesh ( const MeshPart & mp,
float voxelSize,
const ProgressCallback & cb = {} )
nodiscard

creates a copy of given mesh part, subdivides it to get rid of too long edges compared with voxelSize, then packs resulting mesh, this is called typically in preparation for 3D space sampling with voxelSize step, and subdivision is important for making leaves of AABB tree not too big compared with voxelSize

◆ makeSubdividedObjectMeshData()

MRMESH_API ObjectMeshData MR::makeSubdividedObjectMeshData ( const ObjectMesh & obj,
const SubdivideSettings & settings )
nodiscard

returns the data of subdivided mesh given ObjectMesh (which remains unchanged) and subdivision parameters

◆ subdivideMesh() [1/2]

MRMESH_API int MR::subdivideMesh ( Mesh & mesh,
const SubdivideSettings & settings = {} )

splits edges in mesh region according to the settings;

Returns
The total number of edge splits performed

◆ subdivideMesh() [2/2]

MRMESH_API int MR::subdivideMesh ( ObjectMeshData & data,
const SubdivideSettings & settings )

subdivides mesh with per-element attributes according to given settings; \detail if settings.region is not null, then given region must be a subset of current face selection or face selection must absent

Returns
The total number of edge splits performed