How To Do Serialization? #209
Replies: 3 comments 10 replies
-
|
Doing a little bit of digging it seems like the BREP format is probably more appropriate for serialization than using STEP. I'm curious about how it would work in practice (would it be painfully slow or lead to other issues). |
Beta Was this translation helpful? Give feedback.
-
|
Hi @sgenoud! I'm working with Bar on this serialization project and want to check in with you now that we've gotten a little further along. So far BREP seems promising as an accuracy-preserving way to serialize 3d shapes and ship them between workers as needed. In our current proof of concept I'm using oc's BinTools.read and BinTools.write methods to serialize shapes directly to/from memfs files. Then replicad's Shape.cast to wrap the deserialized result. All that being said, it's still early days I'm not yet sure how fast this serialization/deserialization will be. There's two main questions I have for you re replicad and this serialization functionality.
|
Beta Was this translation helpful? Give feedback.
-
|
I was testing this in the hopes that serialized shapes could be used as cache keys, but noticed that there can be subtle differences between the original shapes, and the deserialized ones that appear to affect future cache operations. Here's a comparison of a fuse operation's original output and a second call (after a code or parameter change) where I'm serializing the operation name, target shape, and fuse argument shape: The difference is a If I do, later operations have this also apparently subtle difference ( This is probably not be the goal of this PR/code, but I'm curious if you have some insight, and whether this serialization could be feasible for this use, or if the OC representation has too much built in state to make it possible |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
This is a related question to this question about caching but I didn't want to hijack the conversation there.
I would like to be able to run operations in different workers in parallel, but to be able to pass the replicad geometry back and forth to the workers it needs to be serializable.
Do you have any thoughts on how to best go about doing that? Would using .step representations for geometry work well or is that super inefficient?
Beta Was this translation helpful? Give feedback.
All reactions