Skip to main content

Unusual mesh processing tools

Project description

Meshiki

A collection of unusual mesh processing algorithms.

Install

# from pypi, will build extension at first time
pip install meshiki

# locally
cd meshiki
pip install . 

Usage

Trigs-to-Quads

          Triangulate       We want this!
    Quads ----------> Trigs ------------> Quads
(obj, blender)   (glb, fbx, ...)

This algorithm is aimed for converting a triangulated quad-dominant mesh back to a mixed tri/quad mesh, with as many as possible reasonable quad faces. Our implementation is based on maximum weighted graph matching, and is usually better compared to the built-in tool (Edit Mode -> Face -> Tris to Quads) of blender.

from meshiki import Mesh

mesh = Mesh.load('mesh.glb', verbose=False)
mesh.quadrangulate()
mesh.export('mesh.obj') # must use obj for quad faces

Salient point sampling

This algorithm samples salient points from mesh surface as proposed in Dora.

from meshiki import Mesh, fps, load_mesh, triangulate

# load mesh
vertices, faces = load_mesh(mesh_path, clean=True)
# make sure it's pure-trig
faces = triangulate(faces)
mesh = Mesh(vertices, faces)
# sample 64K salient points
salient_points = mesh.salient_point_sample(64000, thresh_bihedral=30) # np.ndarray, [64000, 3]

We also implement uniform sampling and furthest point sampling:

# sample 128K uniform points
uniform_points = mesh.uniform_point_sample(128000) # np.ndarray, [128000, 3]
# use FPS to subsample 8K points from uniform points
fps_points = fps(uniform_points, N_FPS, backend='kdline') # np.ndarray, [8000, 3]

Acknowledgement

Project details


Download files

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

Source Distribution

meshiki-0.0.6.tar.gz (62.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

meshiki-0.0.6-cp310-cp310-win_amd64.whl (195.4 kB view details)

Uploaded CPython 3.10Windows x86-64

meshiki-0.0.6-cp310-cp310-win32.whl (167.6 kB view details)

Uploaded CPython 3.10Windows x86

meshiki-0.0.6-cp310-cp310-musllinux_1_2_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

meshiki-0.0.6-cp310-cp310-musllinux_1_2_i686.whl (1.4 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ i686

meshiki-0.0.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (275.1 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

meshiki-0.0.6-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl (294.9 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ i686

File details

Details for the file meshiki-0.0.6.tar.gz.

File metadata

  • Download URL: meshiki-0.0.6.tar.gz
  • Upload date:
  • Size: 62.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for meshiki-0.0.6.tar.gz
Algorithm Hash digest
SHA256 6a6014df691ac7cdf5a2353b1b2a2a9dd65b1acd60d17c32d0145f3cc9c41881
MD5 47e637f95c1d22d584ff7da143e3508d
BLAKE2b-256 ae2247ec83b88519161722958777ea4bf1b6d868d3cfef00a40347631386626a

See more details on using hashes here.

Provenance

The following attestation bundles were made for meshiki-0.0.6.tar.gz:

Publisher: pypi-publish.yml on ashawkey/meshiki

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file meshiki-0.0.6-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: meshiki-0.0.6-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 195.4 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for meshiki-0.0.6-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 36f5996b0b7af408eb51054d4aec12c9dd8e74ba9913266d9f3dd617ea6c16c6
MD5 e7144e22695b2ac42637e069f4e0563d
BLAKE2b-256 414330214994b9ca470035f7a3d8ad8c737f874b95ebff26da4fa7a531f6a23f

See more details on using hashes here.

Provenance

The following attestation bundles were made for meshiki-0.0.6-cp310-cp310-win_amd64.whl:

Publisher: pypi-publish.yml on ashawkey/meshiki

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file meshiki-0.0.6-cp310-cp310-win32.whl.

File metadata

  • Download URL: meshiki-0.0.6-cp310-cp310-win32.whl
  • Upload date:
  • Size: 167.6 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for meshiki-0.0.6-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 8cfa31e84ee71fb685403ca580499529759b5f46274d5992dc736385f772333f
MD5 9379c00ab886402956d95e34960131ef
BLAKE2b-256 b83d9227c2a2f44fcb7c601a9e1ab19f1ddc54880c783c7c4e498589680392c1

See more details on using hashes here.

Provenance

The following attestation bundles were made for meshiki-0.0.6-cp310-cp310-win32.whl:

Publisher: pypi-publish.yml on ashawkey/meshiki

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file meshiki-0.0.6-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for meshiki-0.0.6-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 db95e5fa7d8c20b97384d12ff031b278efc10b0249eb4d8f6b0a667d3477e509
MD5 387a737b6d2daf72ea4da174eea0cfd3
BLAKE2b-256 0cbd63a72ba32777e6188c1ceab230ad79252618f55168c0431aa617880e4a7f

See more details on using hashes here.

Provenance

The following attestation bundles were made for meshiki-0.0.6-cp310-cp310-musllinux_1_2_x86_64.whl:

Publisher: pypi-publish.yml on ashawkey/meshiki

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file meshiki-0.0.6-cp310-cp310-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for meshiki-0.0.6-cp310-cp310-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 955ecc713fa8fd26df33375e4af5d48d0bd6656ee201f077168ecfc478cfedc3
MD5 5578fc25029631eb67d09e81317b6fc7
BLAKE2b-256 f8699782c546965aa2e21c897ad3ced2b7ea764719a76bf6a08c37ea163c3ddc

See more details on using hashes here.

Provenance

The following attestation bundles were made for meshiki-0.0.6-cp310-cp310-musllinux_1_2_i686.whl:

Publisher: pypi-publish.yml on ashawkey/meshiki

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file meshiki-0.0.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for meshiki-0.0.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 da00695c57fed866c39766359a72b310f9147a41b8e514b80be29635b69ef8d2
MD5 b1d74f23443303aab71b787e235b0cc2
BLAKE2b-256 a3c54e1f92a73cf1407d7df5eba6e245a4138b4f91bdf86ac2f9d6115323ac99

See more details on using hashes here.

Provenance

The following attestation bundles were made for meshiki-0.0.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: pypi-publish.yml on ashawkey/meshiki

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file meshiki-0.0.6-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for meshiki-0.0.6-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 cf0d2d1791a816822e5dc8405537a8ac33919dc9d93f1dd8b2d6935f0c491c06
MD5 a2ca08c293e58dc2ebb868abcf554e3a
BLAKE2b-256 b8194b8c0b31aa2f1aba800790b9a9aeb220e06d52d73d448a9addf17eaa682a

See more details on using hashes here.

Provenance

The following attestation bundles were made for meshiki-0.0.6-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl:

Publisher: pypi-publish.yml on ashawkey/meshiki

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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