Skip to main content

HoleFillingPy

A dirty implementation of mesh hole filling with libigl.

Installation

pip install hole-filling

Usage

Simply fill all holes.

import numpy as np
import igl
from hole_filling import triangulate_refine_fair

vs, fs, _ = igl.read_off("tests/examples/bunny_holes.off")
out_vs, out_fs = triangulate_refine_fair(vs, fs)

colors = np.ones((len(out_vs), 3))
colors[np.arange(len(vs), len(out_vs))] = [0, 0, 1]  # added vertices are blue

igl.write_off("bunny_hole_filling.off", out_vs, out_fs, colors)

You can fill holes with fine controls, e.x. keeping the longest boundary.

import numpy as np
import igl
from hole_filling import close_holes, triangulate_refine_fair

vs, fs, _ = igl.read_off("tests/examples/face_holes.off")
loop = igl.boundary_loop(fs)
length = np.linalg.norm(vs[loop[:-1]] - vs[loop[1:]], axis=1).sum()
# tweak the parameters to see the difference
out_vs, out_fs = triangulate_refine_fair(vs, fs, hole_len_thr=length - 0.1, density_factor=2, fair_alpha=0.5)
igl.write_off("face_hole_filling.off", out_vs, out_fs, np.ones_like(out_vs) * 0.7)

Reference

  1. Liepa, Peter. "Filling holes in meshes." Proceedings of the 2003 Eurographics/ACM SIGGRAPH symposium on Geometry processing. 2003.
  2. Jacobson, Alec, and Daniele Panozzo. "Libigl: Prototyping geometry processing research in c++." SIGGRAPH Asia 2017 courses. 2017. 1-172.

Metadata

Release files for hole-filling 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for hole-filling 1.0.0
File Interpreter ABI Platform Actions
hole_filling-1.0.0-py3-none-any.whl Python 3 none any Details for hole_filling-1.0.0-py3-none-any.whl

Release files / hole_filling-1.0.0-py3-none-any.whl

Download URL hole_filling-1.0.0-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4edcbd5a24fc806270fcdeb4b3de395c931acc131ee99d74a4f8048b54781b15
BLAKE2b-256 checksum
How to use checksums
904ed34a922461b7ddec8c23ce02b05dabda417bc53118e8853636625918c34f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.10

Security for hole-filling 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page