Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
DM-38544: Allow getCutouts to extend off the edge of chips #698
DM-38544: Allow getCutouts to extend off the edge of chips #698
Changes from all commits
c59dd30
3b12cb9
cf58252
b7b57ed
b650b91
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
Box2I
overload is not documented. Did you mean to use@{
and@}
? (Possibly irrelevant, given my comment below.)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
Box2D
overload worries me, given the unintuitive way conversions betweenBox2I
andBox2D
work. Is there a need for it? At the very least, I think you'd need to document how the conversion fromBox2D
toBox2I
is done (I think your implementation is equivalent toEXPAND
?).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me the question is whether there is something extra
getCutout
can do with aBox2D
that it couldn't do with aBox2I
(e.g. set some metadata field on return). If it's just a convenience for some way of getting aBox2I
from aBox2D
and then callinggetCutout
, then I don't think we want the overload.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, yes, I meant to wrap it in
@{ @}
.I added the
Box2D
version because that seemed like the first thing a user would want (cutout of a generic box), while theBox2I
version is what you'd do with e.g.footprint.getBBox()
. I figured it would be helpful for users to not have to remember to dogeom.ceil(box2d)
, as I think it's challenging for users to remember how to convert between our various primitives. I could add the box2d version as just a python (or pybind11) interface, if that would help?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it would. The issue is that the correct conversion from
Box2D
toBox2I
is context-dependent no matter which language you call it in. I assumeBox2I(Box2D, EdgeHandlingEnum)
is accessible from Python(possibly with a string replacing the enum)? If so, requiring that users call it themselves might be the least of the evils.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed the Box2D overload. We'll see if any users want that functionality.