FacesConduit

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

Bases: BaseConduit

A Rhino display conduit for faces.

Parameters
  • vertices (list[[float, float, float] | Point]) – The coordinates of the vertices of the faces.

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

  • color (tuple[int, int, int] or list[tuple[int, int, int]], optional) – The colors of the faces. Default is None, in which case the default color is used for all faces (FacesConduit.default_color).

Attributes

color (list[System.Drawing.Color]) – The color specification per face.

Class Attributes

default_color (System.Drawing.Color) – The default color is FromArgb(255, 255, 255).

Examples

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

polyhedron = Polyhedron.generate(6)
conduit = FacesConduit(polyhedron.vertices, polyhedron.faces)

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

Methods

DrawForeground

Draw the faces as polygons.

Inherited Methods

CalculateBoundingBox

Calculate the model extents that should be included in the visualization.

disable

Disable the conduit.

enable

Enable the conduit.

enabled

Create a context for the conduit with automatic enabling and disabling.

redraw

Redraw the conduit.