Goal

The goal of this project is to make a CAD-system which is mainly accessed by a powerful functional programming interface. It will be Free and Open Source Software.

Requirements

  • Functional programmable interface
  • Mechanical CAD
    • Basic shapes
    • Basic boolean operations
  • Electronic CAD
    • Basic components
    • Simulation
  • A (more or less) standardized way of exchanging programs in form of modules/packages
  • A way of deconstructing the part(s) by virtually mimicking the assembly/fabrication process to get to the starting materials
  • A way of dealing with units, that doesn't feel like an afterthought
  • Synthesis of constraints for the parameters
  • Support for tolerances

Reasoning

Combining forms can use high level programs to build still higher level ones in a style not possible in conventional languages.

John Backus

One can think of these forms as basic shapes like for example cubes or spheres and the programs as functions, which combine them and return a "higher level" shape. This way very complex final outcomes can be generated. The ability to build a new layer of abstraction above the underlying principles and parts can make it easier to discuss them. This is why a functional approach to building this is superior to others.

The distribution system is already a solved problem, since there are already many different build systems and methods of distributing software and code. In this case Nix seems to be a good choice because it is already functional at its core. Especially Nix flakes seem to be a good fit for this task.

The functions which describe a part can have different parameters. As described here not all combinations of them lead to a valid result. A system to find the constraints would eliminate a lot of guesswork.

Idiomatic support for tolerances would similarily help with this.

Existing solutions

Solidworks, Freecad, and others are graphical CAD packages, which offer many features and are (mostly) easier to learn than a Code-CAD package.

OpenSCAD is a Code-CAD package, which means that it offers many advantages over Graphical packages like the ability to be versioned with Git. But it does not offer a functional interface. The output is implemented as a set of commands, that show a object on screen and not as a value, that is returned from the function.

FunCAD is a work (kind of) in progress CAD package. It aims to provide a operation for every step that could be done in a workshop. I believe this is the wrong way to do go about that because the user should be able to think abut fabrication after the shape is already done.

ImplicitCAD is a functional Code-CAD package, which is licensed under AGPL 3. This is a problem because it restricts the users to the same license for their projects. I think more permissive license would be more suitable (at least for the basic libraries that will be imported in the code of the part itself). The viewer/editor can be under a GPL license without any problem.