Grasshopper

algorithmic modeling for Rhino

Hi,

I want to make a Voronoi triangulation of points with a boundary of the cylinder.

I tried to follow some examples I have seen on the forum and I can't find what the problem is.

Whenever I make the algorithm, the cylinder becomes a box.

So, I tried to trim the outside curves, but failed as you see.

Pt is the multiple points located inside the cylinder.

Geo is the cylindrical mesh.

How can I fix the algorithm? 

p.s. I am NOT doing art thing. So, please do not include some algorithm to make the object look good. 

Views: 2045

Replies to This Discussion

Yes it must be a box. Technically the code supports any closed, purely convex shape made up of planar faces, but the component only allows you to specify a box, as that is the only data-type in GH which guarantees those three constraints.

If you want a custom boundary, you'll have to perform a solid intersection after the voronoi component.

Thanks, 

but I had an error again

"Data conversion failed from Mesh to Brep"


I have looked some threads but they didn't really help me out. 

How can I convert from mesh to brep ?

I made the mesh (cylinder) from SolidWorks. (I saved a solid cylinder as a stl file)

A solid intersection with a brep or a mesh dies not retain inner Voronoi cells for me, so I've been using trim but that leaves sporadic parts only split but not actually trimmed so I'm then calculating area centers and testing if they are in the original solid or not in order to delete the outer split parts. I then lose my surface Voronoi cell curved faces, and end up with open cells. The only other way around this I've found is to keep altering the random seed of my points until trim works completely. Most Voronoi intersection work only seeks surface lines anyway so loss of interior cells isn't a concern or even noticed.

Sorry, I can't understand your saying, since my english is not that good.

So, are you saying the work I want to do is not possible ? 

I'm just nagging David to make a better Voronoi component for the upcoming Grasshopper2.

But no, it's not possible to do simply right now, so here is an old VB script for "clipped" Voronoi and a quick conversion of a mesh cylinder into a closed NURBS solid to feed it:

Your confusion isn't just English. The learning curve is steep at first.

Attachments:

Thanks, Mr.Willmore.

How did you get the "old Visual Basic script for clipped voronoi" ?

And, why did you try to make it small by a factor of 0.9 ?

I occasionally saw it here on the forums. Here it is again.

I can't see the cells without a reduced size preview.

Oh, okay, thanks. And I changed a little portion from your Mesh2BrepB.gh to make it proper form for me.

But I have a problem again.

Solution exception:Exception of type 'System.OutOfMemoryException' was thrown.  was happened.

Probably my computer is not a good one and it cannot calculate the complex algorithm.

Can your super computer make it through ? 

If it can, I should buy a new one... 

Two files (stl, igs) are optional, in case you don't have them.

files

Attachments:

At least get more memory, which is cheap. I upgraded from 12GB to 24GB and most of my old problems were fixed.

maybe I should... Thanks.

Here is another version I found. It also works with that Darn Bunny Mesh :)

Attachments:

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service