Saturday, 19 February 2011

Non Common Cases Crash Fixes. Reviewed To Improve Spline

Some categories of bugs are named "bugs that are not in normal flow". One of those bugs was noticed by Sami and is that some parts of the code are done "just in the right moment", like "Tree View node creation". Sometimes this Tree View can be updated forcifully and can lead to crashes because scanning of shapes in scene can encounter invalid shapes when is populated, or can appear artifacts. Sadly this crash can be triggered in cases when you change solver options.
So the solution is for now to not update any time tree view, and when is needed, will restore everything in a stable state (to be certain that those crashes will not happen).
Splines in major design tools are of three types:
- one of as many points as possible, being the equation that is defined by all points of it. Was our original spline tool implementation
- another two are based on 4 point spline "legs", one is made by using control points and other one for simplicity uses the same control points but will interpolate the values for user, because it reduces the click count by a third
So logically the "Control Point" and "Interpolated" spline are both implemented in the same time, anyway, as both shapes have some exceptions from other shapes, some problems in implementation were obvious (like is one shape that transformation is handled separately). Editing in 1.5.7 works just for first leg of Spline, and so on.
I was evaluated problems of it and I've looked to other how they do it, and I found and I'm on the right track to solve all class of problems: Spline (interpolate and control point) will be consolidated in a single shape), also the actions that expose it will share a good bunch of code (excluding the interpolate "automatical generation of points" that will be different between those two tools). In this time I've also evaluated and solve some small issues I've found around the way: NaroCAD had no dashed fixed distance (not infinite) line that I wanted to use it for previewing the control lines. Also a small bug, but for certain annyoing was that the code for setup the color was not working for "interactives", and the root cause was that we setup style for shapes (a great thing for rectangles).
So in short hopefully soon you will see a spline that will work fairly right in most design ways and will be a useful and friendly tool.
Note: Did you know that you can insert coordinates for Spline from command line? In case you wanted a precise tunning?

No comments:

Post a Comment