Polyline

class compas_singular.geometry.Polyline(points)[source]

Bases: compas.geometry.primitives.polyline.Polyline

Methods

copy([cls])

Make an independent copy of the data object.

divide_polyline(num_segments)

Divide a polyline in equal segments.

divide_polyline_by_length(length[, strict, tol])

Splits a polyline in segments of a given length.

from_data(data)

Construct a polyline from a data dict.

from_json(filepath)

Construct an object from serialized data contained in a JSON file.

is_closed()

Determine if the polyline is closed.

is_selfintersecting()

Determine if the polyline is self-intersecting.

point(t[, snap])

Point on the polyline at a specific normalized parameter.

split_at_corners(angle_threshold)

Splits a polyline at corners larger than the given angle_threshold

tangent_at_point_on_polyline(point)

Calculates the tangent vector of a point on a polyline

to_data()

Convert an object to its native data representation.

to_json(filepath[, pretty])

Serialize the data representation of an object to a JSON file.

transform(T)

Transform this polyline.

transformed(transformation)

Returns a transformed copy of this primitive.

validate_data()

Validate the data of this object against its data schema (self.DATASCHEMA).

validate_json()

Validate the data loaded from a JSON representation of the data of this object against its data schema (self.DATASCHEMA).

vertex_curvature(i)

Discrete polyline curvature.