📄 dxfortranstd.f90
字号:
!
Subroutine dfBeginPline &
(FileNum, &
Layer, &
Color)
! Description:
! Begin a polyline in the file <FileNum>, in the layer <Layer> with
! the color <Color>.
!
! Method:
! No comment...
!
! Current Code Owner:
! Carlos Otero & Davide Santos
! (Department of Civil Engineering of the University of Algarve - Portugal)
! www.ualg.pt/est/adec/csc/dxfortran
!
! History:
! Version Date Comment
! ------- ---- -------
! 0.1 00.11 Carlos Otero & Davide Santos
!
! Code Description:
! Language: Fortran 90.
! Software Standards: "European Standards for Writing and
! Documenting Exchangeable Fortran 90 Code".
Implicit None
! Include statements:
! Declarations must be of the form:
!
! Subroutine arguments
! Scalar arguments with intent(in):
Integer, Intent (in) :: FileNum !+ File number
Character , Intent (in) :: &
Layer*(*), & !+ Line's layer
Color*(*) !+ Line's Color
!- End of header ---------------------------------------------------------------
write (FileNum,fmt='(A)') " 0" !+ Begin of polyline
write (FileNum,fmt='(A)') "POLYLINE" !
write (FileNum,fmt='(A)') " 8" !+ Layer Code
write (FileNum,fmt='(A)') trim(Layer) !+ Layer's name
if (Color=="bylayer" .or. Color=="Bylayer" .or. Color=="BYLAYER") then
else
write (FileNum,fmt='(A)') " 62" !+ Color code
write (FileNum,fmt='(A)') trim(Color) !
end if
write (FileNum,fmt='(A)') " 66" !
write (FileNum,fmt='(A)') " 1" !
write (FileNum,fmt='(A)') " 0" !
return
end subroutine dfBeginPline
!
!+ End of a polyline
!
Subroutine dfEndPline &
(FileNum, &
Layer, &
Color)
! Description:
! End of a polyline in the file <FileNum> in the layer <Layer> with the
! color <Color>.
!
! Method:
! No comment...
!
! Current Code Owner:
! Carlos Otero & Davide Santos
! (Department of Civil Engineering of the University of Algarve - Portugal)
! www.ualg.pt/est/adec/csc/dxfortran
!
! History:
! Version Date Comment
! ------- ---- -------
! 0.1 00.11 Carlos Otero & Davide Santos (University of Algarve - Portugal)
!
! Code Description:
! Language: Fortran 90.
! Software Standards: "European Standards for Writing and
! Documenting Exchangeable Fortran 90 Code".
!
Implicit None
! Include statements:
! Declarations must be of the form:
! Subroutine arguments
! Scalar arguments with intent(in):
Integer ,Intent (in) :: FileNum !+ File number
Character , Intent(in) :: &
Layer*(*), & !+ Polyline's layer
Color*(*) !+ Polyline's color
!- End of header ---------------------------------------------------------------
write (FileNum,fmt='(A)') "SEQEND" !
write (FileNum,fmt='(A)') " 8" !+ Layer's code
write (FileNum,fmt='(A)') trim(Layer) !+ Layer's name
if (Color=="bylayer" .or. Color=="Bylayer" .or. Color=="BYLAYER") then
else
write (FileNum,fmt='(A)') " 62" !+ Color code
write (FileNum,fmt='(A)') TRIM(Color) !
end if
return
end subroutine dfEndPline
!
!+ Definition of the polyline vertex.
!
subroutine dfPlVertex &
(FileNum, &
Layer, &
Color, &
X, &
Y, &
Z)
! Description:
! Vertex of the polyline in the file <FileNum> in the layer <Layer>,
! with the color <Color> and coordenates (X,Y,Z).
!
! Method:
! No comment...
!
! Current Code Owner:
! Carlos Otero & Davide Santos
! (Department of Civil Engineering of the University of Algarve - Portugal)
! www.ualg.pt/est/adec/csc/dxfortran
!
! History:
! Version Date Comment
! ------- ---- -------
! 0.1 00.11 Carlos Otero & Davide Santos
!
! Code Description:
! Language: Fortran 90.
! Software Standards: "European Standards for Writing and
! Documenting Exchangeable Fortran 90 Code".
!
Implicit None
! Include statements:
! Declarations must be of the form:
!
! Subroutine arguments
! Scalar arguments with intent(in):
real, intent (in) :: X, & !+ coordenate XX of the polyline's vertex
Y, & !+ coordenate YY of the polyline's vertex
Z !+ coordenate ZZ of the polyline's vertex
integer, Intent (in) :: FileNum !+ File's number
Character , Intent (in) :: & !+ File's number
Layer*(*),& !+ Layer's name
Color*(*) !+ Color's number
!- End of header ---------------------------------------------------------------
write (FileNum,fmt='(A)') "VERTEX" !
write (FileNum,fmt='(A)') " 8" !+ Layer's code
write (FileNum,fmt='(A)') trim(Layer)!+ Layer's name
if (Color=="bylayer" .or. Color=="Bylayer" .or. Color=="BYLAYER") then
else
write (FileNum,fmt='(A)') " 62" !+ Color code
write (FileNum,fmt='(A)') TRIM(Color) !
end if
write (FileNum,fmt='(A)') " 10" !+ Code of the coordenate X of the polyline vertex
write (FileNum,fmt= *) X !+ Coordenate X of the vertex
write (FileNum,fmt='(A)') " 20" !+ Code of the coordenate Y of the polyline vertex
write (FileNum,fmt= *) Y !+ Coordenate Y of the vertex
write (FileNum,fmt='(A)') " 30" !+ Code of the coordenate Z of the polyline vertex
write (FileNum,fmt= *) Z !+ Coordenate Z of the vertex
write (FileNum,fmt='(A)') " 0" !
return
end subroutine dfPlVertex
!
!+ Write text to file.
!
Subroutine dfText &
(FileNum, &
Layer, &
Color, &
X, &
Y, &
Z, &
Text, &
Height, &
Factor, &
Angle, &
Alignh, &
Alignv, &
Style)
! Description:
! Write text to the file <FileNum>, color <Color> and with the
! coordenates (X,Y). The message is stored in the variable <Text>,
! with de height <Height>, angle <Angle> and horizontal aligned with <Alignh),
! and vertical aligned with <alignv>:
! - Align left : <Alignh> = 0 - Align none : <Alignv> = 0
! - Align center : <Alignh> = 1 - Align bottom : <Alignv> = 1
! - Align right : <Alignh> = 2 - Align middle : <Alignv> = 2
! - Align top : <Alignv> = 3
!
!
! Method:
! No comment...
!
! Current Code Owner:
! Carlos Otero & Davide Santos
! (Department of Civil Engineering of the University of Algarve - Portugal)
!
! History:
! Version Date Comment
! ------- ---- -------
! 0.1 00.11 Carlos Otero & Davide Santos
! 0.2 02.04 David Pereira
!
!
!
! V 0.2: inserts the vertical alignment options for the text position.
!
! Code Description:
! Language: Fortran 90.
! Software Standards: "European Standards for Writing and
! Documenting Exchangeable Fortran 90 Code".
Implicit None
! Include statements:
! Declarations must be of the form:
! Subroutine arguments
! Scalar arguments with intent(in):
Real, Intent (in) :: &
X, & !+ Coordenate X of the text.
Y, & !+ Coordenate Y of the text.
Z, & !+ Coordenate Z of the text.
Height, & !+ Height of the text.
Factor, & !+ Factor of the text.
Angle !+ Angle of the text.
Integer ,Intent (in) :: &
Alignh, & !+ Text horizontal alignment.
Alignv, & !+ Text vertical alignment.
FileNum !+ File's number.
Character , Intent (in) :: &
Layer*(*), & !+ Layer of the text.
Color*(*), & !+ Color of the text.
Text*(*), & !+ Text.
Style*(*) !+ Text style
!- End of header ---------------------------------------------------------------
write (FileNum,fmt='(A)') " 0"
write (FileNum,fmt='(A)') "TEXT"
write (FileNum,fmt='(A)') " 8"
write (FileNum,fmt='(A)') trim(Layer)
if (Color=="bylayer" .or. Color=="Bylayer" .or. Color=="BYLAYER") then
else
write (FileNum,fmt='(A)') " 62" !+ Color code
write (FileNum,fmt=* ) TRIM(Color) !
end if
write (FileNum,fmt='(A)') " 10" !+ X code coordenate of the text.
write (FileNum,*) X !+ X coordenate.
write (FileNum,fmt='(A)') " 20" !+ Y code coordenate of the text.
write (FileNum,*) Y !+ Y coordenate.
write (FileNum,fmt='(A)') " 30" !+ Z code coordenate of the text.
write (FileNum,*) Z !+ Z coordenate.
write (FileNum,fmt='(A)') " 40"
write (FileNum,*) Height
write (FileNum,fmt='(A)') " 41"
write (FileNum,*) Factor !+ Scale Factor
write (FileNum,fmt='(A)') " 1"
write (FileNum,*) TRIM(text)
write (FileNum,fmt='(A)') " 50"
write (FileNum,*) Angle
write (FileNum,fmt='(A)') " 7"
write (FileNum,fmt='(A)') TRIM(style)
write (FileNum,fmt='(A)') " 72"
write (FileNum,fmt='(I1)') alignh
write (FileNum,fmt='(A)') " 11"
write (FileNum,*) X
write (FileNum,fmt='(A)') " 21"
write (FileNum,*) Y !+ Height / 2.0 (Removed in version 0.2)
write (FileNum,fmt='(A)') " 73"
write (FileNum,fmt='(I1)') alignv
return
End Subroutine dfText
!
!+ Draw a 3dfACE in DXF format.
!
Subroutine df3DFace &
(FileNum, &
Layer, &
Ltype, &
Color, &
X1, &
Y1, &
Z1, &
X2, &
Y2, &
Z2, &
X3, &
Y3, &
Z3, &
X4, &
Y4, &
Z4)
!
! Description:
!
! Draw a 3DFace in the in the file <FileNum> in the layer <Layer>
! and in the color <Color> with coordenates
!
! Node 1 - (X1, Y1, Z1) 1------2
! Node 2 - (X2, Y2, Z2) | |
! Node 3 - (X3, Y3, Z3) | |
! Node 4 - (X4, Y4, Z4) 4------3
!
!
! Method:
! No comment...
!
! Current Code Owner:
! Carlos Otero & Davide Santos
! (Department of Civil Engineering of the University of Algarve - Portugal)
! www.ualg.pt/est/adec/csc/dxfortran
!
! History:
! Version Date Comment
! ------- ----- -------
! 01.06 Carlos Otero & Davide Santos
!
!
! Code Description:
! Language: Fortran 90.
! Software Standards: "European Standards for Writing and
! Documenting Exchangeable Fortran 90 Code".
!
Implicit None
! Include statements:
! Declarations must be of the form:
! Subroutine arguments
! Scalar arguments with intent(in):
Real,Intent (in) :: &
X1, & !+ Coordenate XX - node 1
Y1, & !+ Coordenate YY
Z1, & !+ Coordenate ZZ
X2, & !+ Coordenate XX - node 2
Y2, & !+ Coordenate YY
Z2, & !+ Coordenate ZZ
X3, & !+ Coordenate XX - node 3
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -