Create Beams From CAD works only perpenticular geometry

Finally i managed to create script for creating beams from CAD to Revit by dynamo with the help of this wonderful community. I’m sharing the script and hope someone find and use it and save his/her time. I’d like to take this script one step further.The problem is;

Dynamo can’t create center lines of beam layers when theye are not perpenticular.

Mr. @jacob.small use to pointed out that BoundingBox method was the issue. But i couldn’t figure out how i create centerlines with another method.
I’m also sharing my files.


KİRİŞ.dyn (72.3 KB)
kat1-5.dwg (77.4 KB)
betonarme örnek.rvt (5.4 MB)
The packages i use
Packages for beams

Hi @arincakkin try element.location curve from genius loci, and if you are 2024 get.actuellocation

Hi @sovitek element.location curve instead of BoundingBox?

1 Like

arhh i think i misunderstood i talk about the revit beams location line

After you filter components of more than one you have sets of curves which are parallel to each other and within a given distance of each other. Surface.ByLoft should make a quick surface for each grouping.

Each of those surfaces has an isocurve at parameter 0.5 at the center line of the beam, and another Isocurve at parameter 0.5 where you’d take a cross section at the middle of the beam, matching the beam width.

The longer of those two is the beam centerline.

Hi @arincakkin try something here, could probably help in your case…


KİRİŞ.dyn (80.9 KB)

EDIT saw you already have a cad beam layer called BEAM-MID why not just use that instead…it will be much easier

BEAM MID-KİRİŞ.dyn (22.2 KB)

1 Like

I’m having errors at this step.

Where is the right place to use Surface.ByLoft ?

Put a watch node on the in output of the filter by bool mask so I can review what data types you have and their structure.

I hope i’ve done correct.

1 Like

Disable the preview for all of the geometry and pull out the first sublist. You have four curves there (and in many of the sublists) when you should only have pairs, and we need to see why.

Disable all the other geometry - we need to see the visual representation of the first sublist in the background preview and nothing else.

Disable all geometry preview (crtl + A to select all, right click on the background and select disable geometry preview).

Then go to the List.FilterByBoolMask node and wire the in output into a code block of a[0][0][0];

finally i did:)

1 Like

And there lies the problem. These beams aren’t properly pairing up. You’ll need to look at another method of finding the pairs in the previous step where you grouped by distance. Anything which builds atop that step and doesn’t correct the issue will be insufficient.

One thought: before you group by distance, try trimming the lines by the distance grouping.

Thank you for your time. Maybe @sovitek 's method can lead but i got errors with his way

Trining n length off the end of the beam and then extending the eventual center point will also work.

Unless you mean the ‘use the content on the beam centerline layer’, which… yes use that if you have it already.

yeah in my test it work, show an image with nodes expanded before the warnings/nulls…btw have you tried with the centerline layer.