Skip to content

Commit bd1c67a

Browse files
committed
added example docs
1 parent 6ed02e9 commit bd1c67a

6 files changed

+107
-0
lines changed

docs/examples.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Examples
2+
3+
## Conversion of CAD to CSG
4+
5+
6+
The following code snippet will convert a CAD file in the STEP format called example.step into and XML file called geometry.xml that can be opened and run with OpenMC
7+
8+
import geouned
9+
geouned.cad_to_csg(
10+
cad_filename='example.step',
11+
output_filename='geometry.xml',
12+
csg_format='openmc'
13+
)

docs/index.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Welcome to GEOUNED documentation
2+
3+
GEOUNED converts CAD geometry to CGS and CGS to CAD.
4+
5+
6+
The CSG geometry produced is compatible with Monte Carlo particle transport codes such as [OpenMC](https://github.com/openmc-dev/openmc) and [MCNP](https://mcnp.lanl.gov/).
7+

docs/installation.md

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Installation
2+
3+
Recommended method of installing is to make use of Conda / Mamba.
4+
This results in installation of GEOUNED with your system Python and the most straightforward usage.
5+
6+
There are other options which are also documented.
7+
The main difference between the installation options is the manner in which the main dependency FreeCAD is installed and this has consequences for how the code is used.
8+
9+
With some options (Conda) offering integration of FreeCAD Python API into your system Python and other options requiring GEOUNED scripts to be run with freecadcmd or freecad.cmd and integration of GEOUNED and FreeCAD performed with system path appending or freecad.pip
10+
11+
## Linux (Ubuntu)
12+
13+
### Conda
14+
15+
16+
In principle, installing any Conda/Mamba distribution will work. A few Conda/Mamba options are:
17+
- [Miniforge](https://github.com/conda-forge/miniforge)
18+
- [Anaconda](https://www.anaconda.com/download)
19+
- [Miniconda](https://docs.conda.io/en/latest/miniconda.html)
20+
21+
In this example we will install Miniforge (which includes Mamba)
22+
```bash
23+
wget -O Miniforge3.sh "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
24+
```
25+
26+
Create a new environment, I've chosen Python 3.10 here but newer versions are
27+
also supported.
28+
```bash
29+
mamba create --name new_env python=3.10 -y
30+
```
31+
32+
Activate the environment
33+
```bash
34+
mamba activate new_env
35+
```
36+
37+
Then you can install the cad_to_dagmc package
38+
```bash
39+
mamba install -y -c conda-forge geouned
40+
```
41+
42+
### AppImage
43+
44+
### Apt-get
45+
46+
### Snap
47+
48+
49+
50+
## Mac OS
51+
52+
### Conda
53+
54+
## Windows
55+
56+
### Conda
57+
58+
### Portable FreeCAD
59+

docs/python_api.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Python API
2+
3+
::: geouned.cad_to_csg
4+
options:
5+
show_source: true
6+
7+
::: geouned.csg_to_cad
8+
options:
9+
show_source: true

docs/theory_and_methodology.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Theory and Methodology
2+
3+
4+

mkdocs.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
site_name: GEOUNED
2+
site_url: https://github.com/GEOUNED-org/GEOUNED/deployments/github-pages
3+
nav:
4+
- Home: index.md
5+
- Installation: installation.md
6+
- Examples: examples.md
7+
- Python API: python_api.md
8+
- Theory and Methodology: theory_and_methodology.md
9+
theme: readthedocs
10+
plugins:
11+
- search
12+
- mkdocstrings:
13+
handlers:
14+
python:
15+
paths: [src]

0 commit comments

Comments
 (0)