Class: RuPov::Objects::FiniteSolidPrimitives::Prism

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(height1, height2, points, splineType = "linear_spline", sweepType = "linear_sweep", open = false, sturm = false) {|_self| ... } ⇒ Prism

Returns a new instance of Prism.

Yields:

  • (_self)

Yield Parameters:



97
98
99
100
101
102
103
# File 'lib/rupov.rb', line 97

def initialize( height1, height2, points, splineType = "linear_spline", sweepType = "linear_sweep", open = false, sturm = false )
    super( 'prism' )
    self << Methods::MultiValue.new( [height1,height2,points.length]+points, splineType+" "+sweepType )
    @open = open
    @sturm = sturm
    yield(self) if block_given? and self.class == Prism
end

Instance Method Details

#to_sObject



104
105
106
107
108
109
110
111
# File 'lib/rupov.rb', line 104

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