Registry / data / pymcubes

pymcubes

JSON →
library0.1.6pypypi✓ verified 82d ago

A Python library for extracting isosurfaces from volumetric data using the marching cubes algorithm. Version 0.1.6 is the latest, with irregular releases.

pip install pymcubes
INSTALL
IMPORT
SIG · PYMCUBES
P
pymcubes
datapythonv0.1.6
Install
7.3s avg
Import
Disk
228MB
Pass rate
4/ 10
Env Coverage4 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.1.6 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
✓ 7s
py 3.11
✕ build_error
✓ 6.9s
py 3.12
✕ build_error
✓ 7.4s
py 3.13
✕ build_error
✕ build_error
py 3.9
✕ build_error
✓ 8s
228MB installed
● package 228MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

marching_cubes
from mcubes import marching_cubes
from skimage.measure import marching_cubes
export_mesh
from mcubes import export_mesh
smooth
from mcubes import smooth

Extract an isosurface from volumetric data and save as OBJ.

import numpy as np from mcubes import marching_cubes, export_obj # Create volumetric data: a sphere X, Y, Z = np.mgrid[-2:2:50j, -2:2:50j, -2:2:50j] volume = np.sqrt(X**2 + Y**2 + Z**2) - 1.0 # Extract isosurface at level 0 vertices, triangles = marching_cubes(volume, 0) # Export to OBJ file export_obj(vertices, triangles, 'sphere.obj') print('Isosurface extracted and saved to sphere.obj')
Debug
Known issues
gotchaThe correct import is 'from mcubes import ...' not 'from pymcubes import ...'. The package installs as pymcubes but the module is mcubes.
fix
Use 'import mcubes' or 'from mcubes import ...' after pip install pymcubes.
affects: all
gotchaMarching cubes output vertices in a (N,3) array, not (3,N). Ensure your downstream code expects the correct shape.
fix
Check the shape: vertices.shape should be (N,3).
affects: all
Upgrade
Version history
0.1.6latest on PyPI · released Jul 3, 2024
Audit
Dependencies

No dependency data recorded yet.

Agent activity
17 hits · last 30 days
node
14
OpenAI (training)
1
Resources
pymcubes — pip install pymcubes · libregistry