summaryrefslogtreecommitdiff
path: root/src/helpers_cadquery.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/helpers_cadquery.py')
-rw-r--r--src/helpers_cadquery.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/helpers_cadquery.py b/src/helpers_cadquery.py
index 44553e6..5fb3886 100644
--- a/src/helpers_cadquery.py
+++ b/src/helpers_cadquery.py
@@ -15,7 +15,9 @@ def box(width, height, depth):
def cylinder(radius, height, segments=100):
- return cq.Workplane("XY").union(cq.Solid.makeCylinder(radius=radius, height=height))
+ shape = cq.Workplane("XY").union(cq.Solid.makeCylinder(radius=radius, height=height))
+ shape = translate(shape, (0, 0, -height/2))
+ return shape
def sphere(radius):