Code Monkey home page Code Monkey logo

Comments (4)

nschloe avatar nschloe commented on June 7, 2024 1

Thanks for the report. I've tried to reproduce this, but the script just ran forever, filling the memory until it eventually choked. Somethings not right with Union. I'll check it out sometime later.

from pygalmesh.

nschloe avatar nschloe commented on June 7, 2024

I've improved some things in domain specifications and released a new version, but the above mesh will still fail. I found that all cuboid unions fail where the two cuboids share part of at least one side exactly. For example, this

c1 = pygalmesh.Cuboid([0., 0., 0.], [1.0, 1.0, 1.0])
c2 = pygalmesh.Cuboid([-0.5, -0.5, -0.5], [0.9, 0.9, 1.0])

will hang/segfault as well. I'm not sure why this happens yet, perhaps is has to do with the feature edges. As a work-around, add a miniscule offset; this works:

c1 = pygalmesh.Cuboid([0., 0., 0.], [1.0, 1.0, 1.0])
c2 = pygalmesh.Cuboid([-0.5, -0.5, -0.5], [0.9, 0.9, 1.0 - 1.0e-15])

from pygalmesh.

florianwechsung avatar florianwechsung commented on June 7, 2024

Thanks, that runs!
Unfortunately when adding such a small offset, this seems to confuse the mesh generator, as I see this when I zoom into (0.0, 0.9, 1.0):

image

If I zoom out further, I see a few more issues:

image

from pygalmesh.

nschloe avatar nschloe commented on June 7, 2024

Yup, feature edges aren't preserved by default. Right now, all primitive domains are implemented in terms of level-sets, even polygonal domains like cuboids. As a consequence, feature edges are not preserved automatically. There are native polyhedral domains in CGAL, perhaps that can help out. Not sure...

from pygalmesh.

Related Issues (20)

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.