Package: openscad
Version: 2011.12-3

With the attached files, "openscad knifeblock.scad" does not show
anything.  But if you copy knifeblock-bar-2.dxf to
knifeblock-bar-2a.dxf, and edit the file knifeblock.scad accordingly,
it does.

Providing an explicit "convexity=3" parameter fixes the problem.

I conjecture that when the convexity parameter is not specified,
openscad uses a value from uninitialised memory. 

I have seen a similar bug with another openscad primitive.  If I am
right, it would be wise to audit the source code for more occurrences
(or refactor the argument-fetching idiom to make this class of bug
impossible).

Ian.

// -*- C -*-
//import(file="t.dxf");

//translate([0,100,0]){

//translate([0,0,10])
//import(file="knifeblock-knives-l1.dxf");
//import(file="knifeblock-knives-l2.dxf");

//import(file="t.dxf");
//import(file="knifeblock-knives-l2.dxf");
//import(file="foo.dxf");
//import(file="knifeblock-bar-2.dxf", convexity=3);
//import(file="knifeblock-bar-2a.dxf");
import(file="knifeblock-bar-2.dxf");
//import(file="foo-bar-2.dxf");

//}

Attachment: knifeblock-bar-2.dxf
Description: test case included file

Reply via email to