The goal is to be able to easily drop bars of various lengths into the model, and arrange them in various configurations. My initial attempt was to create 4 points defining the profile of the extrusion (in my case, 40mm x 40mm), generate a rectangle from the points, extrude that rectangle to create a long bar, and then… big question mark.
I was hoping to be able to drop those 4 points in any where I needed to extrude another bar, but in my attempts to make this happen, I’m getting the feeling that I’m approaching it all wrong.
If anybody has any tips or pointers on the general tools / approaches that would be best for achieving something like this, I would be most interested to learn.
In order to use the end points of each extruded bar as points that I could build off of for additional bars, I created a script that moves all the points to the end of the extrusion, so that I could select one of those points as the input for another bar using the same script. I tried to build in some Boolean toggles so that I could easily flip the orientation of the bar depending on how it needs to be positioned. I then used these interconnected scripts to create a simple frame as shown in the screenshot.
I feel like I must be missing something here, as it seems like what I’m trying to design should be quite simple, but the only solution I’ve managed to figure out is grotesquely complex and unscalable.
8020 tool Edited V0.gh (28.9 KB)
I prefer to do it in a cheaper way.
Just go to McMaster-Carr, find the extrusion, bring the digital 2D drawing to Rhino.
Thank you, that’s a great idea.
I haven’t used Pufferfish but I’ll download it and experiment further with your definition.
Looks like a great way to approach this, and I’ve already learned a bunch just from parsing through your script!
It does seem like the ability to add individual bars anywhere along the length of an existing bar is still not quite within reach. I’d like to “build” one by one, being able to place a new bar up against an existing one, and be able to repeatedly apply this process with maximal flexibility so that I can construct any kind of shape, and change it with relative ease.
Perhaps scaling your definition down so that it operated on a single line instead of a box – but then the issue of placement is my primary stumbling block. I have a Fusion360 background, so I’m wondering if I’m perhaps viewing GH through the wrong lens, and that this type of “jointing” is maybe not GH’s strong-suit.
One thought on that: I would pair back the script to take line inputs from a specified layer and then any lines/polylines you draw on that layer will be referenced to GH and automatically add extrusions at those locations. This would allow you to have “control geometry” of simplified lines within Rhino that you can draw as you are accustomed to but benefit from the GH solution in populating said control geometry.
By leveraging Elefront, similar plugin, or Rhino User data you could assign “Instance Parameters” to each line to handle different functions in GH. Like User Key: Type with Value: U36 maybe spawns a “U36 Extrusion to length of the drawn curve” but if you change that user value to U28 you get a different extrusion for instance.
This could then be taken a step further to populate specific connection details based on line intersections such as angle, count of lines at intersection, etc.
One issue that feels worth highlighting is that positioning and orienting new bars seems to require referencing global coordinates, rather than referencing any of the local geometry of an adjacent bar with which I am trying to simulate a joint.
So if I position Bar A relative to Bar B in a way that simulates a joint, and then rotate Bar B, the joint breaks, because Bar A has no idea, as it were, where Bar B is.
I’m new to GH, and don’t have much experience using Rhino & GH in tandem. But since designing out the entire model exclusively using parameters feels a bit infeasible at the moment, your suggestion would vastly simplify the manual modeling process.
I’d be interested to see how I could handle any overlaps at the vertices of two or more lines. I imagine I could have specific parameters that extrude the length of the line minus the thickness of the extrusion, so it appears to butt up against the adjacent bar. And by swapping that parameter, you could switch which bar was overlapping which. Could be pretty nifty.
I’ll look into Elefront and give your idea a shot!
Personally I’m not a big fan of ONLY parameter specified solutions or ONLY manual modeling. I think the middle ground is the sweetest. Once you open the GH door successfully with Rhino it’s hard to go back