Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export FCstd to jcad #25

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Export FCstd to jcad #25

wants to merge 5 commits into from

Conversation

arjxn-py
Copy link
Member

@arjxn-py arjxn-py commented Dec 4, 2024

Fix #24

@arjxn-py arjxn-py marked this pull request as draft December 4, 2024 15:25
@martinRenou martinRenou added the enhancement New feature or request label Dec 4, 2024

try:
fcstd = FCStd()
fcstd.load(base64_content=base64_content)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our jupytercad_freecad.freecad.loader module only exposes a load method that reads base 64 data, but it will create a temporary file under the hood before passing it to actual freecad. So we're reading into base 64, writing the file, and reading it again.

We could reduce the complexity of this by introducing e.g. a load_file method to the FCStd that loads from a file directly.

@martinRenou
Copy link
Member

Adding a note that exporting an empty FCstd file seems to fail

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

File -> Export to .jcad button is disabled but should be available
2 participants