Skip to main content

Uniformly remeshes surface meshes

Project description

https://img.shields.io/pypi/v/pyacvd.svg https://travis-ci.org/pyvista/pyacvd.svg?branch=master

This module takes a surface mesh and returns a uniformly meshed surface using voronoi clustering. This approach is loosely based on research by S. Valette, and J. M. Chassery in ACVD.

Installation

Installation is straightforward using pip:

$ pip install pyacvd

Example

This example remeshes a non-uniform quad mesh into a uniform triangular mesh.

from pyvista import examples
import pyacvd

# download cow mesh
cow = examples.download_cow()

# plot original mesh
cow.plot(show_edges=True, color='w')
original cow mesh zoomed cow mesh
# mesh is not dense enough for uniform remeshing
# must be an all triangular mesh to sub-divide
cow.tri_filter(inplace=True)
cow.subdivide(4, inplace=True)

clus = pyacvd.Clustering(cow)
clus.cluster(20000)

# plot clustered cow mesh
clus.plot()
zoomed cow mesh
# remesh
remesh = clus.create_mesh()

# plot uniformly remeshed cow
remesh.plot(color='w', show_edges=True)
zoomed cow mesh

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

pyacvd-0.1.1-cp37-cp37m-win_amd64.whl (122.4 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

pyacvd-0.1.1-cp36-cp36m-win_amd64.whl (122.4 kB view hashes)

Uploaded CPython 3.6m Windows x86-64

pyacvd-0.1.1-cp35-cp35m-win_amd64.whl (116.2 kB view hashes)

Uploaded CPython 3.5m Windows x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page