Sunday, May 2, 2010

Point to Point Constraint, Shape Restriction Framework

Point to point constraint code was done. The code is still far from perfect (it have some bugs that seem to appear like a random jumping around the area, so may be a logic point).

Even the constraint is important as constraints were introduced and they can make NaroCAD a more than useful tool by supporting a lot of operations, sometimes the problem is that a lot of testing and crashes are just because of incompatible operation of different objects. For example you should not apply a constraint like: Line Length Constraint on a circle shape. You should apply it only on a line. Because of this the code behind was extended to support for references on your operations at two levels:
- a logical (high level) one, like: you can pick the reference shapes and the operation that applies to
- a reference based (low level) like: you can write your custom code to accept/exclude a shape from candidates
Also this works as previously code for shapes that you don't want that this extra checks to occur.

I will try to work in two directions: try to integrate this work to actions/meta-actions to use explicitly this code to give to user information like: "Incompatible shape to this operation".
This will be nice to avoid known crashes of NaroCAD code or of OpenCascade operations.

You may check it using the nightly build.

No comments: