Thanks to visit codestin.com
Credit goes to github.com

Skip to content

prepend argument variables with _ #77

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
16 changes: 8 additions & 8 deletions solid/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ class union(OpenSCADObject):
def __init__(self):
OpenSCADObject.__init__(self, 'union', {})

def __add__(self, x):
return self.add(x)
#def __add__(self, x):
#return self.add(x)


class intersection(OpenSCADObject):
Expand All @@ -180,8 +180,8 @@ class intersection(OpenSCADObject):
def __init__(self):
OpenSCADObject.__init__(self, 'intersection', {})

def __mul__(self, x):
return self.add(x)
#def __mul__(self, x):
#return self.add(x)


class difference(OpenSCADObject):
Expand All @@ -191,8 +191,8 @@ class difference(OpenSCADObject):
def __init__(self):
OpenSCADObject.__init__(self, 'difference', {})

def __sub__(self,x):
return self.add(x)
#def __sub__(self,x):
#return self.add(x)


class hole(OpenSCADObject):
Expand Down Expand Up @@ -408,9 +408,9 @@ class rotate_extrude(OpenSCADObject):
:type segments: int

'''
def __init__(self, convexity=None, segments=None):
def __init__(self, angle=None, convexity=None, segments=None):
OpenSCADObject.__init__(self, 'rotate_extrude',
{'convexity': convexity, 'segments': segments})
{'angle':angle, 'convexity': convexity, 'segments': segments})


class dxf_linear_extrude(OpenSCADObject):
Expand Down
6 changes: 3 additions & 3 deletions solid/solidpython.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,15 +247,15 @@ def new_openscad_class_str(class_name, args=[], kwargs=[], include_file_path=Non
args_pairs = ''

for arg in args:
args_str += ', ' + arg
args_pairs += "'%(arg)s':%(arg)s, " % vars()
args_str += ', _' + arg
args_pairs += "'%(arg)s':_%(arg)s, " % vars()

# kwargs have a default value defined in their SCAD versions. We don't
# care what that default value will be (SCAD will take care of that), just
# that one is defined.
for kwarg in kwargs:
args_str += ', %(kwarg)s=None' % vars()
args_pairs += "'%(kwarg)s':%(kwarg)s, " % vars()
args_pairs += "'%(kwarg)s':_%(kwarg)s, " % vars()

if include_file_path:
# include_file_path may include backslashes on Windows; escape them
Expand Down