subdivision-hole-filler

A python package to fill N-sided holes using combined subdivision schemes, based on Catmull-Clark subdivison.

https://github.com/huang-lihao/subdivision-hole-filler

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (7.1%) to scientific vocabulary
Last synced: 7 months ago · JSON representation ·

Repository

A python package to fill N-sided holes using combined subdivision schemes, based on Catmull-Clark subdivison.

Basic Info
  • Host: GitHub
  • Owner: huang-lihao
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 420 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 9
Created almost 2 years ago · Last pushed over 1 year ago
Metadata Files
Readme License Code of conduct Citation

README.md

Filler for N-sided holes

GitHub release (with filter) Upload Python Package PyPI - Version PyPI - Downloads GitHub License

A python package to fill N-sided holes using combined subdivision schemes, based on Catmull-Clark subdivison.

See Levin, Adi. “Filling N-sided Holes Using Combined Subdivision Schemes.” (2000).

Install

Use PyPI to install subdivision-hole-filler: sh pip install subdivision-hole-filler

Usage

Run the following script to fill a hole. ```python import numpy as np

from subdivisionholefiller import Boundary, NsidedHoleFiller

r = 1 R = 1

boundaries = [None, None, None, None, None, None] for d in range(3): def coord(u: float, d=d): phi = (1.0 - u / 2.0) * np.pi / 2.0 x = r * np.cos(phi) y = r * np.sin(phi) z = r + R c = np.zeros(3) c[d] = z c[(d + 1) % 3] = x c[(d + 2) % 3] = y return c

def deriv(u: float, d=d):
    vec = np.zeros(3)
    vec[d] = -1
    return np.array(vec)

bd = Boundary()
bd.coord = coord # A function of parametric coord `u` in [0.0, 2.0], which defines the coordinate of a point on the boundary 
bd.deriv = deriv # A function of parametric coord `u` in [0.0, 2.0], which defines the cross boundary derivative of a point on the boundary, poining to the inside
boundaries[d*2] = bd

for d in range(3): def coord(u: float, d=d): phi = (1.0 - u / 2.0) * np.pi / 2.0 x = R + r - R * np.cos(phi) y = R + r - R * np.sin(phi) z = 0 c = np.zeros(3) c[d] = z c[(d + 1) % 3] = x c[(d + 2) % 3] = y return c

def deriv(u: float, d=d):
    vec = np.zeros(3)
    vec[d] = 1
    return np.array(vec)

bd = Boundary()
bd.coord = coord # A function of parametric coord `u` in [0.0, 2.0], which defines the coordinate of a point on the boundary 
bd.deriv = deriv # A function of parametric coord `u` in [0.0, 2.0], which defines the cross boundary derivative of a point on the boundary, poining to the inside
boundaries[(d + 1) % 3 * 2 + 1] = bd

filler = NsidedHoleFiller(boundaries)

centerpoint = np.array([r, r, r]) filler.geninitialmesh(centerpoint)

for iteration in range(3): filler.cmcsubdivfor_1step(iteration=iteration)

```

Here is the ouput.

Owner

  • Name: HUANG Lihao (黄立昊)
  • Login: huang-lihao
  • Kind: user

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: Filler for N-sided holes
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Lihao
    family-names: Huang
    email: huang-lihao@outlook.com
    orcid: 'https://orcid.org/0000-0003-3828-892X'
    affiliation: Tsinghua University
repository-code: 'https://github.com/huang-lihao/subdivision-hole-filler'
license: MIT
version: v1.0.7
date-released: '2024-12-02'

GitHub Events

Total
  • Release event: 1
  • Push event: 2
  • Create event: 1
Last Year
  • Release event: 1
  • Push event: 2
  • Create event: 1

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 45 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 9
  • Total maintainers: 1
pypi.org: subdivision-hole-filler

A python package to fill N-sided holes using combined subdivision schemes, based on Catmull-Clark subdivison.

  • Versions: 9
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 45 Last month
Rankings
Dependent packages count: 9.4%
Average: 35.8%
Dependent repos count: 62.2%
Maintainers (1)
Last synced: 7 months ago