MeshObject
- class MeshObject[source]
Bases:
ViewerSceneObject
,MeshObject
Viewer scene object for displaying COMPAS Mesh geometry.
- Parameters:
- mesh
compas.datastructures.Mesh
A COMPAS mesh.
- vertexcolorUnion[Dict[Any,
compas.colors.Color
],compas.colors.Color
]], optional The vertex color. Defaults to the value of pointcolor in viewer.config.
- edgecolorUnion[Dict[Any,
compas.colors.Color
],compas.colors.Color
]], optional The edge color. Defaults to the value of linecolor in viewer.config.
- facecolorUnion[Dict[Any,
compas.colors.Color
],compas.colors.Color
]], optional The face color. Defaults to the value of surfacecolor in viewer.config.
- hide_coplanaredgesbool, optional
True to hide the coplanar edges. Defaults to the value of hide_coplanaredges in viewer.config.
- use_vertexcolorsbool, optional
True to use vertex color. Defaults to the value of use_vertexcolors in viewer.config.
- **kwargsdict, optional
Additional options for the
compas_viewer.scene.ViewerSceneObject
andcompas.scene.MeshObject
.
- mesh
- Attributes:
- mesh
compas.datastructures.Mesh
The mesh data structure.
- use_vertexcolorsbool
True to use vertex color. Defaults to False.
- hide_coplanaredgesbool
True to hide the coplanar edges.
- mesh
See also
Methods
Draw the edges of the mesh.
Draw the faces of the mesh.
Draw the vertices of the mesh.
Inherited Methods
Converts the instance to a string.
Add a child item to the scene object.
The main clearing method.
Clear the edges of the mesh.
Clear the faces of the mesh.
Clear the vertices of the mesh.
Make an independent copy of the data object.
Draw the object from its buffers
Draw the object instance for picking
Draw the mesh of the mesh.
Construct an object of this type from a JSON file.
Construct an object of this type from a JSON string.
Initialize the object
Create buffers from point/line/face data.
Create all buffers from object's data
Remove a child node from this node.
Compute a hash of the data for comparison during version control using the sha256 algorithm.
Convert an object to its native data representation and save it to a JSON file.
Convert an object to its native data representation and save it to a JSON string.
Traverse the tree from this node.
Update the object.
Update existing buffers from point/line/face data.
Validate the data against the object's data schema.