![]() |
||||
|
||||
DKSimpleDXF - Example Application using DrawKit and DXFReader DKSimpleDXF is an example application that uses both the DrawKit Cocoa graphics framework created by Graham Cox and the DXFReader framework available on this site. To create DKSimpleDXF I used Graham Cox's "DK Mini Demo 1.2" program as the base for the application. The "DK Mini Demo 1.2" source code and licensing information are available at the DrawKit site. Into this application I added functions in the "File ..." menu, including some simple commands to programmatically create a rectangle and a text object as well as a much more complex feature to import a DXF file. DKSimpleDXF is my test-bed as I learn the DrawKit framework and develop the DXFReader code. It is not a full featured application. I am posting it here as an example of code for others to see and use to allow the translation of a standard DXF file into DrawKit objects. DKSimpleDXF is developed in Objective-C 2.0 and I am using the properties, garbage collection, and fast enumeration features of the latest version of Objective-C so it requires Mac OS X 10.5 or later. I am issuing this as opensource code. I have not included any license information at this time, but the "DK Mini Demo 1.2" program by Graham Cox is issued under a standard BSD license and I have retained his licensing notices. See the DrawKit site for more licencing information.
Source Code The DKSimpleDXF source code is available for download from this site. This archive contains an XCode 3.1.2 project and the associated files. To run this application you will also need the download DrawKit Version 1.0 Beta 6 (July 15, 2009) from the DrawKit site. The archive also contains two example DXF files to test the "import DXF" feature. One is a small file containing a number of different kinds of shapes. The other is a large file that is an example of an architectural floorplan.
Acknowledgements Graham Cox has been very generous with his time and expertise and helped a great deal in the development of this application. Brad Larson and Michael Caron from SonoPlot have also provided useful input and example code (the SonoDraw application) that influenced and informed this project. Thank you Graham, Brad, and Michael. |
||
Copyright © 2009 Allan Daly |
brown-bird.net |
||