Skip to content

hole turns differences into unions #82

Description

@davidji

E.g.

I expect

from solid import *
from solid.utils import *

def hole_difference():
    return cube([20,20,20], center=True) + hole()(cube([10,10,20], center=True) - cylinder(d=10, h = 20))

if __name__ == '__main__':
    scad_render_to_file(hole_difference(), 'hole_union.scad')

to produce

difference(){
	union() {
		cube(center = true, size = [20, 20, 20]);
	}
	/* Holes Below*/
	union(){
		difference() {
			cube(center = true, size = [10, 10, 20]);
			cylinder(d = 10, h = 20);
		}
	} /* End Holes */ 
}

but it produces

difference(){
	union() {
		cube(center = true, size = [20, 20, 20]);
	}
	/* Holes Below*/
	union(){
		union() {
			cube(center = true, size = [10, 10, 20]);
			cylinder(d = 10, h = 20);
		}
	} /* End Holes */ 
}

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions