bertinireal.curve¶
Python libraries used: Numpy
- platform:
Unix, Windows
- synopsis:
The Curve is a child class of Decomposition. Curve contains methods that parse curve edge and samples data.
- class curve.Curve(directory, is_embedded=False, embedded_into=None)¶
a Curve
- Parameters:
Decomposition – Decomposition data from decomp file
- break_into_pieces(edge_indices=None)¶
this function returns a list of CurvePieces
if edge_indices is not given, it will be all the indices for this curve.
if it is given, it should be an iterable of integers. they probably come from pieces…
- parse_curve_samples(directory)¶
Parse and store curve samples data
- Parameters:
directory – Directory of the curve folder
- parse_edge(directory)¶
Parse and store curve edges data
- Parameters:
directory – Directory of the curve folder
- class curve.CurvePiece(curve, edges, directed_edges)¶
A piece of a curve. Must be contiguously connected. Other people might call this a connected component.
- to_points()¶
computes a numpy array of points, in order, for this piece of a curve.
generate edges are skipped, and adjacent endpoints are unified into one point.
- class curve.DirectedEdge(edge_index, direction)¶
- direction¶
Alias for field number 1
- edge_index¶
Alias for field number 0
- class curve.EdgeDirection(*values)¶
- curve.is_edge_degenerate(e)¶
Check if critical point slices are degenerate (one of the endpoints is also the middle point)
- param e:
Critical point slices
- rtype:
Return True if e is degenerate