Skip to content

Commit

Permalink
SUKU test
Browse files Browse the repository at this point in the history
  • Loading branch information
SukuWc committed Jan 2, 2024
1 parent eba4dc5 commit 691d7d3
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 3 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/freecad_export2.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

import Part


import os
if os.path.isdir("temp"):
print("Directory already exists")
else:
os.mkdir("temp")

App.openDocument("Mechanical/Design/PCBA-ENDLESSPOT/PCBA-ENDLESSPOT.FCStd")

objs = App.ActiveDocument.Objects
Expand All @@ -10,9 +17,9 @@

if sono.TypeId == "App::Part":
print(obj.Label, obj.Name, "STEP")
sono.Shape.exportStep("./"+obj.Label+".step")
sono.Shape.exportStep("temp/"+obj.Label+".step")
__objs__=[]
__objs__.append(App.ActiveDocument.getObject(obj.Name))
print(__objs__)
import ImportGui
ImportGui.export(__objs__,"./"+obj.Label+"2.step")
ImportGui.export(__objs__,"temp/"+obj.Label+"2.step")
29 changes: 28 additions & 1 deletion .github/workflows/mechanical_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,34 @@ jobs:
run: |
ls
export DISPLAY=:99
timeout 1m freecad --hidden ./.github/workflows/freecad_export.py step
timeout 1m freecad --hidden ./.github/workflows/freecad_export2.py step
- name: Install conda, pythonocc and do the conversion
run: |
CONDA_INSTALL_DIR="$HOME/miniconda3"
# Download and install Miniconda
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p "$CONDA_INSTALL_DIR"
rm miniconda.sh
# Add Miniconda to PATH
export PATH="$CONDA_INSTALL_DIR/bin:$PATH"
# Initialize conda
conda init bash
# Print Miniconda version
conda --version
conda install -c conda-forge pythonocc-core=7.7.0 --yes
conda --version
# python ./.github/workflows/pythonocc_step_to_stl.py
- name: Generate Preview PNG
run: |
# ./.github/workflows/openscad_preview.sh
- name: Stop x11vnc
run: pkill x11vnc
Expand Down

0 comments on commit 691d7d3

Please sign in to comment.