Code Monkey home page Code Monkey logo

Comments (2)

hugoledoux avatar hugoledoux commented on August 26, 2024

@clausnagel I have been giving some thought at this today. I don't think it's possible to do, and that we actually want that. Let me explain. Assume we have the polygon there: http://val3dity.readthedocs.io/en/v2/errors/#non-planar-polygon-normals-deviation

If we ignore 204 then we might end up having val3dity crash because it's not possible to triangulate the top face: it gets projected to the xy-plane and thus you get duplicate points (triangulation is done by projecting to a plane). Also, if $c$ and $f$ are moved a bit to the right, when we project we get intersections of the edges. I could clean the polygon by removing the annoying vertices (with https://github.com/tudelft3d/prepair), but then what if val3dity returns VALID? It's not valid since without cleaning ops I wouldn't have been able to validate it... But within the planarity tolerance you give, it's a valid polygon.

from val3dity.

hugoledoux avatar hugoledoux commented on August 26, 2024

okay, I updated val3dity (branch v2) with the following behaviour. (it's now an option --ignore204 efbe24d)

A ring is self-intersecting (error 104) if its projection to the best-fitted plane (done with least-square) through the vertices of the polygon containing the ring has a self-intersection. This rule is there because if it is not possible to project the rings/polygons to a plane, then it is not possible to triangulate it (which is necessary, at least by val3dity, to validate 3D primitives).

If the rings of a polygon pass 203 (planarity with distance to fitted-plane) and have no self-intersection), then I can triangulate it (without modifying its geometry) and then 204 can be tested as before.

The default value of 204 is now 20degree, but can be changed.

option --ignore204 basically puts the planarity_n_tol to 180degree.

from val3dity.

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.