Class: RuPov::Objects::FiniteSolidPrimitives::SurfaceOfRevolution

Inherits:
Base
  • Object
show all
Defined in:
lib/rupov.rb

Instance Attribute Summary

Attributes inherited from Base

#name

Instance Method Summary collapse

Methods inherited from Base

#<<

Constructor Details

#initialize(points, open = false, sturm = false) {|_self| ... } ⇒ SurfaceOfRevolution

Returns a new instance of SurfaceOfRevolution.

Yields:

  • (_self)

Yield Parameters:



147
148
149
150
151
152
153
# File 'lib/rupov.rb', line 147

def initialize( points, open = false, sturm = false )
    super( 'sor' )
    self << Methods::MultiValue.new( [points.length]+points )
    @open = open
    @sturm = sturm
    yield(self) if block_given? and self.class == SurfaceOfRevolution
end

Instance Method Details

#to_sObject



154
155
156
157
158
159
160
161
# File 'lib/rupov.rb', line 154

def to_s
    self << "open" if @open
    self << "sturm" if @sturm
    result = super()
    self.pop() if @sturm
    self.pop() if @open
    result
end