Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions fvdb/functional/_meshing.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# SPDX-License-Identifier: Apache-2.0
#
"""Functional API for meshing and TSDF integration on sparse grids."""

from __future__ import annotations

from typing import TYPE_CHECKING
Expand Down Expand Up @@ -36,7 +37,8 @@ def marching_cubes_batch(
Returns:
vertices (JaggedTensor): Mesh vertex positions, shape ``(B, -1, 3)``.
faces (JaggedTensor): Triangle face indices.
normals (JaggedTensor): Per-vertex normals.
unique_vertex_ids (JaggedTensor): Unique vertex IDs with int64 values,
shape ``(B, -1, 3)``.

.. seealso:: :func:`marching_cubes_single`
"""
Expand All @@ -60,7 +62,8 @@ def marching_cubes_single(
Returns:
vertices (torch.Tensor): Mesh vertex positions, shape ``(N, 3)``.
faces (torch.Tensor): Triangle face indices.
normals (torch.Tensor): Per-vertex normals.
unique_vertex_ids (torch.Tensor): Unique vertex IDs with dtype ``torch.int64``,
shape ``(N, 3)``.

.. seealso:: :func:`marching_cubes_batch`
"""
Expand Down
4 changes: 2 additions & 2 deletions fvdb/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -1470,8 +1470,8 @@ def marching_cubes(
``(num_vertices, 3)``.
faces (torch.Tensor): Triangle face indices of shape
``(num_faces, 3)``.
normals (torch.Tensor): Vertex normals of shape
``(num_vertices, 3)``.
unique_vertex_ids (torch.Tensor): Unique vertex IDs of shape
``(num_vertices, 3)`` and dtype ``torch.int64``.
"""
from . import functional

Expand Down
3 changes: 2 additions & 1 deletion fvdb/grid_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,8 @@ def marching_cubes(
Returns:
vertex_positions (JaggedTensor): Mesh vertex positions. Shape: ``(batch_size, num_vertices_for_grid_b, 3)``.
face_indices (JaggedTensor): Triangle face indices. Shape: ``(batch_size, num_faces_for_grid_b, 3)``.
vertex_normals (JaggedTensor): Vertex normals. Shape: ``(batch_size, num_vertices_for_grid_b, 3)``.
unique_vertex_ids (JaggedTensor): Unique vertex IDs with int64 values.
Shape: ``(batch_size, num_vertices_for_grid_b, 3)``.

.. seealso:: :meth:`Grid.marching_cubes`
"""
Expand Down
Loading