Skip to content
Michal Altair Valášek edited this page Apr 7, 2020 · 8 revisions

Altair's 2D Library for OpenSCAD is a library of useful functions, modules and constants for 2D drawing in OpenSCAD. Technical 3D models often have some basis in 2D and then they are extruded to 3D. This library can greatly simplify such code.

Using A2D

To use the library in your model, copy it alongside the SCAD file and include the following lines in your code:

include <A2D.scad>; //
assert(a2d_required([1, 6, 0]), "Please upgrade A2D library to version 1.6.0 or higher.");

Although only the include <A2D.scad>; part is really necessary, the code has two best practices:

  • Include link to the project homepage, because your model could not be built without the library and the link will indicate where the library is supposed to be downloaded from.
  • Check for minimum required version, because someone might have older version of the library, which does not support the required features. The library version can be found in comment at the beginning of the A2D.scad file or on the releases page.

General Principles

The library requires OpenSCAD version 2019.05, which is current version at time of writing. Should be compatible with further versions as well.

Functions and modules in this library do a decent amount of checking if the arguments have sane values. But it's up to users to maintain reasonable relation of sizes and corner radius etc.


You can’t perform that action at this time.