Hi All. I have a roof which needs a framing layout. I’ve 6 curves that define the perimeter and 3 which define peaks in the roof. It’s a little complex as each truss changes slightly to create curves but each truss is straight and simple. so I want to generate point on all these curves for each truss. I was going the way of chord length to get the separation of each truss and relying on modeling the curves accurately to line up but this seems a little fragile.

Should I be creating planes or intersecting elements to generate the points along the curves. Create the lines between the points for the framing system. At the momne tin the attached image I have the lines going diagonally but there needs to be a few more points added to the list from the perimeter line which I though I’d just add by amending the list. (line lines are diagonal and incorrect in the image but this isn’t the problem I have a problem with) Please see where i’ve got so far.

Advice greatly appreciated.

Roof script.dyn (87.5 KB)

@Wildtypitch not sure if I understand correctly your end goal, is it that you want a vertical array of trusses that vary in height between start and end extremities, meaning you will end up with 4 trusses at each vertical line (the yellow highlight)? if yes, plane at parameter at your longest line (I guess the highest one in the middle) with geometry intersect, will get you these points, then line by start end points will result in the lines you want.

If not, please provide more screenshots so someone can assist you.

Yes that sounds about right. I’ve attached pictures of a rhino modelled version of what we are trying to achieve. Each truss is composed of 4 members which vary along the roof.

So I can generate a plane at each 500mm for each truss along the main roof line (I’m not sure how to create a plane in one axis along a curve though, perhaps it’ll be simpler if i just create a reference curve which is straight and use PlaneAtSegmentLength)

Then geometry intersect plane and lines to give me the points in a list which I can then join up with lines then frame. Sounds simple. but I’m a bit lost how to run Geometry.Intersect on all those planes and the 9 curves that define the roof.

@Wildtypitch just make sure `Geometry.Intersect`

Lacing is set to Cross Product, you might need to group your curves, try to share your script, and where you are facing problems:

Thanks @Elie.Trad

I’ve tried your solution but I’m not getting quite the outcome I’d expected. Not sure what you code block is doing but i guess it’s defining where on the curve to place the plane. I’ve made that apply to a straight curve so they’re uniform distance and aligned (based off the straight curve normal). but the points created don’t seem to be uniform and theres not many of them (They’re in the list but not visible in revit)

Roof script.dyn (107.2 KB)

@Wildtypitch the code block is to create a sequence of numbers to place the planes at, these are supposed to be the location of the trusses, but I see your curve is arc based, the planes will not be parallel to each other, in that case either extract the start/ end points X and Y coordinates to reproduce a straight line with parallel planes or use a `Curve.PullOntoPlane`

on a XY Plane to get that line… hope it helps.

That’s really great @Elie.Trad. I’m very excited, first time I’ve used Dynamo to generate geometry.

I have all my lines and perfectly placed points on them at the planes. And nice ordered list separated with the points grouped by the plane they are on. Now I just need to create lines between those points. I’m looking at ways of performing operations on a list but I’m not sure. I want to perform an operation on all the items within each level. So for each level 1 indices perform operation on [0] and [1]. [1] and [2] and so on. oh and perhaps ignore the first and last indices because it’s three points with the same coordinates (maybe it’s fine if I leave it).

Feels like something that should be done with script.

I’ve managed to perform the line joining in a very simple way on one plane. No doubt there’s an obvious way to do this much more efficiently

Roof script.dyn (80.9 KB)