Automated Centerline Extraction from Plan - Walls

Hi,

So I’m faced again with the monotonous task of reconstructing a pre-exisiting building based on just plans/sections (This time for use in bim). In order to build the model correctly, I’ll need centerlines and center points of all elements. I’ve looked through the forum and found conversations about medial axes, and roof centerlines, but nothing really that directly addresses the problem at hand. The problem I have is that the wall polylines (taken from dwg) represent walls of different thicknesses and orientations, never perfectly perpendicular. Is there a method I’m missing? I realize I can just go through and draw centerlines manually, but with a multiple levels and multiple buildings, I’m hoping for a more automated solution.

Best,

1 Like

hi @hawke

Try this solution for the walls.

What I’m doing: Extracting all the edges from a wall, ordering by size (the longest edge representes the
the wall axis) and then theres two options. First one: Extract the smallest edges and then connect with a polyline by the curve middle vertices of each one. Or, extract the axis edges and then tween each other. They return the same results.

To be honest, I don’t know if this is exactly what you want due to the lack of images and examples of what you want or even if will work. BUT, this is the first step.

Take care!

@kotto_97
Thank you for the reply! The walls I am hoping to address are a bit more complex, given that all of them are joined and keep varying in thickness. I have looked a bit further but it seems there is not a real viable solution. I think I am looking down the wrong route. Will rethink the entire process :smiley:

I just had a very quick look at this with a random form. Its not great, but maybe something like this could work; as long as the walls are rectilinear.

Next would be how to deal with the intersections.

WallCL.gh (16.5 KB)

2 Likes

Hi -
Have you seen this one?

-wim

Hi , may i know what software that u used for automation centre line from 2D plan ?


curve intermediate line.gh (10.2 KB)
curve intermediate line.3dm (318.6 KB)
Hi leonardo

could you please help me with this problem? I’m trying to create a centerline for this closed curve shape. I tried your method for small curves it’s working, for big curves, I’m facing issues. could you please check Leonardo da Vinci

One would think that something as simple as this should work - but it doesn’t:


tween_2023Nov23a.gh (8.1 KB)

So I added Rebuild Curve to match the higher number of control points, which seems to work most of the time - but still fails at times.


tween_2023Nov23b.gh (11.4 KB)

thank you so much, Joseph oster. Its working, but when i tried selecting multiple closed curves I’m facing issue , i treid sorting out its not working for me . could you please help me

Yeah, my bad. The curve input needs to be grafted and the flattened output of Lng needs to use PShift instead. See yellow group below:


tween_2023Nov24a.gh (12.2 KB)

However, it does not work in some cases so you need to look further into why TweenCrv fails?

@Sri_Hari @Joseph_Oster
This also seems to produce adequate results.


tween_2023Nov24b.gh (15.8 KB)

Much more than “adequate results”, that method looks superior to me. I had exactly the same idea, glad to see it implemented so well.

However, there are still problems trying to use circular surfaces (two edges, zero control points).

Thnak you toni Osterlund for answering my query

thank you Joseph Oster sir , for answering my queries

could you please help me with this problem

X1 & x2 indicates main whole pieces and it have sub pieces as shown in the image . im trying to label the sub pieces with a sequence of (AA), (BB), (CC) to again (AA), like a loop. to acheieve points for labeling i used tween curve and i trimed the tween curve at start and end of the curve , then i took the points of the both ends of tween curve , then i generated labeling , but im facing few difficulties , could you please take a look
LABELING DOUBT.3dm (842.0 KB)
labeling doubt.gh (38.9 KB)


these are work in progress files , please take a look

hello, I tried your method it’s working well, at some places, it is creating issues, like this


The center line got scaled automatically i don’t know what the issue is, could you please take a look
center line doubt.3dm (273.7 KB)
centerline doubt.gh (15.1 KB)

@Sri_Hari
Don’t know what you were trying to solve with your script, but this one gives you a clean and closed centerCrv with the surfaces you provided.

centerline doubt_a.gh (25.6 KB)

EDIT:
And here, if you want to split at the seams.


centerline doubt_b.gh (24.3 KB)