Browse Source

add a second tree, add svg files

master
wes 12 months ago
parent
commit
f10b5ace1a
  1. 38
      planter.py
  2. 103
      tree_of_gondor.svg
  3. 99
      tree_of_gondor_backup.svg
  4. 69
      tree_of_gondor_small.svg
  5. 117
      tree_of_gondor_stars.svg
  6. 117
      tree_of_gondor_stars_small.svg

38
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)

103
tree_of_gondor.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 14 KiB

99
tree_of_gondor_backup.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 16 KiB

69
tree_of_gondor_small.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 13 KiB

117
tree_of_gondor_stars.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 14 KiB

117
tree_of_gondor_stars_small.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 15 KiB

Loading…
Cancel
Save