SceneConfig

class SceneConfig[source]

Bases: Config

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

Parameters:
pointscolorcompas.colors.Color

The default color of the points.

linescolorcompas.colors.Color

The default color of the lines.

facescolorcompas.colors.Color

The default color of the faces.

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.

lineswidthfloat

The default width of the lines.

pointssizefloat

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.