Improve serialization robustness: schema preservation, triangulation, and checksum alignment#22
Merged
afshawnlotfi merged 5 commits intomainfrom Apr 9, 2026
Merged
Conversation
…ion in mesh processing
… checksum computation for data dicts
…lback mechanism; update checksum computation for data dicts to align with TypeScript implementation
782aa15 to
8b3225b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enhanced schema utilities and add earcut triangulation
SchemaUtilsto validate all Literal fields present in both model and dataearcutlibrary dependency for triangulating non-triangle faces in mesh processingmesh.tsandpackable-worker.tswith triangulation capabilityPackable schema handling and checksum improvements
_original_json_schemato Packable class to preserve schema during reconstruction (for dynamic models with numpy fields)extract()to use preserved schema whenmodel_json_schema()failscompute_dict_checksum()to compute SHA256 from compact JSON + asset bytes (removing orjson dependency)object/Anytypes)Refined JSON schema handling and TypeScript alignment
_get_json_schema()method for cleaner fallback logic with improved documentation(',', ':')separators and conditional asset bytes)meshToRawGeometry()with clearer inline comments and improved formatting$refkeysOverall Focus: These commits improve serialization robustness, cross-language consistency (Python/TypeScript), and support for dynamic/complex models.