Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add enlarge method to BoundBox #1356

Merged
merged 1 commit into from
Oct 9, 2023

Conversation

AshtonOhms
Copy link

Surfaces Bnd_Box's Enlarge in the BoundBox class.

@codecov
Copy link

codecov bot commented Jun 27, 2023

Codecov Report

Merging #1356 (fe8bddf) into master (b96eb8a) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head fe8bddf differs from pull request most recent head de3f528. Consider uploading reports for the commit de3f528 to get more accurate results

@@           Coverage Diff           @@
##           master    #1356   +/-   ##
=======================================
  Coverage   94.16%   94.16%           
=======================================
  Files          26       26           
  Lines        5584     5590    +6     
  Branches      954      954           
=======================================
+ Hits         5258     5264    +6     
  Misses        194      194           
  Partials      132      132           
Impacted Files Coverage Δ
cadquery/occ_impl/geom.py 99.59% <100.00%> (+<0.01%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@adam-urbanczyk
Copy link
Member

Thanks, could you first explain why is this needed?

@AshtonOhms
Copy link
Author

This is useful for detecting when geometry is on the edge of (or just outside of) the original, un-enlarged bounding box.

My particular use case is a custom Selector for geometry within a BoundBox using isInside(). I need to enlarge the box by a small margin, otherwise the Selector misses geometry on the edges. Apart from this niche case, I think this is generally helpful for those edge cases with isInside().

Copy link
Member

@jmwright jmwright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I've experimented with automatically finding interreference and excessive gaps between components in an assembly before, and this could be useful for that. Thanks @AshtonOhms

@jmwright jmwright merged commit f467ac9 into CadQuery:master Oct 9, 2023
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.

3 participants