Hacker News new | ask | show | jobs
by nine_k 888 days ago
Just thinking aloud. Change-tracking software like git works with "patches", that is, changes applied to a source file to produce the changed file. They are hardwired to work with text files like source code, with short lines, and with line-oriented changes.

But nothing prevents such a system from working with arbitrary files, as long as there is a tool to create a "patch" or a "diff" (that is, a description of a change) and a tool that can apply such "diff". Git does have a mechanism to plug in both of these tools, depending on the file type.

I have a very vague idea of what CAD files are internally, but I suppose they are some kind of a database, and they are not colossal (unlike e.g. video files or such). They certainly could use this mechanism to allow tools like git (or hg, or maybe even perforce) be used in workflows involving CAD files, with human-understandable and reviewable changes.

I wonder if someone has ever tried that. I can't be the first person to have this obvious idea.

3 comments

A lifetime ago, I worked on a large project that was never completed because Google released Wave, which addressed the same problem. Wave did it in a less useful way, but my employer (understandably) didn't want to go toe-to-toe with Google and so abandoned it.

The main part I worked on was to be able to do exactly this (not for CAD files specifically, but including those). It was a very difficult, but rewarding, problem to solve.

I think version control like this would work great with programmatic CAD like OpenSCAD
Git works great with text-based code-cad. My personal favourite flavor is build123d, which is based on cadquery.
Since OpenSCAD uses basically source code format, it already does.

I'm more interested in tracking and versioning edits to KiCAD schematics, for instance.

I think you are describing something similar to Perforce Versic [1]. I use this at work to diff schematic or layout. The ugly thing is: it's perforce.. I wish there was an open source alternative.

[1] https://www.perforce.com/products/versic

KiCAD’s storage format is s-expressions, so it works OK with git (better than binary file formats). However I have not tried to merge concurrent edits by multiple people; I suspect if there is any conflict you are basically out of luck.
CSG is not as useful as BReps
This is what allspice.io does