Class: DXF::Spline

Inherits:
Entity show all
Defined in:
lib/dxf/entity.rb

Direct Known Subclasses

Bezier

Constant Summary

Constants inherited from Entity

Entity::TypeError

Instance Attribute Summary collapse

Attributes inherited from Entity

#handle, #layer

Instance Method Summary collapse

Methods inherited from Entity

new, #parse_pair

Methods included from ClusterFactory

included

Constructor Details

#initialize(degree: nil, knots: [], points: nil) ⇒ Spline

Returns a new instance of Spline.



126
127
128
129
130
# File 'lib/dxf/entity.rb', line 126

def initialize(degree:nil, knots:[], points:nil)
    @degree = degree
    @knots = knots || []
    @points = points || []
end

Instance Attribute Details

#degreeObject (readonly)

Returns the value of attribute degree.



122
123
124
# File 'lib/dxf/entity.rb', line 122

def degree
  @degree
end

#knotsObject (readonly)

Returns the value of attribute knots.



123
124
125
# File 'lib/dxf/entity.rb', line 123

def knots
  @knots
end

#pointsObject (readonly)

Returns the value of attribute points.



124
125
126
# File 'lib/dxf/entity.rb', line 124

def points
  @points
end