You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: wiki/GetStarted.md
+54-19Lines changed: 54 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,52 @@
1
1
## Get Started
2
2
3
-
### Quick start
4
-
The command line `geomPipeline.py imprint your_geometry_file_path` is the starting point for users, just replace *your_geometry_file_path* by your geometry.
5
-
6
-
run `geomPipeline.py -h` for more options.
3
+
### Command line interface
4
+
5
+
Geometry pipeline can be started in a terminal. `geomPipeline.py` takes 2 positional arguments, the first is the action, and the second is the input file path. For example, `geomPipeline.py imprint your_geometry_file_path` , just replace *your_geometry_file_path* by your geometry.
6
+
7
+
Optional arguments for all pipelines, it is expected other pipelines also follow this convention.
8
+
```
9
+
-h, --help show this help message and exit
10
+
-o OUTPUT_FILE, --output-file OUTPUT_FILE
11
+
output file name (without folder path)
12
+
--working-dir WORKING_DIR
13
+
working folder path, by default the current working folder
14
+
--output-dir OUTPUT_DIR
15
+
output folder path, by default, a subfolder in workingDir
16
+
--config only generate config.json without run the pipeline
17
+
18
+
-nt THREAD_COUNT, --thread-count THREAD_COUNT
19
+
number of thread to use, max = hardware core number
20
+
21
+
-v VERBOSITY, --verbosity VERBOSITY
22
+
verbosity: for console or terminal: DEBUG, PROGRESS, INFO, WARNING, ERROR
23
+
```
24
+
25
+
optional arguments for geometry pipeline
26
+
```
27
+
--metadata METADATA input metadata file, only for brep input geometry
28
+
--tolerance TOLERANCE
29
+
tolerance for imprinting, unit MilliMeter
30
+
--no-merge do not merge the imprinted shapes, for two-step workflow
31
+
--ignore-failed ignore failed (in BOP check, collision detect, etc) solids
32
+
```
33
+
34
+
Always run `geomPipeline.py -h` to get the latest arguments.
7
35
8
36
### Geometry preprocessing features
9
37
10
-
The default action is **imprint**, outputting a geometry file (`*._processed.brep`) of one shape with duplicated shared faces removed, and also a `*_processed_metadata.json` file of meta data. The latter file contains meta data such as material information for the geometry brep file. All the output files are located in a folder in the current directory.
38
+
Implemented geometry processing actions are: `check,detect,merge,imprint,search`, some other planned actions `tessellate, fix, decompose` can be found in [Roadmap.md](Roadmap.md)
39
+
40
+
The **imprint** action outputs a geometry file (`*._processed.brep`) of one shape with duplicated shared faces removed, and also a `*_processed_metadata.json` file of meta data. The latter file contains meta data such as material information for the geometry brep file. All the output files are located in a folder in the current directory.
11
41
12
-
The imprint operation can be split into 2 steps: Imprint faces and Merge faces:
42
+
The imprint operation is accomplished in 2 steps: Imprint faces and Merge faces:
Other actions are `search, check, detect, decompose`, etc, see more options by running `geomPipeline.py -h`.
46
+
Usage of other actions such as `search, check, detect, decompose`
17
47
18
48
`geomPipeline.py check geometry_file` will check for errors, e.g. volume too small, invalid geometry, etc
19
-
`geomPipeline.py detect geometry_file` will detect collision between solid shapes, see more shape relations types at Geom::CollisionType
49
+
`geomPipeline.py detect geometry_file` will detect collision between solid shapes, see more shape spatial relationship types defined in the type `Geom::CollisionType`
20
50
21
51
### Input geometry format supported
22
52
@@ -29,23 +59,28 @@ Other actions are `search, check, detect, decompose`, etc, see more options by r
`geomPipeline.py` will generate a json configuration based on user input (by default `config.json` in the current folder), then starts the geometry preprocessing pipeline. For example, the imprint action will be organized into a pipeline of several GeometryProcessors, with default parameters written into the `config.json`. If the output is not ideal, users can edit parameters in the generated `config.json` and re-run the pipeline by `python3 geomPipeline.py config.json`, or equally `geomPipeline path_to_json_config.json`.
65
+
### Debug your installation
37
66
38
-
In fact, python pipeline controller such as `geomPipeline.py` generates input configuration, all the processing computation is done by `geomPipeline`which is an executable compiled from C++ code. This executable only accepts a json configuration file, e.g. `geomPipeline path_to_json_config.json`.
67
+
`which geomPipeline` on Unix-like system, or `where geomPipeline`on Windows to see if executable has been installed on PATH.
39
68
40
-
The split of high-level user-oriented python script and lower-level C++ program has the benifits:
41
-
+ to ease the debugging of mixed python and C++ programming
42
-
+ to ease the parallel programming, since Python has the GIL problem
69
+
NOTE: if installed using deb/rpm on ubuntu and fedora, while user has anaconda activated, then user will not be able to use c-extension module `ppp`. For example, on Ubuntu the ppp module `ppp.cpython-36m-x86_64-linux-gnu.so` is installed to `/usr/lib/python3/dist-packages/`. In that case, `python3 /usr/bin/geomPipeline.py manifest.json` will start an external process by python to run pipeline without using `ppp` module.
43
70
71
+
On windows, a batch file calling may be generated to run python script "geomPipeline.py" without "python path_to/geomePipeline.py".
44
72
45
-
### Debug your installation
46
73
47
-
NOTE: if installed using deb/rpm on ubuntu and fedora, while user has anaconda activated, then user should give the full path of system python3 path, as the Linux package of ppp link to system python `/usr/bin/python3`, and install ppp module to system python site. For example, on Ubuntu the ppp module `ppp.cpython-36m-x86_64-linux-gnu.so` is installed to `/usr/lib/python3/dist-packages/`
`geomPipeline.py` will generate a json configuration based on user input (by default `config.json` in the current folder), then starts the geometry preprocessing pipeline. For example, the imprint action will be organized into a pipeline of several GeometryProcessors, with default parameters written into the `config.json`.
78
+
79
+
If the output is not ideal, users can edit parameters in the generated `config.json` and re-run the pipeline by `python3 geomPipeline.py config.json`, or equally `pppGeomPipeline path_to_json_config.json`.
48
80
49
-
To use `geomPipeline.py`
81
+
Actually, all the processing computation is done by `pppGeomPipeline` which is an executable compiled from C++ code. This executable only accepts a json configuration file, e.g. `pppGeomPipeline path_to_json_config.json`.
82
+
83
+
The split of high-level user-oriented python script and lower-level C++ program has the benefits:
84
+
+ to ease the debugging of mixed python and C++ programming
85
+
+ to ease the parallel programming, since Python has the GIL problem
Copy file name to clipboardExpand all lines: wiki/Testing.md
+10-1Lines changed: 10 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,13 @@
1
1
## Testing
2
+
3
+
### Run all the tests
4
+
5
+
After out of source build, in the build folder such as `parallel-preprocessor/build/`, run `sh run_all_tests.sh`.
6
+
7
+
NOTE: unit test application such as `pppGeomTests` must be run in the `build/ppptest` folder for the moment, since test data in `parallel-preprocessor/build/data` are referred using relative path.
8
+
9
+
### Tested platforms
10
+
2
11
Unit tests are written in C++ to test C++ functions and in Python to test the pipeline.
3
12
4
13
Unit tests can be triggered by `run_all_test.sh` in the build dir. This `run_all_test.sh` will make `ppptest` subfolder under the build folder if not yet generated by cmake build system, and copy/link necessary test data for all tests.
@@ -25,7 +34,7 @@ Those python tests script implement `unittest` paradigm; python3-pytest will be
25
34
26
35
### Continuous integration
27
36
28
-
Gitlab runners ubuntu and fedora setup within UKAEA
37
+
Github CI runners ubuntu and fedora will run all the tests.
0 commit comments