SolidCode / SolidPython

A python frontend for solid modelling that compiles to OpenSCAD
1.1k stars 172 forks source link

Offset should accept zero as arguments #147

Closed yaqwsx closed 4 years ago

yaqwsx commented 4 years ago

In OpenSCAD, offset can accept zero for r or delta. Unfortunately, SolidPython does not. The problem is in: https://github.com/SolidCode/SolidPython/blob/f79d68c7fbb82f1763ca7de1ec24576fbfc02585/solid/objects.py#L418-L426

Instead of if variable: should be if variable is not None.

Use case: When r is a user-supplied argument.

etjones commented 4 years ago

Thanks, that’s a good catch. I’ll push a change later today