FacesConduit

class compas_rhino.conduits.FacesConduit(*args: Any, **kwargs: Any)[source]

Bases: compas_rhino.conduits.base.BaseConduit

A Rhino display conduit for faces.

Parameters
  • vertices (list of list of float) – The coordinates of the vertices of the faces.

  • faces (list of list of int) – The faces defined as lists of indices in vertices.

  • color (list of str or 3-tuple, optional) – The colors of the faces. Default is None, in which case the default color is used for all faces.

Attributes
  • color (list of RGB colors) – The color specification per face.

  • vertices (list of list of float) – The coordinates of the vertices of the faces.

  • faces (list of list of int) – The faces defined as lists of indices in vertices.

Examples

from compas.geometry import Polyhedron
from compas_rhino.conduits import FacesConduit

polyhedron = Polyhedron.generate(6)
faces = polyhedron.faces
vertices = polyhedron.vertices
polygons = [[vertices[index] for index in face] for face in faces]
conduit = FacesConduit(polygons)

with conduit.enabled():
    conduit.redraw(pause=5.0)

Methods

CalculateBoundingBox(e)

DrawForeground(e)

disable()

Disable the conduit.

enable()

Enable the conduit.

enabled()

redraw([k, pause])

Redraw the conduit.