!


!opening lines WINDOW
!3D Script
!Graphisoft
!PB
!1997


addx a
mulx -1


!*********************** parameters  ******
!
!  a - width
!
!  b - height
!
!  c - frame thickness
!
!  d - 1-side hung, 2-top hung
!
!*****************************************************



v1=0.08     !*** 1 dash length
v2=0.05     !*** 1 space length

aa=a
bb=b



!************************************************************

10:     

if d=2 then
      aa=b
    bb=a
    rotz -90
    addx -aa
endif


!*************************** dashed lines


fvh= sqr( aa^2+(bb/2)^2 )
sz=atn((bb/2)/aa)

vhk= ( fra( fvh / (v1+v2) ) * (v1+v2) - v2 ) / 2
xi= int( fvh / (v1+v2) )

if vhk<=0 then
    vh1= ( fra( (fvh-v2) / (v1+v2) ) * (v1+v2) ) / 2
    xi=xi-1
else
    vh1=vhk
endif

v1x=v1*cos(sz)
v1y=v1*sin(sz)
v2x=v2*cos(sz)
v2y=v2*sin(sz)
vh1x=vh1*cos(sz)
vh1y=vh1*sin(sz)


for kii=1 to 2


    addy bb/2

    for jj= 1 to 2 step 1
        lin_ 0,0,0,vh1x,vh1y,0
        add vh1x,vh1y,0

        for i=1 to xi step 1
            lin_ v2x,v2y,0,v2x+v1x,v2y+v1y,0
            add v2x+v1x,v2y+v1y,0
        next i
        lin_ v2x,v2y,0,v2x+vh1x,v2y+vh1y,0
        del xi+1
        muly -1
    next jj

    del 3

    addz c


next kii



20:

