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).
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
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.
I see/understand now thanks - but stepped away - 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.
Nevermind 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
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
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.
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!
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