⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jsgc2005.for

📁 此程序采用Fortern和AutoCAD中的脚本结合开发而成
💻 FOR
📖 第 1 页 / 共 3 页
字号:
44             continue
		   endif
             if(kx4(j).gt.kp(n-1)) then
               hx4(j)=h0(n)+(kx4(j)-k0(n))*p(n-1)
             endif
	hxx4(j)=hx4(j)*1.0
c------------6    左幅桥内缘P5设计高------------------------------
		   if(kx5(j).le.kp(n-1)) then
             do 45 i=2,n-1
                 a=kx5(j)-kp(i-1)
                 b=kx5(j)-kp(i)
                 if(a.ge.0.0.and.b.lt.0.0) then
                     a1=k0(i)-t(i)
                     a2=kp(i)
                     if(kx5(j).le.a1) then
                       hx5(j)=h0(i)+(kx5(j)-k0(i))*p(i-1)
                     endif
                     if(kx5(j).gt.a1) then
                         if(p(i).le.p(i-1)) then
                          if(kx5(j).eq.k0(i)) then
                            hx5(j)=h0(i)-e(i)
                          endif
                          if(kx5(j).lt.k0(i)) then
                            h1=(kx5(j)-a1)*(kx5(j)-a1)/(r(i)*2.0)
                            hx5(j)=h0(i)+(kx5(j)-k0(i))*p(i-1)-h1
                           endif
                          if(kx5(j).gt.k0(i)) then
                            h1=(a2-kx5(j))*(a2-kx5(j))/(r(i)*2.0)
                            hx5(j)=h0(i)+(kx5(j)-k0(i))*p(i)-h1
                          endif
                         endif
                         if(p(i).gt.p(i-1)) then
                          if(kx5(j).eq.k0(i)) then
                            hx5(j)=h0(i)+e(i)
                          endif
                          if(kx5(j).lt.k0(i)) then
                            h1=(kx5(j)-a1)*(kx5(j)-a1)/(r(i)*2.0)
                            hx5(j)=h0(i)+(kx5(j)-k0(i))*p(i-1)+h1
                           endif
                          if(kx5(j).gt.k0(i)) then
                            h1=(a2-kx5(j))*(a2-kx5(j))/(r(i)*2.0)
                            hx5(j)=h0(i)+(kx5(j)-k0(i))*p(i)+h1
                          endif
                         endif
                     endif
                 endif
45             continue
		   endif
             if(kx5(j).gt.kp(n-1)) then
               hx5(j)=h0(n)+(kx5(j)-k0(n))*p(n-1)
             endif
	hxx5(j)=hx5(j)+hp1(j)/100*(x1-x2)
	hcpz(j)=(hxx4(j)-hxx2(j))*100/((road/2-x1-x4)/cos(alfa(j)*pi/180))
c------------7    右幅桥内边缘P6设计高------------------------------
		   if(kx6(j).le.kp(n-1)) then
             do 46 i=2,n-1
                 a=kx6(j)-kp(i-1)
                 b=kx6(j)-kp(i)
                 if(a.ge.0.0.and.b.lt.0.0) then
                     a1=k0(i)-t(i)
                     a2=kp(i)
                     if(kx6(j).le.a1) then
                       hx6(j)=h0(i)+(kx6(j)-k0(i))*p(i-1)
                     endif
                     if(kx6(j).gt.a1) then
                         if(p(i).le.p(i-1)) then
                          if(kx6(j).eq.k0(i)) then
                            hx6(j)=h0(i)-e(i)
                          endif
                          if(kx6(j).lt.k0(i)) then
                            h1=(kx6(j)-a1)*(kx6(j)-a1)/(r(i)*2.0)
                            hx6(j)=h0(i)+(kx6(j)-k0(i))*p(i-1)-h1
                           endif
                          if(kx6(j).gt.k0(i)) then
                            h1=(a2-kx6(j))*(a2-kx6(j))/(r(i)*2.0)
                            hx6(j)=h0(i)+(kx6(j)-k0(i))*p(i)-h1
                          endif
                         endif
                         if(p(i).gt.p(i-1)) then
                          if(kx6(j).eq.k0(i)) then
                            hx6(j)=h0(i)+e(i)
                          endif
                          if(kx6(j).lt.k0(i)) then
                            h1=(kx6(j)-a1)*(kx6(j)-a1)/(r(i)*2.0)
                            hx6(j)=h0(i)+(kx6(j)-k0(i))*p(i-1)+h1
                           endif
                          if(kx6(j).gt.k0(i)) then
                            h1=(a2-kx6(j))*(a2-kx6(j))/(r(i)*2.0)
                            hx6(j)=h0(i)+(kx6(j)-k0(i))*p(i)+h1
                          endif
                         endif
                     endif
                 endif
