Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hole turns differences into unions #82

Open
davidji opened this issue Jul 5, 2017 · 0 comments
Open

hole turns differences into unions #82

davidji opened this issue Jul 5, 2017 · 0 comments

Comments

@davidji
Copy link

davidji commented Jul 5, 2017

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 */ 
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant