# Test Lowe's In-Store Breakdown Cuts for Transport in Car
kerf_store = 0.1875 # 3/16" generous rough kerf for store panel saw

def analyze_store_cuts():
    print("================================================================================")
    print("LOWE'S IN-STORE CUTTING ANALYSIS (FITTING 4' x 8' INTO A CAR)")
    print("================================================================================")

    # All 13 House Panels with dimensions:
    # E1: 34.00 x 14.11
    # E2: 34.00 x 14.11
    # C1: 32.00 x 16.50
    # Bay: 8.00 x 2.00
    # A1: 32.00 x 12.00
    # A2: 32.00 x 12.00
    # A3: 32.00 x 12.00
    # B1: 27.00 x 12.00
    # B2: 27.00 x 12.00
    # D1-A, D1-B, D2-A, D2-B: 12.00 x 8.25

    # SCENARIO A: 2 CROSS-CUTS (Gives 3 panels, all 48" wide)
    # Cut 1 at 35" from end -> Panel 1: 48" x 35" (Holds E1, E2, C1, Bay Pad)
    # Cut 2 at 33" -> Panel 2: 48" x 33" (Holds A1, A2, A3, D1-A, D1-B)
    # Remaining -> Panel 3: 48" x 27.6" (Holds B1, B2, D2-A, D2-B + 418 sq in scrap)
    # Vehicle requirement: Car must be able to load a 48" wide panel.
    print("SCENARIO A: 2 CROSS-CUTS (Best if your car can lay a 48\" wide board flat or tilted):")
    print("  Cut 1: Cross-cut at 35\" -> Gives one 48\" x 35\" piece (Holds E1, E2, C1, Bay Pad)")
    print("  Cut 2: Cross-cut at 33\" -> Gives one 48\" x 33\" piece (Holds A1, A2, A3, D1-A, D1-B)")
    print("  Piece 3: Remainder is ~48\" x 27-1/2\" (Holds B1, B2, D2-A, D2-B)")
    print("  -> Maximum piece size in car: 48\" x 35\"!\n")

    # SCENARIO B: IF CAR CANNOT FIT 48" WIDTH (e.g. Sedan trunk / Small Crossover < 40" wide):
    # What if Lowe's makes:
    # 1. ONE RIP CUT along the 8-ft length at 35" (leaves a 35" wide strip and a 12-3/4" wide strip)
    # 2. Cross-cut the 35" strip in half at 48" -> Two pieces of 35" x 48"!
    # 3. Cross-cut the 12-3/4" strip in half at 48" -> Two pieces of 12-3/4" x 48"!
    # Let's check what fits on these pieces!
    print("SCENARIO B: NARROW CAR FIT (If car opening is between 36\" and 44\" wide):")
    # Piece B1: 35" x 48"
    #   Can fit E1 (34 x 14.11), E2 (34 x 14.11), and what else?
    #   14.11 + 0.125 + 14.11 = 28.35" <= 48". Leaves (48 - 28.35 - 0.125) = 19.5" x 35"!
    #   In 19.5" x 35", C1 (32 x 16.50) fits!
    #   Bay pad (8 x 2) fits!
    #   ALL ROOF AND FRONT FACADE FIT ON PIECE B1 (35" x 48")!
    print("  Piece 1 (35\" x 48\"): Holds E1, E2, C1, and Bay Pad!")
    # Piece B2: 35" x 48"
    #   Decks A1, A2, A3 are 32" x 12".
    #   3 decks: 12 + 12 + 12 + 2*0.125 = 36.25" <= 48"! Length: 32" <= 35"!
    #   Leaves: (48 - 36.25 - 0.125) = 11.6" x 35"!
    #   In 11.6" x 35": D1-A (12 x 8.25) and D1-B (12 x 8.25) fit!
    #   ALL THREE 32\" DECKS + 2 PARTITIONS FIT ON PIECE B2 (35\" x 48\")!
    print("  Piece 2 (35\" x 48\"): Holds A1, A2, A3, D1-A, D1-B!")
    # Piece B3 & B4: Two strips of 12-3/4\" x 48\"
    #   Strip 1 (12.75\" x 48\"): B1 (27 x 12) + D2-A (12 x 8.25) + D2-B (12 x 8.25)
    #   27 + 0.125 + 8.25 + 0.125 + 8.25 = 43.75\" <= 48\"!
    #   Strip 2 (12.75\" x 48\"): B2 (27 x 12) fits easily! Leaves 20\" x 12.75\" reserve!
    print("  Piece 3 (12-3/4\" x 48\"): Holds B1 (27x12), D2-A (8.25x12), D2-B (8.25x12)")
    print("  Piece 4 (12-3/4\" x 48\"): Holds B2 (27x12) + 20\" x 12.75\" spare wood!")
    print("  -> Maximum piece size in car: 35\" x 48\"! (Fits in almost ANY vehicle!)\n")

    # SCENARIO C: 2' x 4' HANDY PANELS (24" x 48")
    print("SCENARIO C: BUYING ONLY 2' x 4' (24\" x 48\") HANDY PANELS:")
    # How many 2x4 panels do we need?
    # Panel 1: E1 (34 x 14.11) + D1-A (12 x 8.25) + D1-B (12 x 8.25) + D2-A (12 x 8.25) + D2-B (12 x 8.25) + Bay (8 x 2)
    # Panel 2: E2 (34 x 14.11) + scrap
    # Panel 3: C1 (32 x 16.50) + scrap
    # Panel 4: A1 (32 x 12) + A2 (32 x 12) -> Wait! Can A1 and A2 fit on one 24x48?
    #   Width is 24\". 12 + 0.125 + 12 = 24.125\" > 24.00\"!
    #   So A1 and A2 CANNOT be cut side-by-side from a 24\" width!
    #   Can they be cut end-to-end? 32 + 32 = 64\" > 48\"!
    #   So each 32\" x 12\" deck requires its own 24\" x 48\" panel unless paired with something narrower!
    #   Pairing:
    #   Panel 2: E2 (34 x 14.11) - can we put a 12\" wide piece alongside? No, remaining width is 9.765\" < 12\".
    #   Panel 3: C1 (32 x 16.50) - remaining width is 7.375\" < 12\".
    #   Panel 4: A1 (32 x 12). Alongside A1: 24 - 12 - 0.125 = 11.875\" < 12\"!
    #   So A1 takes Panel 4.
    #   A2 takes Panel 5.
    #   A3 takes Panel 6.
    #   B1 (27 x 12) & B2 (27 x 12): On Panel 7?
    #   27 + 27 = 54\" > 48\"! So B1 and B2 can't be end-to-end. And side-by-side 12+12 > 24\"!
    #   So buying 2'x4' panels requires 6 to 7 PANELS!
    #   Cost: 7 panels x $18 = $126! (vs ONE 4x8 sheet for $38!).
    print("  -> Buying 2' x 4' panels is heavily constrained by the 24\" width (12\" + 12\" + kerf = 24-1/8\"!).")
    print("  -> You would need 6 to 7 individual 2'x4' panels, costing over $120+!")
    print("  -> CONCLUSION: Buying the 4' x 8' sheet and having Lowe's make 2 or 3 rough cuts is VASTLY SUPERIOR!")

if __name__ == "__main__":
    analyze_store_cuts()
