Class: Sumi::Sundries::Grid::Axis::Query

Inherits:
Object
  • Object
show all
Defined in:
sundries/lib/sumi/sundries/grid.rb

Overview

Grid line query for an axis.

Direct Known Subclasses

Halve, Major, Minor

Instance Method Summary collapse

Instance Method Details

#lines ⇒ Array<Sumi::Geometry::Line>

Returns exact generated grid lines. The collection is computed once and frozen. Use #points or #xys for precision-rounded coordinates.

Returns:



157
# File 'sundries/lib/sumi/sundries/grid.rb', line 157

def lines = @lines ||= build.freeze

#points ⇒ Array<Array<Sumi::Geometry::Point>>

Returns grid line endpoints as points at the active F precision. Each call reads the current thread precision. The outer and nested collections are frozen.

Returns:



152
# File 'sundries/lib/sumi/sundries/grid.rb', line 152

def points = lines.map { it.points(true).freeze }.freeze

#xys ⇒ Array<Array<Array<Float>>>

Returns grid line endpoints as coordinate pairs at the active F precision. Each call reads the current thread precision. The outer and nested collections are frozen.

Returns:

  • (Array<Array<Array<Float>>>) —

    frozen coordinate pairs



147
# File 'sundries/lib/sumi/sundries/grid.rb', line 147

def xys = lines.map { it.points(true).map { |point| point.deconstruct.freeze }.freeze }.freeze