Skip to content

added missing properties to RhinoBrep #1459

New issue

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

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

Already on GitHub? # to your account

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Conversation

chenkasirer
Copy link
Member

@chenkasirer chenkasirer commented Apr 10, 2025

Tracking progress in #1447 (comment)

Added some missing properties and alternative constructors to RhinoBrep.

image

  • Bug fix in a backwards-compatible manner.
  • New feature in a backwards-compatible manner.
  • Breaking change: bug fix or new feature that involve incompatible API changes.
  • Other (e.g. doc update, configuration, etc)

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.

  • I added a line to the CHANGELOG.md file in the Unreleased section under the most fitting heading (e.g. Added, Changed, Removed).
  • I ran all tests on my computer and it's all green (i.e. invoke test).
  • I ran lint on my computer and there are no errors (i.e. invoke lint).
  • I added new functions/classes and made them available on a second-level import, e.g. compas.datastructures.Mesh.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added necessary documentation (if appropriate)

Copy link

codecov bot commented Apr 10, 2025

Codecov Report

Attention: Patch coverage is 57.14286% with 6 lines in your changes missing coverage. Please review.

Project coverage is 61.89%. Comparing base (8496686) to head (3aa022c).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
src/compas/geometry/brep/brep.py 54.54% 5 Missing ⚠️
src/compas/geometry/brep/__init__.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1459      +/-   ##
==========================================
- Coverage   61.89%   61.89%   -0.01%     
==========================================
  Files         208      208              
  Lines       22333    22338       +5     
==========================================
+ Hits        13822    13825       +3     
- Misses       8511     8513       +2     

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

@chenkasirer chenkasirer marked this pull request as ready for review April 17, 2025 14:52
@chenkasirer chenkasirer requested a review from Copilot April 17, 2025 14:52
Copy link

@Copilot Copilot AI left a 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.

Comment on lines 750 to 751
if not not filepath.endswith(".step"):
raise ValueError("Expected file with .igs extension")
Copy link
Preview

Copilot AI Apr 17, 2025

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.

Suggested change
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
Copy link
Preview

Copilot AI Apr 17, 2025

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.

Suggested change
pass
raise NotImplementedError("Infinite check is not implemented for Rhino Breps.")

Copilot uses AI. Check for mistakes.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant