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

$box_bevel - does it work? #56

Open
crabbedh opened this issue May 1, 2022 · 6 comments
Open

$box_bevel - does it work? #56

crabbedh opened this issue May 1, 2022 · 6 comments

Comments

@crabbedh
Copy link

crabbedh commented May 1, 2022

Not sure if this is the right place.. if not direct me .. (using puzzlecad 2.3)

I want to bevel the frame/box much more than "default" rendering.. similar to those 3D puzzles online (ie: https://www.puzzlemaster.ca/search/?q=spiral%20lock). I see in the puzzlecad-boxes.scad source a variable called "$box_bevel" which I'm guessing would do this. However, if I specify "$box_bevel=5;" at the top layer of my puzzle source, nothing happens; nor does it when calling the packing_box routine.

I even edited the puzzlecad.scad default values for $box_bevel (line #56) and no change to box rendering. ($box_bevel = 5;)

Can one change the bevel of the packing box? Again.. sorry if this is the wrong location for this comment.. am just ramping up on scad/puzzlecad and don't see other ways to ask.

@aaron-siegel
Copy link
Owner

It works for me:

packing_box(["xxxxx|xxxxx|xxxxx|xxxxx|xxxxx", "xxxxx|x...x|x...x|x...x|xxxxx"]);

image

versus

$box_bevel = 3;
packing_box(["xxxxx|xxxxx|xxxxx|xxxxx|xxxxx", "xxxxx|x...x|x...x|x...x|xxxxx"]);

image

Can you post your complete .scad file? Thanks!

@crabbedh
Copy link
Author

crabbedh commented May 6, 2022

ahh.. found the issue.. I had a "$burr_bevel_adjustments = " part at the end of the statement and it was over-riding the $box_bevel value. (In learning SCAD, I was doing too much cut/paste).

Screen Shot 2022-05-06 at 2 22 47 PM

Taking that out fixed the issue, but the rendering is not ideal.. You can see it bevels where the top is cut. Ideally when you glue the top, you'd like the bevel to continue on the sides, but not on the top/bottom of the cut.

Screen Shot 2022-05-06 at 2 14 25 PM

Although I haven't tried it thoroughly, can you use the 'connect' statement (on the packing_box routine to create an obstruction on a wall so that it creates a 'glue' point? Adding the obstruction and hoping the auto layout will take care of it doesn't seem to work as shown below.

Screen Shot 2022-05-06 at 2 19 52 PM

If I don't use $auto_layout = true, then it renders without issue. With a nice bevel! My attempt to use "connect" magic here has not worked as I'd also need to use on the top.. but maybe packing_box is not intended to have obstructions inside.

So if obstructions should use burr_plate to create the box.. will the $box_bevel constant work independently of the $burr_bevel? (or will burr_plate even use $box_bevel)?

Screen Shot 2022-05-06 at 2 21 22 PM

@aaron-siegel
Copy link
Owner

If you don't use $auto_layout, you can fine-tune the beveling. The following is supposed to work, but evidently there's a bug that causes an infinitesimally thin overhang if the z- adjustment is less than 1/2 of the main bevel.

$box_bevel = 3;
packing_box([
    "xxxxxxx|xxxxxxx|xxxxxxx|xxxxxxx",
    "x.....x|xxx...x|x.....x|x.....x",
    "x.....x|x.....x|x....xx|x.....x",
    "x.....x|x.....x|x.....x|x.....x",
    "x{connect=mz+}.....x{connect=mz+}|x.....x|x.....x|x{connect=mz+}.....x{connect=mz+}"
], $burr_bevel_adjustments = "z+=0");

image

@crabbedh
Copy link
Author

crabbedh commented May 6, 2022 via email

@crabbedh
Copy link
Author

crabbedh commented May 8, 2022

Yes that would work fine, with bug fixed. I also found (when creating mini lock 2) that 4 circles do not preserve lid orientation and user could glue lid backwards. That is critical in the mini lock 2 puzzle. As a suggestion, I’d make one circle a square ( or put circles so layout is not symmetric …. ( I never checked if autolayout actually does that).

@crabbedh
Copy link
Author

crabbedh commented Oct 11, 2022 via email

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