Global

Type Definitions

BoundingBox

A box in 2D/3D space.
Type:
  • object
Properties:
Name Type Description
min Vertex A 2D/3D vertex which defines the 'minimum' co-ordinates. This is the corner of the box with the lowest x, y and optional z co-ordinate.
max Vertex A 2D/3D vertex which defines the 'maximum' co-ordinates. This is the corner of the box with the highest x, y and optional z co-ordinate.
Source:

OpenSCADBoolean

Represents an OpenSCAD boolean. Equal to 'boolean'.
Type:
  • string
Source:

OpenSCADInfinity

Represents Infinity in OpenSCAD. Equal to 'inf'.
Type:
  • string
Source:

OpenSCADNaN

Represents NaN (Not a Number) in OpenSCAD. Equal to 'nan'.
Type:
  • string
Source:

OpenSCADNumber

Represents an OpenSCAD number. Equal to 'number'.
Type:
  • string
Source:

OpenSCADRange

Represents an OpenSCAD range. Equal to 'range'.
Type:
  • string
Source:

OpenSCADString

Represents an OpenSCAD string. Equal to 'string'.
Type:
  • string
Source:

OpenSCADUndefined

Represents undef (undefined) in OpenSCAD. Equal to 'undefined'.
Type:
  • string
Source:

OpenSCADVector

Represents an OpenSCAD vector. Equal to 'vector'.
Type:
  • string
Source:

Options

Key/value pair of options to configure the execution of an OpenSCAD test.
Type:
  • object
Properties:
Name Type Description
openSCADDirectory String The prefix to prepend to all uses/includes.
use Array.<String> List of .scad files to import as 'use'.
include Array.<String> List of .scad files to import as 'include'.
setUpText String Any required OpenSCAD code to set up the test.
testText String The OpenSCAD code to be tested and asserted on.
Source:

Triangle

An array of three 3D vertices which describe a triangle. See https://en.wikipedia.org/wiki/Triangle_mesh.
Type:
Source:

Types

A collection of the available OpenSCAD types.
Type:
  • object
Properties:
Name Type Description
BOOLEAN OpenSCADBoolean See OpenSCADBoolean.
INF OpenSCADInfinity See OpenSCADInfinity.
NAN OpenSCADNaN See OpenSCADNaN.
NUMBER OpenSCADNumber See OpenSCADNumber.
RANGE OpenSCADRange See OpenSCADRange.
STRING OpenSCADString See OpenSCADString.
UNDEF OpenSCADUndefined See OpenSCADUndefined.
VECTOR OpenSCADVector See OpenSCADVector.
Source:

UnitTestSCAD

This is the top level object exposed when requiring UnitTestSCAD into a NodeJS script.
Type:
  • object
Properties:
Name Type Description
Function function Exposes the Function class for use. This should be used when testing an OpenSCAD function.
ThreeDModule ThreeDModule Exposes the ThreeDModule class for use. This should be used when testing an OpenSCAD module which produces a 3D model.
TwoDModule TwoDModule Exposes the TwoDModule class for use. This should be used when testing an OpenSCAD module which produces a 2D model.
Types Types Exposes the Types object for use. This should be used when performing assertions on a Function.
Source:

Vertex

A 2/3 length co-ordinate representing a point in 2D/3D space.
Type:
  • Array.<number>
Source: