curobo.geom.sphere_fit module
- class SphereFitType(value)
Bases:
Enum
Supported sphere fit types are listed here. VOXEL_VOLUME_SAMPLE_SURFACE works best.
See Geometry Approximation to Spheres for more details.
- SAMPLE_SURFACE = 'sample_surface'
samples the surface of the mesh to approximate geometry
- VOXEL_SURFACE = 'voxel_surface'
voxelizes the volume and returns voxel positions that are intersecting with surface.
- VOXEL_VOLUME = 'voxel_volume'
voxelizes the volume and returns all ocupioed voxel positions.
- VOXEL_VOLUME_INSIDE = 'voxel_volume_inside'
voxelizes the volume and returns voxel positions that are inside the surface of the geometry
- VOXEL_VOLUME_SAMPLE_SURFACE = 'voxel_volume_sample_surface'
voxelizes the volume and returns voxel positions that are inside the surface, along with surface sampled positions
- voxel_fit_surface_mesh( )
- get_voxelgrid_from_mesh( )
Get voxel grid from mesh using
trimesh.voxel.creation.voxelize
.
- voxel_fit_mesh( )
- voxel_fit_volume_sample_surface_mesh( )
- fit_spheres_to_mesh(
- mesh: Trimesh,
- n_spheres: int,
- surface_sphere_radius: float = 0.01,
- fit_type: SphereFitType = SphereFitType.VOXEL_VOLUME_SAMPLE_SURFACE,
- voxelize_method: str = 'ray',
Approximate a mesh with spheres. See Geometry Approximation to Spheres for more details.
- Parameters:
mesh – Input trimesh
n_spheres – _description_
surface_sphere_radius – _description_. Defaults to 0.01.
fit_type – _description_. Defaults to SphereFitType.VOXEL_VOLUME_SAMPLE_SURFACE.
voxelize_method – _description_. Defaults to “ray”.
- Returns:
_description_