MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / print_voxel_info

Function print_voxel_info

scripts/meshstat.py:160–171  ·  view source on GitHub ↗
(mesh, info)

Source from the content-addressed store, hash-verified

158 title="Voxel radius ratio", with_total=False);
159
160def print_voxel_info(mesh, info):
161 if mesh.dim == 2:
162 return;
163 if (mesh.num_voxels == 0):
164 print_section_header("Volume Estimation");
165 volume = mesh.volume;
166 print("volume estimation: {:.6g}".format(volume));
167 info["volume_estimation"] = volume;
168 else:
169 mesh.add_attribute("voxel_volume");
170 voxel_volume = mesh.get_attribute("voxel_volume");
171 quantile_breakdown(voxel_volume, "volume", info);
172
173def print_extended_info(mesh, info):
174 print_section_header("Extended info");

Callers 1

mainFunction · 0.85

Calls 4

print_section_headerFunction · 0.85
quantile_breakdownFunction · 0.85
add_attributeMethod · 0.45
get_attributeMethod · 0.45

Tested by

no test coverage detected