-
Notifications
You must be signed in to change notification settings - Fork 113
added missing properties to RhinoBrep #1459
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1459 +/- ##
==========================================
- Coverage 61.98% 61.96% -0.02%
==========================================
Files 208 208
Lines 22433 22437 +4
==========================================
- Hits 13904 13903 -1
- Misses 8529 8534 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
if not not filepath.endswith(".step"): | ||
raise ValueError("Expected file with .igs extension") |
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 double negation is confusing and the check here unexpectedly raises a ValueError with a message for '.igs' even though the method name implies a STEP file. Consider rewriting the condition to 'if not filepath.endswith(".step"):' and updating the error message accordingly.
if not not filepath.endswith(".step"): | |
raise ValueError("Expected file with .igs extension") | |
if not filepath.endswith(".step"): | |
raise ValueError("Expected file with .step extension") |
Copilot uses AI. Check for mistakes.
|
||
@property | ||
def is_infinite(self): | ||
pass |
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 'is_infinite' property currently uses 'pass', which results in no return value. It should raise a NotImplementedError to signal that this functionality is not implemented.
pass | |
raise NotImplementedError("Infinite check is not implemented for Rhino Breps.") |
Copilot uses AI. Check for mistakes.
@tomvanmele ping |
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.
LGTM, with a few minor comments
return self._brep.SolidOrientation | ||
|
||
@property | ||
def shells(self): |
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.
this is OCC terminology
raise NotImplementedError("Shells are not implemented for Rhino Breps.") | ||
|
||
@property | ||
def solids(self): |
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.
also OCC terminology. every solid is bound by a shell. not every shell is a solid...
@staticmethod | ||
def _export_brep_to_file(filepath, brep): |
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.
why not just make this a function independent of the class?
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.
would also switch the order of the params...
@staticmethod | ||
def _import_brep_from_file(filepath): |
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.
why not just make this a function?
Tracking progress in #1447 (comment)
Added some missing properties and alternative constructors to
RhinoBrep
.Checklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.CHANGELOG.md
file in theUnreleased
section under the most fitting heading (e.g.Added
,Changed
,Removed
).invoke test
).invoke lint
).compas.datastructures.Mesh
.