diff --git a/docs/examples.md b/docs/examples.md new file mode 100644 index 00000000..a6cc185a --- /dev/null +++ b/docs/examples.md @@ -0,0 +1,13 @@ +# Examples + +## Conversion of CAD to CSG + + +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 + + import geouned + geouned.cad_to_csg( + cad_filename='example.step', + output_filename='geometry.xml', + csg_format='openmc' + ) \ No newline at end of file diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 00000000..f77a481f --- /dev/null +++ b/docs/index.md @@ -0,0 +1,7 @@ +# Welcome to GEOUNED documentation + +GEOUNED converts CAD geometry to CGS and CGS to CAD. + + +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/). + diff --git a/docs/installation.md b/docs/installation.md new file mode 100644 index 00000000..519481f7 --- /dev/null +++ b/docs/installation.md @@ -0,0 +1,59 @@ +# Installation + +Recommended method of installing is to make use of Conda / Mamba. +This results in installation of GEOUNED with your system Python and the most straightforward usage. + +There are other options which are also documented. +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. + +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 + +## Linux (Ubuntu) + +### Conda + + +In principle, installing any Conda/Mamba distribution will work. A few Conda/Mamba options are: +- [Miniforge](/~https://github.com/conda-forge/miniforge) +- [Anaconda](https://www.anaconda.com/download) +- [Miniconda](https://docs.conda.io/en/latest/miniconda.html) + +In this example we will install Miniforge (which includes Mamba) +```bash +wget -O Miniforge3.sh "/~https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" +``` + +Create a new environment, I've chosen Python 3.10 here but newer versions are +also supported. +```bash +mamba create --name new_env python=3.10 -y +``` + +Activate the environment +```bash +mamba activate new_env +``` + +Then you can install the cad_to_dagmc package +```bash +mamba install -y -c conda-forge geouned +``` + +### AppImage + +### Apt-get + +### Snap + + + +## Mac OS + +### Conda + +## Windows + +### Conda + +### Portable FreeCAD + diff --git a/docs/python_api.md b/docs/python_api.md new file mode 100644 index 00000000..2d999aa7 --- /dev/null +++ b/docs/python_api.md @@ -0,0 +1,9 @@ +# Python API + +::: geouned.cad_to_csg + options: + show_source: true + +::: geouned.csg_to_cad + options: + show_source: true \ No newline at end of file diff --git a/docs/theory_and_methodology.md b/docs/theory_and_methodology.md new file mode 100644 index 00000000..54a6e66f --- /dev/null +++ b/docs/theory_and_methodology.md @@ -0,0 +1,4 @@ +# Theory and Methodology + + + diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 00000000..226de33c --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,15 @@ +site_name: GEOUNED +site_url: /~https://github.com/GEOUNED-org/GEOUNED/deployments/github-pages +nav: + - Home: index.md + - Installation: installation.md + - Examples: examples.md + - Python API: python_api.md + - Theory and Methodology: theory_and_methodology.md +theme: readthedocs +plugins: +- search +- mkdocstrings: + handlers: + python: + paths: [src] \ No newline at end of file