Help Needed: Issue with Local Axis Alignment in Grasshopper & Karamba3D

Hey everyone!

I’m working on a hyperboloid tower structure in Grasshopper, where horizontal rings are generated from a set of intersection points of diagonal members. The idea is to group points by their Z-values, connect them with polylines to form closed rings, and make sure that all local axes are consistently aligned.

Since I’m using Karamba3D for structural analysis, I need to ensure that each ring’s local axis system behaves the same way, with the normal vectors pointing toward the center of the ring.

The problem is, most of the rings are working exactly as expected, but for some reason, three specific rings (the 2nd, 9th, and 16th ones) have different local axis orientations than the others.

No matter what I do, I can’t seem to get these three rings to align properly. They either:

  1. Flip unexpectedly,
  2. Have slightly different local axis directions compared to the others,
  3. Or rotate in ways I don’t fully understand.

I’ve gone through so many iterations to fix this, but at this point, I feel like I’m missing something fundamental, and I’d love to hear if anyone has ideas on how to fix this!

I’m attaching:

  • My Grasshopper file
  • Screenshots showing the issue
  • Python scripts I used inside Grasshopper to generate the polylines and check local axes

Any help or insight would be really appreciated! Thanks in advance. :blush:

2 hyperboloid frame to compare v2.gh (52.5 KB)
Python 3 Script I.py (580 Bytes)
Python 3 Script II.py (1.0 KB)

You’re going to want to post to the Grasshopper Developer category if you’re coding, and as Karamba is propietary, 95% of people are going to open your definitions and get placeholder components.

On the other hand, you are using Python to do stuff for which there native Grasshopper components for so…

Thanks for the suggestion! I actually wrote the Python scripts with ChatGPT because I was struggling to generate the horizontal rings directly from the intersection points using Grasshopper nodes. That being said, I’m definitely open to any suggestions on how to achieve this purely with native Grasshopper components—if there’s a better way, I’d love to learn!

As for posting in the developer category, that’s a great idea, and I’ll definitely consider it. The reason I posted here is because I know Karamba is proprietary, so I figured people in this forum would already have access to the components and wouldn’t run into placeholder issues.

Not sure yet if I’ll reach out to the developers directly, but since everyone here has Karamba, I thought this would be a good place to ask. Thanks again for your input! :blush:

A minority of people have Karamba. But as I said, I don’t think you’ll need to be coding for this. I am looking it through at the moment.

Ah, I see what you mean! I selected Karamba3D as the main tag because I thought the people active here would likely have the plug-in, but I get that it’s still a smaller group within the Grasshopper community.

That being said, thank you so much for taking the time to look through this! Grasshopper isn’t my strongest area, and I do struggle with it at times, so I really appreciate the help and guidance :blush:

So two things. Firstly, you can sort your Z values like this:

Aparently they are not all the same? Strangely, if I do not convert them to text, the Create Set component does not create a unique set.

Secondly, Plane Surface does not create planes, but surfaces:

You will be able to create the polyline rungs without scripting.

But I don’t know about these orientations. I’m guess you’re not talking about geometry orientation, but the orientation of forces of in the members? That would be the responsibility of how Karamba interprets the situation, so you need a Karmaba expert, not me.

It’s totally possible what you’re seeing is correct. I know expletive-all about structural engineering, but if those are normal forces those rungs are in compression/tension in comparison to the other rungs.

You’re right. I don’t know what I’m talking about. The Karamba tag means for people who have Karamba :sweat_smile:

Thanks so much for taking the time to help! I really appreciate it.

I’ve had a lot of trouble with the Create Set component—it just doesn’t work for me, and I have no idea why. It only works if I round the numbers to integers, but I need the exact point locations since these will be used as supports/joints in Karamba3D later on. Turning them into text is a really smart idea, but unfortunately, it still doesn’t fully solve the problem of differentiating values like 45 and 45.0.

As for the orientation issue, I suspect it’s a geometry problem, but Karamba could also be affecting it in some way—I’m really not sure. Is there a reliable way to analyze and flip the problematic curves automatically? I don’t want to do a manual flip because:

  1. It breaks parametricity, and I need the model to stay fully procedural.
  2. Some curves aren’t just flipped 180 degrees, so a simple flip wouldn’t work for all cases.

Honestly, this whole model and analysis process is driving me crazy at this point :sweat_smile: but I really appreciate the help!

Also, you mentioned that I can create the polylines (horizontal rings) without scripting—could you explain how? I actually tried doing it with circles, which worked fine, but when I needed them as polylines, I couldn’t figure out a clean way to do it.

Regarding the structural behavior, I don’t think what I’m seeing is correct. The deformation is behaving in a way that doesn’t make sense for the system—certain rings are oriented differently, but this shouldn’t be happening under normal force distribution.

If it were purely a matter of compression/tension differences, I would expect a more gradual, predictable shift rather than only a few specific rings being affected. This makes me think it’s more of a modeling issue rather than a real structural effect.

I’ll attach a deformation image to show what I mean—maybe that will help clarify why I think something is off. Would love to hear thoughts on whether this could be Karamba misinterpreting the local axes or if it’s something in my Grasshopper setup.

Really appreciate all the insight! :blush:

Sure. That’s very easy – if it IS a geometry problem. But I baked your geometry and all directions were fine.

Create a circle at the origin, radius size doesn’t matter. Then get the Flip Curve component from the Curves > Util Panel. Plug the circle into Flip Curve as a guide geometry, and the polyline rungs as the curves. Voila.

I thought about flip curve too but as I said:

Thank you though, I started to believe more that it is a Karamba issue, as you said, I baked them too and they seem fine on the model as well.

I don’t understand. Flip Curve flips curves automatically… and procedurally.

This is one way to get the horizontal rungs:


2 hyperboloid frame to compare v2 _ vr2.gh (54.8 KB)

Here I have baked the result, and manually flipped every second rung in Rhino:

Then I saved the geometry to a geometry container, used the first item as a guide, and flipped all the other rungs according to it:

Then rebaked and checked direction with _ShowDir. All rungs face the same way.

2 Likes

Thank you so much!! With these, I really don’t need the Python codes.

I guess the local axis thing is happening on Karamba side as flipping do not work as well. I hope someone from Karamba could give some insights on that.

Hi, with the orientate element component you can set the orientation of each element using an angle or a vector:

3.1.12: Orientate Element | Karamba3D v3

Hi Matthew,

I followed your suggestion, and it successfully resolved the local axis issue for the top and bottom rings. However, the structure is still deforming in an unusual way, as you can see in the attached image.

For testing purposes, I excluded the horizontal rings from the structural system, yet I still notice outward-facing local axes in the middle of the structure that I can’t seem to explain. I’ve tried several adjustments, but I haven’t been able to pinpoint the root cause.

I’m attaching the updated Grasshopper file, and I’d really appreciate any insights or suggestions on how to fix this issue.


2 hyperboloid frame to compare v3.gh (55.6 KB)

if you want it calculate as a diagrid, then you need to split all your curves at their intersections

No, I did it to see if the horizontal rings had a geometrical problem, but apparently it is about Karamba. I want it with the horizontal rings, but deformation is being still the same, somehow off. Could you help please?

@Merivski I did this for you, since I thought you might have some difficulty with it:


2 hyperboloid frame to compare v2 _ vr4.gh (56.7 KB)