Repeat lines

Good companions.
I would like to ask for help, I want to make a staircase, but I do not know how I can repeat these lines constantly one over the other as seen in the red lines, I appreciate if you can give me a guide on how to develop it, thanks.

Try this one.

2 Likes

I would recommend you model a full tread and riser, and then use a list of coordinate systems to transform that base geometry into place.

1 Like

hello,
Continuing your code block
here is a another possibility


code block :

p1=Point.ByCoordinates(0,0,0);
p2=Point.ByCoordinates(1,0,0);
v1=Autodesk.Vector.ByCoordinates(0,0,1);
t1=Autodesk.Geometry.Translate(p2,v1);
l1=Line.ByStartPointEndPoint(p1,p2);
l2=Line.ByStartPointEndPoint(p2,t1);
n;
dx=Autodesk.DesignScript.Geometry.Curve.Length(l1);
dy=Autodesk.DesignScript.Geometry.Curve.Length(l2);
Autodesk.Geometry.Translate(l1,(1..n)*dx,0,(1..n)*dy);
Autodesk.Geometry.Translate(l2,(1..n)*dx,0,(1..n)*dy);

cordially
christian.stan

3 Likes

Thank you very mush

steps

PolyCurve.ByPoints (List.Flatten (Point.ByCoordinates (List.Cycle ((0..#cnt..trd)<1>,2), 0, List.DropItems (List.Sublists (0..#cnt+1..rsr,0..1,1),-1)), -1));

4 Likes

What I’d meant about using coordinate systems:

2 Likes

thank you very much for answering, I would like to know how I could put points in all the vertices of my polycurve, this in order to join them and start generating my solids, thank you.

1 Like

image

Hello, your stair nosings are the indexes (odd: 1,3,5,…) of Mr. Vikram’s solution
(you do a List chop of 2, then last item with the right lacing)

if you want to draw the bench (even index: not necessarily all)

Cordially
christian.stan