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)
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.
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
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:
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:
I have a feeling 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
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!
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.