Structural Tube (Diagrid) for Revit using Dynamo

I’m really really new to dynamo so I only have a rough Idea of how to do this.
I’m trying to create a diagrid similar to this picture (https://i.ytimg.com/vi/WjrrNCoB7yM/maxresdefault.jpg) in Dynamo.
It’s a simple diagrid that goes along a cylinder of uniform radius throughout its height.
This is the only workflow I can think of.
-Create circle
-Extract points, use slider to change number of points
-copy the circle a certain distance, rotate the points by 45 degrees
-create lists out of the coordinates of the points
-finally, use Adaptive component byPoints

I’ve been browsing through the nodes but I can’t find one that can extract points from a circle.

Thanks in advance.

This might help you get started …

Thanks for the replies. I’ve managed to create the lines for the diagrid however, I’m having problems with the creation of the adaptive components. (It probably has to do with the creation of my lists).

I realize this is a crude diagrid because the diagonal members are straight instead of curved along the cylinder. Any tips on this?

I’m off to sleep for now. Thanks in advance again.
Home.dyn (16.7 KB)

diagrid-ds.dyn (4.4 KB)

cir1=Circle.ByCenterPointRadius(Point.Origin(),r);
pnt1=cir1.PointsAtEqualSegmentLength(d);
pnt2=pnt1.Translate(Vector.ZAxis(),h);
pnt3=List.ShiftIndices(pnt2,{1,-1});
pnt4=Transpose({pnt1,pnt3[0]});
pnt5=Transpose({pnt1,pnt3[1]});
pnt6=List.Join({pnt4,pnt5});
lin1=Line.ByBestFitThroughPoints(pnt6);
adp=AdaptiveComponent.ByPoints(pnt6,a);
1 Like

diagrid.dyn (12.9 KB)

@Der_Jon

here’s a suggestion :

<a class=“attachment”


href=“//cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/2X/a/a71c2bd318e9c04ad29516a149ef1d71c5ecf1d7.dyn”>diagrid.dyn (15.2 KB)

I’m having some minor problems. I’m not really used to the way Dynamo works (I’m more comfortable with GH).
How do I copy the diagrid at specified heights? I was able to do it for the circles but for the lines, it gets messed up. I guess this could be done in Grasshopper using geometric primitives but Dynamo doesn’t have those yet right?

Hi,

Connect your Diagrid geometry to “Geometry.Translate” Geometry.

I tried that. It messed up the lines (copied each line at a different level). I think it has to do with the way the lines were created. (best fit).
Home.dyn (32.9 KB)

Change Lacing to “Cross Product”:

Thank you very much!
I guess I’m ok now.

You can also convert to polycurves using “Polycurve.ByJoinedCurves” before copying.

diagrid-ds-1.dyn (5.6 KB)

//Center Point: c
//Radius: r
//Number of Divisions: d
//Level Height: h
//Number of Levels: n
cir1=Circle.ByCenterPointRadius(c,r);
pnt1=cir1.PointsAtEqualSegmentLength(d);
pnt2=pnt1.Translate(Vector.ZAxis(),h);
pnt3=List.ShiftIndices(pnt2,{1,-1});
pnt4=Transpose({pnt1,pnt3[0]});
pnt5=Transpose({pnt1,pnt3[1]});
pnt6=List.Join({pnt4,pnt5});
lin1=Line.ByBestFitThroughPoints(pnt6);
cyl1=cir1.Extrude(Vector.ZAxis(),h);
dir1=Vector.ByTwoPoints(c,lin1.PointAtParameter(0.5));
lin2=RemoveIfNot(lin1.Project(cyl1,dir1)<1>,"Ellipse");
lin3=Flatten(lin2)<1>.Translate(Vector.ZAxis(),h..n*h..h);
1 Like