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

laserCutBox cubes are translated to correctly fit their dimensions from 0, laserCutSquare pieces aren't #24

Open
Inhibit opened this issue Mar 2, 2021 · 3 comments

Comments

@Inhibit
Copy link

Inhibit commented Mar 2, 2021

I'm unsure if this is intentional or not but it threw me for a loop when I was coding up a parametric assembly.

The behavior of boxes is to fit their dimensions precisely including the tab cutouts. The square sheets don't. They're offset by a sheet thickness in two dimensions from 0 rather than translated to compensate. Personally I'd prefer all the functions to have the behavior of the box and once created have the 0 offset; but either case being consistent would do for regular behavior.

I realize this might be intentional for some reason but felt I should point it out to prevent someone having a similar head-scratching moment as their assembly is subtly off :). I can submit a patch if you'd like but it'd probably take me a while.

Thanks for sharing this library by the way. It's a nice time saver.

in example:

$fn=60;

include <lasercut.scad>;

thickness = 3.0;
cabx = 185;
caby = 320;
cabz = 220; 


// Our laserCutSquare sheet
color("aqua", 0.75)
translate([0, 0, 0])
lasercutoutSquare(thickness=thickness, x=cabx-thickness, y=caby-(2*thickness),
bumpy_finger_joints=[
        [UP, 1, 4],
        [DOWN, 0, 4],
        [LEFT, 1, 6]
    ]
);

// a cube for easy reference
color("green", 0.75)
translate([cabx, 0, 0])
cube([cabx, caby, thickness]);

// a cube for easy reference
color("green", 0.75)
translate([0, caby, 0])
cube([cabx, caby, thickness]);

// our laserCutBox
color("red",0.6)
translate([cabx, caby, 0])
lasercutoutBox(thickness = thickness, x=cabx, y=caby, z=cabz, 
sides=5, num_fingers=4);
@Inhibit
Copy link
Author

Inhibit commented Mar 2, 2021

I had a few minutes and figured it'd be easier to make the change prior to creating my design.

Added a pull request with the way I'd implement it after looking at the code.
#25

@bmsleight
Copy link
Owner

Long day at work, yet bug and patch submitted. :)
Cool - try at look at this at weekend.

@Inhibit
Copy link
Author

Inhibit commented Mar 2, 2021

By then I might have it fixed. Shortly after posting I noticed it was a little too simplistic.

I think the method is sound but I need to follow the logic of the program a little more and clean up where the jiggering happens. I should be able to follow up with a correctly working patch!

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

No branches or pull requests

2 participants