Storing FreeCAD (CAD) projects
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
Storing FreeCAD (CAD) projects
Hi all,
how do you guys store your FreeCAD project files? Does someone use a version control system like git?
BR Manuel
how do you guys store your FreeCAD project files? Does someone use a version control system like git?
BR Manuel
Re: Storing FreeCAD (CAD) projects
I don't use it right now. I have thought about a version system before. For me the most important reason for not git is it don't know any difference between a release and a version change.
for example we work together on the same project an i create a file part_001.fcstd. when check it in it becomes version 0.0. you change it for some reason 0.1. A few changes later it the part will be released as version 0.xx.
With windchill as i use now i have to revise the part so it get a new revision number what is 1.xx. now we can do some modifications til it is 1.xx+nn. release it again and all start all over again.
As far i know git can't do that. but i'm not that far in checking the possibilities with git.
for example we work together on the same project an i create a file part_001.fcstd. when check it in it becomes version 0.0. you change it for some reason 0.1. A few changes later it the part will be released as version 0.xx.
With windchill as i use now i have to revise the part so it get a new revision number what is 1.xx. now we can do some modifications til it is 1.xx+nn. release it again and all start all over again.
As far i know git can't do that. but i'm not that far in checking the possibilities with git.
Re: Storing FreeCAD (CAD) projects
There have have been several attempts to tackle this:
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Storing FreeCAD (CAD) projects
thanks for the links...
it is a while since the thread was active, too sad.... maybe some day their is a solution to handle this...
it is a while since the thread was active, too sad.... maybe some day their is a solution to handle this...
Re: Storing FreeCAD (CAD) projects
Yes, using git would make things a bit different.
You can use 'git tag' to tag a specific project version as a release. That would happen at project level, not for a specific part. The logic of decentralized versionning (git) is quite different from the centralized one that most CAD users are used too. Yet, coming from a software dev background and being an avid CAD user and developper, I believe the decentralized workflow is superior in most use-cases, even for CAD. Some hurdles (diffing and merging CAD is the highest one IMO) have to be jumped but I believe git will become more and more prominent for CAD in the next decade.
But to come back to the topic, something like part-REV.B-04 might be difficult with git because it allows by design to have people working in parallel on the same file: so how do we define a version when you and I modify it at the same time? This can only happen when we merge our works into a single file or choose the best file from 2 options (yours or mine).
Aside from that, CAD scripts are perfect candidates from git version management.
EDIT: forgot to mention the binary file issue: git looses some of its interest when dealing with files that are not human readable. The FCStd format, for example, has this issue and the git databse may grow fast as it has to store the whole thing each time it is modified. But the versions are stored properly. In the context of CAD, human readable means 3D viewable, with aids to diff and merge (you don't want to diff and merge the text inside a STEP file!). So, if many people work on the same project, CAD scripts that carry creation logic (and its is pretty easy to get the script equivalent of your GUI actions in FreeCAD (brilliant design !!)) are better stuff to store in git than big binaries.
Last edited by gflorent on Thu Jan 24, 2019 2:59 am, edited 3 times in total.
Re: Storing FreeCAD (CAD) projects
And by the way, I am developping a git based platform at : http://cadracks.org. FCStd files and vendor-neutral files (STEP, IGES, STL, BREP) receive a special treatment in v0.1 as there is a 3D viewer for these files.
It will soon do more: https://cadracks.github.io/blog/2019/01/15/The_roadmap
Feel free to register, to create a repository and add some files (tuto at: https://cadracks.github.io/doc/2019/01/ ... ng_started).
And let us know how managing CAD projects with git goes for you.
It will soon do more: https://cadracks.github.io/blog/2019/01/15/The_roadmap
Feel free to register, to create a repository and add some files (tuto at: https://cadracks.github.io/doc/2019/01/ ... ng_started).
And let us know how managing CAD projects with git goes for you.
Re: Storing FreeCAD (CAD) projects
FreeCAD is something in between. If you unzip the FreeCAD file it is well possible to diff the text files which will reduce the needed size enormously. And experts can well see from the diffs what has changed, if it's not too much.gflorent wrote: ↑Thu Jan 24, 2019 2:22 am EDIT: forgot to mention the binary file issue: git looses some of its interest when dealing with files that are not human readable. The FCStd format, for example, has this issue and the git databse may grow fast as it has to store the whole thing each time it is modified. But the versions are stored properly. In the context of CAD, human readable means 3D viewable,
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Storing FreeCAD (CAD) projects
That is exactly what i mean. What if a part is released for certain project and it have to edited for another project. I have to change only one / few part(s).
This never could happend with most cad systems. If we both work on a project (or the same) with a shared part. If i have the ability to change a part than you don’t. If you want another change we can talk with eachother so i fix you’re change too. Or you change it after me.gflorent wrote: ↑Thu Jan 24, 2019 2:22 am But to come back to the topic, something like part-REV.B-04 might be difficult with git because it allows by design to have people working in parallel on the same file: so how do we define a version when you and I modify it at the same time? This can only happen when we merge our works into a single file or choose the best file from 2 options (yours or mine).
Things like verion numbering in file names is never a good idea! Every part or object should have a revision number and a version number. Also there must be a method that a part that is released is protected agains undesireble changings. Every change should be a conscious choice.
This changes should be saved in a database. The database should know which version is available. Probaly saved multiple versions(at least the released ones).
let’s say we have had first product a
Code: Select all
product_a_assy
|_ subassy_1
|_ subassy_2
|_ subsubpart_1
|_ subsubpart_2
|_ subsubpart_3
|_ subassy_3
|_ subsubpart_4
|_ subsubpart_2
|_ subsubpart_5
|_ subpart_1
|_ subpart_2
|_ subpart_3
we create a new product B with this config
Code: Select all
product_b_assy
|_ subassy_1b
|_ subassy_2b
|_ subsubpart_1b
|_ subsubpart_2 – rev 1
|_ subsubpart_3 – rev 1
|_ subassy_3
|_ subsubpart_4
|_ subsubpart_2 – rev 1
|_ subsubpart_5
|_ subpart_1 – rev 1
|_ subpart_2
|_ subpart_3 – rev 1
We start to create a new product again. Which is now product C
Code: Select all
product_c_assy
|_ subassy_1
|_ subassy_2b
|_ subsubpart_1c
|_ subsubpart_2 – rev 2
|_ subsubpart_3 – rev 1
|_ subassy_3
|_ subsubpart_4 – rev 1
|_ subsubpart_2 – rev 2
|_ subsubpart_5
|_ subpart_1 – rev 1
|_ subpart_2 – rev 1
|_ subpart_3 – rev 2
Code: Select all
product_a_assy
|_ subassy_1
|_ subassy_2
|_ subsubpart_1
|_ subsubpart_2 – rev 1
|_ subsubpart_3 – rev 1
|_ subassy_3
|_ subsubpart_4
|_ subsubpart_2 – rev 1
|_ subsubpart_5
|_ subpart_1 – rev 1
|_ subpart_2
|_ subpart_3 – rev 1
I think you forgot that most mechanical engineers aren’t programmers. And a second commend a lot of CAD packages store binary because it speeds everything up.gflorent wrote: ↑Thu Jan 24, 2019 2:22 am forgot to mention the binary file issue: git looses some of its interest when dealing with files that are not human readable. The FCStd format, for example, has this issue and the git databse may grow fast as it has to store the whole thing each time it is modified. But the versions are stored properly. In the context of CAD, human readable means 3D viewable, with aids to diff and merge (you don't want to diff and merge the text inside a STEP file!). So, if many people work on the same project, CAD scripts that carry creation logic (and its is pretty easy to get the script equivalent of your GUI actions in FreeCAD (brilliant design !!)) are better stuff to store in git than big binaries.
Re: Storing FreeCAD (CAD) projects
The idea was to have something like bare freecad files, which are not zip but inside a folder. Then, git could easily manage everything.gflorent wrote: ↑Thu Jan 24, 2019 2:22 am EDIT: forgot to mention the binary file issue: git looses some of its interest when dealing with files that are not human readable. The FCStd format, for example, has this issue and the git databse may grow fast as it has to store the whole thing each time it is modified.
yes, this is a problem. But not from the git side. The only thing is how to merge the brep files correctly?gflorent wrote: ↑Thu Jan 24, 2019 2:22 am But to come back to the topic, something like part-REV.B-04 might be difficult with git because it allows by design to have people working in parallel on the same file: so how do we define a version when you and I modify it at the same time? This can only happen when we merge our works into a single file or choose the best file from 2 options (yours or mine).
Idk, is there any CAD solution which allows working on the same geometry and have some good merging strategy?
For working on different geometries: this should work IMHO but then there is the topological naming problem which make it nasty to update for example assemblies.
probbaly you want git submodules then.
I really want to work on freecad-gitproject again but my time is limited and too much other stuff is going on
If someone wants to contribute to the tool, please feel free to test it, open up tickets, send in PRs, whatever