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
Re: Version Control Support in FreeCAD
Just saw the new discussions here. But it seems not many people bother to read through the posts, huh? What I have already done is to allow FreeCAD to save its document into a directory, without compression. The user can easily choose various layout of the directory. The one that is most suitable for version control in my opinion is to save each object into its own XML file, and save its BRep shape into separate file, all of which are doable in my branch. To see meaning diffs, simply ignore the BRep file diff. On the other extreme, the user can choose to save everything into two XML (Document.xml and GuiDocument.xml), for whatever reason. The actual 'Version Control' part can be implemented outside of FreeCAD.
BTW, I have also introduced APIs in my topo naming PR to compare shapes, that'll be the basis of a meanful diff tool for Brep shapes.
BTW, I have also introduced APIs in my topo naming PR to compare shapes, that'll be the basis of a meanful diff tool for Brep shapes.
Re: Version Control Support in FreeCAD
I think I saw you mention you added in the ability to save unzipped files, and I was just adding my support behind that effort.
Thanks
Thanks
Re: Version Control Support in FreeCAD
According to https://github.com/realthunder/FreeCAD/ ... c933b2de1c the defaults for the file layout (Force XML, Prefere Binary, Split XML) can be adjusted in parameter editor path BaseApp/Preferences/Document.
But i can't find these parameters in there. Also searching for 'xml' in the exported parameters doesn't yield results.
How can these defaults be adjusted then?
But i can't find these parameters in there. Also searching for 'xml' in the exported parameters doesn't yield results.
How can these defaults be adjusted then?
-
- Veteran
- Posts: 2190
- Joined: Tue Jan 03, 2017 10:55 am
Re: Version Control Support in FreeCAD
You can create those parameters by yourself. Right click in parameter editor, and select bool type for 'SplitXML' and 'PreferBinary', and int type for 'ForceXML'.tomsaw wrote: ↑Mon Nov 07, 2022 9:17 am According to https://github.com/realthunder/FreeCAD/ ... c933b2de1c the defaults for the file layout (Force XML, Prefere Binary, Split XML) can be adjusted in parameter editor path BaseApp/Preferences/Document.
But i can't find these parameters in there. Also searching for 'xml' in the exported parameters doesn't yield results.
How can these defaults be adjusted then?
Re: Version Control Support in FreeCAD
Thanks realthunder, and Interesting: I would expect any ever possible parameter predeclared in there. Think like that's the standard, known f.e. from firefox -> about:configrealthunder wrote: ↑Mon Nov 07, 2022 9:27 amYou can create those parameters by yourself. Right click in parameter editor, and select bool type for 'SplitXML' and 'PreferBinary', and int type for 'ForceXML'.tomsaw wrote: ↑Mon Nov 07, 2022 9:17 am According to https://github.com/realthunder/FreeCAD/ ... c933b2de1c the defaults for the file layout (Force XML, Prefere Binary, Split XML) can be adjusted in parameter editor path BaseApp/Preferences/Document.
But i can't find these parameters in there. Also searching for 'xml' in the exported parameters doesn't yield results.
How can these defaults be adjusted then?
- adrianinsaval
- Veteran
- Posts: 5541
- Joined: Thu Apr 05, 2018 5:15 pm
Re: Version Control Support in FreeCAD
FreeCAD parameter editor is more comparable to the windows registry. I know, that's a terrible model to follow.
Re: Version Control Support in FreeCAD
At least there are no GUIDs destroying all readability.adrianinsaval wrote: ↑Mon Nov 07, 2022 1:52 pm FreeCAD parameter editor is more comparable to the windows registry. I know, that's a terrible model to follow.
(I often add parameters to the Windows registry. They are not all preloaded.)
In the case of Firefox the extra (hidden) parameters are simply built into the code. In the case of FreeCAD all the adjustable parameters are contained in the user configuration files. Adding every possible predeclared option could greatly increase the size of those files. It could also make navigating and editing the parameters more difficult.
[Edit] I have added parameters to Firefox as well. They are not all pre-declared.
Gene
Re: Version Control Support in FreeCAD
All right then, i'm not familiar with the registry philosophy (using fedora) ;P but can adapt to it.
What's a generic way to find (all) parameter candidates? Throwing some regex onto the sourcecode ?
What's a generic way to find (all) parameter candidates? Throwing some regex onto the sourcecode ?
Re: Version Control Support in FreeCAD
There's a wiki page but I can't find it right now...
Regards / Viele Grüße
Max
Max
Re: Version Control Support in FreeCAD
Hi there, I started by commenting out on the existing issue until I found this forum thread… thanks for working on it, I'd welcome this as well, being used to OpenSCAD + git.
For now I'll disable compression in the GUI and hope this gets merged before I have anything to publish, so I can filter-branch before doing so.
For now I'll disable compression in the GUI and hope this gets merged before I have anything to publish, so I can filter-branch before doing so.