Wednesday, 19 January 2011

Boo Shapes Plugin (Part II)

One hard category of bugs that NaroCAD can fix are those bugs that are reported in one version and we have no clue if they are fixed or regressed on shapes that are sometimes just +0.0.1 newer.
The reason is that at times for the very good reasons we rewrite some data representation that makes NaroXml incompatible with earlier versions. Also another hard topic is that we (NaroCAD devs) do know what to do with Boo scripting (I think I'm the only one for now that masters how to use it to almost full potential) but for most users is hard to start.
So one of the best solutions I've found is this: the user creates a scene, and NaroCAD will generate it's Boo script. Also, the start of script will be exposed in file, so when you will want to add/extend your header of your script you will be more than easy to do.
This exporter will navigate throughout the entire scene and will make all constructions that may be needed to remake the scene based on interpreters. This design will permit that in future (or by other developer that wants to export information like layers, colors (which are not yet supported for now) to be able to extend this code. Also will make this code less fragile if big format changes will happen. At the end this code is separated in a plugin, so you may enable just if will make sense to you to update your NaroCAD files. In this way is a nice way to have guaranteed that your hard done scenes will not be lost over changes that happen from time to time in NaroCAD internal format. And if those changes will happen, eventually the Boo script is exposed and you will be able to fix it with replaces.
At the end you are are encouraged to make shapes and to try to combine with Boo to get all power available to make your complex designs to shine.

No comments:

Post a Comment