-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Problem
The current Meshery implementation crashes when processing complex golf courses (18+ holes) with the error:
AttributeError: 'MultiPolygon' object has no attribute 'exterior'
Additionally, exported OBJ files don't include UV coordinates, making textures unusable in Unity.
Solution
I've fixed both issues:
1. MultiPolygon Handling (mesh.py)
- Added MultiPolygon support to
densify_polygon()andtriangulate_polygon() - Functions now handle both simple Polygons and MultiPolygons
- Complex courses with hundreds of overlapping shapes now process correctly
2. UV Coordinate Generation (export.py)
- Added UV coordinate generation for all vertices
- Uses planar projection from XZ coordinates
- Exports proper
vtlines in OBJ format - Textures now work in Unity
Testing
Tested successfully with:
- Bartow18: 18-hole course with 165 paths - previously crashed, now works ✅
- Keystone12: 12-hole course with complex terrain - processes correctly ✅
- Simple courses continue to work without changes ✅
Files
I'll attach the two fixed files:
mesh.py- MultiPolygon handlingexport.py- UV coordinate generation
Both files are backward compatible. No breaking changes.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels