Class: RuPov::Objects::FiniteSolidPrimitives::SphereSweep

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

Constant Summary collapse

Tolerance =
0.000001

Instance Attribute Summary

Attributes inherited from Base

#name

Instance Method Summary collapse

Methods inherited from Base

#<<

Constructor Details

#initialize(spheresweep, splineType = "linear_spline", tolerance = Tolerance) {|_self| ... } ⇒ SphereSweep

Returns a new instance of SphereSweep.

Yields:

  • (_self)

Yield Parameters:



124
125
126
127
128
129
# File 'lib/rupov.rb', line 124

def initialize( spheresweep, splineType = "linear_spline", tolerance=Tolerance )
    super( 'sphere_sweep' )
    self << Methods::MultiValue.new( [spheresweep.length/2]+spheresweep, splineType )
    @tolerance = tolerance
    yield(self) if block_given? and self.class == SphereSweep
end

Instance Method Details

#to_sObject



130
131
132
133
134
135
# File 'lib/rupov.rb', line 130

def to_s
    self << Methods::MultiValue.new( @tolerance, 'tolerance') if @tolerance != Tolerance
    result = super()
    self.pop() if @tolerance != Tolerance
    result
end