Class: Laser::Cutter::Sloped::Corners
- Inherits:
-
Object
- Object
- Laser::Cutter::Sloped::Corners
- Defined in:
- lib/laser/cutter/sloped/corners.rb
Overview
Which panel fills the corner cube at each square corner of the box.
Three panels meet at such a corner and one of them carries the cube, as a square on its own corner. The side wall never does. Of the other two, the back and the front strip come first, as the front and back do in the box with six panels. A panel whose two notches next to the corner are both holes cannot carry it, since the square would hang off the panel by a single point; the other panel then begins with a tab there, and takes it.
Instance Method Summary collapse
-
#back_top ⇒ Symbol?
:back or :top; nil without a top strip, where the corner is not square.
-
#bottom_back ⇒ Symbol
:back or :bottom.
-
#front_bottom ⇒ Symbol?
:front or :bottom; nil without a front strip, where the corner is not square.
-
#initialize(profile:, width:, notcher:) ⇒ Corners
constructor
A new instance of Corners.
Constructor Details
#initialize(profile:, width:, notcher:) ⇒ Corners
Returns a new instance of Corners.
19 20 21 22 23 24 |
# File 'lib/laser/cutter/sloped/corners.rb', line 19 def initialize(profile:, width:, notcher:) @profile = profile @width = width @notcher = notcher freeze end |
Instance Method Details
#back_top ⇒ Symbol?
Returns :back or :top; nil without a top strip, where the corner is not square.
39 40 41 42 43 |
# File 'lib/laser/cutter/sloped/corners.rb', line 39 def back_top return unless @profile.top_strip? carries?(@profile.height) ? :back : :top end |
#bottom_back ⇒ Symbol
Returns :back or :bottom.
34 35 36 |
# File 'lib/laser/cutter/sloped/corners.rb', line 34 def bottom_back carries?(@profile.height) ? :back : :bottom end |
#front_bottom ⇒ Symbol?
Returns :front or :bottom; nil without a front strip, where the corner is not square.
27 28 29 30 31 |
# File 'lib/laser/cutter/sloped/corners.rb', line 27 def front_bottom return unless @profile.front_strip? carries?(@profile.front_height) ? :front : :bottom end |