Repository navigation
fix(server): onshape composite parts keep their colors on import - #230
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
This branch was previously deployed
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.
Composite parts imported from Onshape assemblies could lose their colors. NEO Vortex motors, which Onshape shows dark gray, rendered almost white. Onshape's 3MF export writes a fixed near-white (232,232,232) on composite faces whose color should come from a constituent body. The importer copied those colors as-is.
Composite parts now skip the 3MF archive and use the existing source-geometry fallback (per-part or Part Studio batch glTF with
outputFaceAppearances=true). Onshape's glTF endpoint returns the displayed colors for composites. Every other part keeps its 3MF geometry and per-face colors, so multi-color parts are unchanged.The bulk geometry profile changes to
onshape-3mf-coarse-meters-z-up-opacity-composite-source-v4, so existing snapshots rebuild on the next sync. That sync does one full re-import. After that, unchanged syncs use one request again. Each import adds about one request per Part Studio that contains a composite.Verification
tessellatedfacesdata and shaded view show 55,55,55.Limitations
Onshape's glTF stores sRGB values in
baseColorFactor. The viewer already corrects this when a material's color equals the part's BOM color, as it does for other fallback parts. A composite with no face at its BOM color would still render lighter than in Onshape.Reviewed with sol-loop: 1 round with gpt-6.1-sol. Sol verdict: approved