Version Control Support in FreeCAD
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Veteran
- Posts: 2190
- Joined: Tue Jan 03, 2017 10:55 am
Version Control Support in FreeCAD
I know that version control (e.g. git) support for FreeCAD document has been requested several times. I am also aware the Arch git utility mentioned in wiki page (but I couldn't find it in current release, is it removed?) Anyway, I hereby announcing my effort to bring proper support of version control (VC) to FreeCAD. In short, it is now possible to save and restore directly from uncompressed directory, and all files saved inside are completely text based and optimized for line based diff operation. For more details, please check out the big commit message here.
I didn't add any code to interact with the actual VC software. That being said, it is already pretty usable with an external VC, such as git, since it is easy to use git to find out what are the new files added. And unused files are auto deleted by FreeCAD, so git can show you the deleted files as well.
Many of you may know that my Link merge is on the way. This VC patch can be applied after the big merge. So I guess it can happen pretty soon. Part of the reason I am opening this topic is to inspire other interested developers to continue the development with the actual VC interaction. It should be modularized, preferably developed using Python, such that more than one VC can be supported. Interested developers can checkout my branch at here. For end users, please be warned that the file format hasn't been finalized yet, there may be breaking change along the way, although the archived format is kept same for backward compatibility.
I didn't add any code to interact with the actual VC software. That being said, it is already pretty usable with an external VC, such as git, since it is easy to use git to find out what are the new files added. And unused files are auto deleted by FreeCAD, so git can show you the deleted files as well.
Many of you may know that my Link merge is on the way. This VC patch can be applied after the big merge. So I guess it can happen pretty soon. Part of the reason I am opening this topic is to inspire other interested developers to continue the development with the actual VC interaction. It should be modularized, preferably developed using Python, such that more than one VC can be supported. Interested developers can checkout my branch at here. For end users, please be warned that the file format hasn't been finalized yet, there may be breaking change along the way, although the archived format is kept same for backward compatibility.
Re: Version Control Support in FreeCAD
Hi @realthumder
Is there a chance to have also a visual version control like the following one?
3d-repo-open-source-revision-control-framework-for-large-3d-models
3drepo.com/publications
-
Maybe an approach mixing your and the 3D diff would cover many user cases.
In my user case, when I model an enclosure I would need to know what I have changed from a version to an other (i.e. size or position of holes, or height etc...)... a tool to visualize it would be great, beside a tool for VC.
In kicad there is something arising:
(but obviously kicad is a simpler task because is on a 2D environment)
-
https://github.com/Gasman2014/KiCad-Diff
Is there a chance to have also a visual version control like the following one?
3d-repo-open-source-revision-control-framework-for-large-3d-models
3drepo.com/publications
-
Maybe an approach mixing your and the 3D diff would cover many user cases.
In my user case, when I model an enclosure I would need to know what I have changed from a version to an other (i.e. size or position of holes, or height etc...)... a tool to visualize it would be great, beside a tool for VC.
In kicad there is something arising:
(but obviously kicad is a simpler task because is on a 2D environment)
-
https://github.com/Gasman2014/KiCad-Diff
-
- Veteran
- Posts: 2190
- Joined: Tue Jan 03, 2017 10:55 am
Re: Version Control Support in FreeCAD
Yes exactly! I was actually thinking about a shape diff task panel while developing this VC patch. And I have a rough idea of how to accomplish this. Just compare two shapes face by face, by exporting individual faces and then compare the texts. My topo naming will be handy when it comes to finding the correct pair of faces to compare. But of course there maybe other difficulties. Anyway, this is definitely on my to do list.
Re: Version Control Support in FreeCAD
Great .. thx a lot!realthunder wrote: ↑Mon Aug 05, 2019 9:13 am Yes exactly! I was actually thinking about a shape diff task panel while developing this VC patch. And I have a rough idea of how to accomplish this. Just compare two shapes face by face, by exporting individual faces and then compare the texts. My topo naming will be handy when it comes to finding the correct pair of faces to compare. But of course there maybe other difficulties. Anyway, this is definitely on my to do list.
Re: Version Control Support in FreeCAD
looking forward for this...
Re: Version Control Support in FreeCAD
@reox would love to hear this news
reox wrote:
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
- DeepSOIC
- Veteran
- Posts: 7896
- Joined: Fri Aug 29, 2014 12:45 am
- Location: used to be Saint-Petersburg, Russia
Re: Version Control Support in FreeCAD
Wow, that's a good direction! I had plans for some hacks in part-o-magic for storing uncompressed FCStd files, but now that's getting irrelevant, as FC hopefully will soon support it internally thanks to you, nice!
Re: Version Control Support in FreeCAD
Great idea. It would also be great to have a PDM/PLM cloud platform for team collaboration. I had listed some of the Free, Libre and Open source options here. Imagine we could edit some components and they would be locked for other users and then everything would be merged automatically. Proper progress description...
The options are:
The options are:
Re: Version Control Support in FreeCAD
Besides git there seems subversion to be a widely used standard.
If locking is required then it may be necessary to split Document.xml in tiny pieces, e.g. with a file for every single object.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
-
- Veteran
- Posts: 2190
- Joined: Tue Jan 03, 2017 10:55 am
Re: Version Control Support in FreeCAD
That's exactly what I did. Check out my commit message. There are more options.