guile-exprcad
is a computer-aided design (CAD) library for Guile.
This project is still very much work in progress!
The library allows building CAD models in a functional programming style. It uses an immutable data structure to represent geometric shapes.
Most of the heavy lifting is done by Open CASCADE Technology.
Place the following code in a file called model.scm
:
(use-modules ((exprcad) #:prefix exprcad:))
(define model
(exprcad:box 1 2 3))
(exprcad:export-step-file "model.step" model)
Then, run the script:
guile -s ./model.scm
This generates the chosen shape and exports it to a STEP file called model.step
.
Currently, the code is the documentation as the library is still under heavy development.
On Debian GNU/Linux 12 (bookworm), download or build the .deb
file, then install it:
apt install ./guile-exprcad_*_amd64.deb
Install the docker.io
package and run the following command:
sudo DOCKER_BUILDKIT=1 docker build --output type=tar,dest=build.tar .
Then, extract the generated build.tar
file into the build
directory to obtain the package file:
tar --extract --file ./build.tar --one-top-level=build --strip-components=1
guile-exprcad
is inspired by these great projects:
Copyright 2023 Pascal Schmid
This file is part of guile-exprcad.
guile-exprcad is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
guile-exprcad is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with guile-exprcad. If not, see https://www.gnu.org/licenses/.