mirror of
https://github.com/Alex38Lyon/Synthese-PSM_LARRA.git
synced 2026-09-30 07:21:55 +00:00
Update convertPLYtoSTL.yml
This commit is contained in:
@@ -1,25 +1,49 @@
|
|||||||
name: Convert PLY to STL/OBJ
|
name: Convert PLY to STL/OBJ
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths:
|
paths:
|
||||||
- '**.ply'
|
- '**/*.ply'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
convert:
|
convert:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
- uses: actions/setup-python@v5
|
|
||||||
|
- uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version: '3.x'
|
python-version: '3.x'
|
||||||
- run: pip install trimesh numpy
|
|
||||||
- run: |
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install trimesh numpy
|
||||||
|
|
||||||
|
- name: Convert PLY files
|
||||||
|
run: |
|
||||||
python -c "
|
python -c "
|
||||||
import trimesh, glob, os
|
import trimesh
|
||||||
|
import glob
|
||||||
|
import os
|
||||||
|
|
||||||
for f in glob.glob('**/*.ply', recursive=True):
|
for f in glob.glob('**/*.ply', recursive=True):
|
||||||
m = trimesh.load(f)
|
print(f'Conversion de {f}')
|
||||||
m.export(f.replace('.ply', '.stl'))
|
|
||||||
|
mesh = trimesh.load(f)
|
||||||
|
|
||||||
|
stl = os.path.splitext(f)[0] + '.stl'
|
||||||
|
obj = os.path.splitext(f)[0] + '.obj'
|
||||||
|
|
||||||
|
mesh.export(stl)
|
||||||
|
mesh.export(obj)
|
||||||
|
|
||||||
|
print(f' -> {stl}')
|
||||||
|
print(f' -> {obj}')
|
||||||
"
|
"
|
||||||
- uses: stefanzweifel/git-auto-commit-action@v5
|
|
||||||
|
- name: Commit converted files
|
||||||
|
uses: stefanzweifel/git-auto-commit-action@v7
|
||||||
with:
|
with:
|
||||||
commit_message: "Auto-convert PLY to STL/OBJ"
|
commit_message: "Auto-convert PLY to STL/OBJ"
|
||||||
|
|||||||
Reference in New Issue
Block a user