diff --git a/planter.py b/planter.py index 9f2d82e..39ef286 100644 --- a/planter.py +++ b/planter.py @@ -11,6 +11,8 @@ from svgpathtools import svg2paths import cadquery as cq import cqmore +RENDER_TREES = True + Workplane = cqmore.extend(Workplane) Workplane.addSvgPath = addSvgPath @@ -28,7 +30,7 @@ outer_poly = Polyhedron(outer_points, outer_faces) result = Workplane().polyhedron(*outer_poly) -holder_angle_offset = 20 +holder_angle_offset = 67 planter_polygon = result.workplane(offset=-36).makePolygon( @@ -45,26 +47,26 @@ result = planter_polygon.vertices().sphere(8, combine="cut") paths, attributes = svg2paths("/home/deck/cad_files/tree_of_gondor_small.svg") -# print(dir(result.addSvgPath(paths[0]))) -tree = ( - Workplane("YZ") - .center(0, 75) - .addSvgPath(paths[0]) - .extrude(-2.0) - .translate((95.03, -100, 0)) -) +if RENDER_TREES: + tree = ( + Workplane("YZ") + .center(0, 75) + .addSvgPath(paths[0]) + .extrude(-2.0) + .translate((95.03, -100, 0)) + ) -tree2 = ( - Workplane("YZ") - .center(0, 75) - .addSvgPath(paths[0]) - .extrude(-2.0) - .translate((-95, -100, 0)) -) + tree2 = ( + Workplane("YZ") + .center(0, 75) + .addSvgPath(paths[0]) + .extrude(2.0) + .translate((-95.03, -100, 0)) + ) -result = result.cut(tree, clean=False) -result = result.cut(tree2, clean=False) + result = result.cut(tree, clean=False) + result = result.cut(tree2, clean=False) cone = cq.Solid.makeCone(planter_radius, 33, planter_height + 95) diff --git a/tree_of_gondor.svg b/tree_of_gondor.svg new file mode 100644 index 0000000..7accae7 --- /dev/null +++ b/tree_of_gondor.svg @@ -0,0 +1,103 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + diff --git a/tree_of_gondor_backup.svg b/tree_of_gondor_backup.svg new file mode 100644 index 0000000..641ea8f --- /dev/null +++ b/tree_of_gondor_backup.svg @@ -0,0 +1,99 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + diff --git a/tree_of_gondor_small.svg b/tree_of_gondor_small.svg new file mode 100644 index 0000000..f032f9c --- /dev/null +++ b/tree_of_gondor_small.svg @@ -0,0 +1,69 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + diff --git a/tree_of_gondor_stars.svg b/tree_of_gondor_stars.svg new file mode 100644 index 0000000..bbe4570 --- /dev/null +++ b/tree_of_gondor_stars.svg @@ -0,0 +1,117 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + diff --git a/tree_of_gondor_stars_small.svg b/tree_of_gondor_stars_small.svg new file mode 100644 index 0000000..f27abaa --- /dev/null +++ b/tree_of_gondor_stars_small.svg @@ -0,0 +1,117 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + +