Draw walls by inputting coordinates and thickness

Hi, i am currently struggling in how to draw wall (rectangles) along lines
i have a excel input the coordinates of start and end points of the wall, and the thickness
image
however, it wont work if the wall is not in vertical or horizontal (because i am using rectangle 2Pt function)
and the rotating corner is not in correct shape.

My code is as follow


If its possible, the best outcome is inputting the coordinates and thickness, the code can draw the walls and turning corner like ETABS software

Thank you.

Hi @Sam_Loo ,

Take a look at the definition in the Grasshopper Player 2nd example:

Video:

https://www.rhino3d.com/features/grasshopper/player/Wall.gh

By referencing the example script to take your X,Y coordinates instead it will essentially get you where you need to be by modifying your script slightly.

Please upload your Grasshopper file with any inputs as “internalised data” if you would like more help.

There are lots of other ways to achieve this functionality though but I think the above example is close to what you are looking for as a starting point.

But the basic logic you need is in the following gh script I’m attaching. If you want variable wall thickness or the ability to change it after it’s built that’s more logic involved. This should get you started though.

Graph Space:

Model Space:

Let me know if you get stuck and I can help out.

Cheers!

20230820_Wall_From_Line_Response_01a.gh (9.7 KB)

1 Like

Reading your post again I noticed you have variable wall widths.

I setup a script to account for this with sweep2 and it got a bit buggy sometimes so I ended up creating this script instead which variably offsets a polyline per your excel input wall widths and then creates a solid with optional mitered corners.

You’ll need to connect your excel input in but the rest should work

Graph Space:

Graph Space (Cont.):

Graph Space (Cont.):

Model Space:

20230820_Wall_From_Line_Response_01b.gh (22.9 KB)

Hope it helps,

Cheers!

3 Likes

Thank you so much
It’s exactly what i need.
Cheers!

1 Like

You’re welcome!