Class: Laser::Cutter::Sloped::SidePanel

Inherits:
Object
  • Object
show all
Defined in:
lib/laser/cutter/sloped/side_panel.rb

Overview

A side wall of the sloped box: the profile, notched into every panel that closes it.

In its own frame x is the depth from the front and y the height, as in Profile. Its square edges are notched into the bottom, the back and the strips. Along the slope it is notched into the tilted panel, over the span that panel covers, or left plain under a tilted panel that lifts off.

Where the tilted panel stops short under a strip, a wedge stays open between its square end and the strip. The wall closes the end of that wedge with a triangle, so nobody sees into the box from the side:

   strip
----+=========
  |\  wedge

end |
of \ \ slope tilted \

Instance Method Summary collapse

Constructor Details

#initialize(profile:, notcher:, lid:) ⇒ SidePanel

Returns a new instance of SidePanel.

Parameters:

  • profile (Profile)
  • notcher (Notcher)
  • lid (Symbol) —

    :full for a tilted panel notched into the wall, :plain for one lying on it



29
30
31
32
33
34
# File 'lib/laser/cutter/sloped/side_panel.rb', line 29

def initialize(profile:, notcher:, lid:)
  @profile = profile
  @notcher = notcher
  @lid = lid
  freeze
end

Instance Method Details

#loop ⇒ Geometry::Loop

Returns the outline, counter-clockwise from the front of the bottom.

Returns:

  • (Geometry::Loop) —

    the outline, counter-clockwise from the front of the bottom



37
38
39
# File 'lib/laser/cutter/sloped/side_panel.rb', line 37

def loop
  Geometry::Loop.new(bottom + back + top + slope + front)
end