Assembly project

Here the project plan for the Assembly modul as part of the Development_roadmap

Purpose and principles
This is a software development project aimed to implement a Assembly and product creation capabilities. Its about implementing some core features into the CAD modules of FreeCAD, Part and Assembly.

The development steps are planed here and tracked in the Issue tracking system to get a well formed change log: Issue tracker

Outcome
Aim of the project is to enable FreeCAD accomplish a design task like this one:



This will be achived by using the Assembly to put all the different kind of parts together with constraints and stay as close as possible to the ISO 10303 specification to allow easy model exchange.

Another aim is to utilize ODE for kinematics.

Multi model
A key feature to real world designs is the ability to split a design into handleable pieces. Its impossible to work on all aspects of a design at the same time or alone. That is true for the geometry and also for engineering tasks like FEM or CAM. There for FreeCAD need the ability to split models. That opens some possibilities:
 * Late loading - Only need resources like Graphics and main memory for the piece you work on.
 * Concurrent engineering - allows many people to work on the same design
 * Fine grained Version control - better control over various aspects of the design
 * and many more....

A multi model design could look like that:

Copyright
Now copyright of 3D models is a interesting field. 3D models do fall under the copyright. The copyright falls to the creator of the model. Its only possible to protect the shape, which is represented by the model, by a patent or a design patent (US). But patents cover only the creation of a physical part to earn money. As an example the Microsoft Mouse design patent.

So we have to remember the creator (copyright holder) and any kind of license for each model/product/file of a design. For the license I would use the CC type licenses. http://creativecommons.org/

ISO 10303
The ISO 10303 (STEP) is very important in this field. Its the only good standardized and widely discussed and recognized definition of product structures I know of.

Here some links with info:
 * ISO 10303 on Wikipedia
 * WikiStep.org with a lot of basic info but mostly toward STEP-NC
 * The product structure in STEP
 * Some examples about STEP
 * ISO 10303-11 about the modeling language (EXPRESS)
 * A Wikipedia article about product modeling
 * Overview of Part 41 -- Fundamentals of Product Description and Support
 * Overview of Part 44 (edition 2) -- Product Structure Configuration
 * Examples of small AP 214 files

Assembly constraints
An important role in building up large models and products take the assembly constraints, which formulate certain rules how parts assemble a product. Mainly these are Fix, FaceToFace, Angle, Offset and some kind of pattern instantiation. This constraints need a specialized solver to keep them up if the parts change. This solver is fundamentally different to the Sketch solver. I think we have to go for a graph based approach on this...

Kinematics
A further step would be to use ODE, or similar libs, to put the parts and the assembly constraints together to do a kinematic simulation of machines. That would allow checking for collisions and exploring the conditions of a mechanical system.

Revision control
An important point is the version control and distributed development. With multi model design we are able to split designs in smaller pieces and can distribute work among a team. For a software developer "distributed" and "Version" sounds familiar, so why not use a DVCS. A good comparison is here.

Since we deal with big data, and data which can not be easily diffed, we are limited to those which use the snapshot persistence model. Any system storing just diffs will have grave problems with our data (personally tested with Mercurial and Catia files). After sorting out commercial and non-free, basically only Git and SVN remains.

Using Git for the task leaves us with two big frontiers: will put a lot of complexity in that matter. To hide it from the user will be a challenging task. documents and show and merge differences in the objects, features and parameters. Also not easy.
 * Git is very complicated; Branching merging and tagging along a non linear development path let alone merging with remote repositories (push, pull)
 * Git allow Merge and Diff handlers for certain file types; We need one for .fcstd. This handler has to examine two FreeCAD

But using git would open a lot of possibilities even high class PLM system would dream of...

Organizing
Here some development task needed for a decent Assembly/Product design:

Infrastructure
the assembly will demand some changes in the base system and infrastructure layer of FreeCAD.

Multi model
Multi-Model was in mind from the beginning of FreeCADs design. There fore we have a multi document interface and can load unlimited documents. But we need to upgrade especially the 3D-Viewer to handle showing more the one document in its view (Part-Trees).

Part-Trees
Since in Assembly the composition of parts and sub-assemblies is the main workflow, the tools to stack (group) Parts in a tree have to be implemented. Unlike a DocumentObjectGroup the Assembly group has to deal with visibility and placement of the children. Best done by stacking ViewProvider on each other. That need a kind of ClaimChildren interface to the ViewProviders.

Unified Drag/Drop/Copy/Paste interface
A interface allow ViewProvider and Workbenches full control about Drag/Drop/Copy/Paste operations in the tree or the 3D view.

external resources
Handling of doped links (from internal or external browsers). Means loading resources over (potential) slow connections (http).

Object model
Class tree to deal with concepts needed. References, interfaces, document links, views, compounds, constraints, configurations, and many more...

Assembly constraint solver
Define a interface to a assembly constraint solver, very similar to the Sketcher solver interface.

Physics simulation interface
Interface to allow a (external) (multi)physics simulation software to take control over the positioning of the Parts of a assembly. This would allow to use "bullet" or "ODE" to do kinematic tests and DMU.

Next actions

 * Object model
 * wait for the 0.12 release branch happened