-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from CadQuery/multi-file
Added FreeCAD Support
- Loading branch information
Showing
7 changed files
with
112 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Test FreeCAD | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install and Test | ||
run: | | ||
conda create -y -n freecad -c conda-forge python=3.11 freecad=0.21.2 | ||
conda init bash | ||
source /usr/share/miniconda/bin/activate | ||
conda activate freecad | ||
python -m pip install --upgrade pip | ||
pip install -e . | ||
pip install -e .[dev] | ||
python -m pytest -v tests/test_freecad.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -127,3 +127,6 @@ dmypy.json | |
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
# FreeCAD related files | ||
updated_part* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import tests.test_helpers as helpers | ||
|
||
|
||
def test_static_freecad_file(): | ||
""" | ||
Basic test of the FreeCAD (FCStd) codec plugin. | ||
""" | ||
test_file = helpers.get_test_file_location("shelf.FCStd") | ||
|
||
command = [ | ||
"python", | ||
"src/cq_cli/main.py", | ||
"--codec", | ||
"step", | ||
"--infile", | ||
test_file, | ||
] | ||
out, err, exitcode = helpers.cli_call(command) | ||
|
||
assert "ISO-10303-21;" in out.decode() | ||
|
||
|
||
def test_parametric_freecad_file(): | ||
""" | ||
Basic test of the FreeCAD (FCStd) codec plugin. | ||
""" | ||
test_file = helpers.get_test_file_location("shelf.FCStd") | ||
|
||
command = [ | ||
"python", | ||
"src/cq_cli/main.py", | ||
"--codec", | ||
"step", | ||
"--params", | ||
"internal_rail_spacing:152.4;", | ||
"--infile", | ||
test_file, | ||
] | ||
out, err, exitcode = helpers.cli_call(command) | ||
|
||
assert "ISO-10303-21;" in out.decode() |
Binary file not shown.