CadQuery / CadQuery/sphinxcadquery

Using deprecated export method

Open
#30 3 comments 1 reaction 0 assignees View on GitHub
enhancement good first issue hacktoberfest help wanted
Dominant language
JavaScript
Stars
16
Forks
4
PR merge metrics
No merged PRs in 30d

Description

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...
```python
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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.