class SolidRuby::CSGModelling::CSGModelling

Public Class Methods

new(*list) click to toggle source
Calls superclass method SolidRuby::SolidRubyObject::new
# File lib/solidruby/csg_modelling/csg_modelling.rb, line 18
def initialize(*list)
  super(list)
  @transformations = []
  @children = list
  @operation = self.class.name.split('::').last.downcase
end

Public Instance Methods

get_point_on(args = {}) click to toggle source
# File lib/solidruby/csg_modelling/csg_modelling.rb, line 39
def get_point_on(args = {})
  @children[0].get_point_on(args) if @children.count > 0
end
to_rubyscad() click to toggle source
# File lib/solidruby/csg_modelling/csg_modelling.rb, line 25
def to_rubyscad
  @children ||= []
  ret = "#{@operation}(){"
  @children.each do |child|
    begin
      ret += child.walk_tree
    rescue NoMethodError
    end
  end
  # puts @children.map{|l| l.walk_tree_classes}.inspect

  ret += '}'
end