csg.geom.Node

class csg.geom.Node(polygons=None)

Bases: object

class Node

Holds a node in a BSP tree. A BSP tree is built from a collection of polygons by picking a polygon to split along. That polygon (and all other coplanar polygons) are added directly to that node and the other polygons are added to the front and/or back subtrees. This is not a leafy BSP tree since there is no distinction between internal and leaf nodes.

allPolygons()

Return a list of all polygons in this BSP tree.

build(polygons)
clipPolygons(polygons)

Recursively remove all polygons in polygons that are inside this BSP tree.

clipTo(bsp)

Remove all polygons in this BSP tree that are inside the other BSP tree bsp.

clone()
invert()

Convert solid space to empty space and empty space to solid space.

Previous topic

csg.core.CSG

Next topic

csg.geom.Plane

This Page