3D Demo
A 3D Demo
The notebook shows how to extract SN-Graph out of a 3D volume.
import trimesh
import numpy as np
from sn_graph import create_sn_graph, draw_sn_graph, visualize_3d_graph
mesh = trimesh.load("../assets/cup_0085.off")
print("Displaying original mesh...")
mesh.show()
# local voxelise allows to fill the inside of the mesh with positive values which is needed for sdf computation
voxels = trimesh.voxel.creation.local_voxelize(
mesh, point=(0, 0, 0), radius=300, pitch=0.5, fill=True
)
print("Displaying voxelized mesh...")
voxels.show()