Segment Spliting

class Cruxingator.split.Point(pos)[source]

Points in two dimensions

get_pos(precision=0.0003)[source]

Get a rounded position at precision level

merge(other)[source]

Tells two points are equivalent

class Cruxingator.split.Segment(a, b)[source]

Segment between two endpoints

intersect(other)[source]

Calculate the intersection point beetween self and other

class Cruxingator.split.Vect(x, y)[source]

Two dimensional Vector

norm2()[source]

Squared norm of the vector

Cruxingator.split.cut(segments)[source]

Cuts the segments such that no two segments cross

Cruxingator.split.find_intersections(segments)[source]

Find all intersections between segments

Cruxingator.split.generate_id_tuple(points)[source]

Generates a tuple for each point (id, x, y, [id of linked])

Cruxingator.split.pairs(l)[source]

Iterate on pairs of segments