Orient nodes along edges of 3d objects with joints

I have a set of modular elements - a fixed-length node and two interlocking elements that can form a cross joint. I explore ways how I can orient them so they will interlock. It was pretty easy with central symmetry (pic 1).

but in other cases it will require splitting the structure into frames so nodes will be oriented as loops with unified direction.

I am looking for a logic principle of finding these loops so I can minimize manual tweaking.

orient nodes.gh (45.4 KB)

Hi Lurii, I saw your file. What manual tweaking are you intending to minimize? Are you referring to post-GH tweaking in Rhino or tweaks still within grasshopper?

In grasshopper ideally. As you can see, a series of nodes in pic 2 have to be rotated to match direction of the gap. In this case I could select square profiles and work with a list of frames to orient nodes, as they all have vertical section, and the rest are lying flat so I could group them as well.

I am looking for algorithms how to decide which should I group

Pardon my ignorance, what are your nodes in this case? The white + signs or the rectangular beam-like (brown) elements along frame edges?

For the latter, I first I thought this could help:
orient nodes.gh (51.4 KB)


Did I get it right?

These are nodes (beams) and the selected ones didn’t rotate correctly as just sorted them as horizontal and vertical.

I could group these and orient along loops instead. Just looking for the way to sort curves before moving geometry to them so I can rotate wrong planes separately for each group.

1 Like

I see/understand now :nerd_face: thanks - but stepped away :frowning: - I’ll check again - meanwhile: you could look into (1) getting the bounding box of the frame, (2) use ‘edges from direction’ component to get the bbox verticals matching your frames and distinguish from the rest of the lines/edges, then (3) specify the two types of conditions for the orienting or mapping.

1 Like

Nevermind :sweat_smile: I guess I’m not sure what you’re talking about afterall (I saw your previous post on my phone screen).

In “pic 2” from your original post I don’t know what has been rotated or not; it’s just a nice screenshot - so I am trying to understand (again ha!) how that relates to the other screenshots here. I guess I’m not inspecting it well enough? They seem the same to me.

What is the correct rotation?

Which ones is “these”?

Sort which curves?

Do you have a screenshot of the ideal ‘group’ you wish to orient?

Sorry for the many questions - it wouldn’t surprise me if the problem is more obvious to others :grin:

Correct rotation of selected items (they should be raised as well, but it’s another story)

For this particular example, I could orient beams along these loops

and then use the rest for different orientation

The problem is finding the most useful way to sort edges automatically in a brep in the most convenient way so there’s less manual job to do

I think of Mesh Topology from Parakeet so it can sort corners by number of connections and place the joints and this will dictate orientation of the nodes

1 Like

I think I pretty much achieved what I wanted to so will post it here.

I used Mesh Topology component to get Point connectivity and Line connectivity. Joints are placed at mesh corners and have Orient vector with sliders to rotate them.

I sorted edges by their connectivity and then sorted each group one more time into vertical and horizontal, so they can be rotated in such groups by XYZ Vector.

Not each shape will be buildable, but it gives the opportunity to explore interconnections.

orient nodes parakeet.gh (190.2 KB)

1 Like

I see now :slight_smile:

Thank you for taking the time to re-explain. Glad you got it to work without help!

I opened it but don’t have the pakareet plugin. Similar to the suggestion of looking into brep edge directions (but you have a mesh, sorry!), you could also use dot product to grab lines in a direction vs the other:
orient nodes parakeet.gh (139.5 KB)
Not sure it helps but just in case!



Cheers!

1 Like

Great, thank you for the idea, I do try to work around tasks without using external plugins if possible, but I am quite amateur for now so it’s definitely worth taking a note of this method

1 Like

Cool work! There’s also the Warp | Weft component that can be useful for similar tasks:

1 Like

Updated version where I can rotate elements in all possible directions.

Also there’s a way to automatically capture connectivity to know how many element groups are needed.

WOOD_TOY_4.gh (594.3 KB)

1 Like

Beautiful, @Urchuck - thanks for sharing