Fix settings for exporting mesh#141
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes mesh export settings by modifying how mesh shapes are named and handled during the export process, and adds a missing export mode option.
Changes:
- Commented out
setUricall for loaded mesh shapes to prevent path conflicts during export - Changed shape naming from "/geom" to "/shape" for mesh geometries
- Added "Copy model files" option to the export dialog
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/RobotAssemblerBody.cpp | Modified mesh shape naming and commented out setUri call to fix export functionality |
| src/AssemblerManager.cpp | Added CopyModelFiles mode to export dialog options |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| shape->setName(name_ + "/geom"); | ||
| shape->setUri(geom.url, geom_file_path); | ||
| shape->setName(name_ + "/shape"); | ||
| //shape->setUri(geom.url, geom_file_path); |
There was a problem hiding this comment.
The setUri call has been commented out instead of removed. If this change is intended to be permanent, consider removing the commented code entirely. Commented-out code can create confusion about whether it might be needed in the future and makes the codebase harder to maintain.
| //shape->setUri(geom.url, geom_file_path); |
| DEBUG_STREAM(" mesh loaded!"); | ||
| shape->setName(name_ + "/geom"); | ||
| shape->setUri(geom.url, geom_file_path); | ||
| shape->setName(name_ + "/shape"); |
There was a problem hiding this comment.
The shape name was changed from "/geom" to "/shape", but the transform name on line 102 still uses "/geom_postrans". This creates a naming inconsistency. Consider either:
- Keeping the shape name as "/geom" to maintain consistency with the transform name, or
- Changing the transform name to "/shape_postrans" to match the new shape naming convention.
Note that line 60 in the addShape helper function uses "geom_postrans" (without prefix), while line 102 uses the prefixed version. Consistency across all geometry types would improve code maintainability.
No description provided.