Skip to content

Commit 4a4872f

Browse files
committed
Fix for #163. All OpenSCAD arguments are effectively optional, while all arguments without default values are required in Python. Resolved to match OpenSCAD's semantics
1 parent c97197d commit 4a4872f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

solid/solidpython.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -653,10 +653,10 @@ def parse_scad_callables(scad_code_str: str) -> List[dict]:
653653
arg_matches = re.finditer(args_re, all_args)
654654
for am in arg_matches:
655655
arg_name = am.group('arg_name')
656-
if am.group('default_val'):
657-
kwargs.append(arg_name)
658-
else:
659-
args.append(arg_name)
656+
# NOTE: OpenSCAD's arguments to all functions are effectively
657+
# optional, in contrast to Python in which all args without
658+
# default values are required.
659+
kwargs.append(arg_name)
660660

661661
callables.append({'name': callable_name, 'args': args, 'kwargs': kwargs})
662662

0 commit comments

Comments
 (0)