[OpenSCAD] puzzlecutlib rendering problem & STL export error Current top level object is empty.

Ronaldo rcmpersiano at gmail.com
Wed Jun 8 01:56:13 EDT 2016


You are right. There is an error in the way dovetail() deals with kerf. 

Although it can be corrected I found a better way to define the joints.
Redefine makePuzzleStamp as:

> module makePuzzleStamp(kerf = 0) {
> 	difference() {
> 		//make the cube
> 		translate ([0,stampSize[0] / 2 - kerf,0])
> 			cube (stampSize, center = true);
> 		
> 		//make the cuts
> 		for ( i = cutLocations )
> 			translate([i,0,0]) tenon(cutSize, kerf, stampSize[2]); 

and at the beginning of puzzlecutlib.scad add:

> // profiles
> t = tan(12);
> dovetail = [ [-3/8, 1], [3/8, 1], [3/8-t, -0.1], [-3/8+t, -0.1] ] ;
> // rounded dovetail
> round_dt = [ [-1/2+1/7, 1-1/10], [-1/3+1/8,  1], [1/3-1/8,  1], [1/2-1/7,
> 1-1/10], 
>              [1/2-1/8,   1-2/7], [3/16,   -0.1], [-3/16, -0.1], [-1/2+1/8,
> 1-2/7], ] ;
> 
> t_lock  = [ [-1/4, -0.1], [-1/4, 1/3], [-1/2, 1/3], [-1/2,  3/4],
>             [ 1/2,  3/4], [ 1/2, 1/3], [ 1/4, 1/3], [ 1/4, -0.1] ];
> 
> profile = dovetail; // choose any of above profiles
> 
> module tenon(size=6, kerf=0, h=100) {
>     translate([0,0,-1])
>         linear_extrude(height = h+2)
>             offset(delta=-kerf) 
>                 polygon(size*profile);
> }

To define a new cut shape it is enough to provide its list of points as a
new profile. The profile round_dt is an example.



--
View this message in context: http://forum.openscad.org/puzzlecutlib-rendering-problem-STL-export-error-Current-top-level-object-is-empty-tp17440p17582.html
Sent from the OpenSCAD mailing list archive at Nabble.com.




More information about the Discuss mailing list