27 October 2012

Open Scad trick adding holes

I have been having a problem with Open Scad recently. When I create a hollow but fully enclosed object and try to compile it, Open Scad orientates the faces internal to the object pointed outwards. This is a problem when slicer processes the object and finds what sensibly appears as a fully filled in space rather than an empty space surrounded by the walls of the object.

I noticed that open scad correctly orientates internal faces when they are not fully enclosed. I first used spheres to cut holes slightly larger than the width of the wall in the structure. This 'worked' but didn't print well. The structure is quite small relative to the wall width and when sliced there were just too many short tracks.

The object is automatically generated by some software I have written. It was easy to tack on the spheres on to the end. I put in more effort for my second idea. I calculated the center of each plane and put a 1 layer thick hole aligned with the normal of the plane.

This has 'tricked' open scad into orientating the planes correctly, with much less disruption to the structure and it seems to print fine.