Wednesday, March 4, 2009

Magnetism around...


If you worked with a tool that does design, one of the most used features is to create shapes with exact sizes. For this in NaroCAD you may use the grid. But there are some cases you will not get enough with that. So there is a need to consider other cases like: - middle of a line, the bounds of a line, or corners of a rectangle, etc. The solution should be specific enough and generic enough also.

Right now enters in scene a new Naro compoment: the Solver. What should this solver do? It should have a set of geometry and some rules that can make processing on top of that geometry. In future it may compute the interesting geometry beyond the points, as like shape constraints, etc.

Where is this solver used? When you input your values, the solver may offer the right values to you, or it may give to you the closest point that is interesting to you, or all points. The future extensions of solver may make Naro offer more visual hints to the user.

Where is the solver used right now? The solver right now processes the interesting line points and aligns the mouse to them (magnetic points). So at least is easy to draw a triangle made by three lines right now in Naro, without a grid.

Solver design (look to picture):
The solver consists of 2 components:
- a geometry tree (that resembles OCAF tree: a tree of nodes indexed by integers and a list of unique attributes, identified by a string)
- a RuleSet that can process the geometry tree

The RuleSet may be changed depending on geometry and needs. So if you add more rules, you will get a more complete solver.
The solver may be queried every time to give the most interesting geometry closed by a defined point, and it makes it easy to make mouse align to the returned solver geometry.

2 comments:

ytjun said...

Hi.
Thanks, this looks very good!
But is it support for Import/Export for Iges format ?

Best Regards!

ciplogic said...

Hi ytjun,

IGES import is already there, is not yet added to OCC scene!

I estimate that wrappers will gonna to change (as design approach) and the generating of wrappers will take both less time and will make easier to add a new component to them in around one-two months from now!

If you will want help on adding the extra packages using the current code, email me and I will give to you full instructions to build your wrappers (and if you will want, to send back your changes to be put as a part of Naro wrappers).

My email is ciprian dot mustiata at g mail com.

Best wishes to you too,
Ciprian