Skip to content

import_scad('MCAD') fails with the last version of OpenSCAD and solidpython on march 2021 #166

@fredericcassin

Description

@fredericcassin

The error occurs on every omport_scad attempt on any library folder I try.
The error with the wiki sample code trace the error:

Unable to import SCAD module: 12ptStar from shapes.scad, with error: invalid syntax (, line 2)
Unable to import SCAD module: bearing from hardware.scad, with error: invalid syntax (, line 3)
Unable to import SCAD module: nut from hardware.scad, with error: invalid syntax (, line 3)
Unable to import SCAD module: washer from hardware.scad, with error: invalid syntax (, line 3)
Unable to import SCAD module: rodnut from hardware.scad, with error: invalid syntax (, line 3)
Unable to import SCAD module: rodwasher from hardware.scad, with error: invalid syntax (, line 3)
Unable to import SCAD module: duplicate from multiply.scad, with error: duplicate argument 'no' in function definition (, line 3)
Unable to import SCAD module: 8bit_str from letter_necklace.scad, with error: invalid syntax (, line 2)
Unable to import SCAD module: 8bit_char from bitmap.scad, with error: invalid syntax (, line 2)
Unable to import SCAD module: 8bit_str from bitmap.scad, with error: invalid syntax (, line 2)
Unable to import SCAD module: 8bit_polyfont from fonts.scad, with error: invalid syntax (, line 2)
Unable to import SCAD module: 3dtri_sides2coord from 3d_triangle.scad, with error: invalid syntax (, line 2)
Unable to import SCAD module: 3dtri_centerOfGravityCoord from 3d_triangle.scad, with error: invalid syntax (, line 2)
Unable to import SCAD module: 3dtri_centerOfcircumcircle from 3d_triangle.scad, with error: invalid syntax (, line 2)
Unable to import SCAD module: 3dtri_radiusOfcircumcircle from 3d_triangle.scad, with error: invalid syntax (, line 2)
Unable to import SCAD module: 3dtri_radiusOfIn_circle from 3d_triangle.scad, with error: invalid syntax (, line 2)
Unable to import SCAD module: 3dtri_centerOfIn_circle from 3d_triangle.scad, with error: invalid syntax (, line 2)
Unable to import SCAD module: 3dtri_draw from 3d_triangle.scad, with error: invalid syntax (, line 2)
Unable to import SCAD module: 3dtri_rnd_draw from 3d_triangle.scad, with error: invalid syntax (, line 2)

Found OpenSCAD code that's not compatible with Python.
Imported OpenSCAD code using from
can be accessed with from_ in SolidPython

['2Dshapes', '3d_triangle', 'class', 'delattr', 'dict', 'dir', 'doc', 'eq', 'format', 'ge', 'getattribute', 'gt', 'hash', 'init', 'init_subclass', 'le', 'lt', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'setattr', 'sizeof', 'str', 'subclasshook', 'bearing', 'bitmap', 'boxes', 'constants', 'curves', 'fonts', 'gears', 'gridbeam', 'hardware', 'involute_gears', 'layouts', 'lego_compatibility', 'libtriangles', 'materials', 'math', 'metric_fastners', 'motors', 'multiply', 'nuts_and_bolts', 'polyholes', 'regular_shapes', 'screw', 'servos', 'shapes', 'stepper', 'teardrop', 'transformations', 'triangles', 'trochoids', 'units', 'unregular_shapes', 'utilities']

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