Skip to content

Commit

Permalink
SUKU workflow updated, format fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
SukuWc committed Jul 3, 2024
1 parent 628af69 commit 9aa9651
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/freecad_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

print(f"sys.argv = {sys.argv}")

import os
import os
if os.path.isdir("temp"):
print("Directory already exists")
else:
Expand Down Expand Up @@ -75,7 +75,7 @@ def exportScreenshot(label, filename):
print("STEP 4",filename)
FreeCADGui.updateGui()
print("STEP 5",filename)

print("SCREENSHOT", label, filename)
App.Gui.ActiveDocument.ActiveView.saveImage(filename,3200,2400,'Transparent')

Expand Down Expand Up @@ -164,4 +164,4 @@ def exportScreenshot(label, filename):
App.Gui.getMainWindow().close()

# sys.exit(0)
# exit(0)
# exit(0)
14 changes: 7 additions & 7 deletions .github/workflows/mechanical_components.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
matrix:
component:
- 'KNOT-ASSEMBLY'

steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -38,9 +38,9 @@ jobs:
- name: Run GUI application
continue-on-error: true
run: |
ls
ls
export DISPLAY=:99
timeout 1m freecad --hidden ./Mechanical/Design/${{ matrix.component }}/${{ matrix.component }}.FCStd ./.github/workflows/freecad_export.py step pdf
timeout 5m freecad --hidden ./Mechanical/Design/${{ matrix.component }}/${{ matrix.component }}.FCStd ./.github/workflows/freecad_export.py step pdf
- name: Install conda, pythonocc and do the conversion
run: |
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:

- name: Set Date
run: echo "action_date=$(date +'%Y-%m-%d-%H%M')" >> $GITHUB_ENV

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
Expand All @@ -84,7 +84,7 @@ jobs:
deploy-results:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
needs: generate-artifacts
needs: generate-artifacts
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -111,9 +111,9 @@ jobs:
done
- name: Commit the files
run: |
run: |
git config --global user.name ${{ github.actor }}
git config --global user.email ${{ github.actor }}@users.noreply.github.com
git config --global user.email ${{ github.actor }}@users.noreply.github.com
git add Preview/*
git commit -m "BOT ${{ github.workflow }} ${{ github.sha }}"
git push
4 changes: 2 additions & 2 deletions .github/workflows/pythonocc_step_to_stl.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
for step_file in file_list:
step_file_path = os.path.join(directory_path, step_file)
print(f"Converting {step_file} to STL...")

# Read STEP file
shape = read_step_file(step_file_path)

Expand All @@ -21,4 +21,4 @@
# Write STL file
write_stl_file(shape, stl_file_path, mode='binary', linear_deflection=0.1, angular_deflection=0.5)

print(f"Conversion of {step_file} to {stl_file} complete\n")
print(f"Conversion of {step_file} to {stl_file} complete\n")

0 comments on commit 9aa9651

Please sign in to comment.