summaryrefslogtreecommitdiffstats
path: root/libdimension-python
diff options
context:
space:
mode:
Diffstat (limited to 'libdimension-python')
-rw-r--r--libdimension-python/dimension.pxd1
-rw-r--r--libdimension-python/dimension.pyx9
2 files changed, 10 insertions, 0 deletions
diff --git a/libdimension-python/dimension.pxd b/libdimension-python/dimension.pxd
index 3f89e71..cddd7ba 100644
--- a/libdimension-python/dimension.pxd
+++ b/libdimension-python/dimension.pxd
@@ -335,6 +335,7 @@ cdef extern from "../libdimension/dimension.h":
dmnsn_object *dmnsn_new_cube()
dmnsn_object *dmnsn_new_cone(double r1, double r2, bint open)
dmnsn_object *dmnsn_new_torus(double major, double minor)
+ dmnsn_object *dmnsn_new_teapot()
dmnsn_object *dmnsn_new_csg_union(dmnsn_array *objects)
dmnsn_object *dmnsn_new_csg_intersection(dmnsn_object *A, dmnsn_object *B)
diff --git a/libdimension-python/dimension.pyx b/libdimension-python/dimension.pyx
index a34d2eb..704d6fa 100644
--- a/libdimension-python/dimension.pyx
+++ b/libdimension-python/dimension.pyx
@@ -1271,6 +1271,15 @@ cdef class Torus(Object):
self._object = dmnsn_new_torus(major_radius, minor_radius)
Object.__init__(self, *args, **kwargs)
+cdef class Teapot(Object):
+ """The Utah teapot."""
+ def __init__(self, *args, **kwargs):
+ """
+ Create a Teapot. Teapot() accepts any arguments that Object() accepts.
+ """
+ self._object = dmnsn_new_teapot()
+ Object.__init__(self, *args, **kwargs)
+
cdef class Union(Object):
"""A CSG union."""
def __init__(self, objects, *args, **kwargs):