Skip to content

decompose returns unexpected result #94

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

Closed
vk928 opened this issue Sep 26, 2020 · 1 comment
Closed

decompose returns unexpected result #94

vk928 opened this issue Sep 26, 2020 · 1 comment

Comments

@vk928
Copy link

vk928 commented Sep 26, 2020

I wanted to mesh an arbitrary polygons from 3d points. But if provided points are in CW direction, mesh() returns empty or with missing geometry faces. I guess it's because decompose() function returns empty array:

tri_ccw = Point{3,Float64}[(0,0,0,), (1,0,0), (0,1,0)] # points in ccw direction
tri_cw = reverse(tri_ccw) # points in cw direction
@show length(decompose(TriangleFace{Int}, tri_ccw)) == 1 # <- as expected
@show length(decompose(TriangleFace{Int}, tri_cw )) == 1 # <- decompose returns with empty array
@vk928
Copy link
Author

vk928 commented Sep 26, 2020

Works as expected for 2d points. I was wrong, imagining that function just connects nearest 3 points in series.

@vk928 vk928 closed this as completed Sep 26, 2020
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