Weird offset result only in some pieces of my definition

I am trying to offset a set of curves extracted as contours of a brep. As you can see in the photo, most of the ribs created by the extrussion work well but some of them are doing strange things.
I grafted contours and doesn’t seem to work. Also, if I change the height of the pavillion, wich is parametric too, the ribs that have problems will change. The next photo shows well the problem. I don’t know why that happens and I’m really new to rhino.

Here i changed the parameters of the top curve (a bit extreme) and it doesn’t happen anymore.

And here with other parameters for height of the top curve:

I will upload the GH definition and the 3dm file. Sorry if the definition is messy but that’s the best I can do for now with my knowledge of grasshopper.

Thank you so much! :slight_smile:

Offset Problem.3dm (7.6 MB)

Modelo creado (22.1 KB)

I rewrote the definition beneath your definition. I used more ruled surfaces that lofts, as I feel they give better performance when you simply want to create a surface between two sets of curves.

My process was to generate the contours, then copy these in x and y by the rib width, then ruled surface between these lines to create the top rib surface. Then offset the top surface downwards to create the lower surface, then grab the surface edges of top and bottom and ruled surface between these to create the sides.

IMO the best approach is to generate rib centrelines instead and then sweep the rectangular profile along that curve, however I wanted to recreate your method to help solve the problem.

Modelo creado (37.9 KB)

1 Like

And again but sweeping the rail curve instead - much simpler/cleaner:

Modelo creado (41.5 KB)


Thank you so much!
The first definition works perfectly…
The second one gives me some problems when I change the height of the points (again). I will try to solve the problem by myself.

Also, could you explain me this process? Those are all new commands to me, and I would really like to understand everything new I learn. (This has no real purpose further than learning)

Thank you so much again, you really helped me!

1 Like

Made another version which should correct the variable offset. The tricky part is being thorough with your planes. The section of the script you pulled out above titled flip normal is to do just that - ensure all the plane normals are facing the same direction.

Modelo creado (39.6 KB)

1 Like

Oh, okay, so by evaluating the surface you get the normals and you chek if ot’s going “up or down”, but then I don’t know how can it be a pattern for the dispatch command.

I understand a lot better how you got the “sweep curve” option which works perfectly now.

Thank you very much for your help. Sorry for my ignorance but I’m just a newbie so everything is new for me.

Exactly. For dispatch, you just have to find a way to use the pattern you know exists and convert this into a true/false paradigm. In this instance, ‘up’ normals have a positive Z value, whereas ‘down’ normals have a negative Z value. All i did was feed this into a smaller than component and check whether Z component was smaller than 0 (ie downwards). That gives a true/false pattern which can then be fed into dispatch. Flip one of the dispatch outputs, then merge back together, and now all of your normals point in the same direction.