Skip to content

print warnings or error when a scoped operator is used without a scope #192

@maxlem

Description

@maxlem

Hi, thanks for your project!

I was stuck for a while transitioning code from scad to solidpython. I tend to open curly braces on the following line, replacing them with braces produces valid python code but surprizing results:

from solid import *

d = difference()
(
    cube(10),
    sphere(15)
)
scad_render_to_file(d, "tmp.scad")

produces

difference();

since python does not call operator() on difference() in this case.

I think one could easily detect such a use case and warn the user.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions