home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / FAQSYS18.ZIP / FAQS.DAT / 3DDXF.TXT < prev    next >
Text File  |  1993-09-21  |  12KB  |  1,689 lines

  1.  
  2. Minimum Requirements
  3. for Creating a DXF File
  4. of a 3D Model
  5.  
  6.  
  7. Paul Bourke
  8. School of Architecture, Property, and Planning
  9. Auckland University, Private Bag, Auckland, New Zealand
  10. Fax: +64 9 3737410, Ph: +64 9 737599 x7367
  11. EMail: pdbourke@ccu1.auckland.ac.nz
  12.  
  13. Original: March 1990
  14. Revision: September 1993
  15.  
  16. Introduction
  17. DXF is possibly the most widespread CAD exchange format in use by CAD packages on small computer systems. It was developed primarily by the AutoCAD developers and has thus received it popularity mainly from the high number of AutoCAD stations. Most CAD systems can export and most also import DXF, at least for 2D data.
  18. This document describes the minimum requirements needed to create a DXF description of some 3D object and/or scene. This description is not complete by any means but contains enough information for describing the geometry of many 3D models.
  19. A DXF file is a text only file which consists of the following sections: header, tables, blocks, and entities. Each section contains a set of groups each of which occupies two lines in the file. The first line is called the group code, it is an integer in the range of 0 to 999. The second line is called the value which depends on the group code.
  20. The group code indicates the type of value that follows according to the table below.
  21. Group code    Value type  
  22. 0-9    string
  23. 10-59    real number
  24. 60-79    integer
  25. 210-239    real number
  26. 999    comment
  27.  
  28. Header comment and header section
  29. It is common for the first line of a DXF file to contain a comment, the group code for comments is 999. A standard convention is to describe the creator of the DXF file in this comment. It might also be relevant to include the date and time of creation.
  30. The header section contains general information about the drawing, these are only relevant when creating specialised DXF files for AutoCAD. Some examples of what can be included in the header section are: version numbers, unit specification, current layer, grid spacing, tolerances, drawing bounds, fill mode and pattern, etc. Programs that read DXF files will have sensible defaults for these parameters. Since this document is only interested in the transfer of the geometry we don't need a complicated header section. A header comment and header section may look like the following. The model extents ($EXTMIN and $EXTMAX) are included here because some packages insist on it.
  31. 999
  32. DXF created from <program name>
  33. 0
  34. SECTION
  35. 2
  36. HEADER
  37. 9
  38. $ACADVER
  39. 1
  40. AC1006
  41. 9
  42. $INSBASE
  43. 10
  44. 0.0
  45. 20
  46. 0.0
  47. 30
  48. 0.0
  49. 9
  50. $EXTMIN
  51. 10
  52. 0.0
  53. 20
  54. 0.0
  55. 9
  56. $EXTMAX
  57. 10
  58. 1000.0
  59. 20
  60. 1000.0
  61. 0
  62. ENDSEC
  63.  
  64. Tables Section
  65. These can be used to specify predefined constants, line styles, text styles, layers, view tables, user coordinate systems, etc. We will only use tables to define some layers for use later on. Note: not all programs that support DXF import will support layers and those that do usually insist on the layers being defined before use. The following will create a default line style and initialise layers 1 and 2 for use later on.
  66. 0
  67. SECTION
  68. 2
  69. TABLES
  70. 0
  71. TABLE
  72. 2
  73. LTYPE
  74. 70
  75. 1
  76. 0
  77. LTYPE
  78. 2
  79. CONTINUOUS
  80. 70
  81. 64
  82. 3
  83. Solid line
  84. 72
  85. 65
  86. 73
  87. 0
  88. 40
  89. 0.000000
  90. 0
  91. ENDTAB
  92. 0
  93. TABLE
  94. 2
  95. LAYER
  96. 70
  97. 6
  98. 0
  99. LAYER
  100. 2
  101. 1
  102. 70
  103. 64
  104. 62
  105. 7
  106. 6
  107. CONTINUOUS
  108. 0
  109. LAYER
  110. 2
  111. 2
  112. 70
  113. 64
  114. 62
  115. 7
  116. 6
  117. CONTINUOUS
  118. 0
  119. ENDTAB
  120. 0
  121. TABLE
  122. 2
  123. STYLE
  124. 70
  125. 0
  126. 0
  127. ENDTAB
  128. 0
  129. ENDSEC
  130.  
  131. Blocks section
  132. Not necessary here but it is good form to include one anyway. The following is an empty block section.
  133. 0
  134. SECTION
  135. 2
  136. BLOCKS
  137. 0
  138. ENDSEC
  139.  
  140. Entities section
  141. The entities section is where the geometric elements of the model or scene are described. The following is the standard form of the entities section.
  142. 0
  143. SECTION
  144. 2
  145. ENTITIES
  146. <Geometric entities go here, see later>
  147. 0
  148. ENDSEC
  149.  
  150. Colour
  151. Only index colour is supported, it is done with group code 62 within an entity description. The value is the colour index. The way the colours are mapped is dependent on the application and the hardware capabilities. To determine the colour mappings on a particular system create a number of lines segments each with a different colour and import that into the CAD package. Many packages that don't use an index colour model will simply ignore the colour instruction. See appendix 1 for a sample DXF file to determine the first 64 index colours on your system. The following will specify index colour 4
  152. 62
  153. 4
  154.  
  155. Layers
  156. Layer numbers are specified with group code 8 within an entity description. The layers to be used should be defined as described earlier in the tables section. Most DXF importers will insist on predefining the layers in the tables. Note: the number of layers possible will vary on the software used to import the DXF file. The following indicates that the current entity is to be placed on layer 2
  157. 8
  158. 2
  159.  
  160. Geometry
  161. DXF explicitly supports two 3D primitive types, namely, 3DFACE and 3DLINE (it is usual to just use the plain LINE primitive). LINE consists of the two endpoints, 3DFACE specifies either three or four vertex facets (polygonal bounded planes). All four vertices must be specified, in the case of a three point facet the last vertex is specified twice. In general vertex group codes are numbers 10,20,30 for the first (x,y,z) triple, 11,21,31 for the second, 12,22,32 for the third and 13,23,33 for the fourth. Each vertex group code is followed by the appropriate coordinate value. Note: that there is no requirement for the four vertices specifying the facet to be planar but it may be important for the software that imports the DXF file. The vertices can be ordered clockwise or anticlockwise with respect to the outward pointing normal, however some packages may insist on a particular orientation, especially rendering software.
  162.  
  163. The following specifies a line on layer 2 of index colour number 4 between the points (8500, -12563.4, 0) and (8500, -12563.4, 4150.99)
  164. 0
  165. LINE
  166. 8
  167. 2
  168. 62
  169. 4
  170. 10
  171. 8500
  172. 20
  173. -12563.4
  174. 30
  175. 0
  176. 11
  177. 8500
  178. 21
  179. -12563.4
  180. 31
  181. 4150.99
  182.  
  183. The following specifies a 4 vertex facet on layer 1 with index colour number 3.
  184. 0
  185. 3DFACE
  186. 8
  187. 1
  188. 62
  189. 3
  190. 10
  191. 3000
  192. 20
  193. 10000
  194. 30
  195. 5419.35
  196. 11
  197. 4000
  198. 21
  199. 10000
  200. 31
  201. 5605.46
  202. 12
  203. 4000
  204. 22
  205. 11000
  206. 32
  207. 4861.04
  208. 13
  209. 3000
  210. 23
  211. 11000
  212. 33
  213. 4674.94
  214.  
  215. To create planar facets with more than 3 or 4 vertices it is necesary to use the POLYLINE primitive, the reader should consult the DXF specification for more information on this.
  216.  
  217. End of file
  218. This indicates the end of the DXF file, it is not usually necessary but should be included for good form. Most applications expect a carriage return after the EOF text.
  219. 0
  220. EOF
  221.  
  222. Appendix 1
  223. The following can be used to determine the colour mapping used on your system. It contains 64 line segments with colours from 0 to 63. Note that many CAD packages only support 8 colours, also the following will indicate whether your package starts its colour numbering at 0 or 1 (the two most common choices)
  224.  
  225. 999
  226. Colour
  227. 0
  228. SECTION
  229. 2
  230. HEADER
  231. 9
  232. $ACADVER
  233. 1
  234. AC1006
  235. 9
  236. $INSBASE
  237. 10
  238. 0.0
  239. 20
  240. 0.0
  241. 30
  242. 0.0
  243. 9
  244. $EXTMIN
  245. 10
  246. 0.0
  247. 20
  248. 0.0
  249. 9
  250. $EXTMAX
  251. 10
  252. 1000.0
  253. 20
  254. 1000.0
  255. 9
  256. $LINMIN
  257. 10
  258. 0.0
  259. 20
  260. 0.0
  261. 9
  262. $LINMAX
  263. 10
  264. 1000.0
  265. 20
  266. 1000.0
  267. 0
  268. ENDSEC
  269. 0
  270. SECTION
  271. 2
  272. TABLES
  273. 0
  274. TABLE
  275. 2
  276. LTYPE
  277. 70
  278. 1
  279. 0
  280. LTYPE
  281. 2
  282. CONTINUOUS
  283. 70
  284. 64
  285. 3
  286. Solid line
  287. 72
  288. 65
  289. 73
  290. 0
  291. 40
  292. 0.000000
  293. 0
  294. ENDTAB
  295. 0
  296. TABLE
  297. 2
  298. LAYER
  299. 70
  300. 6
  301. 0
  302. LAYER
  303. 2
  304. 1
  305. 70
  306. 64
  307. 62
  308. 7
  309. 6
  310. CONTINUOUS
  311. 0
  312. ENDTAB
  313. 0
  314. TABLE
  315. 2
  316. STYLE
  317. 70
  318. 0
  319. 0
  320. ENDTAB
  321. 0
  322. ENDSEC
  323. 0
  324. SECTION
  325. 2
  326. BLOCKS
  327. 0
  328. ENDSEC
  329. 0
  330. SECTION
  331. 2
  332. ENTITIES
  333. 0
  334. LINE
  335. 8
  336. 1
  337. 62
  338. 0
  339. 10
  340. 0
  341. 20
  342. 0
  343. 30
  344. 0
  345. 11
  346. 0
  347. 21
  348. 0
  349. 31
  350. 1
  351. 0
  352. LINE
  353. 8
  354. 1
  355. 62
  356. 1
  357. 10
  358. 0.05
  359. 20
  360. 0
  361. 30
  362. 0
  363. 11
  364. 0.05
  365. 21
  366. 0
  367. 31
  368. 1
  369. 0
  370. LINE
  371. 8
  372. 1
  373. 62
  374. 2
  375. 10
  376. 0.1
  377. 20
  378. 0
  379. 30
  380. 0
  381. 11
  382. 0.1
  383. 21
  384. 0
  385. 31
  386. 1
  387. 0
  388. LINE
  389. 8
  390. 1
  391. 62
  392. 3
  393. 10
  394. 0.15
  395. 20
  396. 0
  397. 30
  398. 0
  399. 11
  400. 0.15
  401. 21
  402. 0
  403. 31
  404. 1
  405. 0
  406. LINE
  407. 8
  408. 1
  409. 62
  410. 4
  411. 10
  412. 0.2
  413. 20
  414. 0
  415. 30
  416. 0
  417. 11
  418. 0.2
  419. 21
  420. 0
  421. 31
  422. 1
  423. 0
  424. LINE
  425. 8
  426. 1
  427. 62
  428. 5
  429. 10
  430. 0.25
  431. 20
  432. 0
  433. 30
  434. 0
  435. 11
  436. 0.25
  437. 21
  438. 0
  439. 31
  440. 1
  441. 0
  442. LINE
  443. 8
  444. 1
  445. 62
  446. 6
  447. 10
  448. 0.3
  449. 20
  450. 0
  451. 30
  452. 0
  453. 11
  454. 0.3
  455. 21
  456. 0
  457. 31
  458. 1
  459. 0
  460. LINE
  461. 8
  462. 1
  463. 62
  464. 7
  465. 10
  466. 0.35
  467. 20
  468. 0
  469. 30
  470. 0
  471. 11
  472. 0.35
  473. 21
  474. 0
  475. 31
  476. 1
  477. 0
  478. LINE
  479. 8
  480. 1
  481. 62
  482. 8
  483. 10
  484. 0.4
  485. 20
  486. 0
  487. 30
  488. 0
  489. 11
  490. 0.4
  491. 21
  492. 0
  493. 31
  494. 1
  495. 0
  496. LINE
  497. 8
  498. 1
  499. 62
  500. 9
  501. 10
  502. 0.45
  503. 20
  504. 0
  505. 30
  506. 0
  507. 11
  508. 0.45
  509. 21
  510. 0
  511. 31
  512. 1
  513. 0
  514. LINE
  515. 8
  516. 1
  517. 62
  518. 10
  519. 10
  520. 0.5
  521. 20
  522. 0
  523. 30
  524. 0
  525. 11
  526. 0.5
  527. 21
  528. 0
  529. 31
  530. 1
  531. 0
  532. LINE
  533. 8
  534. 1
  535. 62
  536. 11
  537. 10
  538. 0.55
  539. 20
  540. 0
  541. 30
  542. 0
  543. 11
  544. 0.55
  545. 21
  546. 0
  547. 31
  548. 1
  549. 0
  550. LINE
  551. 8
  552. 1
  553. 62
  554. 12
  555. 10
  556. 0.6
  557. 20
  558. 0
  559. 30
  560. 0
  561. 11
  562. 0.6
  563. 21
  564. 0
  565. 31
  566. 1
  567. 0
  568. LINE
  569. 8
  570. 1
  571. 62
  572. 13
  573. 10
  574. 0.65
  575. 20
  576. 0
  577. 30
  578. 0
  579. 11
  580. 0.65
  581. 21
  582. 0
  583. 31
  584. 1
  585. 0
  586. LINE
  587. 8
  588. 1
  589. 62
  590. 14
  591. 10
  592. 0.7
  593. 20
  594. 0
  595. 30
  596. 0
  597. 11
  598. 0.7
  599. 21
  600. 0
  601. 31
  602. 1
  603. 0
  604. LINE
  605. 8
  606. 1
  607. 62
  608. 15
  609. 10
  610. 0.75
  611. 20
  612. 0
  613. 30
  614. 0
  615. 11
  616. 0.75
  617. 21
  618. 0
  619. 31
  620. 1
  621. 0
  622. LINE
  623. 8
  624. 1
  625. 62
  626. 16
  627. 10
  628. 0.8
  629. 20
  630. 0
  631. 30
  632. 0
  633. 11
  634. 0.8
  635. 21
  636. 0
  637. 31
  638. 1
  639. 0
  640. LINE
  641. 8
  642. 1
  643. 62
  644. 17
  645. 10
  646. 0.85
  647. 20
  648. 0
  649. 30
  650. 0
  651. 11
  652. 0.85
  653. 21
  654. 0
  655. 31
  656. 1
  657. 0
  658. LINE
  659. 8
  660. 1
  661. 62
  662. 18
  663. 10
  664. 0.9
  665. 20
  666. 0
  667. 30
  668. 0
  669. 11
  670. 0.9
  671. 21
  672. 0
  673. 31
  674. 1
  675. 0
  676. LINE
  677. 8
  678. 1
  679. 62
  680. 19
  681. 10
  682. 0.95
  683. 20
  684. 0
  685. 30
  686. 0
  687. 11
  688. 0.95
  689. 21
  690. 0
  691. 31
  692. 1
  693. 0
  694. LINE
  695. 8
  696. 1
  697. 62
  698. 20
  699. 10
  700. 1
  701. 20
  702. 0
  703. 30
  704. 0
  705. 11
  706. 1
  707. 21
  708. 0
  709. 31
  710. 1
  711. 0
  712. LINE
  713. 8
  714. 1
  715. 62
  716. 21
  717. 10
  718. 1.05
  719. 20
  720. 0
  721. 30
  722. 0
  723. 11
  724. 1.05
  725. 21
  726. 0
  727. 31
  728. 1
  729. 0
  730. LINE
  731. 8
  732. 1
  733. 62
  734. 22
  735. 10
  736. 1.1
  737. 20
  738. 0
  739. 30
  740. 0
  741. 11
  742. 1.1
  743. 21
  744. 0
  745. 31
  746. 1
  747. 0
  748. LINE
  749. 8
  750. 1
  751. 62
  752. 23
  753. 10
  754. 1.15
  755. 20
  756. 0
  757. 30
  758. 0
  759. 11
  760. 1.15
  761. 21
  762. 0
  763. 31
  764. 1
  765. 0
  766. LINE
  767. 8
  768. 1
  769. 62
  770. 24
  771. 10
  772. 1.2
  773. 20
  774. 0
  775. 30
  776. 0
  777. 11
  778. 1.2
  779. 21
  780. 0
  781. 31
  782. 1
  783. 0
  784. LINE
  785. 8
  786. 1
  787. 62
  788. 25
  789. 10
  790. 1.25
  791. 20
  792. 0
  793. 30
  794. 0
  795. 11
  796. 1.25
  797. 21
  798. 0
  799. 31
  800. 1
  801. 0
  802. LINE
  803. 8
  804. 1
  805. 62
  806. 26
  807. 10
  808. 1.3
  809. 20
  810. 0
  811. 30
  812. 0
  813. 11
  814. 1.3
  815. 21
  816. 0
  817. 31
  818. 1
  819. 0
  820. LINE
  821. 8
  822. 1
  823. 62
  824. 27
  825. 10
  826. 1.35
  827. 20
  828. 0
  829. 30
  830. 0
  831. 11
  832. 1.35
  833. 21
  834. 0
  835. 31
  836. 1
  837. 0
  838. LINE
  839. 8
  840. 1
  841. 62
  842. 28
  843. 10
  844. 1.4
  845. 20
  846. 0
  847. 30
  848. 0
  849. 11
  850. 1.4
  851. 21
  852. 0
  853. 31
  854. 1
  855. 0
  856. LINE
  857. 8
  858. 1
  859. 62
  860. 29
  861. 10
  862. 1.45
  863. 20
  864. 0
  865. 30
  866. 0
  867. 11
  868. 1.45
  869. 21
  870. 0
  871. 31
  872. 1
  873. 0
  874. LINE
  875. 8
  876. 1
  877. 62
  878. 30
  879. 10
  880. 1.5
  881. 20
  882. 0
  883. 30
  884. 0
  885. 11
  886. 1.5
  887. 21
  888. 0
  889. 31
  890. 1
  891. 0
  892. LINE
  893. 8
  894. 1
  895. 62
  896. 31
  897. 10
  898. 1.55
  899. 20
  900. 0
  901. 30
  902. 0
  903. 11
  904. 1.55
  905. 21
  906. 0
  907. 31
  908. 1
  909. 0
  910. LINE
  911. 8
  912. 1
  913. 62
  914. 32
  915. 10
  916. 1.6
  917. 20
  918. 0
  919. 30
  920. 0
  921. 11
  922. 1.6
  923. 21
  924. 0
  925. 31
  926. 1
  927. 0
  928. LINE
  929. 8
  930. 1
  931. 62
  932. 33
  933. 10
  934. 1.65
  935. 20
  936. 0
  937. 30
  938. 0
  939. 11
  940. 1.65
  941. 21
  942. 0
  943. 31
  944. 1
  945. 0
  946. LINE
  947. 8
  948. 1
  949. 62
  950. 34
  951. 10
  952. 1.7
  953. 20
  954. 0
  955. 30
  956. 0
  957. 11
  958. 1.7
  959. 21
  960. 0
  961. 31
  962. 1
  963. 0
  964. LINE
  965. 8
  966. 1
  967. 62
  968. 35
  969. 10
  970. 1.75
  971. 20
  972. 0
  973. 30
  974. 0
  975. 11
  976. 1.75
  977. 21
  978. 0
  979. 31
  980. 1
  981. 0
  982. LINE
  983. 8
  984. 1
  985. 62
  986. 36
  987. 10
  988. 1.8
  989. 20
  990. 0
  991. 30
  992. 0
  993. 11
  994. 1.8
  995. 21
  996. 0
  997. 31
  998. 1
  999. 0
  1000. LINE
  1001. 8
  1002. 1
  1003. 62
  1004. 37
  1005. 10
  1006. 1.85
  1007. 20
  1008. 0
  1009. 30
  1010. 0
  1011. 11
  1012. 1.85
  1013. 21
  1014. 0
  1015. 31
  1016. 1
  1017. 0
  1018. LINE
  1019. 8
  1020. 1
  1021. 62
  1022. 38
  1023. 10
  1024. 1.9
  1025. 20
  1026. 0
  1027. 30
  1028. 0
  1029. 11
  1030. 1.9
  1031. 21
  1032. 0
  1033. 31
  1034. 1
  1035. 0
  1036. LINE
  1037. 8
  1038. 1
  1039. 62
  1040. 39
  1041. 10
  1042. 1.95
  1043. 20
  1044. 0
  1045. 30
  1046. 0
  1047. 11
  1048. 1.95
  1049. 21
  1050. 0
  1051. 31
  1052. 1
  1053. 0
  1054. LINE
  1055. 8
  1056. 1
  1057. 62
  1058. 40
  1059. 10
  1060. 2
  1061. 20
  1062. 0
  1063. 30
  1064. 0
  1065. 11
  1066. 2
  1067. 21
  1068. 0
  1069. 31
  1070. 1
  1071. 0
  1072. LINE
  1073. 8
  1074. 1
  1075. 62
  1076. 41
  1077. 10
  1078. 2.05
  1079. 20
  1080. 0
  1081. 30
  1082. 0
  1083. 11
  1084. 2.05
  1085. 21
  1086. 0
  1087. 31
  1088. 1
  1089. 0
  1090. LINE
  1091. 8
  1092. 1
  1093. 62
  1094. 42
  1095. 10
  1096. 2.1
  1097. 20
  1098. 0
  1099. 30
  1100. 0
  1101. 11
  1102. 2.1
  1103. 21
  1104. 0
  1105. 31
  1106. 1
  1107. 0
  1108. LINE
  1109. 8
  1110. 1
  1111. 62
  1112. 43
  1113. 10
  1114. 2.15
  1115. 20
  1116. 0
  1117. 30
  1118. 0
  1119. 11
  1120. 2.15
  1121. 21
  1122. 0
  1123. 31
  1124. 1
  1125. 0
  1126. LINE
  1127. 8
  1128. 1
  1129. 62
  1130. 44
  1131. 10
  1132. 2.2
  1133. 20
  1134. 0
  1135. 30
  1136. 0
  1137. 11
  1138. 2.2
  1139. 21
  1140. 0
  1141. 31
  1142. 1
  1143. 0
  1144. LINE
  1145. 8
  1146. 1
  1147. 62
  1148. 45
  1149. 10
  1150. 2.25
  1151. 20
  1152. 0
  1153. 30
  1154. 0
  1155. 11
  1156. 2.25
  1157. 21
  1158. 0
  1159. 31
  1160. 1
  1161. 0
  1162. LINE
  1163. 8
  1164. 1
  1165. 62
  1166. 46
  1167. 10
  1168. 2.3
  1169. 20
  1170. 0
  1171. 30
  1172. 0
  1173. 11
  1174. 2.3
  1175. 21
  1176. 0
  1177. 31
  1178. 1
  1179. 0
  1180. LINE
  1181. 8
  1182. 1
  1183. 62
  1184. 47
  1185. 10
  1186. 2.35
  1187. 20
  1188. 0
  1189. 30
  1190. 0
  1191. 11
  1192. 2.35
  1193. 21
  1194. 0
  1195. 31
  1196. 1
  1197. 0
  1198. LINE
  1199. 8
  1200. 1
  1201. 62
  1202. 48
  1203. 10
  1204. 2.4
  1205. 20
  1206. 0
  1207. 30
  1208. 0
  1209. 11
  1210. 2.4
  1211. 21
  1212. 0
  1213. 31
  1214. 1
  1215. 0
  1216. LINE
  1217. 8
  1218. 1
  1219. 62
  1220. 49
  1221. 10
  1222. 2.45
  1223. 20
  1224. 0
  1225. 30
  1226. 0
  1227. 11
  1228. 2.45
  1229. 21
  1230. 0
  1231. 31
  1232. 1
  1233. 0
  1234. LINE
  1235. 8
  1236. 1
  1237. 62
  1238. 50
  1239. 10
  1240. 2.5
  1241. 20
  1242. 0
  1243. 30
  1244. 0
  1245. 11
  1246. 2.5
  1247. 21
  1248. 0
  1249. 31
  1250. 1
  1251. 0
  1252. LINE
  1253. 8
  1254. 1
  1255. 62
  1256. 51
  1257. 10
  1258. 2.55
  1259. 20
  1260. 0
  1261. 30
  1262. 0
  1263. 11
  1264. 2.55
  1265. 21
  1266. 0
  1267. 31
  1268. 1
  1269. 0
  1270. LINE
  1271. 8
  1272. 1
  1273. 62
  1274. 52
  1275. 10
  1276. 2.6
  1277. 20
  1278. 0
  1279. 30
  1280. 0
  1281. 11
  1282. 2.6
  1283. 21
  1284. 0
  1285. 31
  1286. 1
  1287. 0
  1288. LINE
  1289. 8
  1290. 1
  1291. 62
  1292. 53
  1293. 10
  1294. 2.65
  1295. 20
  1296. 0
  1297. 30
  1298. 0
  1299. 11
  1300. 2.65
  1301. 21
  1302. 0
  1303. 31
  1304. 1
  1305. 0
  1306. LINE
  1307. 8
  1308. 1
  1309. 62
  1310. 54
  1311. 10
  1312. 2.7
  1313. 20
  1314. 0
  1315. 30
  1316. 0
  1317. 11
  1318. 2.7
  1319. 21
  1320. 0
  1321. 31
  1322. 1
  1323. 0
  1324. LINE
  1325. 8
  1326. 1
  1327. 62
  1328. 55
  1329. 10
  1330. 2.75
  1331. 20
  1332. 0
  1333. 30
  1334. 0
  1335. 11
  1336. 2.75
  1337. 21
  1338. 0
  1339. 31
  1340. 1
  1341. 0
  1342. LINE
  1343. 8
  1344. 1
  1345. 62
  1346. 56
  1347. 10
  1348. 2.8
  1349. 20
  1350. 0
  1351. 30
  1352. 0
  1353. 11
  1354. 2.8
  1355. 21
  1356. 0
  1357. 31
  1358. 1
  1359. 0
  1360. LINE
  1361. 8
  1362. 1
  1363. 62
  1364. 57
  1365. 10
  1366. 2.85
  1367. 20
  1368. 0
  1369. 30
  1370. 0
  1371. 11
  1372. 2.85
  1373. 21
  1374. 0
  1375. 31
  1376. 1
  1377. 0
  1378. LINE
  1379. 8
  1380. 1
  1381. 62
  1382. 58
  1383. 10
  1384. 2.9
  1385. 20
  1386. 0
  1387. 30
  1388. 0
  1389. 11
  1390. 2.9
  1391. 21
  1392. 0
  1393. 31
  1394. 1
  1395. 0
  1396. LINE
  1397. 8
  1398. 1
  1399. 62
  1400. 59
  1401. 10
  1402. 2.95
  1403. 20
  1404. 0
  1405. 30
  1406. 0
  1407. 11
  1408. 2.95
  1409. 21
  1410. 0
  1411. 31
  1412. 1
  1413. 0
  1414. LINE
  1415. 8
  1416. 1
  1417. 62
  1418. 60
  1419. 10
  1420. 3
  1421. 20
  1422. 0
  1423. 30
  1424. 0
  1425. 11
  1426. 3
  1427. 21
  1428. 0
  1429. 31
  1430. 1
  1431. 0
  1432. LINE
  1433. 8
  1434. 1
  1435. 62
  1436. 61
  1437. 10
  1438. 3.05
  1439. 20
  1440. 0
  1441. 30
  1442. 0
  1443. 11
  1444. 3.05
  1445. 21
  1446. 0
  1447. 31
  1448. 1
  1449. 0
  1450. LINE
  1451. 8
  1452. 1
  1453. 62
  1454. 62
  1455. 10
  1456. 3.1
  1457. 20
  1458. 0
  1459. 30
  1460. 0
  1461. 11
  1462. 3.1
  1463. 21
  1464. 0
  1465. 31
  1466. 1
  1467. 0
  1468. LINE
  1469. 8
  1470. 1
  1471. 62
  1472. 63
  1473. 10
  1474. 3.15
  1475. 20
  1476. 0
  1477. 30
  1478. 0
  1479. 11
  1480. 3.15
  1481. 21
  1482. 0
  1483. 31
  1484. 1
  1485. 0
  1486. ENDSEC
  1487. 0
  1488. EOF
  1489.  
  1490.  
  1491.  
  1492. Appendix 2
  1493. The following example is a complete description of a line, a triangular facet, and a four pointed facet. All the objects are on layer 1, and have colour index 1. This can be used to test whether the DXF importer you are using supports all of these 3D primitives. The resulting model should look like the following.
  1494.  
  1495. 
  1496.  
  1497. 999
  1498. VISION3D DXF
  1499. 0
  1500. SECTION
  1501. 2
  1502. HEADER
  1503. 9
  1504. $ACADVER
  1505. 1
  1506. AC1006
  1507. 9
  1508. $INSBASE
  1509. 10
  1510. 0.0
  1511. 20
  1512. 0.0
  1513. 30
  1514. 0.0
  1515. 9
  1516. $EXTMIN
  1517. 10
  1518. 0.0
  1519. 20
  1520. 0.0
  1521. 9
  1522. $EXTMAX
  1523. 10
  1524. 1000.0
  1525. 20
  1526. 1000.0
  1527. 9
  1528. $LINMIN
  1529. 10
  1530. 0.0
  1531. 20
  1532. 0.0
  1533. 9
  1534. $LINMAX
  1535. 10
  1536. 1000.0
  1537. 20
  1538. 1000.0
  1539. 0
  1540. ENDSEC
  1541. 0
  1542. SECTION
  1543. 2
  1544. TABLES
  1545. 0
  1546. TABLE
  1547. 2
  1548. LTYPE
  1549. 70
  1550. 1
  1551. 0
  1552. LTYPE
  1553. 2
  1554. CONTINUOUS
  1555. 70
  1556. 64
  1557. 3
  1558. Solid line
  1559. 72
  1560. 65
  1561. 73
  1562. 0
  1563. 40
  1564. 0.000000
  1565. 0
  1566. ENDTAB
  1567. 0
  1568. TABLE
  1569. 2
  1570. LAYER
  1571. 70
  1572. 6
  1573. 0
  1574. LAYER
  1575. 2
  1576. 1
  1577. 70
  1578. 64
  1579. 62
  1580. 7
  1581. 6
  1582. CONTINUOUS
  1583. 0
  1584. ENDTAB
  1585. 0
  1586. TABLE
  1587. 2
  1588. STYLE
  1589. 70
  1590. 0
  1591. 0
  1592. ENDTAB
  1593. 0
  1594. ENDSEC
  1595. 0
  1596. SECTION
  1597. 2
  1598. BLOCKS
  1599. 0
  1600. ENDSEC
  1601. 0
  1602. SECTION
  1603. 2
  1604. ENTITIES
  1605. 0
  1606. 3DFACE
  1607. 8
  1608. 1
  1609. 62
  1610. 1
  1611. 10
  1612. -0.5
  1613. 20
  1614. -0.5
  1615. 30
  1616. -0.5
  1617. 11
  1618. -0.5
  1619. 21
  1620. 0.5
  1621. 31
  1622. -0.5
  1623. 12
  1624. 0.5
  1625. 22
  1626. 0.5
  1627. 32
  1628. -0.5
  1629. 13
  1630. 0.5
  1631. 23
  1632. -0.5
  1633. 33
  1634. -0.5
  1635. 0
  1636. 3DFACE
  1637. 8
  1638. 1
  1639. 62
  1640. 1
  1641. 10
  1642. -0.5
  1643. 20
  1644. -0.5
  1645. 30
  1646. -0.5
  1647. 11
  1648. 0.5
  1649. 21
  1650. -0.5
  1651. 31
  1652. -0.5
  1653. 12
  1654. 0
  1655. 22
  1656. -0.5
  1657. 32
  1658. 0.5
  1659. 13
  1660. 0
  1661. 23
  1662. -0.5
  1663. 33
  1664. 0.5
  1665. 0
  1666. LINE
  1667. 8
  1668. 1
  1669. 62
  1670. 1
  1671. 10
  1672. 0
  1673. 20
  1674. -0.5
  1675. 30
  1676. 0.5
  1677. 11
  1678. 0
  1679. 21
  1680. 0.5
  1681. 31
  1682. -0.5
  1683. 0
  1684. ENDSEC
  1685. 0
  1686. EOF
  1687.  
  1688.  
  1689.