From 1c2bf16b3ecc86c29fef74f2b523dbc7347bdc61 Mon Sep 17 00:00:00 2001 From: AJ Isaacs Date: Thu, 29 Oct 2026 21:09:46 -0400 Subject: [PATCH] feat(data): give the Generic Laser real grades, leads and stock sizes Mild steel splits into CR, HR and HR P&O, stainless into 304 and 316, and aluminum into 5052 and 6061, so no thickness carries a grade it is not sold in. Gauge thicknesses use MaterialLedger's decimals, which also corrects stainless gauges that used carbon-steel values. Every thickness gets a 60 degree line lead-in (0.15", longer from 1/4" up) and a 0.1" lead-out, with no lead-out on inside cuts, a 0.75 cut-off overtravel and every catalog plate size up to 72x144. Co-Authored-By: Claude Opus 5.5 --- OpenNest.Data/Defaults/Generic-Laser.json | 95 +++++++++++++++++------ OpenNest.Tests/Data/DefaultConfigTests.cs | 23 +++++- 2 files changed, 92 insertions(+), 26 deletions(-) diff --git a/OpenNest.Data/Defaults/Generic-Laser.json b/OpenNest.Data/Defaults/Generic-Laser.json index 4adbe1a9..e42e3146 100644 --- a/OpenNest.Data/Defaults/Generic-Laser.json +++ b/OpenNest.Data/Defaults/Generic-Laser.json @@ -7,18 +7,40 @@ "materials": [ { "name": "Mild Steel", - "grade": "A36", + "grade": "CR", "density": 0.2836, "thicknesses": [ - {"value": 0.06, "name": "16 ga", "kerf": 0.006, "assistGas": "O2", "leadIn": {"type": "Arc", "length": 0.0, "angle": 90.0, "radius": 0.0625}, "leadOut": {"type": "None", "length": 0.0, "angle": 90.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.125, "minSegmentLength": 0.5, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "60x120"]}, - {"value": 0.075, "name": "14 ga", "kerf": 0.006, "assistGas": "O2", "leadIn": {"type": "Arc", "length": 0.0, "angle": 90.0, "radius": 0.0625}, "leadOut": {"type": "None", "length": 0.0, "angle": 90.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.125, "minSegmentLength": 0.5, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "60x120"]}, - {"value": 0.105, "name": "12 ga", "kerf": 0.008, "assistGas": "O2", "leadIn": {"type": "Arc", "length": 0.0, "angle": 90.0, "radius": 0.09375}, "leadOut": {"type": "None", "length": 0.0, "angle": 90.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.1875, "minSegmentLength": 0.75, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "60x120"]}, - {"value": 0.12, "name": "11 ga", "kerf": 0.008, "assistGas": "O2", "leadIn": {"type": "Arc", "length": 0.0, "angle": 90.0, "radius": 0.09375}, "leadOut": {"type": "None", "length": 0.0, "angle": 90.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.1875, "minSegmentLength": 0.75, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "60x120"]}, - {"value": 0.135, "name": "10 ga", "kerf": 0.008, "assistGas": "O2", "leadIn": {"type": "Arc", "length": 0.0, "angle": 90.0, "radius": 0.09375}, "leadOut": {"type": "None", "length": 0.0, "angle": 90.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.1875, "minSegmentLength": 0.75, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "60x120"]}, - {"value": 0.1875, "name": "3/16", "kerf": 0.01, "assistGas": "O2", "leadIn": {"type": "Arc", "length": 0.0, "angle": 90.0, "radius": 0.125}, "leadOut": {"type": "None", "length": 0.0, "angle": 90.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.25, "minSegmentLength": 1.0, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "60x120", "60x144"]}, - {"value": 0.25, "name": "1/4", "kerf": 0.01, "assistGas": "O2", "leadIn": {"type": "Arc", "length": 0.0, "angle": 90.0, "radius": 0.125}, "leadOut": {"type": "None", "length": 0.0, "angle": 90.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.25, "minSegmentLength": 1.0, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "60x120", "60x144"]}, - {"value": 0.375, "name": "3/8", "kerf": 0.012, "assistGas": "O2", "leadIn": {"type": "Arc", "length": 0.0, "angle": 90.0, "radius": 0.1875}, "leadOut": {"type": "None", "length": 0.0, "angle": 90.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.3125, "minSegmentLength": 1.25, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "60x120", "60x144"]}, - {"value": 0.5, "name": "1/2", "kerf": 0.014, "assistGas": "O2", "leadIn": {"type": "Arc", "length": 0.0, "angle": 90.0, "radius": 0.25}, "leadOut": {"type": "None", "length": 0.0, "angle": 90.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.375, "minSegmentLength": 1.5, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "60x120", "60x144"]} + {"value": 0.0598, "name": "16 ga", "kerf": 0.006, "assistGas": "O2", "leadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 0.5, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]}, + {"value": 0.0747, "name": "14 ga", "kerf": 0.006, "assistGas": "O2", "leadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 0.5, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]}, + {"value": 0.1046, "name": "12 ga", "kerf": 0.008, "assistGas": "O2", "leadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 0.75, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]}, + {"value": 0.1196, "name": "11 ga", "kerf": 0.008, "assistGas": "O2", "leadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 0.75, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]}, + {"value": 0.1345, "name": "10 ga", "kerf": 0.008, "assistGas": "O2", "leadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 0.75, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]} + ] + }, + { + "name": "Mild Steel", + "grade": "HR", + "density": 0.2836, + "thicknesses": [ + {"value": 0.0747, "name": "14 ga", "kerf": 0.006, "assistGas": "O2", "leadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 0.5, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]}, + {"value": 0.1046, "name": "12 ga", "kerf": 0.008, "assistGas": "O2", "leadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 0.75, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]}, + {"value": 0.1196, "name": "11 ga", "kerf": 0.008, "assistGas": "O2", "leadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 0.75, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]}, + {"value": 0.1345, "name": "10 ga", "kerf": 0.008, "assistGas": "O2", "leadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 0.75, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]}, + {"value": 0.1875, "name": "3/16", "kerf": 0.01, "assistGas": "O2", "leadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 1.0, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]}, + {"value": 0.25, "name": "1/4", "kerf": 0.01, "assistGas": "O2", "leadIn": {"type": "Line", "length": 0.25, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.25, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 1.0, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]}, + {"value": 0.375, "name": "3/8", "kerf": 0.012, "assistGas": "O2", "leadIn": {"type": "Line", "length": 0.3125, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.3125, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 1.25, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]}, + {"value": 0.5, "name": "1/2", "kerf": 0.014, "assistGas": "O2", "leadIn": {"type": "Line", "length": 0.375, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.375, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 1.5, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]} + ] + }, + { + "name": "Mild Steel", + "grade": "HR P&O", + "density": 0.2836, + "thicknesses": [ + {"value": 0.0747, "name": "14 ga", "kerf": 0.006, "assistGas": "O2", "leadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 0.5, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]}, + {"value": 0.1046, "name": "12 ga", "kerf": 0.008, "assistGas": "O2", "leadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 0.75, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]}, + {"value": 0.1196, "name": "11 ga", "kerf": 0.008, "assistGas": "O2", "leadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 0.75, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]}, + {"value": 0.1345, "name": "10 ga", "kerf": 0.008, "assistGas": "O2", "leadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 0.75, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]} ] }, { @@ -26,13 +48,27 @@ "grade": "304", "density": 0.289, "thicknesses": [ - {"value": 0.06, "name": "16 ga", "kerf": 0.006, "assistGas": "N2", "leadIn": {"type": "Arc", "length": 0.0, "angle": 90.0, "radius": 0.0625}, "leadOut": {"type": "None", "length": 0.0, "angle": 90.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.125, "minSegmentLength": 0.5, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "60x120"]}, - {"value": 0.075, "name": "14 ga", "kerf": 0.006, "assistGas": "N2", "leadIn": {"type": "Arc", "length": 0.0, "angle": 90.0, "radius": 0.0625}, "leadOut": {"type": "None", "length": 0.0, "angle": 90.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.125, "minSegmentLength": 0.5, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "60x120"]}, - {"value": 0.105, "name": "12 ga", "kerf": 0.008, "assistGas": "N2", "leadIn": {"type": "Arc", "length": 0.0, "angle": 90.0, "radius": 0.09375}, "leadOut": {"type": "None", "length": 0.0, "angle": 90.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.1875, "minSegmentLength": 0.75, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "60x120"]}, - {"value": 0.12, "name": "11 ga", "kerf": 0.008, "assistGas": "N2", "leadIn": {"type": "Arc", "length": 0.0, "angle": 90.0, "radius": 0.09375}, "leadOut": {"type": "None", "length": 0.0, "angle": 90.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.1875, "minSegmentLength": 0.75, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "60x120"]}, - {"value": 0.135, "name": "10 ga", "kerf": 0.008, "assistGas": "N2", "leadIn": {"type": "Arc", "length": 0.0, "angle": 90.0, "radius": 0.09375}, "leadOut": {"type": "None", "length": 0.0, "angle": 90.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.1875, "minSegmentLength": 0.75, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "60x120"]}, - {"value": 0.1875, "name": "3/16", "kerf": 0.01, "assistGas": "N2", "leadIn": {"type": "Arc", "length": 0.0, "angle": 90.0, "radius": 0.125}, "leadOut": {"type": "None", "length": 0.0, "angle": 90.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.25, "minSegmentLength": 1.0, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "60x120", "60x144"]}, - {"value": 0.25, "name": "1/4", "kerf": 0.01, "assistGas": "N2", "leadIn": {"type": "Arc", "length": 0.0, "angle": 90.0, "radius": 0.125}, "leadOut": {"type": "None", "length": 0.0, "angle": 90.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.25, "minSegmentLength": 1.0, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "60x120", "60x144"]} + {"value": 0.0625, "name": "16 ga", "kerf": 0.006, "assistGas": "N2", "leadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 0.5, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]}, + {"value": 0.0781, "name": "14 ga", "kerf": 0.006, "assistGas": "N2", "leadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 0.5, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]}, + {"value": 0.1094, "name": "12 ga", "kerf": 0.008, "assistGas": "N2", "leadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 0.75, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]}, + {"value": 0.125, "name": "11 ga", "kerf": 0.008, "assistGas": "N2", "leadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 0.75, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]}, + {"value": 0.1406, "name": "10 ga", "kerf": 0.008, "assistGas": "N2", "leadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 0.75, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]}, + {"value": 0.1875, "name": "3/16", "kerf": 0.01, "assistGas": "N2", "leadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 1.0, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]}, + {"value": 0.25, "name": "1/4", "kerf": 0.01, "assistGas": "N2", "leadIn": {"type": "Line", "length": 0.25, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.25, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 1.0, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]} + ] + }, + { + "name": "Stainless Steel", + "grade": "316", + "density": 0.289, + "thicknesses": [ + {"value": 0.0625, "name": "16 ga", "kerf": 0.006, "assistGas": "N2", "leadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 0.5, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]}, + {"value": 0.0781, "name": "14 ga", "kerf": 0.006, "assistGas": "N2", "leadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 0.5, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]}, + {"value": 0.1094, "name": "12 ga", "kerf": 0.008, "assistGas": "N2", "leadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 0.75, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]}, + {"value": 0.125, "name": "11 ga", "kerf": 0.008, "assistGas": "N2", "leadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 0.75, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]}, + {"value": 0.1406, "name": "10 ga", "kerf": 0.008, "assistGas": "N2", "leadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 0.75, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]}, + {"value": 0.1875, "name": "3/16", "kerf": 0.01, "assistGas": "N2", "leadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 1.0, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]}, + {"value": 0.25, "name": "1/4", "kerf": 0.01, "assistGas": "N2", "leadIn": {"type": "Line", "length": 0.25, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.25, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 1.0, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]} ] }, { @@ -40,12 +76,25 @@ "grade": "5052", "density": 0.097, "thicknesses": [ - {"value": 0.063, "name": "0.063", "kerf": 0.006, "assistGas": "N2", "leadIn": {"type": "Arc", "length": 0.0, "angle": 90.0, "radius": 0.0625}, "leadOut": {"type": "None", "length": 0.0, "angle": 90.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.125, "minSegmentLength": 0.5, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "60x120"]}, - {"value": 0.08, "name": "0.080", "kerf": 0.006, "assistGas": "N2", "leadIn": {"type": "Arc", "length": 0.0, "angle": 90.0, "radius": 0.0625}, "leadOut": {"type": "None", "length": 0.0, "angle": 90.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.125, "minSegmentLength": 0.5, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "60x120"]}, - {"value": 0.09, "name": "0.090", "kerf": 0.008, "assistGas": "N2", "leadIn": {"type": "Arc", "length": 0.0, "angle": 90.0, "radius": 0.09375}, "leadOut": {"type": "None", "length": 0.0, "angle": 90.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.1875, "minSegmentLength": 0.75, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "60x120"]}, - {"value": 0.125, "name": "1/8", "kerf": 0.008, "assistGas": "N2", "leadIn": {"type": "Arc", "length": 0.0, "angle": 90.0, "radius": 0.09375}, "leadOut": {"type": "None", "length": 0.0, "angle": 90.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.1875, "minSegmentLength": 0.75, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "60x120"]}, - {"value": 0.1875, "name": "3/16", "kerf": 0.01, "assistGas": "N2", "leadIn": {"type": "Arc", "length": 0.0, "angle": 90.0, "radius": 0.125}, "leadOut": {"type": "None", "length": 0.0, "angle": 90.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.25, "minSegmentLength": 1.0, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "60x120", "60x144"]}, - {"value": 0.25, "name": "1/4", "kerf": 0.01, "assistGas": "N2", "leadIn": {"type": "Arc", "length": 0.0, "angle": 90.0, "radius": 0.125}, "leadOut": {"type": "None", "length": 0.0, "angle": 90.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.25, "minSegmentLength": 1.0, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "60x120", "60x144"]} + {"value": 0.063, "name": "0.063", "kerf": 0.006, "assistGas": "N2", "leadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 0.5, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]}, + {"value": 0.08, "name": "0.080", "kerf": 0.006, "assistGas": "N2", "leadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 0.5, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]}, + {"value": 0.09, "name": "0.090", "kerf": 0.008, "assistGas": "N2", "leadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 0.75, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]}, + {"value": 0.125, "name": "1/8", "kerf": 0.008, "assistGas": "N2", "leadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 0.75, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]}, + {"value": 0.1875, "name": "3/16", "kerf": 0.01, "assistGas": "N2", "leadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 1.0, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]}, + {"value": 0.25, "name": "1/4", "kerf": 0.01, "assistGas": "N2", "leadIn": {"type": "Line", "length": 0.25, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.25, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 1.0, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]} + ] + }, + { + "name": "Aluminum", + "grade": "6061", + "density": 0.0975, + "thicknesses": [ + {"value": 0.063, "name": "0.063", "kerf": 0.006, "assistGas": "N2", "leadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 0.5, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]}, + {"value": 0.08, "name": "0.080", "kerf": 0.006, "assistGas": "N2", "leadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 0.5, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]}, + {"value": 0.09, "name": "0.090", "kerf": 0.008, "assistGas": "N2", "leadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 0.75, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]}, + {"value": 0.125, "name": "1/8", "kerf": 0.008, "assistGas": "N2", "leadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 0.75, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]}, + {"value": 0.1875, "name": "3/16", "kerf": 0.01, "assistGas": "N2", "leadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.15, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 1.0, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]}, + {"value": 0.25, "name": "1/4", "kerf": 0.01, "assistGas": "N2", "leadIn": {"type": "Line", "length": 0.25, "angle": 60.0, "radius": 0.0}, "leadOut": {"type": "Line", "length": 0.1, "angle": 60.0, "radius": 0.0}, "insideLeadIn": {"type": "Line", "length": 0.25, "angle": 60.0, "radius": 0.0}, "insideLeadOut": {"type": "None", "length": 0.0, "angle": 60.0, "radius": 0.0}, "cutOff": {"partClearance": 0.02, "overtravel": 0.75, "minSegmentLength": 1.0, "direction": "AwayFromOrigin"}, "plateSizes": ["48x96", "48x120", "48x144", "60x120", "60x144", "72x120", "72x144"]} ] } ] diff --git a/OpenNest.Tests/Data/DefaultConfigTests.cs b/OpenNest.Tests/Data/DefaultConfigTests.cs index 7897919d..4c06c8e7 100644 --- a/OpenNest.Tests/Data/DefaultConfigTests.cs +++ b/OpenNest.Tests/Data/DefaultConfigTests.cs @@ -73,6 +73,19 @@ public class DefaultConfigTests : IDisposable } } + [Fact] + public void DefaultConfig_ListsEachGradeOnce() + { + var provider = new LocalJsonProvider(_testDir); + provider.EnsureDefaults(); + var config = provider.GetMachine(provider.GetMachines()[0].Id); + + var grades = config.Materials.Select(m => $"{m.Name} {m.Grade}").ToList(); + Assert.Equal( + new[] { "Mild Steel CR", "Mild Steel HR", "Mild Steel HR P&O", "Stainless Steel 304", "Stainless Steel 316", "Aluminum 5052", "Aluminum 6061" }, + grades); + } + [Fact] public void DefaultConfig_HasSensibleValues() { @@ -93,8 +106,12 @@ public class DefaultConfigTests : IDisposable Assert.True(thickness.CutOff.PartClearance > thickness.Kerf, label); Assert.True(thickness.CutOff.Overtravel > 0, label); Assert.True(thickness.CutOff.MinSegmentLength > 0, label); - Assert.Equal("Arc", thickness.LeadIn.Type); - Assert.True(thickness.LeadIn.Radius >= thickness.Kerf * 4, label); + Assert.Equal("Line", thickness.LeadIn.Type); + Assert.True(thickness.LeadIn.Length >= thickness.Kerf * 4, label); + Assert.Equal("Line", thickness.LeadOut.Type); + Assert.True(thickness.LeadOut.Length > 0, label); + Assert.Equal("Line", thickness.InsideLeadIn?.Type); + Assert.Equal("None", thickness.InsideLeadOut?.Type); Assert.NotEmpty(thickness.PlateSizes); Assert.All(thickness.PlateSizes, s => Assert.True(OpenNest.Shapes.PlateSizes.TryGet(s, out _), s)); @@ -103,7 +120,7 @@ public class DefaultConfigTests : IDisposable var thinner = thicknesses[i - 1]; Assert.True(thickness.Value > thinner.Value, label); Assert.True(thickness.Kerf >= thinner.Kerf, label); - Assert.True(thickness.LeadIn.Radius >= thinner.LeadIn.Radius, label); + Assert.True(thickness.LeadIn.Length >= thinner.LeadIn.Length, label); } } }