46             continue
		   endif
             if(kx6(j).gt.kp(n-1)) then
               hx6(j)=h0(n)+(kx6(j)-k0(n))*p(n-1)
             endif
	hxx6(j)=hx6(j)+hp2(j)/100*(x1-x2)
c------------8   右幅桥内缘防撞墙处P7设计高------------------------------
		   if(kx7(j).le.kp(n-1)) then
             do 47 i=2,n-1
                 a=kx7(j)-kp(i-1)
                 b=kx7(j)-kp(i)
                 if(a.ge.0.0.and.b.lt.0.0) then
                     a1=k0(i)-t(i)
                     a2=kp(i)
                     if(kx7(j).le.a1) then
                       hx7(j)=h0(i)+(kx7(j)-k0(i))*p(i-1)
                     endif
                     if(kx7(j).gt.a1) then
                         if(p(i).le.p(i-1)) then
                          if(kx7(j).eq.k0(i)) then
                            hx7(j)=h0(i)-e(i)
                          endif
                          if(kx7(j).lt.k0(i)) then
                            h1=(kx7(j)-a1)*(kx7(j)-a1)/(r(i)*2.0)
                            hx7(j)=h0(i)+(kx7(j)-k0(i))*p(i-1)-h1
                           endif
                          if(kx7(j).gt.k0(i)) then
                            h1=(a2-kx7(j))*(a2-kx7(j))/(r(i)*2.0)
                            hx7(j)=h0(i)+(kx7(j)-k0(i))*p(i)-h1
                          endif
                         endif
                         if(p(i).gt.p(i-1)) then
                          if(kx7(j).eq.k0(i)) then
                            hx7(j)=h0(i)+e(i)
                          endif
                          if(kx7(j).lt.k0(i)) then
                            h1=(kx7(j)-a1)*(kx7(j)-a1)/(r(i)*2.0)
                            hx7(j)=h0(i)+(kx7(j)-k0(i))*p(i-1)+h1
                           endif
                          if(kx7(j).gt.k0(i)) then
                            h1=(a2-kx7(j))*(a2-kx7(j))/(r(i)*2.0)
                            hx7(j)=h0(i)+(kx7(j)-k0(i))*p(i)+h1
                          endif
                         endif
                     endif
                 endif
47             continue
		   endif
             if(kx7(j).gt.kp(n-1)) then
               hx7(j)=h0(n)+(kx7(j)-k0(n))*p(n-1)
             endif
	hxx7(j)=hx7(j)*1.0
