Skip to content

Conversation

@siddarth09
Copy link

Update URDF Exporter for Python 3.13.2 Compatibility

Summary

This pull request updates the Fusion 360 URDF Exporter to ensure compatibility with Python 3.13.2. The changes address deprecated functionality, improve script stability, and enhance maintainability, ensuring seamless execution in the latest Python version.

Changes and Improvements

Refactored File and Directory Handling

  • Replaced distutils.dir_util.copy_tree with shutil.copytree
    • distutils has been deprecated and is no longer available in Python 3.13.
    • shutil.copytree() now handles package copying with dirs_exist_ok=True, preventing unnecessary errors.

Enhanced STL Export Function

  • Improved error handling for STL export to prevent script failures due to problematic components.
  • Better logging was added to provide more visibility into the export process.

Improved Package Creation

  • Updated package setup to use shutil.copytree() for better cross-version support.
  • Ensured correct initialization of directories such as launch/, urdf/, and config/.

Rationale for Changes

  • Python 3.13.2 removed deprecated modules like distutils, breaking the existing URDF exporter.
  • These updates ensure the script runs correctly in Fusion 360 with the latest Python version.
  • The changes make the exporter more robust, easier to debug, and compatible with future updates.

Testing and Verification

  • Successfully tested URDF generation on Fusion 360 API with Python 3.13.2.
  • Verified that the STL export and package creation function correctly and without errors.

This update ensures long-term compatibility while maintaining existing functionality. Please review and provide feedback if any further modifications are required.

Changes to make sure this plugin works with new updates of python and  fusion 360
@siddarth09 siddarth09 marked this pull request as draft March 9, 2025 02:29
@JesseDarr
Copy link

I can confirm this works. Would be nice to get this approved and merged.

Thank you, @siddarth09

@siddarth09 siddarth09 marked this pull request as ready for review March 15, 2025 23:22
@siddarth09
Copy link
Author

How many more to approve this merge?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants