Sunday, November 1, 2009

Face splitter refactor and why was done

More than a week I was targeting undo/redo bugs and the last big remaining bug was on face-splitting. Half of reasoning was that there were some quirks in current codebase (small issues but the code was stressed to show those problems) but face splitter in particular was a bit overwhelming (for me at least). The cause is just that cases where it does not work are only cases with spliter that works with more than three shapes, undo that applies out of order the items (the splitter itself required that references to be deserialized first), a lot of side-effects.

Splitter in itself was the first shape that creates other shapes, meaning small "pies" over an area that shapes actually intersect.The actual refactor targets just that issue, and gets out the splitter out of tree, as is much more a helper code. By doing this, the splitter will work more or less like the solver component (so as an scene utility). Because splitter required kinda big refactor, was a good reason to also cut out (some) parts of code in smaller pieces. The shapes are created right now in a separate assembly, and is not mixed with property grid assembly one. This will mean for anyone that will look to the code a bit more clear where to find stuff. This code moving does not change functionality more than the splitter related one.

An installer nice thing: NaroCad will use ngen at the end of instalation translating in waiting for around a minute at the end of installing (the biggest thing is to compile wrappers, so using NaroLinker may improve the compiling time), but startup time will simply halve. So you will "feel" NaroCAD as being more responsive when next releases will happen.

No comments: