Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix earcut bug - triangulating faces with +4 vertices #32

Merged
merged 12 commits into from
Nov 30, 2020

Commits on Nov 18, 2020

  1. Configuration menu
    Copy the full SHA
    40385f4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3feb42d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    50f689b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6cc39c3 View commit details
    Browse the repository at this point in the history

Commits on Nov 21, 2020

  1. second earcut fix - since only the first two coordinates are used in …

    …triangualation (even when dim=3), it is important we give it a non degenrate face.. this commit checks which coordinates have the largest variance and rearanges the dimensions accordingly. this doesnt affect the model in anyway
    eyalperry88 committed Nov 21, 2020
    Configuration menu
    Copy the full SHA
    2bbc16d View commit details
    Browse the repository at this point in the history

Commits on Nov 22, 2020

  1. Configuration menu
    Copy the full SHA
    f5b8979 View commit details
    Browse the repository at this point in the history

Commits on Nov 28, 2020

  1. Configuration menu
    Copy the full SHA
    fc84a3d View commit details
    Browse the repository at this point in the history
  2. Correct is2d and needsFlip detection and y/z flipping

    * Correct is2d detection: 2D only if all vertices are 2D,
      and treat 0 the same as an absent third coordinate.
    * Always swap y and z coordinates when importing/exporting FOLD,
      independent of 2D status, for consistent behavior in all cases.
      (To get there, `rawFold` also has swapped coordiantes.)
    * To decide `needsFlip`, instead of looking for a face edge in the first
      triangle, which can fail if the first triangle is a fully interior triangle,
      look for the first edge of the face in all the triangles.
    edemaine committed Nov 28, 2020
    Configuration menu
    Copy the full SHA
    d7fb3d1 View commit details
    Browse the repository at this point in the history
  3. needsFlip bug fix

    edemaine committed Nov 28, 2020
    Configuration menu
    Copy the full SHA
    68c9a6a View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2020

  1. Revert 2D -> 3D mapping instead of y/z swap

    Swapping y/z flips the coordinate system between left- and right-handed,
    effectively reversing the notions of cw/ccw. This isn't an issue in 2D,
    because there it would be the same as mapping (x, y, z) → (x, -z,
    y) (because z=0) which doesn't flip handedness, but it's a problem in 3D.
    edemaine committed Nov 29, 2020
    Configuration menu
    Copy the full SHA
    ff66566 View commit details
    Browse the repository at this point in the history
  2. earcut sometimes returns less triangles than needed to cover the face…

    … (because of it using only the first two coordinates, and possible degeneracies there). this update makes sure there are at least enough triangles before breaking
    eyalperry88 committed Nov 29, 2020
    Configuration menu
    Copy the full SHA
    940b2e0 View commit details
    Browse the repository at this point in the history

Commits on Nov 30, 2020

  1. Configuration menu
    Copy the full SHA
    18a0313 View commit details
    Browse the repository at this point in the history