Skip to content

Conversation

@JackB-Ansys
Copy link
Collaborator

@JackB-Ansys JackB-Ansys commented Nov 17, 2025

Think the name and Docstring can be improved...

This is a new method that uses/wraps around Region.subtract for finding the intersecting region between two regions.

self.overlap(region)

Mutates self to give the portion of self that overlaps with region.

For example, if we have the rotor and a circle:

circular notch example_1

do circle.overlap(rotor) to get a notch region that can be set in Motor-CAD:

circular notch example_2

Current implementation is to mutate self, but I am considering making it 'get_overlap' or 'get_intersection' where it would leave self unchanged and return the overlap region as a new region. Would welcome feedback on this.

@github-actions github-actions bot added the enhancement New features or code improvements label Nov 17, 2025
@codecov
Copy link

codecov bot commented Nov 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.35%. Comparing base (58d678a) to head (bb3bb5a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #633      +/-   ##
==========================================
+ Coverage   88.31%   88.35%   +0.03%     
==========================================
  Files          25       25              
  Lines        3929     3940      +11     
==========================================
+ Hits         3470     3481      +11     
  Misses        459      459              
🚀 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

enhancement New features or code improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants