class CrystalScad::CSGModifier

Public Class Methods

new(object, attributes) click to toggle source
# File lib/crystalscad/CrystalScad.rb, line 477
def initialize(object, attributes)
        @transformations = []
        @children = [object]
        @attributes = attributes
end

Public Instance Methods

to_rubyscad() click to toggle source
# File lib/crystalscad/CrystalScad.rb, line 483
def to_rubyscad       
        #   Apparently this doesn't work for CSGModifiers, like it does for other things in RubyScad?
  # also this is a dirty, dirty hack.
        @attributes = @attributes.gsub("fn","$fn").gsub("$$","$") 
        ret = "#{@operation}(#{@attributes}){"
        @children ||= []                     
        @children.each do |child|    
                begin
                        ret +=child.walk_tree
                rescue NoMethodError
                end
        end
        ret +="}"                    
end