Repository navigation
Machine Selector: support Fusion .f3d/.f3z files - #91
Open
george-roberts wants to merge 1 commit into
Open
george-roberts wants to merge 1 commit into
george-roberts wants to merge 1 commit into
Conversation
Extract the embedded .mch (Zstandard/deflate ZIP entries, nested .f3d in .f3z) to a temp file and pass it to the post engine. Archives without a machine are hidden from the machine list. Co-authored-by: Cursor <cursoragent@cursor.com>
george-roberts
force-pushed
the
machine-selector-f3d
branch
from
October 14, 2026 10:59
2867a0c to
e51bbb7
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.
Summary
Lets the machine selector use Fusion design files (
.f3d/.f3z) that carry a machine definition. The embedded.mch(e.g.MachineAsset/Machines/simulation.mch) is extracted to a temp file and passed to the post engine via--machine.out/fusionArchive.js: minimal ZIP reader (stored, deflate, and Zstandard method 93, which Fusion uses), ZIP64 aware, searches nested.f3dinside.f3z. Prefers an[Active]machine asset when several exist..f3d/.f3z; archives without a.mchare hidden from the list..mch..mchonly when building post arguments. Extraction is cached in$TMPDIR/AutodeskPostUtility/ArchiveMachines, keyed on path + mtime + size..mch, with a note that edits are not written back.Notes
zlib.zstdDecompressSync(Node >= 22.15). On older editor runtimes, selecting an archive shows an error asking to update; plain.mch/.machineare unaffected..mch, 1 GB for nested designs, nesting depth 2) and the output file name comes from a hash, never from entry names.Testing
Run under Cursor's Node 24 runtime:
Autodesk Generic 5-axis (CB Table-Head).f3d: extractsMachineAsset/Machines/simulation.mchbyte-identical to an independent extraction; vendor/model parsed..f3zwrapping that.f3d: same result..f3dwith no machine: reported as "No machine definition (.mch) found" and hidden from the tree.maxOutputLengthcap verified to throwERR_BUFFER_TOO_LARGE.node --checkon all modified files;vsce package --no-dependenciesbuilds.Not yet exercised end-to-end in the Extension Development Host with the post executable.
Made with Cursor