Grasshopper

algorithmic modeling for Rhino

I have been using voronoi to compute medial axis for a V tool carving simulation (and curved sheet folding):

Unfortunately I have found that when I decrease the distance between Voronoi points (which increases the smoothness of the medial axis, and hence the accuracy of the output mesh), spikes appear in the voronoi diagram as shown below. 

For reference the point spacing along the input curve is 0.2mm, and the extension of the overlapping cells is about 8mm

I have compared this result with the only other Voronoi implementation i could find in GH which is from SmartForm. SmartForm SMART Voronoi does not produce this error, however it is exponentially slower, taking approx 11 minutes compared to 2.5 seconds for the native component. 

Is this a known problem with the accuracy of the GH Voronoi implementation? I have tried this with various Units settings in the RhinoDoc, with no change. 

Any ideas?

Are there any other fast + accurate Voronoi implementations out there?

example file is attached. Note that it requires SmartForm, but will show the error without it. 

Thanks :)

Views: 666

Attachments:

Replies to This Discussion

I found a dumb hack solution. Scale it up before computing the Voronoi :o

Before:

After:

That's good enough for me. I'm surprised that precision would be affected that much by the scale. 

Attachments:

Without looking into the code, there are some hard-coded tolerances in the algorithm. It could be the problem is caused by one of those, which would explain why it goes away if scaled up. 

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service