geometor.model.chains

class geometor.model.chains.Chain(sections: list[Section])[source]

Bases: object

A class representing a chain of connected golden sections, facilitating the extraction of segments, points, and lengths, as well as analyzing the flow and symmetry within the chain.

Each chain’s flow is characterized by the comparative lengths of consecutive segments, represented symbolically to understand the progression and transitions in segment lengths. Furthermore, this module empowers users to explore symmetry lines within chains, unveiling a subtle, profound aspect of geometric harmony.

extract_segments() list[Segment][source]

Extracts unique segments from the chain.

returns

  • list[spg.Segment]

    A list containing the unique segments in the chain.

extract_points() list[Point][source]

Extracts unique points from the chain while maintaining order.

returns

  • list[spg.Point]

    A list containing the ordered unique points from the chain.

property lengths: list[Expr]

Extract the symbolic lengths of the segments in the chain.

returns

  • list[sp.Expr]

    A list containing the symbolic lengths of each segment in the chain.

property numerical_lengths: list[float]

Calculate and extract the numerical lengths of the segments in the chain.

returns

  • list[float]

    A list containing the evaluated numerical lengths of each segment in the chain.

property flow: list[str]

Determine the flow of the segments in the chain by comparing the lengths of consecutive segments.

returns

  • list[str]

    A list of symbols representing the flow of segment lengths. ‘>’ indicates that the previous segment is longer, ‘<’ indicates that the next segment is longer.

count_symmetry_lines() int[source]
property fibonacci_labels: list[str]

Creates and returns Fibonacci-style labels for each segment based on their lengths.

returns

  • list[str]

    A list of strings where each string is a Fibonacci-style label corresponding to a segment.