[HN Gopher] Versioning FreeCAD Files with Git (2021)
       ___________________________________________________________________
        
       Versioning FreeCAD Files with Git (2021)
        
       Author : todsacerdoti
       Score  : 59 points
       Date   : 2024-06-18 19:59 UTC (3 hours ago)
        
 (HTM) web link (blog.lambda.cx)
 (TXT) w3m dump (blog.lambda.cx)
        
       | OJFord wrote:
       | There's also a long-standing branch by a major contributor (but
       | with some kind of complicated politics that someone else can
       | probably better explain) which has a non-zipped non-churny on-
       | disk format specifically to allow using version control.
       | 
       | (I think it's called linkstage3, but it's been a long time, I
       | keep trying and failing to get on with FreeCAD, always end up
       | back using Fusion360. Not that that works well with git of
       | course, I just can manage to actually design stuff.)
        
         | stavros wrote:
         | I'm in the same boat, I always mean to switch to FreeCAD, I
         | always fail and stay with OnShape because that's what I know,
         | and I only use OnShape over Fusion because the former runs on
         | Linux.
         | 
         | I'd like to switch 5 FreeCAD just because then I can save the
         | files to my computer, but the UI is too different from
         | Fusion/OnShape.
        
           | juliangmp wrote:
           | I've tried multiple times to get into freecad but the ux is
           | just not for me. One time I also lost like 3 hours of work so
           | I called it quits.
           | 
           | Now I usually use solvespace, though that only does 3D
           | modeling, no CAM, ...
        
             | stavros wrote:
             | To be fair, SolveSpace is tiny, capable, and pretty nifty
             | overall. Maybe I should spend another 30 minutes to learn
             | it again, as I forgot everything I learned the first time
             | around, years ago.
        
       | rbanffy wrote:
       | Wouldn't it be nicer if FreeCAD had an option to save its files
       | as a directory and optionally use .zips for export/import
       | functions? It'd probably be much faster as well, as it wouldn't
       | need to decompress anything during operation.
        
       | riiii wrote:
       | You also need to prohibit merge commits.
       | 
       | I don't know the FC format. But I'm still willing to bet large
       | sums of money that if you happen to change the same version in
       | different ways and merge the changes that you'll wreck the file.
        
       | Always42 wrote:
       | I really really really tried to switch to freecad when I switched
       | to macos maybe 8 months ago. But I couldn't stick with it. The
       | program is just so far from solidworks for me that I cannot
       | justify the time and frustration... The interface feels like an
       | ee wrote it ( I am an Ee) and honestly it's buggy. I found myself
       | restarting the program alot to get out of certain states. I
       | wanted to like it... Mcad is the only thing I really want on my
       | Mac I don't have a solution for.
        
         | janice1999 wrote:
         | Same here. I really wish there was a fork that was willing to
         | try a new interface. Unfortunately these type of projects have
         | complex codebases and a lot of inertia so it's unlikely to
         | happen.
        
           | jononor wrote:
           | There is a fork calls Onseel I believe, which has a slighty
           | different UI. And it looks like many UI improvement are
           | coming into mainline now / over the next releases.
        
             | jacobgkau wrote:
             | Do you mean Ondsel?
        
               | jononor wrote:
               | Yes, that is the one!
        
             | alright2565 wrote:
             | 2 minor ui features are in Ondsel & latest git that make a
             | huge difference:
             | 
             | - auto-constraints. If you select a line and click
             | "constrain", it automatically chooses a length constraint.
             | If you select 2 lines, you get an angle constraint. A
             | circle, a radius constraint.
             | 
             | - constraining on drawing. When you draw a rectangle, you
             | can immediately type one dimension, press tab, type the
             | other dimensions. You don't need to manually select
             | constraints.
        
         | deskr wrote:
         | Look at MangoJelly's beginner's tutorial playlist, start on
         | first video and follow along:
         | https://www.youtube.com/watch?v=NXN7TOg3kj4&list=PLWuyJLVUNt...
         | 
         | There are definitely problems with FC (but then even expensive
         | CADs have problems). One of the biggest problem I think was
         | lack of good learning material. MangoJelly does an excellent
         | work on that.
        
         | resource_waste wrote:
         | What is your experience level?
         | 
         | I made the change and I did a few decent sized projects and a
         | major project. Obviously its no Catia/NX from a feature POV,
         | but it can do everything I needed.
        
         | nirvdrum wrote:
         | It's worth giving the 0.22 weekly snapshots a try. The UI isn't
         | as refined as commercial offerings that can pay people to just
         | do it, but the UX is much improved and quite usable. I tried to
         | get going with FreeCAD a while back and gave up, but I'm pretty
         | productive in it now for functional 3D prints.
        
         | zoytek wrote:
         | Same. Make the interface exactly like Solidworks. Prioritise
         | nothing else. And it might be a success. The interface and user
         | experience is fricking weird. It's like Coder Art at the
         | moment. But the frustrating thing is the core is in there
         | somewhere beneath the stupid GUI.
        
           | zoytek wrote:
           | Though I will say it can be good at converting file formats
           | sometimes. I have had a few tricky STEP files that it managed
           | to make usable.
        
             | zoytek wrote:
             | Last comment I promise.. https://www.freecad.org/ shows two
             | gears that can never work together in the real world. This
             | shows that the devs are coders first and know very little
             | about real world design. That or maybe the intern got told
             | to update the homepage. So much potential with FreeCad but
             | the devs seem not able to prioritise killing the overpriced
             | commercial SW. There are millions of $ on the table if
             | Freecad made commercial use was a priority. Maybe they just
             | like coding and not making money.
        
         | yungporko wrote:
         | check out solvespace if you havent already
        
         | mitthrowaway2 wrote:
         | Did you try the 'part design' workbench?
        
       | HPsquared wrote:
       | MS Office files are also a "zipped folder full of text files". I
       | wonder if the same approach could be used on those... Could be
       | very handy for Excel files if they diff nicely (probably not).
        
       | westurner wrote:
       | martinvoz/jj: https://github.com/martinvonz/jj :
       | 
       | > Working-copy-as-a-commit: _Changes to files are recorded
       | automatically as normal commits, and amended on every subsequent
       | change. This "snapshot" design simplifies the user-facing data
       | model (commits are the only visible object), simplifies internal
       | algorithms, and completely subsumes features like Git's stashes
       | or the index/staging-area._
        
       | dotancohen wrote:
       | The solution in the fine article relies on diffing what are
       | essentially zipped text files. Thus this solution might be
       | adaptable to LibreOffice files as well.
        
       | evolve2k wrote:
       | What if git was just applied to the unzipped files? Might that
       | side step some of the issues while also making say your GitHub
       | more usable?
       | 
       | This could be supported with a short bash script that did unzip
       | and git commit (I'd call it unzit as the name makes me laugh).
       | 
       | And then do builds as the last step, either storing the original
       | zip file or having a way to zip things back up.
        
       | jononor wrote:
       | I just check in my FreeCAD project files as binary blobs. For a
       | mostly-one-person projects this works without a problem. I have
       | never felt a need to look inside at the changes on the file
       | format level. Opening two files/versions and comparing them
       | visually I have don just once or twice. Frequent commits with
       | good messages helps a lot though. Have many hundred files now,
       | made over the last 10 years.
        
       | westurner wrote:
       | As text/code-based formats, e g. cadquery and the newer build123d
       | work with text-based VCS systems like git.
       | 
       | Is there a diff tool for FreeCAD?
       | 
       | nbdime: https://nbdime.readthedocs.io/en/latest/#git-integration-
       | qui... :
       | 
       | > _Git doesn't handle diffing and merging notebooks very well by
       | default, but you can configure git to use nbdime_ :
       | nbdime config-git --enable --global
       | 
       | Oh, zippey, for zip archives of text files in git:
       | https://bitbucket.org/sippey/zippey/src/master/
       | 
       | Are there tools to test/validate a FreeCAD model to check for
       | regressions over a range of commits?
       | 
       | git bisect might then be useful with FreeCAD models;
       | https://www.git-scm.com/docs/git-bisect :
       | 
       | > _This command uses a binary search algorithm to find which
       | commit in your project's history introduced a bug. You use it by
       | first telling it a "bad" commit that is known to contain the bug,
       | and a "good" commit that is known to be before the bug was
       | introduced. Then git bisect picks a commit between those two
       | endpoints and asks you whether the selected commit is "good" or
       | "bad". It continues narrowing down the range until it finds the
       | exact commit that introduced the change._
       | 
       | FWIW, LEGO Bricktales does automated design validation as part of
       | the game. Similarly, what CI job(s) run when commits are pushed
       | to a Pull Request git branch?
        
       | s1mon wrote:
       | Or you could just use Onshape. There's a free plan. It runs in
       | the cloud in a browser on desktop so it's on MacOS, Windows,
       | Linux, and there are mobile apps for iOS, iPadOS, and Android.
       | The versioning system is very much based on concepts from GIT,
       | and it will let you merge changes if you want. They recently
       | added workspace locking so that it can be even more like GitFLow
       | (i.e. branch to do work, merge changes into main when you're
       | happy) and the version graph shows merging more clearly than it
       | used to.
        
         | resource_waste wrote:
         | FreeCAD has a great license.
         | 
         | You are comparing apples and oranges.
        
       | _whiteCaps_ wrote:
       | I see all of these complaints about the FreeCAD interface, but I
       | learned it without knowing any other CAD software, so it seemed
       | fine to me.
       | 
       | Maybe I'm just weird, I like the GIMP's UI too.
       | 
       | Highly recommend MangoJelly's tutorials if you're interested in
       | learning it.
        
       | compootr wrote:
       | Git is one of the tools that makes me absolutely love the tech
       | industry
       | 
       | basically every other creative field has unmatched collaboration
       | tools to us
        
       ___________________________________________________________________
       (page generated 2024-06-18 23:00 UTC)