Drafts and versions
Every document has a branch called main, and every branch has a draft: the state you work on. Uploading a file or saving from the editor writes into the draft and replaces what was there. There's no history of saves. The draft holds one state, and that's fine, because it's yours to mess with.
A version is a snapshot you make on purpose with Create version. It holds the source, everything ClassCAD derived from it and, for an assembly, its references, each pinned to an exact version. Versions are numbered per document (v1, v2, …) and can have a name and a comment. A version's source never changes.
Create version needs three things:
- the draft has a source,
- its job has finished,
- it differs from the version it builds on.
After that, the draft builds on the new version.
This is how Onshape does it, and for the same reason: saving should be cheap and private, and a version is something other people can point at. An assembly references versions, never drafts. A release is always a version.
Derived files can still be added to a version until it's released. That way, a picture rendered later still lands on the version it belongs to.