Surface#

class Surface(lines: list[Line] | list[Point])[source]#

Bases: object

A collection class to apply various graphical operations on a set of lines.

Raises:

AssertionError – If the geometries are not all in the same plane.

Parameters:

lines (list[Line] | list[Point])

Methods

bounding_box

Draw the axis-aligned minimum bounding box of a list of points in the plane.

closed

Get surface collection of a computed continous line.

from_points

Make surface from convex hull of a list of points.

Attributes

is_closed

Number of unique points equal number of lines.

key

plane

Methods#

Surface.bounding_box()[source]#

Draw the axis-aligned minimum bounding box of a list of points in the plane.

Raises:

NotImplementedError – WIP.

static Surface.closed(geometries: list[Line] | list[Point]) Surface[source]#

Get surface collection of a computed continous line.

Find missing lines from a sparse collection of lines or points. Compute new lines by checking nearest points of existing lines. Make a surface object from that new line collection.

Parameters:

geometries (list[Line] | list[Point]) – A sparse collection of Point or Line.

Return type:

Surface

static Surface.from_points(points: list[Point]) Surface[source]#

Make surface from convex hull of a list of points.

Raises:

NotImplementedError – WIP.

Parameters:

points (list[Point])

Return type:

Surface

Attributes#

Surface.is_closed#

Number of unique points equal number of lines.

Surface.key#
Surface.plane#