Skip to content

Equal constraints#1983

Open
matscalia wants to merge 13 commits intoCadQuery:masterfrom
matscalia:equal-constraints
Open

Equal constraints#1983
matscalia wants to merge 13 commits intoCadQuery:masterfrom
matscalia:equal-constraints

Conversation

@matscalia
Copy link

@matscalia matscalia commented Jan 29, 2026

Adds the Equal and EqualRadius constraints metioned in #1979.
While I was writing the tests and adding small perturbations to test the solver I noticed that the optimizer would not converge for some Angle constraints. With the wrap around in angle_cost, the delta is always minimal and the solver converges. No tests broke and I couldn't think of any case in which this modification would actually change the already established behavior but I would ask for a double, triple check.

@matscalia matscalia changed the title ~Equal constraints Equal constraints Jan 29, 2026
@matscalia
Copy link
Author

nevermind, I definitely didn't understand how the angle constraint worked, the wrap around was a mistake. I'll fix it as soon as possible, hopefully tomorrow.

@codecov
Copy link

codecov bot commented Feb 1, 2026

Codecov Report

❌ Patch coverage is 66.66667% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.96%. Comparing base (69e9514) to head (ed616e1).
⚠️ Report is 18 commits behind head on master.

Files with missing lines Patch % Lines
cadquery/occ_impl/sketch_solver.py 66.66% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1983      +/-   ##
==========================================
- Coverage   95.96%   94.96%   -1.01%     
==========================================
  Files          29       30       +1     
  Lines        7857     8754     +897     
  Branches     1174     1302     +128     
==========================================
+ Hits         7540     8313     +773     
- Misses        183      291     +108     
- Partials      134      150      +16     

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

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.

2 participants