$box_bevel - does it work?
Opened this issue · 6 comments
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.
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).
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.
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.
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)?
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");
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).