Get Beam Boundaries from CAD File

Hi guys,

I am trying to get beam boundaries as polygons using CAD file. Beam curves are open curves, there are only two curves and I haven’t been able to isolate their shapes. How can I extrude beams with their appropriate thickness/height using attached CAD File? Any help is welcomed.

Base for Beams.dwg (93.1 KB)

I really thought that once I’d get the graph of the beams (or something really close to that) then the solution would be kind-of obvious

but now that I got something similar to the graph of the beams, I’m realizing it’s not that obvious :slight_smile: (35.0 KB)
[beam curves are internalized]

still squeezing my mind on this… maybe it’s not the right starting point

thanks @inno taking your time to look into it. I though about a more geometric approach.

  • Get building outline and create a surface from it.
  • Subtract columns from surface.
  • Split remaining surface with Beam curves.
  • Filter surfaces by area(or some other method) to get beams only.
  • Extrude surface.

But I couldn’t achieve the first step. So I am stuck :pensive:

this might be one way of doing it, but there’s a majour drawback: it only recognizes beams that are composed by the very same amount of lines on each side

for instance, this beam A to B is composed by 1 line on one side, and by 3 lines on the opposite side:

this will not work properly :frowning:

but in most other cases it works, and was funny to do :slight_smile: (43.5 KB)

1 Like

Nice solution. It looks like the last few percent need to be done manually – which isn’t the end of the world.

Looks like the architect was inspired by Sid the Sloth.

1 Like

hi inno,

thanks for taking your time to look into it. when i try your script, I get the following result. Is that because you used some custom package that is not installed in my device or something else?

yes, I’m sorry, had forgot to flatten something before attaching the file
here is the “right-ish” one :slight_smile: (46.3 KB)

just a note, there is a double line here on A, and a polyline here on B that I have deleted from the original DWG (you can even just change their layers so they won’t be referenced) because they were causing some troubles:



1 Like

You can pair with their middle points, then blue indicates lines that need to be fixed manually. (44.0 KB)


this is beautiful :+1:

thanks @inno putting your time and effort to help me.

@ThomasE thanks for this efficient method :slight_smile: I have learned a lot just from this script.

Both of the scripts works fine.