[Drawkit] SonoDraw Beta 1 now available

Brad Larson larson at sonoplot.com
Tue Jul 29 16:03:54 PDT 2008


It's taken us a little while, but now that DrawKit's Beta 4 is out and  
most of our problems have been resolved, I figured it would be a good  
time to release the first beta of SonoDraw.  SonoDraw uses DrawKit to  
provide a custom vector-based drawing program for laying out  
microscale patterns (microcircuitry, arrays of DNA or protein spots,  
etc.) that our Microplotter systems can read in and print onto a  
surface.  This is a highly custom application for use with our  
commercial robotics platform, but we are releasing it as a BSD- 
licensed open source project with the hope that others can learn from  
this example and that our customers will be able to improve the  
software themselves and thus improve interactions with our hardware.   
In particular, it provides an example of custom file format handling  
with DrawKit, although some refactoring still needs to be done to  
clean up the import / export code.

The source code is available for download from
http://www.sonoplot.com/sites/default/files/SonoDraw/SonoDrawBeta1.zip
and a compiled binary can be downloaded from
http://www.sonoplot.com/sites/default/files/SonoDraw/SonoDrawBeta1-Binary.zip

Example .pattern files that you can load with the software are also  
available at
http://www.sonoplot.com/sites/default/files/SonoDraw/SamplePatterns.zip

Some things to note are that this is a Leopard-only application (using  
garbage collection and some Leopard-specific UI elements, like  
toolbars), and the source is intended to be installed in a development  
directory at the same level as the source code for DrawKit Beta 4, as  
well as the latest version of Sparkle ( http://sparkle.andymatuschak.org/ 
  ).  DrawKit may need to have its build settings altered to support  
garbage collection (-fobjc-gc) in order to work with this program.

This version is not quite feature-complete, as the help files are mere  
stubs, and I'm tracking down a glitch with DKArcPath where it doesn't  
always draw with the correct radius.  The last large feature, though,  
involves preparing the pattern file during the save process.  Our  
dispenser draws elements in the order that they appear in the .pattern  
file.  This presents a problem when a user draws out a pattern in  
SonoDraw, because they usually don't draw the elements in an optimal  
order.  The file gets saved out in that drawn order, and it takes a  
much longer time to draw the shape in the machine.  We'd like to add  
an optimization pass on saving out the file that does a simple sorting  
of the drawing elements to get them in the right order.  This doesn't  
need to be the optimal order, just not terrible.  DKObjectOwnerLayer  
has methods for reordering drawing objects one at a time, but I'm  
trying to figure out the best way to do a sort on a layer's objects.   
Should I pull the objects out into an NSMutableArray, sort that, and  
write the elements to disk out of the array, or would a category on  
DKObjectOwnerLayer be the way to go so that sorting could be handled  
on the internal object array?

Any and all feedback on this program is welcome.  Thanks again to  
Graham for writing DrawKit.  It has allowed us to create a far better  
vector illustrator for our niche application than we could do  
completely on our own.

______________________
Brad Larson
SonoPlot, Inc.
3030 Laura Lane, Suite 120
Middleton, WI 53562





More information about the Drawkit mailing list