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

First implementation of open sides on X and Y side #104

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

Conversation

basvdijk
Copy link

@basvdijk basvdijk commented Apr 25, 2023

First attempt to allow open sides on X and Y side

image

image

image

Added checkboxes in settings:

image

closes #103, closes #90

@Ruudjhuu
Copy link
Collaborator

I get the idea. and the feature seems to be wanted. However, it would be nice if this could be implemented in the utility file so the lite version could also have this feature.

Instead of generating all walls and then removing it, could we try to not generate all walls to begin with?

I think the implementation will somehow end up in sweep_rounded, make it able to pick which wall it should generate.

I added some comments to explain what some parts of this code is doing.

module sweep_rounded(w=10, h=10) {
    // Create half a sweep and circle it (fancy mirror)
    union() pattern_circular(2) {
        // Create two corners
        copy_mirror([1,0,0]) 
        translate([w/2,h/2,0])
        rotate_extrude(angle = 90, convexity = 4) 
        children();
        
        // Create wall X
        translate([w/2,0,0])
        rotate([90,0,0])
        linear_extrude(height = h, center = true)
        children();
        
        // Create wall Y
        rotate([0,0,90])
        translate([h/2,0,0])
        rotate([90,0,0])
        linear_extrude(height = w, center = true)
        children();
    }
}

@Ruudjhuu Ruudjhuu added the enhancement New feature or request label Apr 26, 2023
@basvdijk
Copy link
Author

It is not only the walls, but also the bottomplate. Therefore I chose to chop off the wall. For me the code is quite complex and hard to understand what goes when, where and why since it is quite abstracted. I first tried to implement this feature in the utility file, but failed to get it working.

I understand my code is a dirty solution, but at least it does the job and can already provide something to use. Could it be an idea to make a beta folder or something which contains the dirty solution, but already provides this functionality to the user?

@Ruudjhuu
Copy link
Collaborator

I gave it a 15 min try and I see there is a more involved then I thought. The cutters for the inside of the bin (walls, tabs, scoops) do also generate a piece of the wall. That wall piece overlaps with the sweep_rounded results. When disabling the cutters and change sweep_rounded a little bit I got this far which is by any means not perfect.

Regarding the beta folder. If someone wants to use this feature in this state, I think this pull request is a good place. Everyone is able to clone your repo or even the pull request branch if they want to use it. I consider the code changes in this pull request a POC instead of a alpha or beta release.

Your help is more then welcome to implement new features, if you have questions regarding the code base to understand it better. I am happy to help and try to give you answers. I do also not fully understand everything happening here.

image

code snippet for inspiration (does not classifies as good code at all).
Also comment out line 32-36 of the utils file to disable the cutter logic. (not a long term solution of course)

module sweep_rounded(w=10, h=10) {
    remove_wall = true;

    union(){
        if(remove_wall) {
            sweep_corner(w,h)children();
        }
        else {
            pattern_circular(2)
            sweep_corner(w,h)children();
        }

        pattern_circular(2)
        sweep_y(w,h)
        children();
        
        if(remove_wall) {
            sweep_x(w,h)
            children();
        }
        else {
            pattern_circular(2)
            sweep_x(w,h)
            children();
        }
    }
}

module sweep_corner(w=10, h=10){
        copy_mirror([1,0,0]) 
        translate([w/2,h/2,0])
        rotate_extrude(angle = 90, convexity = 4) 
        children();
}

module sweep_x(w=10, h=10) {
    rotate([0,0,90])
    translate([h/2,0,0])
    rotate([90,0,0])
    linear_extrude(height = w, center = true)
    children();
}

module sweep_y(w=10, h=10) {
    translate([w/2,0,0])
    rotate([90,0,0])
    linear_extrude(height = h, center = true)
    children();
}

@basvdijk
Copy link
Author

Updated PR. Code now supports to toggle all sides individually

image

@schneems
Copy link

Fwiw I would love a feature like this. Trimming off the sides with negative volume alone in a slicer is surprisingly tricky. The only pre-built "sideless" project I can find doesn't have much variation and doesn't include the "hole fix" https://www.printables.com/model/209998-gridfinity-sideless-bins-and-platforms.

@chadlipscomb
Copy link

I would really love to see a "Lite" variant of this. I'm trying to do that right now, but I'm totally new to OpenSCAD and am struggling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Idea: Open ended boxes Allow removal of specific bin sides
4 participants