Grasshopper

algorithmic modeling for Rhino

I'm working on a subdivision scheme that takes any set of closed curves (say, a distorted grid or voronoi cells) and 'inserts' a regular grid into each... so far I've got it working pretty well, and the definition is fast (all good). My problem now is that ideally I want the output to be a set of closed cells... and as it is now i'm getting grid lines.


Any ideas?

Views: 4395

Attachments:

Replies to This Discussion

Evan are you good on this or are you still trying to find possible solutions?

It looks interesting, I'll try taking a look...
still working on it...

there's an easy work-around in rhino (just split-surface with all the GH-generated curves, then dup-border on the split surfaces) but it's still a few more steps outside of GH that i'd like to avoid.

ideally i'd like to find a purely GH solution, without resorting to extra plugins (which are a pain to install at work)...
I was thinking If you were starting from scratch there might be a GH way to subdivide a trimmed surface and then get the borders.

Re-orienting any surfaces to subdivide would be an added complication since all GH planar surface are always oriented with respect to the global axis.

And subdividing surfaces makes it sometimes hard to specify actual distances (vs uv curves)...

Anyway, I'll see if I can just add onto your definition. It may not be pretty.
I had written a def based on surface subdivision. It 'worked' as in it resulted in closed polylines, but it was so incredibly slow that I abandoned the method.

Basically...
1) generated a bounding box of each input cell, rotated* according to some vector - here, the perpendicular vector from the cell centroid to the closest side...
2) take one of the xy-plane surfaces of that bounding box, subdivide it and take the brep wireframe border of each isotrim surface...
3) region-intersect that border with the original cell border.

i can post that ghx if you're interested and think you can improve on it.... but it was really inelegant and crash-prone....

*this is the complication i think you're refering to... I took each cell, determined the side i wanted to orient the inscribed grid to, rotated the cell so that side was on the world x-axis, generated a bounding box, extracted one xy-plane surface of that box, rotated it back into place...
No thanks on the alternate version if you've already looked into it.

Can you install WeaverBird? I've got something going with meshes...

WeaverBird helps but I don't think it would be essential.
i tried installing weaverbird today... had some problems with admin rights and unfortunately it's not working. If I can catch our IT guy to install the plugins i'll have more options, but I could wait weeks for that.

if you have an idea for an alt version of this i'm interested - but anything that involves a heavy boolean operation at the end is probably out of the question...
Well, this kind of works...

The idea was to get all the points for each global cell into separate branches. Then run the equivalent of the Rhino commands _MeshFromPoints and _QuadrangulateMesh

There's problems since some of the voronoi cells have 5 verticies and for your other subdivided surface some mesh triangular faces will not quadrangulate.

Still pondering...

Attachments:
Thanks Taz, I've learnt from your definition that about getting the cell lines into separate branches which helps make my definition quite quick and prevents the multiple cell borders.

Sorry, mine isn't a pure grasshopper solution, but the algorithms and data structures it uses to traverse a curve network don't really lend itself to implementation in Grasshopper. I've attached the baked cells in the Rhino3d model and the improved definition. I'm more than happy to try to help with installing with non-admin rights.

Cheers,

Jon
Attachments:
Jon, I'm still having problems w/ the plug in - I drag-n-drop loaded it, but it didn't seem to work. The only command I see (typing in ssi...) is ssiMeshCheck.... under options, rhino lists the plugin as loaded. Can you walk me through the procedure?

Hi Jon,

I seem to have some problem to generate cells sometimes. (with bullant)

see example, diagrid create from rectangular pts grid, but when create the cells, they overlap and some are missing?

1. What is the best way to create the cells from line generated from a ordered grid of pts ?

2. what is the best way to select the perimeter cells ?

as another topics, is there a way to create an order rectangular cells from an order grid of points ?

thnks

stephane

Hi Stephane,

Can you please post or email to me the script so I can give specific advice?

Cheers,

Jon

in case someone have the same issues. below the def.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service