-
Notifications
You must be signed in to change notification settings - Fork 594
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
issue with medial axis not being straight #924
Comments
Oh, the medial axis function returns the approximate medial axis calculated by sampling the boundary and then computing a furthest-site voronoi diagram. If you pass a higher resolution the artifacts should be correspondingly smaller:
|
Hey, happy to take PR's with an implementation of exact medial axis but only the approximation is currently implemented. This method looks reasonable. You could also just keep decreasing the resolution until it is "smooth enough" for your needs. |
Hey, |
Yeah an exact medial axis calculation would be better, but there are a number of ways to smooth jagged results like that. The two easiest are shapely's built in simplification and b-spline resampling:
|
I'll add "exact medial axis" implementation to feature requests and close this for now. |
Hey,
![norskask](https://user-images.githubusercontent.com/51442925/88176785-1ae20680-cc28-11ea-978c-162aff3cc628.png)
![norskmedold](https://user-images.githubusercontent.com/51442925/88176808-22091480-cc28-11ea-9bf2-5e86a548f287.png)
![norskmedask](https://user-images.githubusercontent.com/51442925/88176935-554ba380-cc28-11ea-8184-374d06901ae6.png)
in the pics attached below,
here is the medial axis
in this particular slice, the medial axis is not a straight line but is comprised of points which form a zig-zag medial axis. Can you tell me why the trimesh.path.polygons.medial_axis yields a zig-zag medial axis like the one in this figure?
in this above pics, at the region of the red marking, the medial axis is supposed to be a straight line. But i don't understand why i get a zig-zag medial axis.
Thanks
The text was updated successfully, but these errors were encountered: