main
Drew Owens 0.11.4 source 8889116 1d ago
{
 "id": "cswa-08b-tool-block-step4-explicit",
 "extends": "cswa-07-tool-block-step3",
 "title": "Official Tool Block, Step 4 (Q6), the explicit inset profile: the same pocket drawn line by line (the Offset Entities fallback)",
 "expected": {
  "massG": 432.58,
  "tolerancePct": 1.0
 },
 "keyBasis": "the official key (432.58 g). tools/cswa/SOURCES.md Part 4 read literally: the front face's OUTER loop offset 1 mm in; a 1-mm wall left outside the slot's R41 silhouette (R42); the pocket outside it cut to 12 from the back face (depth 32); the ear inside R41 recessed to 1 mm short of the slot's front wall (depth 7, a 1-mm skin), the \u00d811 left as it is. Predicted 434.72 g, +0.49 % (tools/cswa/tb4c.py's row wall 1 / R41 / no ring / skin 1: areas 581.28 and 936.27 mm\u00b2). tb4c's best case, 432.86 g, cuts the ear through to the slot with a 1-mm ring kept round the \u00d811 instead: the drawing cannot tell the two apart (SOURCES.md ambiguity 4) and both are within the exam's 1 %. This variant DRAWS the two regions (the inset outline's lines, its R20 arc, and the R42 / R41 arcs, every intersection derived below) and cuts them blind (32 and 7), so it needs no op beyond the ones measured live on 2026-10-15",
 "prediction": {
  "massG": 434.715,
  "how": "tools/cswa/tb4c.py (wall_out 1, wall_in 0, ring False, skin 1); the regions' areas 581.282 (outside R42) and 936.267 (inside R41) mm\u00b2, the \u00d811 excluded (95.033 mm\u00b2)"
 },
 "exercises": [
  "sketch.line",
  "sketch.arc",
  "cut.one",
  "sketch.face.front.positive"
 ],
 "needsOps": [],
 "derivedAppend": [
  [
   "s4c19x",
   "Tx + 19*nx"
  ],
  [
   "s4c19y",
   "Ty + 19*ny"
  ],
  [
   "s4fL",
   "sqrt((xR - xRL)^2 + (yRE + 33)^2)"
  ],
  [
   "s4fnx",
   "-(yRE + 33)/s4fL"
  ],
  [
   "s4fny",
   "(xR - xRL)/s4fL"
  ],
  [
   "s4fc",
   "s4fnx*xRL - 33*s4fny + 1"
  ],
  [
   "s4ccs",
   "xR - 5 + yRT - sqrt(2)"
  ],
  [
   "s4qblx",
   "xstep + 1"
  ],
  [
   "s4qbfx",
   "(s4fc + 13*s4fny)/s4fnx"
  ],
  [
   "s4qfry",
   "(s4fc - s4fnx*(xR - 1))/s4fny"
  ],
  [
   "s4qrcy",
   "s4ccs - (xR - 1)"
  ],
  [
   "s4qctx",
   "s4ccs - (yRT - 1)"
  ],
  [
   "s4qtax",
   "s4c19x + sqrt(400 - (yRT - 1 - s4c19y)^2)"
  ],
  [
   "s4tpx",
   "Tx - nx"
  ],
  [
   "s4tpy",
   "Ty - ny"
  ],
  [
   "s4qlly",
   "(ny*18 - 1 - nx*(xstep + 1))/ny"
  ],
  [
   "s4fdx",
   "s4fny"
  ],
  [
   "s4fdy",
   "-s4fnx"
  ],
  [
   "s4wx",
   "s4qbfx - xR"
  ],
  [
   "s4wy",
   "-13 - scy"
  ],
  [
   "s4fb",
   "s4wx*s4fdx + s4wy*s4fdy"
  ],
  [
   "s4fq",
   "s4wx^2 + s4wy^2"
  ],
  [
   "s4s42",
   "-s4fb - sqrt(s4fb^2 - s4fq + 42^2)"
  ],
  [
   "s4x1x",
   "s4qbfx + s4s42*s4fdx"
  ],
  [
   "s4x1y",
   "-13 + s4s42*s4fdy"
  ],
  [
   "s4s41",
   "-s4fb - sqrt(s4fb^2 - s4fq + 41^2)"
  ],
  [
   "s4x3x",
   "s4qbfx + s4s41*s4fdx"
  ],
  [
   "s4x3y",
   "-13 + s4s41*s4fdy"
  ],
  [
   "s4ex",
   "s4c19x - xR"
  ],
  [
   "s4ey",
   "s4c19y - scy"
  ],
  [
   "s4ed",
   "sqrt(s4ex^2 + s4ey^2)"
  ],
  [
   "s4a42",
   "(42^2 - 400 + s4ed^2)/(2*s4ed)"
  ],
  [
   "s4h42",
   "sqrt(42^2 - s4a42^2)"
  ],
  [
   "s4x2x",
   "xR + s4a42*s4ex/s4ed - s4h42*s4ey/s4ed"
  ],
  [
   "s4x2y",
   "scy + s4a42*s4ey/s4ed + s4h42*s4ex/s4ed"
  ],
  [
   "s4a41",
   "(41^2 - 400 + s4ed^2)/(2*s4ed)"
  ],
  [
   "s4h41",
   "sqrt(41^2 - s4a41^2)"
  ],
  [
   "s4x4x",
   "xR + s4a41*s4ex/s4ed - s4h41*s4ey/s4ed"
  ],
  [
   "s4x4y",
   "scy + s4a41*s4ey/s4ed + s4h41*s4ex/s4ed"
  ],
  [
   "s4m1ux",
   "(s4x1x - xR)/42 + (s4x2x - xR)/42"
  ],
  [
   "s4m1uy",
   "(s4x1y - scy)/42 + (s4x2y - scy)/42"
  ],
  [
   "s4m1n",
   "sqrt(s4m1ux^2 + s4m1uy^2)"
  ],
  [
   "s4m1x",
   "xR + 42*s4m1ux/s4m1n"
  ],
  [
   "s4m1y",
   "scy + 42*s4m1uy/s4m1n"
  ],
  [
   "s4m2ux",
   "(s4x2x - s4c19x)/20 + (s4tpx - s4c19x)/20"
  ],
  [
   "s4m2uy",
   "(s4x2y - s4c19y)/20 + (s4tpy - s4c19y)/20"
  ],
  [
   "s4m2n",
   "sqrt(s4m2ux^2 + s4m2uy^2)"
  ],
  [
   "s4m2x",
   "s4c19x + 20*s4m2ux/s4m2n"
  ],
  [
   "s4m2y",
   "s4c19y + 20*s4m2uy/s4m2n"
  ],
  [
   "s4m3ux",
   "(s4qtax - s4c19x)/20 + (s4x4x - s4c19x)/20"
  ],
  [
   "s4m3uy",
   "(yRT - 1 - s4c19y)/20 + (s4x4y - s4c19y)/20"
  ],
  [
   "s4m3n",
   "sqrt(s4m3ux^2 + s4m3uy^2)"
  ],
  [
   "s4m3x",
   "s4c19x + 20*s4m3ux/s4m3n"
  ],
  [
   "s4m3y",
   "s4c19y + 20*s4m3uy/s4m3n"
  ],
  [
   "s4m4ux",
   "(s4x4x - xR)/41 + (s4x3x - xR)/41"
  ],
  [
   "s4m4uy",
   "(s4x4y - scy)/41 + (s4x3y - scy)/41"
  ],
  [
   "s4m4n",
   "sqrt(s4m4ux^2 + s4m4uy^2)"
  ],
  [
   "s4m4x",
   "xR + 41*s4m4ux/s4m4n"
  ],
  [
   "s4m4y",
   "scy + 41*s4m4uy/s4m4n"
  ]
 ],
 "scriptAppend": [
  {
   "op": "sketch",
   "face": {
    "atPointMm": [
     70,
     10,
     "=C"
    ]
   },
   "entities": [
    {
     "polyline": {
      "points": [
       [
        "=s4qblx",
        -13
       ],
       [
        "=s4qbfx",
        -13
       ],
       [
        "=s4x1x",
        "=s4x1y"
       ]
      ]
     }
    },
    {
     "arc3": {
      "start": [
       "=s4x1x",
       "=s4x1y"
      ],
      "mid": [
       "=s4m1x",
       "=s4m1y"
      ],
      "end": [
       "=s4x2x",
       "=s4x2y"
      ]
     }
    },
    {
     "arc3": {
      "start": [
       "=s4x2x",
       "=s4x2y"
      ],
      "mid": [
       "=s4m2x",
       "=s4m2y"
      ],
      "end": [
       "=s4tpx",
       "=s4tpy"
      ]
     }
    },
    {
     "polyline": {
      "points": [
       [
        "=s4tpx",
        "=s4tpy"
       ],
       [
        "=s4qblx",
        "=s4qlly"
       ],
       [
        "=s4qblx",
        -13
       ]
      ]
     }
    }
   ]
  },
  {
   "op": "cut",
   "depthMm": 32
  },
  {
   "op": "sketch",
   "face": {
    "atPointMm": [
     70,
     10,
     "=C"
    ]
   },
   "entities": [
    {
     "polyline": {
      "points": [
       [
        "=s4x3x",
        "=s4x3y"
       ],
       [
        "=xR - 1",
        "=s4qfry"
       ],
       [
        "=xR - 1",
        "=s4qrcy"
       ],
       [
        "=s4qctx",
        "=yRT - 1"
       ],
       [
        "=s4qtax",
        "=yRT - 1"
       ]
      ]
     }
    },
    {
     "arc3": {
      "start": [
       "=s4qtax",
       "=yRT - 1"
      ],
      "mid": [
       "=s4m3x",
       "=s4m3y"
      ],
      "end": [
       "=s4x4x",
       "=s4x4y"
      ]
     }
    },
    {
     "arc3": {
      "start": [
       "=s4x4x",
       "=s4x4y"
      ],
      "mid": [
       "=s4m4x",
       "=s4m4y"
      ],
      "end": [
       "=s4x3x",
       "=s4x3y"
      ]
     }
    }
   ]
  },
  {
   "op": "cut",
   "depthMm": 7
  }
 ]
}