Skip to content

Using deprecated export method #30

Description

@shimwell

The method currently used to export the TJS file is the toString method
https://github.com/Peque/sphinxcadquery/blob/0b7050c0204b8b2c6f7e6912eaee97ca02b9e776/sphinxcadquery/sphinxcadquery.py#L111

toString appears to be deprecated
https://github.com/CadQuery/cadquery/blob/05e42a75e157ed911aeef84cd7a4a864c59a5750/cadquery/occ_impl/exporters/__init__.py#L114-L118

However CadQuery offers a new method
https://github.com/CadQuery/cadquery/blob/05e42a75e157ed911aeef84cd7a4a864c59a5750/cadquery/occ_impl/exporters/__init__.py#L34-L82

That works like this...

from cadquery import exporters
exporters.export(result, 'result.tjs', exportType='TJS')

This is not a problem quite yet but might become a problem if toString is removed in the future.

While I'm here I was wondering why the file is saved with a sha256 of the string as the file name, is this to make sure it has a unique filename?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions