Skip to content

fix: shell located spheres and partial solids - #2101

Open
RanaPriyansh wants to merge 1 commit into
CadQuery:masterfrom
RanaPriyansh:fix/2074-located-sphere-shell
Open

RanaPriyansh wants to merge 1 commit into
CadQuery:masterfrom
RanaPriyansh:fix/2074-located-sphere-shell

Conversation

@RanaPriyansh

Copy link
Copy Markdown

Fixes #2074.

A located solid inside the compound returned by Workplane.findSolid() can make OpenCascade reject shell() with BRep_API: command not done. Normalize child locations before the hollow operation. Map selected faces to the normalized shape so open shells retain their intended openings.

Validation:

  • Reproduced the failure on the upstream base with XZ, YZ, ZX, and ZY spheres. The two new regression tests failed before the fix and passed after it.
  • Four focused shell tests passed. The tests cover inward and outward shells, a translated partial sphere, and a rotated box with a selected open face.
  • The CadQuery Black fork check and git diff --check passed.
  • The full test suite had the same unrelated test_interpPlate numeric failure before and after the change. On the base, it reported 891 passed, 3 skipped, and 1 failed. After the fix, it reported 893 passed, 3 skipped, and 1 failed. The expected volume is 10.956054314; this environment computes 10.338751346962978.

Tested with CadQuery OCP 8.0.1.0. OCP 8.0.1.1 was not available from the local package index, so that version remains untested.

Codex used.

@codecov

codecov Bot commented Sep 25, 2026

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2101   +/-   ##
=======================================
  Coverage   95.80%   95.80%           
=======================================
  Files          30       30           
  Lines        9589     9593    +4     
  Branches     1439     1439           
=======================================
+ Hits         9187     9191    +4     
  Misses        247      247           
  Partials      155      155           

☔ 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.

shell() fails on spheres created on a rotated Workplane (XZ, YZ, ZX, ZY)

1 participant