home *** CD-ROM | disk | FTP | other *** search
- TurboDXF Version 1.0
-
- TurboDXF is a Turbo Pascal unit that allows you to create DXF files compatible
- with AutoCAD (through release 10), PC Intergraph, MicroGrafx Designer,
- CorelDraw and any other package capable of importing a DXF file.
-
- * Precompiled units for both TP 5.0 and 5.5 are included.
-
- * This demo unit is limited to the creation of one drawing layer. Upon
- registration you will receive the source code to create as many layers as
- you want.
-
- [PB]
-
- Registration Form TurboDXF Version 1.0
-
- Company:_____________________________________
-
- Name:_________________________________________
-
- Address:______________________________________
-
- City:_________________________________________
-
- State:________________________________________
-
- Country:______________________________________
-
- Registration fees - all users $25.00 (U.S.)
- $30.00 (Can.)
-
- Mail registration forms and checks to :
-
- David Dorosh
- Suite 105 - 1280 Fir Street
- White Rock, B.C.
- Canada
- V4B 1B4
-
- Thank you, and enjoy !
-
- [PB]
-
- AutoCAD is a registered trademark of Autodesk Corp. Turbo Pascal is a
- registered trademark of Borland International Inc.
-
- This unit consists of six procedures.
-
- OpenDXF This routine creates one layer, LAYER1. LAYER1 is a black
- continuous line. Upon registration you will receive the
- source code so you can create any number of layers. Supply a
- file name to open. CloseDXF will close it.
-
- CloseDXF This routine adds some footer info to the DXF file and
- CLOSEs it.
-
- AddTextToDXF This routine places a text string at x,y,z of height HEIGHT
- and rotation ROTATE on layer LAYER. Note LAYER is 'LAYER1'
- in this demo unit.
-
- AddLineToDXF This routine draws a line from x1,y1,z1 to x2,y2,z2 on layer
- LAYER. Note LAYER is 'LAYER1' in this demo unit.
-
- Add3DFaceToDXF This routine draws a flat face in 3D. Supply 4 points and
- the layer (LAYER1).
-
- AddCircleToDXF This routine draws a circle at x,y,z of radius RADIUS and
- extrusion EXTRUSION. When the extrusion is 0 you get a
- circle, when it is non-zero you get a cylinder. Again,
- supply the layer name.
-
- Other Two variables are defined in the units. DECIMALS specifies
- the decimals for all ordinate entries (X,Y,Z) as well as
- rotations, extrusions etc. It is currently set at 2. eg
- (X,Y,Z) could be (118.29,123.45,324.87). Upon registration
- you will receive the source code so you can change this to
- suit your application. A larger number means larger DXF
- files etc.
-
- The other variable is DXFILE : TEXT. You shouldn't need to
- change this.
-
- * See the demo files DXFDEMO1,2,3 for examples.
-
- * Load the demo file WATMOD.DXF into AutoCAD 10 to see what can be done.
- This file was created from an engineering modeling program output file. A
- TP program to parse the model output (ASCII) file and create the DXF file
- was written. The drawing was created by the TP program in 5 seconds!. Be
- sure to view it in 3D after loading. (VPOINT 2,-2.5,2.5).
-
- * Rename the file TURBODXF.50 or TURBODXF.55 to TURBODXF.TPU before using.
-
- {------------------------------------------------------------------}
- uses DOS;
-
- procedure OpenDXF(FileName:string);
-
- procedure CloseDXF;
-
- procedure AddTextToDXF(X1,Y1,Z1,Height,Rotate : real;
- Txt,Layer : string);
-
- procedure AddLineToDXF(X1,Y1,Z1,X2,Y2,Z2 : real;
- Layer : string);
-
- procedure Add3DFaceToDXF(X1,Y1,Z1,X2,Y2,Z2,X3,Y3,Z3,X4,Y4,Z4 : real;
- Layer : string);
-
- procedure AddCircleToDXF(X1,Y1,Z1,Radius,Extrusion : real;
- Layer : string);
-
- Implementation
-
- const
- Decimals = 2;
-
- var
- DXFFile : text;
- {------------------------------------------------------------------}
-