Skip to content

compas_brep.loop ¤

Classes¤

BrepLoop ¤

BrepLoop(
    edges: list[BrepEdge] | None = None,
    trims: list[BrepTrim] | None = None,
    is_outer: bool = True,
)

Pure Python implementation of a Brep loop.

A loop can store edges directly (legacy) or trims (STEP-inspired). When trims are present, edges are derived from them.

Attributes¤

edges property ¤
edges: list[BrepEdge]

The ordered list of edges in this loop.

If trims are present, returns their underlying edges. Singular trims contribute nothing — they have no edge. Otherwise returns the directly-stored edges (legacy path).

is_inner property ¤
is_inner: bool

True if this loop is an inner loop (a hole) of its face.

is_outer property writable ¤
is_outer: bool

True if this loop is the outer boundary of its face.

loop_type property ¤
loop_type: int

One of the :class:LoopType constants.

trims property ¤
trims: list[BrepTrim]

The ordered list of trims (coedges) in this loop.

LoopType ¤

Constants describing the role of a loop within its face.

Mirrors the loop types of Rhino.Geometry.BrepLoopType for the two cases compas_brep distinguishes.