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

Found an edge case that causes a bug #3

Open
Habrador opened this issue Jun 4, 2020 · 0 comments
Open

Found an edge case that causes a bug #3

Habrador opened this issue Jun 4, 2020 · 0 comments

Comments

@Habrador
Copy link

Habrador commented Jun 4, 2020

The outer shape is:
List outerShapePoints = new List();
outerShapePoints.Add(new Vector3(0, 0, 0));
outerShapePoints.Add(new Vector3(0, 0, 1));
outerShapePoints.Add(new Vector3(1, 0, 1));
outerShapePoints.Add(new Vector3(1, 0, 0));

The two inner shapes are:
List shape = new List();
shape.Add(new Vector3(0.2f, 0, 0.2f));
shape.Add(new Vector3(0.2f, 0, 0.8f));
shape.Add(new Vector3(0.4f, 0, 0.8f));
shape.Add(new Vector3(0.4f, 0, 0.2f));
innerShapes.Add(shape);

shape = new List();
shape.Add(new Vector3(0.6f, 0, 0.2f));
shape.Add(new Vector3(0.6f, 0, 0.8f));
shape.Add(new Vector3(0.96f, 0, 0.8f));
shape.Add(new Vector3(0.8f, 0, 0.2f));
innerShapes.Add(shape);

It looks like this:
edge-case-bug

It will not be able to generate a mesh if you change the third vertex in the second inner shape to something like Vector3(0.98f, 0, 0.8f). It's working fine if you change the third coordinate to new Vector3(0.98f, 0, 0.79999f), so there might be some floating point precision issues going on somewhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant