Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In memory brep passing to gmsh iteration 2 #32

Merged
merged 59 commits into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
43e5dd2
started brep in mem refactor
shimwell Jun 13, 2023
bedfba4
GLIBC_2.29 errors
shimwell Jun 15, 2023
97935d7
[skip ci] Apply formatting changes
shimwell Jun 15, 2023
97e8844
tests passing but some need redoing
shimwell Jun 15, 2023
f7fc3d2
[skip ci] Apply formatting changes
shimwell Jun 15, 2023
63d2574
changed from openmc with dagmc to default openmc
shimwell Jun 16, 2023
956075c
brought some tests back
shimwell Jun 17, 2023
b0790be
[skip ci] Apply formatting changes
shimwell Jun 17, 2023
930db70
labeld examples in ci
shimwell Jun 17, 2023
f3e2001
added ocp from cadquery channel
shimwell Jun 17, 2023
f69c869
updated readme install commands
shimwell Jun 17, 2023
e2f291f
removed all dependencies
shimwell Jun 17, 2023
3392216
newer conda image
shimwell Jun 17, 2023
20ce79e
getting cadquery from cadquery channel
shimwell Jun 17, 2023
435cf1b
added versions and occt
shimwell Jun 17, 2023
ecabf35
changed to 4.12.0
shimwell Jun 17, 2023
cb8378c
ocp vs 7.7.1.0
shimwell Jun 17, 2023
b52051c
try conda action
shimwell Jun 19, 2023
c7ec23e
typo fix
shimwell Jun 19, 2023
e9541cc
typo fix
shimwell Jun 19, 2023
f061dda
added sudo
shimwell Jun 19, 2023
a475a42
removed unit test
shimwell Jun 29, 2023
ed247b2
[skip ci] Apply formatting changes
shimwell Jun 29, 2023
7508428
;updated instructions
shimwell Jun 29, 2023
82cdaea
updated ci install
shimwell Jun 29, 2023
b19761d
ci to docker image
shimwell Jun 29, 2023
d9d46ac
Merge branch 'main' into in_memory_brep2
shimwell Jun 29, 2023
4f13b64
removed sudo
shimwell Jun 29, 2023
f5b917c
added libarchive
shimwell Jun 29, 2023
66524b5
removed duplicate install
shimwell Jun 29, 2023
1ee3796
added trmesh networkx to pip
shimwell Jun 29, 2023
90f2b1b
forcing 7.7.1 version of ocp
shimwell Jun 30, 2023
39f6314
passing tests locally
shimwell Jun 30, 2023
b1235d4
[skip ci] Apply formatting changes
shimwell Jun 30, 2023
47dc6e9
switching install order
shimwell Jun 30, 2023
94504ea
trying --no-deps
shimwell Jun 30, 2023
f86f689
making use of released versions of ocp
shimwell Jul 4, 2023
42119ba
making use of released versions of ocp
shimwell Jul 4, 2023
7b823ae
adding conda-forge channel
shimwell Jul 4, 2023
b68ea1c
[skip ci] updated cq install cmd
shimwell Jul 4, 2023
e3975e2
trying newer docker image
shimwell Jul 4, 2023
0aeda30
trying conda action
shimwell Jul 4, 2023
1815170
adding sudo
shimwell Jul 4, 2023
25d60b7
trying --no-deps
shimwell Jul 7, 2023
21fc37a
changed install order
shimwell Jul 8, 2023
b6d2342
added missing c
shimwell Jul 8, 2023
6616e18
changed order, added -c conda-forge
shimwell Jul 8, 2023
227882f
added conda forge channel
shimwell Jul 8, 2023
c18a74f
added conda forge channel
shimwell Jul 8, 2023
52f7539
upgrading pip
shimwell Jul 8, 2023
a39f242
mamba
shimwell Jul 8, 2023
38beb8a
trying docker
shimwell Jul 8, 2023
d786b60
added moab
shimwell Jul 8, 2023
b4b5eae
adding openmc
shimwell Jul 8, 2023
e93c819
added missing stp file
shimwell Jul 8, 2023
4153997
moved stp file
shimwell Jul 8, 2023
5fd8c14
one cube test
shimwell Jul 10, 2023
f6d8b34
one line install
shimwell Jul 10, 2023
355c902
[skip ci] started intro
shimwell Jul 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 55 additions & 6 deletions .github/workflows/ci_with_install.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

# This CI will launch a Docker image that contains all the dependencies required
# within that image the pytest test suite is run
# container:
# image: continuumio/miniconda3:23.3.1-0

name: CI with install

Expand All @@ -21,41 +23,88 @@ jobs:
testing:
runs-on: ubuntu-latest
container:
image: continuumio/miniconda3:4.12.0
image: continuumio/miniconda3:23.3.1-0
steps:
- name: Checkout repository
uses: actions/checkout@v3

# - uses: conda-incubator/setup-miniconda@v2

- name: install non pypi dependencies for cad creation
run: |
apt-get --allow-releaseinfo-change update
apt-get update -y
apt-get upgrade -y
apt-get install -y libgl1-mesa-glx libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev libosmesa6 libosmesa6-dev libgles2-mesa-dev
apt-get install -y libgl1-mesa-glx libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev libosmesa6 libosmesa6-dev libgles2-mesa-dev libarchive-dev
apt-get install -y libpangocairo-1.0-0
conda install -c conda-forge -y moab
conda install -c conda-forge -y gmsh
conda install -c conda-forge -y python-gmsh
conda install -c conda-forge -y "openmc=0.13.3=dagmc*nompi*"
conda install -c conda-forge mamba -y
mamba install -c conda-forge moab multimethod typish ezdxf nptyping nlopt casadi gmsh python-gmsh ocp>=7.7.1 -y
mamba install -c cadquery -c conda-forge cadquery=master --no-deps -y

- name: install package
run: |
pip install --upgrade pip
pip install .
python -c "import cad_to_dagmc"
mamba install -c conda-forge openmc -y

- name: run examples
run: |
cd examples
python create_stp_files_for_examples.py

- name: run examples
run: |
cd examples
python cadquery_assembly.py

- name: run examples
run: |
cd examples
python cadquery_compound.py

- name: run examples
run: |
cd examples
python cadquery_object_and_stp_file.py

- name: run examples
run: |
cd examples
python cadquery_text.py

- name: run examples 1
run: |
cd examples
python curved_cadquery_object.py

- name: run examples 2
run: |
cd examples
python multiple_cadquery_objects.py

- name: run examples 3
run: |
cd examples
python multiple_stp_files.py

- name: run examples 4
run: |
cd examples
python single_stp_file_multiple_volumes.py

- name: run examples 5
run: |
cd examples

- name: run examples 6
run: |
cd examples
python single_cadquery_object.py

- name: run examples 7
run: |
cd examples
python single_stp_file.py

- name: Run pytest
Expand Down
56 changes: 50 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,74 @@ is intended to convert STP files or [CadQuery](https://cadquery.readthedocs.io)
One unique feature of this package is the ability to combine STP files with CadQuery objects.
This allows for the addition of parametric geometry to static geometry.

# Install (Conda + pip)
# Installation

In principle, any Conda distribution will work.


# Install using Conda and pip

This example uses Conda to install some dependencies that are not available via PyPi.

You will need to install some dependencies that are not available via PyPi.
This example uses Conda but Mamba could also be used.
Create a new conda environment
```bash
conda create --name cad-to-dagmc python=3.9 -y
conda create --name new_env python=3.9 -y
```

Activate the environment
```bash
conda activate cad-to-dagmc
conda activate new_env
```

Install the dependencies
```bash
conda install -c cadquery -c conda-forge cadquery=master moab gmsh python-gmsh
conda install -c conda-forge moab multimethod typish ezdxf nptyping nlopt casadi gmsh python-gmsh ocp>=7.7.1 -y
conda install -c cadquery -c conda-forge cadquery=master --no-deps -y
```

Then you can install the cad_to_dagmc package with ```pip```
```bash
pip install cad_to_dagmc
```

You may also want to install OpenMC with DAGMC to make use of the h5m geometry files produced in simulations. However you could also use other supported particle transport codes such as MCNP, FLUKA and others [link to DAGMC documentation](https://svalinn.github.io/DAGMC/).You can run ```conda install -c conda-forge openmc``` however this more specific command makes sure the latest version of OpenMC which contains DAGMC is chosen by conda / mamba
```bash
conda install -c conda-forge -y "openmc=0.13.3=dagmc*nompi*"
```


# Install using Mamba and pip

This example uses Mamba to install some dependencies that are not available via PyPi.

Create a new conda environment, I've chosen Python 3.9 here but new versions are
also supported.
```bash
conda create --name new_env python=3.9 -y
```

Activate the environment
```bash
mamba activate new_env
```

Install the dependencies
```bash
conda install -c conda-forge mamba -y
mamba install -c conda-forge moab multimethod typish ezdxf nptyping nlopt casadi gmsh python-gmsh ocp>=7.7.1 -y
mamba install -c cadquery -c conda-forge cadquery=master --no-deps -y
```

Then you can install the cad_to_dagmc package with ```pip```
```bash
pip install cad_to_dagmc
```

You may also want to install OpenMC with DAGMC to make use of the h5m geometry files produced in simulations. However you could also use other supported particle transport codes such as MCNP, FLUKA and others [link to DAGMC documentation](https://svalinn.github.io/DAGMC/).You can run ```conda install -c conda-forge openmc``` however this more specific command makes sure the latest version of OpenMC which contains DAGMC is chosen by conda / mamba
```bash
mamba install -c conda-forge -y "openmc=0.13.3=dagmc*nompi*"
```

# Usage - creation of DAGMC h5m files

For examples see the [examples folder](https://github.com/fusion-energy/cad_to_dagmc/tree/main/examples)
Expand Down
16 changes: 0 additions & 16 deletions environment.yml

This file was deleted.

1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ classifiers = [
"Operating System :: OS Independent",
]
dependencies = [
"cadquery>=2.2.0",
"trimesh",
"networkx",
]
Expand Down
Loading