Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 21 additions & 7 deletions solid/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,37 +165,47 @@ class union(OpenSCADObject):
Creates a union of all its child nodes. This is the **sum** of all
children.
'''
def __init__(self):
def __init__(self, *args):
OpenSCADObject.__init__(self, 'union', {})
if args:
self(args)


class intersection(OpenSCADObject):
'''
Creates the intersection of all child nodes. This keeps the
**overlapping** portion
'''
def __init__(self):
def __init__(self, *args):
OpenSCADObject.__init__(self, 'intersection', {})
if args:
self(args)


class difference(OpenSCADObject):
'''
Subtracts the 2nd (and all further) child nodes from the first one.
'''
def __init__(self):
def __init__(self, *args):
OpenSCADObject.__init__(self, 'difference', {})
if args:
self(args)


class hole(OpenSCADObject):
def __init__(self):
def __init__(self, *args):
OpenSCADObject.__init__(self, 'hole', {})
self.set_hole(True)
if args:
self(args)


class part(OpenSCADObject):
def __init__(self):
def __init__(self, *args):
OpenSCADObject.__init__(self, 'part', {})
self.set_part_root(True)
if args:
self(args)


class translate(OpenSCADObject):
Expand Down Expand Up @@ -290,8 +300,10 @@ class minkowski(OpenSCADObject):
sum <http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Minkowski_sum_3/Chapter_main.html>`__
of child nodes.
'''
def __init__(self):
def __init__(self, *args):
OpenSCADObject.__init__(self, 'minkowski', {})
if args:
self(args)

class offset(OpenSCADObject):
'''
Expand Down Expand Up @@ -326,8 +338,10 @@ class hull(OpenSCADObject):
hull <http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Convex_hull_2/Chapter_main.html>`__
of child nodes.
'''
def __init__(self):
def __init__(self, *args):
OpenSCADObject.__init__(self, 'hull', {})
if args:
self(args)


class render(OpenSCADObject):
Expand Down