https://github.com/stefanjohnsen/pyobjtriangulate
Triangulation of polygons in obj files
https://github.com/stefanjohnsen/pyobjtriangulate
earcut fan indices line obj polygon triangle triangulation vertex wavefront-obj
Last synced: 11 months ago
JSON representation
Triangulation of polygons in obj files
- Host: GitHub
- URL: https://github.com/stefanjohnsen/pyobjtriangulate
- Owner: StefanJohnsen
- License: mit
- Created: 2023-12-03T12:48:57.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-02T11:17:53.000Z (about 2 years ago)
- Last Synced: 2025-01-26T17:37:40.771Z (about 1 year ago)
- Topics: earcut, fan, indices, line, obj, polygon, triangle, triangulation, vertex, wavefront-obj
- Language: Python
- Homepage:
- Size: 15.6 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pyOBJTriangulate
Wavefront OBJ files typically consist of triangles, but they can also include quads and polygons. This script aims to convert all quads and polygons found in an OBJ file and create a new OBJ file containing only triangles.
This script is using the python script in the repository [pyTriangulate](https://github.com/StefanJohnsen/pyTriangulate).
# Example
The [trumpet.obj](https://github.com/StefanJohnsen/pyOBJTriangulate/blob/main/objFiles/trumpet.obj) file contains quads and polygons. Just run the script as follows
```
python main.py .\objFiles\trumpet.obj .\objFiles\trumpet.triangulate.obj
```

*result trumpet.triangulate.obj*
# License
This software is released under the MIT License terms.