Defining CSG objects from within Julia.
ConstructiveGeometry.jl
provides functions for defining 2d shapes
and 3d solids via basic primitives and CSG operations, as well as
functions for displaying these objects and output to SVG or STL files.
It is possible to use this module to define basic 3d models. Examples are included in the examples subdirectory:
CairoMakie
back-end.
It is also possible to export a model as a .svg
(for 2d shapes)
or .stl
(for 3d volumes) file.The following features should be mostly working now:
This package defines both a structure for abstractgeometric objects and a way to convert such “ideal” objects to concrete meshes. These meshes are implemented as triangulated surfaces using the IGL graphics library.
Our goal is to replicate what OpenSCAD proved works well (a simple syntax for script-based CAD) while fixing some of the less-fun parts.
We believe that using Julia provides the following advantages:
On the other hand, one notable drawback of Julia (in particular with many dependencies) is the long “time-to-first-plot”. Once everything is loaded however, the second, third plots etc. are much faster.
Reaching feature-parity (at least for static designs)
is one of the first goals of this package.
The main missing part for this is the primitive text
.
On the other hand, this package already provides a few constructions
absent from (base) OpenSCAD, such as 3d offsetting or surface sweep.
Once this feature parity is achieved, we plan to move on to include more content (e.g. some of what is usually implemented library-side in OpenSCAD), such as:
Currently (as of 2021-08), ConstructiveGeometry.jl
happily uses
the following libraries:
libigl
for 3d mesh operations;Clipper
for polygon operations;Makie
for visualization;Triangle
for triangulation;Polyhedra
and GLPK
for convex hull.This project is currently still at the “one-person effort” stage, although it is not indended that it remain here. There are multiple parts which could use some help; apart from the Todo-list above, even something as simple as playtesting the project would be appreciable help.