ViewerConfig

class ViewerConfig[source]

Bases: Config

The class representation for the viewer.json of the viewer. The viewer.json contains all the settings about the general (default) appearance of the scene objects.

Parameters:
pointcolorcompas.colors.Color

The default color of the points.

linecolorcompas.colors.Color

The default color of the lines.

surfacecolorcompas.colors.Color

The default color of the surfaces.

show_pointsbool

The default setting for showing the points.

show_linesbool

The default setting for showing the lines.

show_facesbool

The default setting for showing the faces.

linewidthfloat

The default width of the lines.

pointsizefloat

The default size of the points.

opacityfloat

The default opacity of the objects.

hide_coplanaredgesbool

The default setting for hiding the coplanar edges.

use_vertexcolorsbool

The default setting for using the vertex colors.

framesizetuple[float, int, float, int]

The default size of the frame.

show_framezbool

The default setting for showing the z-axis of the frame.

vectorsizefloat

The default size of the vectors.

Methods

from_default

Load the default configuration.

from_json

Construct an object of this type from a JSON file.

Inherited Methods

ToString

Converts the instance to a string.

copy

Make an independent copy of the data object.

from_jsonstring

Construct an object of this type from a JSON string.

sha256

Compute a hash of the data for comparison during version control using the sha256 algorithm.

to_json

Convert an object to its native data representation and save it to a JSON file.

to_jsonstring

Convert an object to its native data representation and save it to a JSON string.

validate_data

Validate the data against the object's data schema.