Storing FreeCAD (CAD) projects

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
apeltauer
Posts: 184
Joined: Fri Aug 11, 2017 2:19 pm

Storing FreeCAD (CAD) projects

Postby apeltauer » Sat Jan 19, 2019 10:32 am

Hi all,

how do you guys store your FreeCAD project files? Does someone use a version control system like git?

BR Manuel
Jee-Bee
Posts: 1863
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Storing FreeCAD (CAD) projects

Postby Jee-Bee » Sat Jan 19, 2019 10:43 am

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.
User avatar
Kunda1
Posts: 4572
Joined: Thu Jan 05, 2017 9:03 pm

Re: Storing FreeCAD (CAD) projects

Postby Kunda1 » Sat Jan 19, 2019 12:17 pm

Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
apeltauer
Posts: 184
Joined: Fri Aug 11, 2017 2:19 pm

Re: Storing FreeCAD (CAD) projects

Postby apeltauer » Mon Jan 21, 2019 10:27 am

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...
User avatar
gflorent
Posts: 49
Joined: Fri Aug 10, 2018 10:05 am
Location: France
Contact:

Re: Storing FreeCAD (CAD) projects

Postby gflorent » Thu Jan 24, 2019 2:22 am

Jee-Bee wrote:
Sat Jan 19, 2019 10:43 am
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.
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.
User avatar
gflorent
Posts: 49
Joined: Fri Aug 10, 2018 10:05 am
Location: France
Contact:

Re: Storing FreeCAD (CAD) projects

Postby gflorent » Thu Jan 24, 2019 2:28 am

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.
chrisb
Posts: 16296
Joined: Tue Mar 17, 2015 9:14 am

Re: Storing FreeCAD (CAD) projects

Postby chrisb » Thu Jan 24, 2019 6:47 am

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,
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.
Jee-Bee
Posts: 1863
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Storing FreeCAD (CAD) projects

Postby Jee-Bee » Thu Jan 24, 2019 9:44 am

gflorent wrote:
Thu Jan 24, 2019 2:22 am
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.
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).

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).
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.
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
this is saved with a ECO and now it’s all locked

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
Also this is saved with a ECO and now it’s all locked again but some part with new revision. Some new parts and some the same

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
This machine is still under development. And someone would get some drawings from product a in his last official state. I should get somethng like:

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
but this is not the current state off all objects. I don’t know if this is more difficult with how a git based system works. But it is something that is considered.
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.
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.
reox
Posts: 578
Joined: Sat Aug 13, 2016 10:06 am

Re: Storing FreeCAD (CAD) projects

Postby reox » Sun Jan 27, 2019 10:57 am

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.
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
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).
yes, this is a problem. But not from the git side. The only thing is how to merge the brep files correctly?
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.
Jee-Bee wrote:
Thu Jan 24, 2019 9:44 am
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).
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 ;)