From ab13342ab5ba9f495018e2e9f5a9574ddc8bdca0 Mon Sep 17 00:00:00 2001 From: Elod Csirmaz Date: Mon, 19 Aug 2024 23:05:03 +0100 Subject: [PATCH] Convenience method for intersections --- openscad_py.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openscad_py.py b/openscad_py.py index 83528ce..254c1a4 100644 --- a/openscad_py.py +++ b/openscad_py.py @@ -201,6 +201,10 @@ class Object: def union(self, objects: TUnion[list, 'Object']) -> 'Object': """Form the union of self and an object or list of objects""" return Union(child=Collection.c(objects)._add(self)) + + def intersection(self, objects: TUnion[list, 'Object']) -> 'Object': + """Get the intersection of self and an object of list of objects""" + return Intersection(child=Collection.c(objects)._add(self)) class Header: