NaroCAD code have right now multiple layers which clearly separates the roles.
To define a simple shape (like a line), you should have clear the following things:
- dependency (two points in 3D)
- a build shape code named function
- from view point you should define a modifier (named Action) that gets inputs like: application document, mouse events, etc. and builds from it a function and populate it's events.
So far so good, but this makes the code for actions to be error prone because it have multiple interactions with document, document items, mouse inputs, it should notify using SCSF events the interpreter,
An action as Extrude is pretty complicated right now: it should create a subshape face if needed, it should manage the document lifecycle, it should update the object shape.
This makes at least for shape based functions to try to simplify as much as possible the code. This task is linked with posibility to define in a simple way editable things.
Reviewing it makes me to think at least that at least most of actions can be built back from dependencies and some adnotations. I will try to complete this task tomorrow and try to find a clearer code level at the modifiers code. This will combine with plugins code that will make others to add in a very easy fashion support for other shapes.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment