algorithmic modeling for Rhino
Hi all,
I'm working with a kangaroo to simulate a gridshell. The workflow that produces the shell is working just fine, but then I would like to process the output, which I read out as two sets of polylines, by reducing the lattice density to one-third the original.
I'm able to easily cull two thirds of the polylines in each orientation, but then reducing the polylines so that each portion that is between two intersections is straight (in other words, removing 2 of every 3 control points) is proving difficult. I can't just run a typical cull operation on each polyline because they differ in length and therefore the cull pattern would need to be shifted depending on the length of the polyline.
I've attached an example file as well as the desired outcome - you can easily use a join component to get sets of polylines in each orientation, and then a cull pattern to remove two thirds of the polylines.
Afterward is where I get lost. I have tried doing a multiple curve intersection, then pulling the indices of the intersections and passing that to a GraftByData component. It's messy and doesn't deal with the leftover "stems" at the edges of the shell, however.
Tags:
I had to make small fixes to the Rhino file (stray/missing segments) but believe I got it?
The two white groups are identical and should be a cluster...
It matches the "desired" layer in the Rhino file (below), though I see now that your desired.PNG is missing the end points?
No change to the algorithm but dressed it up a bit to make the results more flexible.
Created a 'MCXo' cluster for the duplicated code, used separately by the 'original-u' and 'original-v' curves.
Added a 'End Points' toggle (blue group).
Created a cull pattern generator to select every Nth line, instead of being fixed at 3. The combination of cull pattern 'Length' and 'Shift' sliders offers many patterns to reduce the lattice.
I did not solve the problem of sorting the polylines in a general purpose way... I'm sure it's possible but more work than I care to do at the moment. Sorting is required for culling to work properly. The 'original-u' curves were already in sequence; sorting them by midpoints doesn't work for them as it did for the 'original-v' curves (which were not in sequence).
Lattice curves are internalized in the GH file.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by