Extending a bunch of curves in a similar way to trim function in revit

Please let me pick you clever people’s brains!

I’m currently trying to make a graph that takes a CAD structural drawing and generates beams with the correct type.

So far I have got the graph to generate the correct lines for the beam locations from rectangles which can be used for the StructuralFraming.BeamByCurve node.

Now, as these original lines drawn in autocad are rectangles around columns, there is a space between the lines where the columns would be. Please see below image representing the condition. The left side is the curves I have in dynamo at the moment, and the right is what I would like it to be. Ideally the beams will be drawn from/to the top point of the columns in revit.

I am stumped on how to solve this, how can I extend the lines so that each line represents a beam, going from start point to end point and vice versa? I am having trouble figuring out how to define which lines have to extend to which point, and how to go about applying it across all lines.

The list of lines are currently generated by the Line.ByBestFitThroughPoints node.

I’m pretty new to Dynamo and programming in general, my experience is about a week of playing around with it.

Your help is greatly appreciated!

@sski try this solution. you have to offset the start and end points of your curve and create a new curve before converting it to structural framing.

CAD Link to Revit Structural Framing.dyn (22.5 KB)

2 Likes

Thanks for the solution @rexfrancojesse !
This works wonders for when all column sizes are the same, however the column sizes differ so for each line the amount of offset would be different.

I’m guessing I will have to write a program that takes each intersection point on a case-by-case basis, and uses those points to create a new grid of points?

Then these points will be used to create a grid of lines…

Perhaps I can offset the endpoints a specific amount so that the lines overlap, find intersections between non-parallel lines, and use those as points… Just thinking out loud (type)