SolidCode / SolidPython

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

import_stl and import_dxf are deprecated #113

Closed rockstorm101 closed 4 years ago

rockstorm101 commented 4 years ago

The use of import_stl is now deprecated in favor of just import [1].

etjones commented 4 years ago

Do you think we should remove import_stl() and import_dxf()? I think what happens when either are used in SP code is that the generated OpenSCAD code will print a deprecation warning. That seems like the right behavior until OpenSCAD actually removes the functions.

The other option would be to include a deprecation warning in the Python so you didn't have to open the generated code in OpenSCAD to get a warning. I'd take a pull request for that behavior if you submitted it.

rockstorm101 commented 4 years ago

Please excuse my brevity on this one. My complaint when opening the issue was that no import function was provided. But I just realised it is indeed provided, it is just renamed to import_ (I'm guessing to avoid clashing with python's own import).

If you intend to remove the import_stl and import_dxf once they are removed from OpenSCAD then I would suggest adding a deprecation warning on SolidPython too. Leave this issue open until then or close if you wish, I'm happy with both options.

Otherwise if you intend to keep that backwards compatibility, I would close this issue as it is no longer relevant.

etjones commented 4 years ago

Cheers. I'll close now and revisit when OpenSCAD actually makes some changes.