home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / TURBOD.ZIP / TURBODXF.TXT < prev   
Encoding:
Text File  |  1990-06-15  |  4.1 KB  |  120 lines

  1.                         TurboDXF Version 1.0
  2.  
  3. TurboDXF is a Turbo Pascal unit that allows you to create DXF files compatible
  4. with AutoCAD (through release 10), PC Intergraph, MicroGrafx Designer,
  5. CorelDraw and any other package capable of importing a DXF file.
  6.  
  7.  *    Precompiled units for both TP 5.0 and 5.5 are included.
  8.  
  9.  *    This demo unit is limited to the creation of one drawing layer. Upon
  10.       registration you will receive the source code to create as many layers as
  11.       you want.
  12.  
  13. [PB]
  14.  
  15. Registration Form       TurboDXF Version 1.0
  16.  
  17. Company:_____________________________________
  18.  
  19. Name:_________________________________________
  20.  
  21. Address:______________________________________
  22.  
  23. City:_________________________________________
  24.  
  25. State:________________________________________
  26.  
  27. Country:______________________________________
  28.  
  29. Registration fees - all users   $25.00 (U.S.)
  30. $30.00 (Can.)
  31.  
  32. Mail registration forms and checks to :
  33.  
  34. David Dorosh
  35. Suite 105 - 1280 Fir Street
  36. White Rock, B.C.
  37. Canada
  38. V4B 1B4
  39.  
  40. Thank you, and enjoy !
  41.  
  42. [PB]
  43.  
  44. AutoCAD is a registered trademark of Autodesk Corp. Turbo Pascal is a
  45. registered trademark of Borland International Inc.
  46.  
  47. This unit consists of six procedures.
  48.  
  49. OpenDXF            This routine creates one layer, LAYER1. LAYER1 is a black
  50.                    continuous line. Upon registration you will receive the
  51.                    source code so you can create any number of layers. Supply a
  52.                    file name to open. CloseDXF will close it.
  53.  
  54. CloseDXF           This routine adds some footer info to the DXF file and
  55.                    CLOSEs it.
  56.  
  57. AddTextToDXF       This routine places a text string at x,y,z of height HEIGHT
  58.                    and rotation ROTATE on layer LAYER. Note LAYER is 'LAYER1'
  59.                    in this demo unit.
  60.  
  61. AddLineToDXF       This routine draws a line from x1,y1,z1 to x2,y2,z2 on layer
  62.                    LAYER.  Note LAYER is 'LAYER1' in this demo unit.
  63.  
  64. Add3DFaceToDXF     This routine draws a flat face in 3D. Supply 4 points and
  65.                    the layer (LAYER1).
  66.  
  67. AddCircleToDXF     This routine draws a circle at x,y,z of radius RADIUS and
  68.                    extrusion EXTRUSION. When the extrusion is 0 you get a
  69.                    circle, when it is non-zero you get a cylinder. Again,
  70.                    supply the layer name.
  71.  
  72. Other              Two variables are defined in the units. DECIMALS specifies
  73.                    the decimals for all ordinate entries (X,Y,Z) as well as
  74.                    rotations, extrusions etc. It is currently set at 2. eg
  75.                    (X,Y,Z) could be (118.29,123.45,324.87). Upon registration
  76.                    you will receive the source code so you can change this to
  77.                    suit your application. A larger number means larger DXF
  78.                    files etc.
  79.  
  80.                    The other variable is DXFILE : TEXT. You shouldn't need to
  81.                    change this.
  82.  
  83.  *    See the demo files DXFDEMO1,2,3 for examples.
  84.  
  85.  *    Load the demo file WATMOD.DXF into AutoCAD 10 to see what can be done.
  86.       This file was created from an engineering modeling program output file. A
  87.       TP program to parse the model output (ASCII) file and create the DXF file
  88.       was written. The drawing was created by the TP program in 5 seconds!. Be
  89.       sure to view it in 3D after loading. (VPOINT 2,-2.5,2.5).
  90.  
  91.  *    Rename the file TURBODXF.50 or TURBODXF.55 to TURBODXF.TPU before using.
  92.  
  93. {------------------------------------------------------------------}
  94. uses DOS;
  95.  
  96. procedure OpenDXF(FileName:string);
  97.  
  98. procedure CloseDXF;
  99.  
  100. procedure AddTextToDXF(X1,Y1,Z1,Height,Rotate : real;
  101.                        Txt,Layer : string);
  102.  
  103. procedure AddLineToDXF(X1,Y1,Z1,X2,Y2,Z2 : real;
  104.                            Layer : string);
  105.  
  106. procedure Add3DFaceToDXF(X1,Y1,Z1,X2,Y2,Z2,X3,Y3,Z3,X4,Y4,Z4 : real;
  107.                          Layer : string);
  108.  
  109. procedure AddCircleToDXF(X1,Y1,Z1,Radius,Extrusion : real;
  110.                          Layer : string);
  111.  
  112. Implementation
  113.  
  114. const
  115.   Decimals = 2;
  116.  
  117. var
  118.   DXFFile : text;
  119. {------------------------------------------------------------------}
  120.