Sha256: 96d0fda8af7043f7eafd5bbab0bb0195a943a9aad1d4aff70aaf88185e98ffa3

Contents?: true

Size: 744 Bytes

Versions: 1

Compression:

Stored size: 744 Bytes

Contents

# rbs_inline: enabled

require_relative 'element'

module Autocad
  class Line < Element
    def length
      ole_obj.length
    end

    def line?
      true
    end

    def start_point # : Point3d
      Point3d(ole_obj.StartPoint)
    end

    def end_point # : Point3d
      Point3d(ole_obj.EndPoint)
    end

    def normal
      ole_obj.Normal
    end

    def thickness
      ole_obj.Thickness
    end

    def delta
      ole_obj.Delta
    end
  end

  class Circle < Element
    def center
      Point3d.new(ole_obj.Center)
    end

    def radius
      Point3d.new(ole_obj.Radius)
    end
  end

  class Polyline < Element
    def length
      @ole_obj.Length
    end

    def coordinates
      @ole_obj.coordinates
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
autocad-0.4.6 lib/autocad/line.rb