c------------9    右幅桥单幅桥面中线处P8设计高------------------------------
		   if(kx8(j).le.kp(n-1)) then
             do 48 i=2,n-1
                 a=kx8(j)-kp(i-1)
                 b=kx8(j)-kp(i)
                 if(a.ge.0.0.and.b.lt.0.0) then
                     a1=k0(i)-t(i)
                     a2=kp(i)
                     if(kx8(j).le.a1) then
                       hx8(j)=h0(i)+(kx8(j)-k0(i))*p(i-1)
                     endif
                     if(kx8(j).gt.a1) then
                         if(p(i).le.p(i-1)) then
                          if(kx8(j).eq.k0(i)) then
                            hx8(j)=h0(i)-e(i)
                          endif
                          if(kx8(j).lt.k0(i)) then
                            h1=(kx8(j)-a1)*(kx8(j)-a1)/(r(i)*2.0)
                            hx8(j)=h0(i)+(kx8(j)-k0(i))*p(i-1)-h1
                           endif
                          if(kx8(j).gt.k0(i)) then
                            h1=(a2-kx8(j))*(a2-kx8(j))/(r(i)*2.0)
                            hx8(j)=h0(i)+(kx8(j)-k0(i))*p(i)-h1
                          endif
                         endif
                         if(p(i).gt.p(i-1)) then
                          if(kx8(j).eq.k0(i)) then
                            hx8(j)=h0(i)+e(i)
                          endif
                          if(kx8(j).lt.k0(i)) then
                            h1=(kx8(j)-a1)*(kx8(j)-a1)/(r(i)*2.0)
                            hx8(j)=h0(i)+(kx8(j)-k0(i))*p(i-1)+h1
                           endif
                          if(kx8(j).gt.k0(i)) then
                            h1=(a2-kx8(j))*(a2-kx8(j))/(r(i)*2.0)
                            hx8(j)=h0(i)+(kx8(j)-k0(i))*p(i)+h1
                          endif
                         endif
                     endif
                 endif
48             continue
		   endif
             if(kx8(j).gt.kp(n-1)) then
               hx8(j)=h0(n)+(kx8(j)-k0(n))*p(n-1)
             endif
	hxx8(j)=hx8(j)-hp2(j)/100*(x3-x1)
c------------10    左幅桥外边缘防撞墙处P9设计高------------------------------
		   if(kx9(j).le.kp(n-1)) then
             do 49 i=2,n-1
                 a=kx9(j)-kp(i-1)
                 b=kx9(j)-kp(i)
                 if(a.ge.0.0.and.b.lt.0.0) then
                     a1=k0(i)-t(i)
                     a2=kp(i)
                     if(kx9(j).le.a1) then
                       hx9(j)=h0(i)+(kx9(j)-k0(i))*p(i-1)
                     endif
                     if(kx9(j).gt.a1) then
                         if(p(i).le.p(i-1)) then
                          if(kx9(j).eq.k0(i)) then
                            hx9(j)=h0(i)-e(i)
                          endif
                          if(kx9(j).lt.k0(i)) then
                            h1=(kx9(j)-a1)*(kx9(j)-a1)/(r(i)*2.0)
                            hx9(j)=h0(i)+(kx9(j)-k0(i))*p(i-1)-h1
                           endif
                          if(kx9(j).gt.k0(i)) then
                            h1=(a2-kx9(j))*(a2-kx9(j))/(r(i)*2.0)
                            hx9(j)=h0(i)+(kx9(j)-k0(i))*p(i)-h1
                          endif
                         endif
                         if(p(i).gt.p(i-1)) then
                          if(kx9(j).eq.k0(i)) then
                            hx9(j)=h0(i)+e(i)
                          endif
                          if(kx9(j).lt.k0(i)) then
                            h1=(kx9(j)-a1)*(kx9(j)-a1)/(r(i)*2.0)
                            hx9(j)=h0(i)+(kx9(j)-k0(i))*p(i-1)+h1
                           endif
                          if(kx9(j).gt.k0(i)) then
                            h1=(a2-kx9(j))*(a2-kx9(j))/(r(i)*2.0)
                            hx9(j)=h0(i)+(kx9(j)-k0(i))*p(i)+h1
                          endif
                         endif
                     endif
                 endif
49             continue
		   endif
             if(kx9(j).gt.kp(n-1)) then
               hx9(j)=h0(n)+(kx9(j)-k0(n))*p(n-1)
             endif
	hxx9(j)=hx9(j)-hp2(j)/100*(road/2-x1-x4)
