compas.scene

This package defines sceneobjects for visualising COMPAS items (geometry & datastructures). Every item type is paired with a corresponding scene object type that is capable of visualizing the data of the object. The scene objects are implemented as pluggables, and automatically switch between plugins depending on the contexct in which they are used.

Classes

GeometryObject

Base class for scene objects for geometry objects.

MeshObject

Base class for all mesh scene objects.

GraphObject

Scene object for drawing graph data structures.

Scene

A scene is a container for hierarchical scene objects which are to be visualised in a given context.

SceneObject

Base class for all scene objects.

SceneObjectNotRegisteredError

Exception that is raised when no scene object is registered for a given data type.

VolMeshObject

Scene object for drawing volmesh data structures.

Functions

get_sceneobject_cls

register

Register a scene object type to a data type.

Pluggables

Pluggables are functions that don’t have an actual implementation, but receive an implementation from a plugin.

clear

Pluggable to clear the current context of the scene or a list of objects through guids.

before_draw

Pluggable to perform operations before drawing the scene.

after_draw

Pluggable to perform operations after drawing the scene. This function is automatically called at the end of compas.scene.Scene.draw(). Parameters ---------- drawn_objects : list A list of objects that were drawn.

register_scene_objects

Registers scene objects available in the current context.