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

Reduce the amount of data we're reading from FCstd files #26

Open
martinRenou opened this issue Dec 4, 2024 · 7 comments
Open

Reduce the amount of data we're reading from FCstd files #26

martinRenou opened this issue Dec 4, 2024 · 7 comments
Labels
enhancement New feature or request

Comments

@martinRenou
Copy link
Member

martinRenou commented Dec 4, 2024

The method to translate a freecad object into a jcad object reads all the properties of the freecad object.

This is a bit too much because many of these properties cannot be understood by the JupyterCAD client.

We should reduce this to reading only the properties that JupyterCAD understands, making use of the Python schemas jupytercad-core now exposes.

@trungleduc
Copy link
Member

For properties that don't have a handler, we just set their value to None. Why do we need to filter more?

@martinRenou
Copy link
Member Author

martinRenou commented Dec 4, 2024

But many properties have a handler even though it's not supported by jcad ? At least that's what we see with exported files using #25

Exported files do not respect the jcad schemas so we can't open them in jupyterlite. They should respect the schemas

@trungleduc
Copy link
Member

These properties go into the parameters key of the IJCadObject interface, which is defined as { [k: string]: any;}, I'm wondering how it can break the schema

@martinRenou
Copy link
Member Author

I see, but why load those properties if the client can't understand them? That's probably early optimization but there are lots of properties we don't understand and it's useless to load.

@martinRenou
Copy link
Member Author

Adding a note that those unwanted data results in doubling the size of the exported ArchDetail.jcad file.

@trungleduc
Copy link
Member

Because JupyterCAD was designed with FCStd as a first class citizen, the idea was to eventually support them all

@martinRenou
Copy link
Member Author

Sounds good! But we should maybe add the properties we support progressively in our schema

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

No branches or pull requests

2 participants