c------------11    左幅桥外边缘P10设计高------------------------------
		   if(kx10(j).le.kp(n-1)) then
             do 50 i=2,n-1
                 a=kx10(j)-kp(i-1)
                 b=kx10(j)-kp(i)
                 if(a.ge.0.0.and.b.lt.0.0) then
                     a1=k0(i)-t(i)
                     a2=kp(i)
                     if(kx10(j).le.a1) then
                       hx10(j)=h0(i)+(kx10(j)-k0(i))*p(i-1)
                     endif
                     if(kx10(j).gt.a1) then
                         if(p(i).le.p(i-1)) then
                          if(kx10(j).eq.k0(i)) then
                            hx10(j)=h0(i)-e(i)
                          endif
                          if(kx10(j).lt.k0(i)) then
                            h1=(kx10(j)-a1)*(kx10(j)-a1)/(r(i)*2.0)
                            hx10(j)=h0(i)+(kx10(j)-k0(i))*p(i-1)-h1
                           endif
                          if(kx10(j).gt.k0(i)) then
                            h1=(a2-kx10(j))*(a2-kx10(j))/(r(i)*2.0)
                            hx10(j)=h0(i)+(kx10(j)-k0(i))*p(i)-h1
                          endif
                         endif
                         if(p(i).gt.p(i-1)) then
                          if(kx10(j).eq.k0(i)) then
                            hx10(j)=h0(i)+e(i)
                          endif
                          if(kx10(j).lt.k0(i)) then
                            h1=(kx10(j)-a1)*(kx10(j)-a1)/(r(i)*2.0)
                            hx10(j)=h0(i)+(kx10(j)-k0(i))*p(i-1)+h1
                           endif
                          if(kx10(j).gt.k0(i)) then
                            h1=(a2-kx10(j))*(a2-kx10(j))/(r(i)*2.0)
                            hx10(j)=h0(i)+(kx10(j)-k0(i))*p(i)+h1
                          endif
                         endif
                     endif
                 endif
50             continue
		   endif
             if(kx10(j).gt.kp(n-1)) then
               hx10(j)=h0(n)+(kx10(j)-k0(n))*p(n-1)
             endif
	hxx10(j)=hx10(j)-hp2(j)/100*(road/2-x1)
	hcpy(j)=(hxx7(j)-hxx9(j))*100/((road/2-x1-x4)/cos(alfa(j)*pi/180))
c------------计算地面高----------------------------------------------------
	       do 55 i=2,nn
             if(kx(j).ge.kd(i-1).and.kx(j).lt.kd(i)) then
	    hdd(j)=hd(i-1)+(kx(j)-kd(i-1))*(hd(i)-hd(i-1))/(kd(i)-kd(i-1))
	       endif
55	     continue
	       ik=int(kx(j)/1000.0)
	       ks=kx(j)-ik*1000
c------------输出设计高----------------------------------------------------
	write(3,*)'地面高  设计高程  桩 号   序 号    完整桩号  
     $左幅横坡 右幅横坡'
      write(3,100)hdd(j),hx(j),ks,j,kx(j),hp1(j),hp2(j)
      write(*,100)hdd(j),hx(j),ks,j,kx(j),hp1(j),hp2(j)
	write(3,*)'左幅    合成坡度 设计高1  设计高2  设计高3   设计高4 
     $ 设计高5'
	write(3,700)hcpz(j),hxx1(j),hxx2(j),hxx3(j),hxx4(j),hxx5(j)
	write(*,700)hcpz(j),hxx1(j),hxx2(j),hxx3(j),hxx4(j),hxx5(j)
      write(3,*)'右幅    合成坡度 设计高1  设计高2  设计高3   设计高4 
     $ 设计高5'
      write(3,701)hcpy(j),hxx10(j),hxx9(j),hxx8(j),hxx7(j),hxx6(j)
      write(*,701)hcpy(j),hxx10(j),hxx9(j),hxx8(j),hxx7(j),hxx6(j)
	write(3,*)
      write(3,*)
		   kx(j)=kx(j)*1.0
             hx(j)=hx(j)*1.0
             write(4,200)kx(j),hx(j)

c------------输出设计高CAD图纸SCR文件--------------------------------------
c------------输出地面高、设计高和桩号--------------------------------------
	write(10,*)'textstyle'
	write(10,*)'hz'
      write(10,*)'color'
	write(10,*)'7'
	write(10,*)'text'
	if(itkds.eq.1) xzh=kx(j)-1.5
	write(10,*)'j'
	write(10,*)'m'
	if(itkds.eq.1) write(10,*)xzh,',-976.2'
	if(itkds.eq.1) write(10,*)'2'
	write(10,*)'90'

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -