Skip to content

More free functions#2038

Open
adam-urbanczyk wants to merge 22 commits into
masterfrom
adam-shapes-parity
Open

More free functions#2038
adam-urbanczyk wants to merge 22 commits into
masterfrom
adam-shapes-parity

Conversation

@adam-urbanczyk
Copy link
Copy Markdown
Member

@adam-urbanczyk adam-urbanczyk commented May 22, 2026

This PR should reach (rough) feature parity with Shape.* Closes #1812

  • prism
  • hollow
  • offset2D
  • fillet2D
  • draft
  • set ops for combining selectors

This enables e.g.
selection = f.outerWire() & f.edges('|X')

  • history

Big experimental change. Added a History and Op class. History instance can be passed now to many ops via history= kwarg. Name for the operation can be specified via name=. It can be later queried like so:

h = History()

f = plane(1,1)
res = extrude(f, (0,0,1), history=h, name='ex')

top = h['ex'].last()
side = h[-1].generated(f.edges())
  • tests
  • docs

@adam-urbanczyk adam-urbanczyk marked this pull request as draft May 22, 2026 17:42
@codecov
Copy link
Copy Markdown

codecov Bot commented May 22, 2026

Codecov Report

❌ Patch coverage is 97.46835% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.66%. Comparing base (8c17892) to head (d724fc6).

Files with missing lines Patch % Lines
cadquery/occ_impl/shapes.py 97.43% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2038      +/-   ##
==========================================
+ Coverage   95.64%   95.66%   +0.01%     
==========================================
  Files          30       30              
  Lines        8962     9040      +78     
  Branches     1328     1344      +16     
==========================================
+ Hits         8572     8648      +76     
- Misses        240      241       +1     
- Partials      150      151       +1     

☔ View full report in Codecov by Sentry.
📢 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.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 23, 2026

Codecov Report

❌ Patch coverage is 97.91667% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.73%. Comparing base (8c17892) to head (b32345d).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
cadquery/occ_impl/shapes.py 97.89% 3 Missing and 6 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2038      +/-   ##
==========================================
+ Coverage   95.64%   95.73%   +0.09%     
==========================================
  Files          30       30              
  Lines        8962     9341     +379     
  Branches     1328     1384      +56     
==========================================
+ Hits         8572     8943     +371     
- Misses        240      243       +3     
- Partials      150      155       +5     

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

@jmwright jmwright mentioned this pull request Jun 5, 2026
3 tasks
@adam-urbanczyk adam-urbanczyk requested a review from jmwright June 5, 2026 14:32
@adam-urbanczyk adam-urbanczyk marked this pull request as ready for review June 5, 2026 14:32
@adam-urbanczyk
Copy link
Copy Markdown
Member Author

@jmwright @lorenzncode I'm still working on some docs, but I think the code as such is ready to be reviewed.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature parity with cq.Shape methods

1 participant