A toolbox to script and generate axonometric drawing operations.

To enable a maximum amount of thinkering, the following API documentation covers all public objects of the codebase. For scripting, the Axonometry, Point and Line classes and their corresponding methods are sufficient.

Classes

Axonometry(*angles[, ref_planes_distance, ...])

Axonometry by intersection setup.

Drawing([page_size, orientation])

Records all drawing and projection operations to be rendered.

Line(start, end[, data, plane])

The primary drawing element.

Plane()

Base class for Axonometry and ReferencePlane.

Point(**kwargs)

The atoms of geometry.

ReferencePlane(line_pair, projection_vector)

Tilted coordinate plane in which to draw, project into and from.

Surface(lines)

A collection class to apply various graphical operations on a set of lines.

Trihedron(angles[, position, size, ...])

The orthogonal projection of a trihedron.

Functions

is_valid_angle_pair

Test if an angle pair are valid axonometry angles.

mesh_from_obj_file

Import a 3D model as OBJ file.

Functions#

is_valid_angle_pair(angles: tuple) bool[source]#

Test if an angle pair are valid axonometry angles.

Check if angles satisfy the following conditions:

not (180 - (alpha + beta) >= 90 and
not (alpha == 0 and beta == 0) and
not (alpha == 90 and beta == 0) and
not (alpha == 0 and beta == 90)

Hint

Currently the angle value 0 is not supported. But one can use a float vlue of .1 to approximate zero.

Parameters:

angles (tuple)

Return type:

bool

mesh_from_obj_file(filepath: str, scale_factor: float = 50.0) compas.datastructures.Mesh[source]#

Import a 3D model as OBJ file.

The returned mesh can be manipulated with the COMPAS tools before beeing added to an axonometry with the function import_mesh().

Parameters:
  • filepath (str) – File location path of the model saved as OBJ file.

  • scale_factor (float) – Change size of imported object.

Returns:

COMPAS Mesh object

Return type:

compas.datastructures.Mesh