diff options
Diffstat (limited to 'playground')
| -rw-r--r-- | playground/.gitignore | 2 | ||||
| -rwxr-xr-x | playground/calculate.sh | 4 | ||||
| -rwxr-xr-x | playground/generate_output.sh | 2 | ||||
| -rwxr-xr-x | playground/native-calculate.sh | 8 | ||||
| -rw-r--r-- | playground/params.json | 16 | ||||
| -rw-r--r-- | playground/params.yaml | 12 |
6 files changed, 28 insertions, 16 deletions
diff --git a/playground/.gitignore b/playground/.gitignore index 70dafff..81442ae 100644 --- a/playground/.gitignore +++ b/playground/.gitignore @@ -1,3 +1,3 @@ -/result.yaml +/result.json /output.pdf /output.svg diff --git a/playground/calculate.sh b/playground/calculate.sh index 2db0ada..bff0e14 100755 --- a/playground/calculate.sh +++ b/playground/calculate.sh @@ -3,6 +3,6 @@ . $(dirname -- "$0")/env.sh exec $PYTHON -m opcut calculate \ - --params $RUN_PATH/params.yaml \ - --result $RUN_PATH/result.yaml \ + --params $RUN_PATH/params.json \ + --result $RUN_PATH/result.json \ "$@" diff --git a/playground/generate_output.sh b/playground/generate_output.sh index 1eaae94..0139233 100755 --- a/playground/generate_output.sh +++ b/playground/generate_output.sh @@ -4,6 +4,6 @@ exec $PYTHON -m opcut generate_output \ --output-type pdf \ - --result $RUN_PATH/result.yaml \ + --result $RUN_PATH/result.json \ --output $RUN_PATH/output.pdf \ "$@" diff --git a/playground/native-calculate.sh b/playground/native-calculate.sh new file mode 100755 index 0000000..06756ba --- /dev/null +++ b/playground/native-calculate.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +. $(dirname -- "$0")/env.sh + +exec $ROOT_PATH/build/c/opcut-calculate \ + --method greedy \ + --output result.json \ + params.json diff --git a/playground/params.json b/playground/params.json new file mode 100644 index 0000000..789505c --- /dev/null +++ b/playground/params.json @@ -0,0 +1,16 @@ +{ + "cut_width": 1, + "panels": { + "p1": { + "width": 50, + "height": 50 + } + }, + "items": { + "i1": { + "width": 5, + "height": 5, + "can_rotate": true + } + } +} diff --git a/playground/params.yaml b/playground/params.yaml deleted file mode 100644 index 605acec..0000000 --- a/playground/params.yaml +++ /dev/null @@ -1,12 +0,0 @@ ---- -cut_width: 1 -panels: - p1: - width: 50 - height: 50 -items: - i1: - width: 5 - height: 5 - can_rotate: true -... |
