From 4add045be22b6b61ab1572d6c1404073ad0f9ca4 Mon Sep 17 00:00:00 2001 From: John-Paul Robinson Date: Mon, 26 Nov 2012 18:03:07 -0600 Subject: [PATCH] Workaround in drum() module for difference() bug in openscad There is an inconsistency in openscad in how difference works on Macs and Linux. When the drumHeight is 0, i.e. escapementWheel(), then the first term in the difference() for the drum() module will be empty. This causes the Mac to treat the second term as the actual object and render it. This leaves an artifact on the escapement wheel that is a solid disk which must be drilled out manually to recover the axis hole for the escapement wheel. On linux platforms this artifact doesn't appear. For an openscad example that demonstrates the problem see: https://github.com/openscad/openscad/issues/221 --- clockworkLibrary.scad | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clockworkLibrary.scad b/clockworkLibrary.scad index 9c0d5d9..8f45e22 100755 --- a/clockworkLibrary.scad +++ b/clockworkLibrary.scad @@ -229,6 +229,7 @@ module drum( { flangeWidth=min(drumHeight/3,rimWidth/2); + if (drumHeight != 0 ) { difference() // makes the center hollow & includes holes to attach string { union() // builds the drum with flanges @@ -254,6 +255,7 @@ module drum( } } + } } module escapementWheel(