Skip to content

Conversation

@graelo
Copy link

@graelo graelo commented Sep 28, 2025

Hi, many thanks for this Addon, I love it. I was just missing the scoop for EcoBins.

This PR extends scoop support to both EcoBin and CustomEcoBin classes, bringing feature parity with standard storage bins.

Changes

  • EcoBin: Added scoop properties and shape generation logic
  • CustomEcoBin: Added scoop properties with proper custom shape integration (scoop is trimmed by inside_wall_negative

Both classes now expose Scoop (boolean) and ScoopRadius (length) properties in the UI. Default scoop value set to False for backward compatibility

Implementation

The implementation reuses the existing make_scoop() function and follows established patterns used by other features like label shelves. For CustomEcoBin, the scoop is properly cut by the inside wall negative to handle custom shapes correctly.

Testing

  • Code passes linting (ruff) and type checking (mypy)
  • I could not identify any breaking changes to existing functionality
  • Maintains backward compatibility with existing EcoBin objects

This addresses the feature gap where scoops were available in standard bins but missing from eco bins.

Here's an EcoBin with a scoop (radius: 12mm)

image

The underside is unaffected:
image

It also works for 1x1 EcoBins
image

and custom EcoBins
image

Copy link
Contributor

@greg19 greg19 left a comment

Choose a reason for hiding this comment

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

Nice, cool to have it, thanks for contributing 🙂

@graelo
Copy link
Author

graelo commented Sep 28, 2025

Question for you @greg19:

I'm getting this FA100 warning from Ruff, and I'm wondering what's the most appropriate way for this repo to fix it:

freecad/gridfinity_workbench/feature_construction.py:196:58: FA100 Add `from __future__ import annotations` to simplify `typing.Optional`
    |
196 | def make_scoop(obj: fc.DocumentObject, *, usable_height: Optional[int] = None) -> Part.Shape:
    |                                                          ^^^^^^^^ FA100

I think we have to keep it work for Python 3.10 because I believe that's what FreeCAD still uses, so I went for Optional for the type hint. Would you prefer me to apply the advice for FA100?

Sorry, FreeCAD uses 3.11, I can go with the new notation.

@graelo
Copy link
Author

graelo commented Sep 28, 2025

Thanks for the feedback, it's indeed better now.

@graelo graelo requested a review from greg19 September 28, 2025 09:34
@graelo graelo requested a review from greg19 September 28, 2025 15:08
@graelo
Copy link
Author

graelo commented Oct 10, 2025

Hello @Stu142, a kind ping for this PR.
In any case, take care.

@Stu142
Copy link
Owner

Stu142 commented Oct 10, 2025

@graelo thanks for the contribution I'll have time to take a look at it this weekend, I've been unable to find time over the summer but things are cooling down now and I have some catching up to do.

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