-
Notifications
You must be signed in to change notification settings - Fork 87
[NEW FEATURE] Export Sketch to DXF #8037
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
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Hold off on merging until the DXF fix lands later this week. |
Awesome! 🔥
You might want to keep it in Draft state then. We can still review that will 100% prevent accidental merges (esp. since it's green already!) |
const sketchName = getOperationVariableName(operation, kclManager.ast) | ||
const fileName = `${sketchName || 'sketch'}.dxf` | ||
|
||
if (isDesktop()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's maybe nuance but @jtran had a PR recently which was using electron
param instead of checking isDesktop()
directly, so following that direction you could check for window.electron
? That way it wouldn't be necessary to check writeFile
and showSaveDialog
and throw an error potentially.
But it may be not so simple because I see you're mocking the value of isDesktop
in the test file.
What's New
Users can now export any sketch to DXF format directly from the context menu of the sketch feature in the feature tree.
How to Use
Known Limitations
Why This Matters
This feature is essential for manufacturing workflows:
Technical Implementation
sendSceneCommand
withexport2d
instead of Rust exportrustContext.export()
bracket-sketch.dxf
)Future Improvements
The Rust export system should be refactored into a more flexible architecture that can handle:
rustContext.export()
rustContext.exportEntities()
This would replace the current
sendSceneCommand
approach and enable users to select geometry in the viewport and export just that selection.Testing: Includes comprehensive test coverage and works in both desktop and browser environments.
Closes: #7989