Skip to content

fix: bound countersink cuts by explicit depth - #2103

Open
RanaPriyansh wants to merge 1 commit into
CadQuery:masterfrom
RanaPriyansh:fix/1653-countersink-depth
Open

RanaPriyansh wants to merge 1 commit into
CadQuery:masterfrom
RanaPriyansh:fix/1653-countersink-depth

Conversation

@RanaPriyansh

Copy link
Copy Markdown

Description

Fixes #1653.

cskHole can cut below an explicit shallow depth because its countersink cone extends to its full tip.

Clip the cone to the requested depth before combining it with the bore. The full cone remains in use for deeper and through holes.

Tests

  • Added volume and material checks for shallow, near-tip, deep, through, and 45-degree holes. Added close-diameter controls.
  • The focused tests pass. Fork Black passes.
  • The full local suite has 894 passes, three skips, and one failure. The same test_interpPlate volume mismatch occurs on the exact base.
  • Mypy reports the same OCP missing-stub errors on the exact base and this change.

A small local timing comparison measured shallow cuts at 6.7–6.9 ms before and 8.0 ms after this change. Deep and through-hole timings overlapped. The shallow path performs one additional Boolean intersection.

Codex used.

@codecov

codecov Bot commented Sep 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.81%. Comparing base (c11b3f9) to head (0570574).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2103      +/-   ##
==========================================
+ Coverage   95.80%   95.81%   +0.01%     
==========================================
  Files          30       30              
  Lines        9589     9592       +3     
  Branches     1439     1440       +1     
==========================================
+ Hits         9187     9191       +4     
  Misses        247      247              
+ Partials      155      154       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cskHole generates incorrect results for shallow holes

1 participant