Giter Site home page Giter Site logo

wildmeshing / wildmeshing-python Goto Github PK

View Code? Open in Web Editor NEW
46.0 46.0 8.0 161 KB

Python bindings for TriWild.

Home Page: https://wildmeshing.github.io/python/

License: Other

CMake 23.51% Python 24.66% C++ 51.83%
geometry meshing python-bindings tetrahedral-meshing triangulation

wildmeshing-python's People

Contributors

jiangzhongshi avatar teseoch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

wildmeshing-python's Issues

Control Tetrahedral Element Size

Hello,

Does wildmeshing support the ability to constrain the size of the tetrahedral elements generated? In tetgen, for example, you can do this via the "a" flag. I see the notion of sizing_fields in the C++ code, but I am unsure how those may apply here as they are, unfortunately, not documented in the python code.

My main motivation for this is to limit the volume of geometry generated to allow my simulation to run faster when I am debugging, etc.

I would greatly appreciate any guidance.

Missing module

After running the recommended install command I receive the following error:

In [1]: import wildmeshing as wm                                                          
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-8703ac452926> in <module>
----> 1 import wildmeshing as wm

~/.local/lib/python3.9/site-packages/wildmeshing/__init__.py in <module>
      4 from .wildmeshing import boolean_operation
      5 from .wildmeshing import Tetrahedralizer
----> 6 from .triangulate_svg import triangulate_svg

~/.local/lib/python3.9/site-packages/wildmeshing/triangulate_svg.py in <module>
      1 import json
      2 import math
----> 3 import wildmeshing.parse_svg.svgpathtools as svg
      4 import numpy as np
      5 

ModuleNotFoundError: No module named 'wildmeshing.parse_svg'

Tetrahedralizer segfaults on certain meshes

Here is an example mesh that causes a hard crash:

testobj.obj.zip
Screen Shot 2022-02-10 at 3 20 54 PM

import wildmeshing as wm
tet = wm.Tetrahedralizer()
tet.load_mesh('testobj.obj')
tm = tet.get_tet_mesh()

The mesh is geometrically watertight, as demonstrated by using the summed projected areas:

import igl
import numpy as np

V, _, _, F, _, _ = igl.read_obj('testobj.obj')
areas = igl.doublearea(V, F)
N = igl.per_face_normals(V, F, np.array([np.inf, np.inf, np.inf], dtype=np.float64))
max([abs((areas * N[:,i]).sum()) for i in range(3)])

Gives 2.168404344971009e-19, which I assume is close enough to 0.

What preprocessing, if any, can I do to ensure that the input mesh does not cause a crash?

boolean operation between tetrahedral meshes?

Hello,
I have two tetrahedral meshes: a complex object and a box. I would like to remove half of the complex object by subtracting the box. Is it possible to do that? In the example notebook it seems that only triangular meshes can be used as input...
Thank you!

New release to trigger build for conda

Hi,
currently, the main branch of the repo is newer than the conda version since there is no release with the latest changes. Could you please publish a new release? Thank you!
Marius

How to install wildmeshing by conda on M1 mac

I tried to use the conda install wildmeshing on my M1 Mac(conda install wildmeshing), but could not succeed.
The error as following text:
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  • wildmeshing

Current channels:

To search for alternate channels that may provide the conda package you're
looking for, navigate to

https://anaconda.org

and use the search bar at the top of the page.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.