Orientation rectangular such that Y to be in Vertical direction

As shown in attached image, it is needed that the Y dimension of rectangular geometry should always orient in vertical direction with domain A on top and Domain B on bottom sides. The extrusion to be along the line joining two points. Grasshopper script is also attached.
beam depth always orient downward.gh (13.5 KB)


rass

I can not find the question.

I don’t understand the question either? Added Extrude because I don’t see it?


extrude_2025May27a.gh (7.2 KB)

Rectangular shape is to be extruded along the line between given points. But the situation is, the dimension Y to be always along vertically normal to vector joining two given points.

@inno we need your translation skills here.

2 Likes

perhaps its easier to use orient not rotate?
useORIENT.gh (27.5 KB)

when you build a Rectangle using Plane + X/Y Domains, the direction of the X and Y axis of the Plane identify the direction your Rectangle is expanding

there are many Components that allow to rotate/align a Plane
Align Plane will align the X axis of a plane with a given vector
while Rotate Plane will rotate a plane around its own Z axis
if you want X Domain to always be vertical and pointing down (along -Z) you can Align Plane with a vector Z with “-1” amplitude

for instance:

The_Mentalist_Season_1_Pilot_Episode.gh (15.2 KB)

if you want Plane_X_axis to be horizontal, you might just want to Align Plane to Z and then Rotate Plane by Pi*0.5 (will rotate counterclockwise 90°: X was pointing upn and will point left after rotation, Y was pointing left and after rotation will point down along inverse_Z), like:

The_Mentalist_Season_1_Episode_2.gh (15.8 KB)

1 Like

This is getting very confusing. Maybe @Afroz_K wants this?


extrude_2025May27b.gh (15.7 KB)

Thank you, everyone, for your prompt help. My mind is still stuck on how to resolve this properly. I can adopt Solution 2 proposed by @inno , but when applied to multiple nodes, the script seems to rotate the planes in an unintended way.
Additionally, the solution proposed by @Joseph_Oster , involving cutting the extrusion, is quite interesting.

Please @inno , @Joseph_Oster and everyone, I would truly appreciate it if you could take another look. I’m eager for more assistance to achieve the desired outcome correctly.

Attaching the script and snapshots for additional assistance
Afroz_K_modified 2.gh (20.0 KB)


talking about the Align Plane + Rotate Plane variation (components from the top part of the last definition) what you get looks correct, easy to check from Top view, where you can’t see the long sides of the extrusion because they are perfectly perpendicular to the view:

the Planes look fine to me? their Y axis is always aligned “up” toward +Z

I have a feeling :slight_smile: that this whole thread is the first step of a solution that you have figured out to solve a bigger problem… if you are fine with that, try to state the bigger problem you are trying to solve, instead of focusing on the detail of the single planes: it might be that the big brain forum will offer you a completely different solution that just works fine as well :+1:

I still have no idea what this is about and have no interest in guessing.

This can’t be what you mean :interrobang:


sweep1_2025May28a.gh (10.8 KB)

Because nothing about your descriptions and images convey this. I regret this already. :man_facepalming:

When I use the Inno method, the extrusion ends are perpendicular to the vector, while the depth of the section remains correct (highlighted in green). I am trying to adjust the extrusion so that the ends align normally with the global vertical direction without affecting the cross sectional depth (highlighted in orange).

However, when I follow the Joseph_Oster method, the extrusion at the ends appears correct, but the actual depth of the shape is reduced below the required value. (highlited in red)

I am trying to do parametric modeling for a structure, as shown in the image below. To achieve this effectively, I need to ensure proper modeling.

I sincerely appreciate the valuable support and thoughtful suggestions provided. Thank you for your assistance!

Attaching screen grabs and grasshopper file.

@inno , @Joseph_Oster

Afroz_K_modified 2.gh (21.1 KB)

I’m not going to look again. You can supply multiple section curves (at least one at each end) or use Sweep2 which has a ‘H’ (Same Height) input.

From what I understand, it looks like a structural frame using timber, and we’re trying to cut the timber elements on the right planes on both ends, while at the same time orienting the pieces so that they connect seamlessly. I would suggest doing the structure manually at first, or at least a small portion of it, before going into a parametric approach, to get more insights on the parameters.