|
|
@ -45,29 +45,30 @@ planter_polygon = result.workplane(offset=-36).makePolygon( |
|
|
|
|
|
|
|
result = planter_polygon.vertices().sphere(8, combine="cut") |
|
|
|
|
|
|
|
gondor_paths, gondor_attributes = svg2paths("/home/deck/cad_files/tree_of_gondor_small.svg") |
|
|
|
gondor_paths, gondor_attributes = svg2paths( |
|
|
|
"/home/deck/cad_files/tree_of_gondor_small.svg" |
|
|
|
) |
|
|
|
gandalf_paths, gandalf_attributes = svg2paths("/home/deck/cad_files/gandalf.svg") |
|
|
|
mordor_paths, mordor_attributes = svg2paths("/home/deck/cad_files/mordor.svg") |
|
|
|
|
|
|
|
svgs_to_render = [ |
|
|
|
(gondor_paths, (95.03, -100, 0)), |
|
|
|
(gandalf_paths, (-95.03, -14.5, 85)), |
|
|
|
] |
|
|
|
|
|
|
|
if RENDER_TREES: |
|
|
|
tree = ( |
|
|
|
Workplane("YZ") |
|
|
|
.center(0, 75) |
|
|
|
.addSvgPath(gondor_paths[0]) |
|
|
|
.extrude(-2.0) |
|
|
|
.translate((95.03, -100, 0)) |
|
|
|
) |
|
|
|
|
|
|
|
gandalf = ( |
|
|
|
Workplane("YZ") |
|
|
|
.center(0, 75) |
|
|
|
.addSvgPath(gandalf_paths[0]) |
|
|
|
.extrude(2.0) |
|
|
|
.translate((-95.03, -14.5, 85)) |
|
|
|
) |
|
|
|
image_objects = [] |
|
|
|
for svg_paths, translate_offsets in svgs_to_render: |
|
|
|
image_objects.append( |
|
|
|
Workplane("YZ") |
|
|
|
.center(0, 75) |
|
|
|
.addSvgPath(svg_paths[0]) |
|
|
|
.extrude(-2.0) |
|
|
|
.translate(translate_offsets) |
|
|
|
) |
|
|
|
|
|
|
|
result = result.cut(tree, clean=False) |
|
|
|
result = result.cut(gandalf, clean=False) |
|
|
|
for image_object in image_objects: |
|
|
|
result = result.cut(image_object, clean=False) |
|
|
|
|
|
|
|
cone = cq.Solid.makeCone(planter_radius, 33, planter_height + 95) |
|
|
|
|
|
|
|