@sdmitch said:
By the way, e-(e-0.5) = 0.5.
Oh ya, I guess it would be e-0.5 so it would have to be pushpulled -(e-0.5)
I keep getting pushpull stuck in the head.
What I am looking for is on the last loop make b=0.5
Thanks
I have tried adding k into the mix mix with no success, now b is 0.5 on all the loops.
prompts = ["length", "Run","height","Rise","Total Rises"]
defaults = [36.0,10.0,1.0,7.75,7]
input = UI.inputbox prompts, defaults, "Tread."
a,b,c,d,e=input
k = 0 #<<--- start k=0
ent = Sketchup.active_model.entities
for i in 0..e-1
if k=e-1 then #<<<----if k=e-1
b = 0.5
end#<<<---
ent.add_line [0,(b+1)+i*b,0+i*d-1], [0,(1.5+i*b),0+i*d-1]
ent.add_line [0,1.5+i*b,0+i*d-1], [0,1.5+i*b,-d+(i*d)-1]
ent.add_line [0,1+i*b,0+i*d-1], [0,1+i*b,-d+(i*d)-1]
ent.add_line [0,1+i*b,-d+(i*d)-1], [0,1.5+i*b,-d+(i*d)-1]
edg = ent.add_line [0,1+i*b,-1+i*d],[0,0.5+i*b,-1+i*d];vrt1=edg.end#<-----
ent.add_arc [0,0.5+i*b,-c/2.0+(i*d)],[0,0,-1],[-1,0,0],c/2.0,0,180.degrees,20
edg = ent.add_line [0,0.5+i*b,0+i*d],[0,b+(i*b)+1,0+i*d];vrt2=edg.start#<----_
edg=ent.add_line [0,b+1+i*b,-c+i*d],[0,b+1+i*b,0+i*d]
edg.find_faces; face=edg.faces[0]
face.pushpull -a
edgs=vrt1.edges.reject!{|e| e.length<a};edgs[0].soft=true#<-----
edgs=vrt2.edges.reject!{|e| e.length<a};edgs[0].soft=true#<-----
#group1 = ent.add_group face.all_connected
k=k+1#<<---add 1 to k
end