diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e6724f5db..27de8d798 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,7 +5,7 @@ env: name: Build jobs: set-lib3mf-version: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 outputs: lib3mf-version: ${{ steps.set-version.outputs.LIB3MF_VERSION }} steps: @@ -21,7 +21,7 @@ jobs: run: echo "LIB3MF_VERSION=${{ steps.set-version.outputs.LIB3MF_VERSION }}" build-linux-memtest: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 needs: [set-lib3mf-version] steps: - run: sudo apt update @@ -34,7 +34,7 @@ jobs: working-directory: ./build build-linux-ubi8-gcc12: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 needs: [set-lib3mf-version] env: LIB3MF_VERSION: ${{ needs.set-lib3mf-version.outputs.lib3mf-version }} @@ -110,7 +110,7 @@ jobs: path: dist/${{ env.ARTIFACT_NAME_RPM }} build-macos: - runs-on: macos-latest + runs-on: macos-15 needs: [set-lib3mf-version] env: LIB3MF_VERSION: ${{ needs.set-lib3mf-version.outputs.lib3mf-version }} @@ -131,19 +131,61 @@ jobs: echo "ARTIFACT_NAME=$(basename ${ZIP_FILE})" >> $GITHUB_ENV shell: bash - run: ls -al build/ + - name: Determine macOS dylib + id: find-mac-lib + run: | + set -euo pipefail + MAC_LIB=$(ls build/lib3mf*.dylib | head -n 1) + if [ -z "$MAC_LIB" ]; then + echo "No macOS dylib found in build/" >&2 + exit 1 + fi + echo "MAC_LIB=${MAC_LIB}" >> $GITHUB_ENV - name: Archive Mac binary uses: actions/upload-artifact@v4 with: name: lib3mf.dylib - path: build/lib3mf.${{ env.LIB3MF_VERSION }}.0.dylib + path: ${{ env.MAC_LIB }} - name: Upload Artifact (CPacked Archive) uses: actions/upload-artifact@v4 with: name: ${{ env.ARTIFACT_NAME }} path: build/${{ env.ARTIFACT_NAME }} + build-wasm: + runs-on: ubuntu-24.04 + needs: [set-lib3mf-version] + env: + LIB3MF_VERSION: ${{ needs.set-lib3mf-version.outputs.lib3mf-version }} + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - name: Setup Emscripten + uses: mymindstorm/setup-emsdk@v14 + with: + version: latest + - name: Build lib3mf_wasm + run: | + emcmake cmake -S . -B build/wasm -DLIB3MF_BUILD_WASM=ON -DCMAKE_BUILD_TYPE=Release + cmake --build build/wasm --target lib3mf_wasm -j"$(nproc)" + - name: Package WASM artifact + run: | + mkdir -p build/wasm-artifact + cp build/wasm/lib3mf.js build/wasm-artifact/ + cp build/wasm/lib3mf.wasm build/wasm-artifact/ + ( + cd build + zip -r "lib3mf-wasm-${LIB3MF_VERSION}.zip" wasm-artifact + ) + - name: Upload WASM Artifact + uses: actions/upload-artifact@v4 + with: + name: lib3mf-wasm-${{ env.LIB3MF_VERSION }}.zip + path: build/lib3mf-wasm-${{ env.LIB3MF_VERSION }}.zip + build-macos-debug: - runs-on: macos-latest + runs-on: macos-15 needs: [set-lib3mf-version] steps: - uses: actions/checkout@v4 @@ -161,7 +203,7 @@ jobs: path: build/lib3mf.dylib codecoverage-macos: - runs-on: macos-latest + runs-on: macos-15 needs: [set-lib3mf-version] steps: - uses: actions/checkout@v4 @@ -189,7 +231,7 @@ jobs: verbose: true # optional (default = false) build-windows-release: - runs-on: windows-2019 + runs-on: windows-2022 needs: [set-lib3mf-version] env: LIB3MF_VERSION: ${{ needs.set-lib3mf-version.outputs.lib3mf-version }} @@ -197,7 +239,7 @@ jobs: - uses: actions/checkout@v4 with: submodules: true - - run: ./cmake/GenerateVS2019.bat + - run: ./cmake/GenerateVS2022.bat - run: cmake --build . --config Release working-directory: ./build - run: ctest -V @@ -226,13 +268,13 @@ jobs: path: build/${{ env.ARTIFACT_NAME }} build-windows-debug: - runs-on: windows-2019 + runs-on: windows-2022 needs: [set-lib3mf-version] steps: - uses: actions/checkout@v4 with: submodules: true - - run: ./cmake/GenerateVS2019.bat + - run: ./cmake/GenerateVS2022.bat - run: cmake --build . --config Debug working-directory: ./build - run: ctest -V @@ -251,13 +293,13 @@ jobs: name: lib3mf.debug.lib path: build/Debug/lib3mf.lib build-windows-32bit: - runs-on: windows-2019 + runs-on: windows-2022 needs: [set-lib3mf-version] steps: - uses: actions/checkout@v4 with: submodules: true - - run: ./cmake/GenerateVS2019_32bit.bat + - run: ./cmake/GenerateVS2022_32bit.bat - run: cmake --build . --config Release working-directory: ./build_32bit - run: ctest -V @@ -273,7 +315,7 @@ jobs: name: lib3mf_32bit.lib path: build_32bit/Release/lib3mf.lib build-mingw-w64: - runs-on: windows-2019 + runs-on: windows-2022 needs: [set-lib3mf-version] steps: - run: choco install mingw -y @@ -288,7 +330,7 @@ jobs: assemble-sdk: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 needs: [set-lib3mf-version, build-windows-release, build-macos, build-linux-ubi8-gcc12] env: LIB3MF_VERSION: ${{ needs.set-lib3mf-version.outputs.lib3mf-version }} @@ -305,7 +347,7 @@ jobs: - run: ls -Rlh ./build - run: unzip bindings.zip/bindings.zip working-directory: ./build - - run: bash SDK/GenerateSDK_github.sh + - run: python3 SDK/GenerateSDK_github.py - name: Archive SDK artifact (Comprehensive) uses: actions/upload-artifact@v4 with: @@ -314,7 +356,7 @@ jobs: deploy-linux: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 needs: [set-lib3mf-version, assemble-sdk] env: LIB3MF_VERSION: ${{ needs.set-lib3mf-version.outputs.lib3mf-version }} @@ -365,6 +407,12 @@ jobs: cd SDK/CPackExamples/CppDynamic/build cmake --build . ./Example_ExtractInfo ../../../Examples/Files/Helix.3mf + - name: Build CDynamic - CPack (Linux) + run: | + sh SDK/CPackExamples/CDynamic/GenerateMake.sh + cd SDK/CPackExamples/CDynamic/build + cmake --build . + ./Example_CDynamic - name: Build Cpp - CPack (Linux) run: | sh SDK/CPackExamples/Cpp/GenerateMake.sh @@ -391,6 +439,12 @@ jobs: cd SDK/CPackExamples/CppDynamic/build cmake --build . ./Example_ExtractInfo ../../../Examples/Files/Helix.3mf + - name: Build CDynamic - CPack (Debian) + run: | + sh SDK/CPackExamples/CDynamic/GenerateMake.sh + cd SDK/CPackExamples/CDynamic/build + cmake --build . + ./Example_CDynamic - name: Build Cpp - CPack (Debian) run: | sh SDK/CPackExamples/Cpp/GenerateMake.sh @@ -410,7 +464,7 @@ jobs: ./create_cube deploy-windows: - runs-on: windows-2019 + runs-on: windows-2022 needs: [set-lib3mf-version, assemble-sdk] env: LIB3MF_VERSION: ${{ needs.set-lib3mf-version.outputs.lib3mf-version }} @@ -425,13 +479,13 @@ jobs: unzip lib3mf_sdk.zip/lib3mf_sdk.zip - name: Build CppDynamic run: | - ./Examples/CppDynamic/GenerateVS2019.bat + ./Examples/CppDynamic/GenerateVS2022.bat cd Examples/CppDynamic/build cmake --build . --config Release ./Release/Example_ExtractInfo.exe ../../Files/Helix.3mf - name: Build Cpp run: | - ./Examples/Cpp/GenerateVS2019.bat + ./Examples/Cpp/GenerateVS2022.bat cd Examples/Cpp/build cmake --build . --config Release ./Release/Example_ExtractInfo.exe ../../Files/Helix.3mf @@ -452,13 +506,19 @@ jobs: unzip lib3mf-${{ env.LIB3MF_VERSION }}-Windows.zip/lib3mf-${{ env.LIB3MF_VERSION }}-Windows.zip - name: Build CppDynamic - CPack (Windows) run: | - ./SDK/CPackExamples/CppDynamic/GenerateVS2019.bat + ./SDK/CPackExamples/CppDynamic/GenerateVS2022.bat cd SDK/CPackExamples/CppDynamic/build cmake --build . --config Release ./Release/Example_ExtractInfo.exe ../../../Examples/Files/Helix.3mf + - name: Build CDynamic - CPack (Windows) + run: | + ./SDK/CPackExamples/CDynamic/GenerateVS2022.bat + cd SDK/CPackExamples/CDynamic/build + cmake --build . --config Release + ./Release/Example_CDynamic.exe - name: Build Cpp - CPack (Windows) run: | - ./SDK/CPackExamples/Cpp/GenerateVS2019.bat + ./SDK/CPackExamples/Cpp/GenerateVS2022.bat cd SDK/CPackExamples/Cpp/build cmake --build . --config Release ./Release/Example_ExtractInfo.exe ../../../Examples/Files/Helix.3mf @@ -524,6 +584,12 @@ jobs: cd SDK/CPackExamples/CppDynamic/build cmake --build . ./Example_ExtractInfo ../../../Examples/Files/Helix.3mf + - name: Build CDynamic - CPack (Darwin) + run: | + sh SDK/CPackExamples/CDynamic/GenerateMake.sh + cd SDK/CPackExamples/CDynamic/build + cmake --build . + ./Example_CDynamic - name: Build Cpp - CPack (Darwin) run: | sh SDK/CPackExamples/Cpp/GenerateMake.sh @@ -543,7 +609,7 @@ jobs: ./create_cube deploy-source-code-with-submodules: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 needs: [ set-lib3mf-version, assemble-sdk ] env: LIB3MF_VERSION: ${{ needs.set-lib3mf-version.outputs.lib3mf-version }} @@ -563,11 +629,16 @@ jobs: set-integration-tests-status: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 needs: [ deploy-linux, deploy-windows, deploy-macos, deploy-source-code-with-submodules ] outputs: run_integration_tests: ${{ steps.set-status.outputs.run_integration_tests }} steps: + - name: Install prerequisites + if: env.RUN_INTEGRATION_TESTS == 'on' + run: | + sudo apt-get update + sudo apt-get install -y unzip wget - name: Set status id: set-status run: | @@ -576,10 +647,34 @@ jobs: else echo "run_integration_tests=false" >> $GITHUB_OUTPUT fi + + - name: Cache 3MF test suite + if: steps.set-status.outputs.run_integration_tests == 'true' + uses: actions/cache@v5 + with: + path: ~/.cache/3mf-test-suite + key: 3mf-test-suite-v2.0.0 + + - name: Download integration test suite + if: steps.set-status.outputs.run_integration_tests == 'true' + run: | + USER="${{ secrets.THREEMF_TEST_SUITE_DOWNLOAD_USER }}" + PASS="${{ secrets.THREEMF_TEST_SUITE_DOWNLOAD_TOKEN }}" + CACHE_DIR="$HOME/.cache/3mf-test-suite" + SUITE_ZIP="3MF_Conformance_Test_Suites_v2.0.0.zip" + CACHE_ZIP="$CACHE_DIR/$SUITE_ZIP" + + mkdir -p "$CACHE_DIR" + if [ ! -f "$CACHE_ZIP" ]; then + wget --user "$USER" \ + --password "$PASS" \ + "https://storage.3mf.dev/remote.php/dav/files/$USER/3MF_CONSORTIUM/GITHUB/$SUITE_ZIP" \ + -O "$CACHE_ZIP" + fi integration-tests-latest-release: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 needs: [set-integration-tests-status] if: needs.set-integration-tests-status.outputs.run_integration_tests == 'true' # Single check before the job starts steps: @@ -619,10 +714,17 @@ jobs: cmake --build . ./Example_ExtractInfo ../../Files/Helix.3mf - - name: Download and unzip test suite + - name: Restore 3MF test suite cache + uses: actions/cache@v5 + with: + path: ~/.cache/3mf-test-suite + key: 3mf-test-suite-v2.0.0 + + - name: Unzip integration test suite run: | - wget https://github.com/3MFConsortium/test_suites/releases/download/v2.0.0/3MF_Conformance_Test_Suites_v2.0.0.zip - unzip 3MF_Conformance_Test_Suites_v2.0.0.zip -d test_suites + rm -rf test_suites + unzip -o "$HOME/.cache/3mf-test-suite/3MF_Conformance_Test_Suites_v2.0.0.zip" -d test_suites + - name: List files run: | @@ -636,6 +738,23 @@ jobs: run: | cd test_suites && /usr/bin/time -v python integration_test.py 2>&1 | tee latest_sdk_test.log + - name: List MUSTPASS failures and MUSTFAIL passes (latest release) + run: | + echo "MUSTPASS that failed (latest release):" + grep -E 'MUSTPASS file ".*" does not work' test_suites/latest_sdk_test.log | sed -n 's/.*MUSTPASS file "\([^"]*\)".*/\1/p' | sort -u > test_suites/latest_mp_failed.txt || true + cat test_suites/latest_mp_failed.txt || true + echo "\nMUSTFAIL that passed (latest release):" + grep -E 'MUSTFAIL file ".*" works' test_suites/latest_sdk_test.log | sed -n 's/.*MUSTFAIL file "\([^"]*\)".*/\1/p' | sort -u > test_suites/latest_mf_passed.txt || true + cat test_suites/latest_mf_passed.txt || true + { + echo "### Latest release detailed results"; + echo "MUSTPASS failed: $(wc -l < test_suites/latest_mp_failed.txt 2>/dev/null || echo 0)"; + sed 's/^/- /' test_suites/latest_mp_failed.txt 2>/dev/null || true; + echo; + echo "MUSTFAIL passed: $(wc -l < test_suites/latest_mf_passed.txt 2>/dev/null || echo 0)"; + sed 's/^/- /' test_suites/latest_mf_passed.txt 2>/dev/null || true; + } >> "$GITHUB_STEP_SUMMARY" + - name: Print results (Checks the total python script execution time) run: | LATEST_TIME=$(grep "Elapsed (wall clock) time" test_suites/latest_sdk_test.log | awk '{print $8}') @@ -653,7 +772,7 @@ jobs: integration-tests-last-two-releases: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 needs: [set-integration-tests-status] if: needs.set-integration-tests-status.outputs.run_integration_tests == 'true' # Single check before the job starts steps: @@ -701,10 +820,17 @@ jobs: mv second_latest_lib3mf_sdk/lib3mf_sdk/* second_latest_lib3mf_sdk rmdir second_latest_lib3mf_sdk/lib3mf_sdk - - name: Download and unzip test suite + - name: Restore 3MF test suite cache + uses: actions/cache@v5 + with: + path: ~/.cache/3mf-test-suite + key: 3mf-test-suite-v2.0.0 + + - name: Unzip integration test suite run: | - wget https://github.com/3MFConsortium/test_suites/releases/download/v2.0.0/3MF_Conformance_Test_Suites_v2.0.0.zip - unzip 3MF_Conformance_Test_Suites_v2.0.0.zip -d test_suites + rm -rf test_suites + unzip -o "$HOME/.cache/3mf-test-suite/3MF_Conformance_Test_Suites_v2.0.0.zip" -d test_suites + - name: Copy integration test script run: | @@ -728,8 +854,6 @@ jobs: - name: Build and run CppDynamic with second latest SDK run: | - ls -al - ls -al second_latest_lib3mf_sdk sh second_latest_lib3mf_sdk/Examples/CppDynamic/GenerateMake.sh cd second_latest_lib3mf_sdk/Examples/CppDynamic/build cmake --build . @@ -745,6 +869,36 @@ jobs: - name: Compare results (Checks the total python script execution time and must pass/fail counts) run: | + # Extract detailed lists from logs for diffing + grep -E 'MUSTPASS file ".*" does not work' test_suites/latest_sdk_test.log | sed -n 's/.*MUSTPASS file "\([^"]*\)".*/\1/p' | sort -u > test_suites/latest_mp_failed.txt || true + grep -E 'MUSTFAIL file ".*" works' test_suites/latest_sdk_test.log | sed -n 's/.*MUSTFAIL file "\([^"]*\)".*/\1/p' | sort -u > test_suites/latest_mf_passed.txt || true + grep -E 'MUSTPASS file ".*" does not work' test_suites/second_latest_sdk_test.log | sed -n 's/.*MUSTPASS file "\([^"]*\)".*/\1/p' | sort -u > test_suites/second_latest_mp_failed.txt || true + grep -E 'MUSTFAIL file ".*" works' test_suites/second_latest_sdk_test.log | sed -n 's/.*MUSTFAIL file "\([^"]*\)".*/\1/p' | sort -u > test_suites/second_latest_mf_passed.txt || true + + echo "=== Latest MUSTPASS failed:"; cat test_suites/latest_mp_failed.txt || true + echo "=== Second Latest MUSTPASS failed:"; cat test_suites/second_latest_mp_failed.txt || true + echo "=== Latest MUSTFAIL passed:"; cat test_suites/latest_mf_passed.txt || true + echo "=== Second Latest MUSTFAIL passed:"; cat test_suites/second_latest_mf_passed.txt || true + + # Compute regressions and improvements + comm -23 test_suites/latest_mp_failed.txt test_suites/second_latest_mp_failed.txt > test_suites/regressions_mp_now_failing.txt || true + comm -23 test_suites/latest_mf_passed.txt test_suites/second_latest_mf_passed.txt > test_suites/regressions_mf_now_passing.txt || true + comm -13 test_suites/latest_mp_failed.txt test_suites/second_latest_mp_failed.txt > test_suites/improvements_mp_fixed.txt || true + comm -13 test_suites/latest_mf_passed.txt test_suites/second_latest_mf_passed.txt > test_suites/improvements_mf_fixed.txt || true + + echo "=== Regressions - MUSTPASS now failing:"; cat test_suites/regressions_mp_now_failing.txt || true + echo "=== Regressions - MUSTFAIL now passing:"; cat test_suites/regressions_mf_now_passing.txt || true + echo "=== Improvements - MUSTPASS fixed:"; cat test_suites/improvements_mp_fixed.txt || true + echo "=== Improvements - MUSTFAIL fixed:"; cat test_suites/improvements_mf_fixed.txt || true + + { + echo "### Last two releases - detailed diffs"; + echo "#### Regressions - MUSTPASS now failing"; sed 's/^/- /' test_suites/regressions_mp_now_failing.txt 2>/dev/null || true; echo; + echo "#### Regressions - MUSTFAIL now passing"; sed 's/^/- /' test_suites/regressions_mf_now_passing.txt 2>/dev/null || true; echo; + echo "#### Improvements - MUSTPASS fixed"; sed 's/^/- /' test_suites/improvements_mp_fixed.txt 2>/dev/null || true; echo; + echo "#### Improvements - MUSTFAIL fixed"; sed 's/^/- /' test_suites/improvements_mf_fixed.txt 2>/dev/null || true; echo; + } >> "$GITHUB_STEP_SUMMARY" + LATEST_TIME=$(grep "Elapsed (wall clock) time" test_suites/latest_sdk_test.log | awk '{print $8}') SECOND_LATEST_TIME=$(grep "Elapsed (wall clock) time" test_suites/second_latest_sdk_test.log | awk '{print $8}') LATEST_TOTAL_SECONDS=$(echo $LATEST_TIME | awk -F: '{ print ($1 * 60) + $2 }') @@ -775,17 +929,19 @@ jobs: fi # Compare MUSTPASS and MUSTFAIL counts - if [ "$LATEST_MUSTPASS" != "$SECOND_LATEST_MUSTPASS" ] || [ "$LATEST_MUSTFAIL" != "$SECOND_LATEST_MUSTFAIL" ]; then - echo "MUSTPASS or MUSTFAIL counts have changed" + # Allow improvements: pass if latest >= second latest for both metrics; fail only on regression + if [ "$LATEST_MUSTPASS" -lt "$SECOND_LATEST_MUSTPASS" ] || [ "$LATEST_MUSTFAIL" -lt "$SECOND_LATEST_MUSTFAIL" ]; then + echo "MUSTPASS or MUSTFAIL counts have regressed" + echo "Regressions detected. See lists above and job summary for files." exit 1 else - echo "MUSTPASS and MUSTFAIL counts are consistent" + echo "MUSTPASS and MUSTFAIL counts have improved or stayed the same" fi integration-tests-latest-commit: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 needs: [set-integration-tests-status] if: needs.set-integration-tests-status.outputs.run_integration_tests == 'true' # Single check before the job starts steps: @@ -820,10 +976,17 @@ jobs: cmake --build . ./Example_ExtractInfo ../../Files/Helix.3mf - - name: Download and unzip test suite + - name: Restore 3MF test suite cache + uses: actions/cache@v5 + with: + path: ~/.cache/3mf-test-suite + key: 3mf-test-suite-v2.0.0 + + - name: Unzip integration test suite run: | - wget https://github.com/3MFConsortium/test_suites/releases/download/v2.0.0/3MF_Conformance_Test_Suites_v2.0.0.zip - unzip 3MF_Conformance_Test_Suites_v2.0.0.zip -d test_suites + rm -rf test_suites + unzip -o "$HOME/.cache/3mf-test-suite/3MF_Conformance_Test_Suites_v2.0.0.zip" -d test_suites + - name: Copy integration test script run: | @@ -833,6 +996,23 @@ jobs: run: | cd test_suites && /usr/bin/time -v python integration_test.py 2>&1 | tee latest_sdk_test.log + - name: List MUSTPASS failures and MUSTFAIL passes (latest commit) + run: | + echo "MUSTPASS that failed (latest commit):" + grep -E 'MUSTPASS file ".*" does not work' test_suites/latest_sdk_test.log | sed -n 's/.*MUSTPASS file "\([^"]*\)".*/\1/p' | sort -u > test_suites/latest_commit_mp_failed.txt || true + cat test_suites/latest_commit_mp_failed.txt || true + echo "\nMUSTFAIL that passed (latest commit):" + grep -E 'MUSTFAIL file ".*" works' test_suites/latest_sdk_test.log | sed -n 's/.*MUSTFAIL file "\([^"]*\)".*/\1/p' | sort -u > test_suites/latest_commit_mf_passed.txt || true + cat test_suites/latest_commit_mf_passed.txt || true + { + echo "### Latest commit detailed results"; + echo "MUSTPASS failed: $(wc -l < test_suites/latest_commit_mp_failed.txt 2>/dev/null || echo 0)"; + sed 's/^/- /' test_suites/latest_commit_mp_failed.txt 2>/dev/null || true; + echo; + echo "MUSTFAIL passed: $(wc -l < test_suites/latest_commit_mf_passed.txt 2>/dev/null || echo 0)"; + sed 's/^/- /' test_suites/latest_commit_mf_passed.txt 2>/dev/null || true; + } >> "$GITHUB_STEP_SUMMARY" + - name: Print results (Checks the total python script execution time) run: | LATEST_TIME=$(grep "Elapsed (wall clock) time" test_suites/latest_sdk_test.log | awk '{print $8}') @@ -854,7 +1034,7 @@ jobs: echo "LATEST_TOTAL_MUSTFAIL=${LATEST_TOTAL_MUSTFAIL}" >> $GITHUB_ENV integration-test-last-commit-and-last-release: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 needs: [set-integration-tests-status] if: needs.set-integration-tests-status.outputs.run_integration_tests == 'true' # Single check before the job starts steps: @@ -890,10 +1070,17 @@ jobs: cmake --build . ./Example_ExtractInfo ../../Files/Helix.3mf - - name: Download and unzip test suite + - name: Restore 3MF test suite cache + uses: actions/cache@v5 + with: + path: ~/.cache/3mf-test-suite + key: 3mf-test-suite-v2.0.0 + + - name: Unzip integration test suite run: | - wget https://github.com/3MFConsortium/test_suites/releases/download/v2.0.0/3MF_Conformance_Test_Suites_v2.0.0.zip - unzip 3MF_Conformance_Test_Suites_v2.0.0.zip -d test_suites + rm -rf test_suites + unzip -o "$HOME/.cache/3mf-test-suite/3MF_Conformance_Test_Suites_v2.0.0.zip" -d test_suites + - name: Copy integration test script run: | @@ -946,6 +1133,17 @@ jobs: - name: Compare results (Checks the total python script execution time) id: compare_results run: | + # Extract detailed lists from logs for diffing + grep -E 'MUSTPASS file ".*" does not work' test_suites/latest_commit_sdk_test.log | sed -n 's/.*MUSTPASS file "\([^"]*\)".*/\1/p' | sort -u > test_suites/latest_commit_mp_failed.txt || true + grep -E 'MUSTFAIL file ".*" works' test_suites/latest_commit_sdk_test.log | sed -n 's/.*MUSTFAIL file "\([^"]*\)".*/\1/p' | sort -u > test_suites/latest_commit_mf_passed.txt || true + grep -E 'MUSTPASS file ".*" does not work' test_suites/latest_release_sdk_test.log | sed -n 's/.*MUSTPASS file "\([^"]*\)".*/\1/p' | sort -u > test_suites/latest_release_mp_failed.txt || true + grep -E 'MUSTFAIL file ".*" works' test_suites/latest_release_sdk_test.log | sed -n 's/.*MUSTFAIL file "\([^"]*\)".*/\1/p' | sort -u > test_suites/latest_release_mf_passed.txt || true + + echo "=== Latest commit MUSTPASS failed:"; cat test_suites/latest_commit_mp_failed.txt || true + echo "=== Latest release MUSTPASS failed:"; cat test_suites/latest_release_mp_failed.txt || true + echo "=== Latest commit MUSTFAIL passed:"; cat test_suites/latest_commit_mf_passed.txt || true + echo "=== Latest release MUSTFAIL passed:"; cat test_suites/latest_release_mf_passed.txt || true + LATEST_COMMIT_TIME=$(grep "Elapsed (wall clock) time" test_suites/latest_commit_sdk_test.log | awk '{print $8}') LATEST_RELEASE_TIME=$(grep "Elapsed (wall clock) time" test_suites/latest_release_sdk_test.log | awk '{print $8}') LATEST_COMMIT_TOTAL_SECONDS=$(echo $LATEST_COMMIT_TIME | awk -F: '{ print ($1 * 60) + $2 }') @@ -969,11 +1167,22 @@ jobs: echo "Latest release MUSTFAIL: ${LATEST_RELEASE_MUSTFAIL} / ${LATEST_TOTAL_RELEASE_MUSTFAIL}" # Compare MUSTPASS and MUSTFAIL counts - if [ "$LATEST_COMMIT_MUSTPASS" != "$LATEST_RELEASE_MUSTPASS" ] || [ "$LATEST_COMMIT_MUSTFAIL" != "$LATEST_RELEASE_MUSTFAIL" ]; then - echo "MUSTPASS or MUSTFAIL counts have changed" + # Allow improvements: pass if latest commit >= latest release for both metrics; fail only on regression + if [ "$LATEST_COMMIT_MUSTPASS" -lt "$LATEST_RELEASE_MUSTPASS" ] || [ "$LATEST_COMMIT_MUSTFAIL" -lt "$LATEST_RELEASE_MUSTFAIL" ]; then + echo "MUSTPASS or MUSTFAIL counts have regressed" + # Highlight exactly which files changed outcome + comm -23 test_suites/latest_commit_mp_failed.txt test_suites/latest_release_mp_failed.txt > test_suites/regressions_commit_mp_now_failing.txt || true + comm -23 test_suites/latest_commit_mf_passed.txt test_suites/latest_release_mf_passed.txt > test_suites/regressions_commit_mf_now_passing.txt || true + echo "=== Regressions (commit vs release) - MUSTPASS now failing:"; cat test_suites/regressions_commit_mp_now_failing.txt || true + echo "=== Regressions (commit vs release) - MUSTFAIL now passing:"; cat test_suites/regressions_commit_mf_now_passing.txt || true + { + echo "### Latest commit vs latest release - regressions"; + echo "#### MUSTPASS now failing"; sed 's/^/- /' test_suites/regressions_commit_mp_now_failing.txt 2>/dev/null || true; echo; + echo "#### MUSTFAIL now passing"; sed 's/^/- /' test_suites/regressions_commit_mf_now_passing.txt 2>/dev/null || true; echo; + } >> "$GITHUB_STEP_SUMMARY" exit 1 else - echo "MUSTPASS and MUSTFAIL counts are consistent" + echo "MUSTPASS and MUSTFAIL counts have improved or stayed the same" fi # Compare the total seconds @@ -994,4 +1203,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: integration-test-results - path: results.txt \ No newline at end of file + path: results.txt diff --git a/Autogenerated/Bindings/C/lib3mf.h b/Autogenerated/Bindings/C/lib3mf.h index 9dc5898a9..8c0d1dee7 100644 --- a/Autogenerated/Bindings/C/lib3mf.h +++ b/Autogenerated/Bindings/C/lib3mf.h @@ -24,12 +24,12 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha. +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. Abstract: This is an autogenerated plain C Header file in order to allow an easy use of the 3MF Library -Interface version: 2.4.1 +Interface version: 2.5.0 */ @@ -1926,7 +1926,7 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedatacomposite_setbasematerialgroup(Lib LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedatacomposite_getmaterialmappingcount(Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 * pCount); /** -* Returns MaterialMappting with given index +* Returns MaterialMapping with given index * * @param[in] pVolumeDataComposite - VolumeDataComposite instance. * @param[in] nIndex - Index of the MaterialMapping in question. @@ -1936,7 +1936,7 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedatacomposite_getmaterialmappingcount( LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedatacomposite_getmaterialmapping(Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 nIndex, Lib3MF_MaterialMapping * pTheMaterialMapping); /** -* Adds a the MaterialMapping +* Adds a MaterialMapping * * @param[in] pVolumeDataComposite - VolumeDataComposite instance. * @param[in] pTransform - new transformation matrix @@ -2048,7 +2048,7 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_removecolor(Lib3MF_VolumeData pVo * Returns the number of VolumeDataProperty * * @param[in] pVolumeData - VolumeData instance. -* @param[out] pCount - the number of VolumeDataProperty-elements within this VolumdeData +* @param[out] pCount - the number of VolumeDataProperty-elements within this VolumeData * @return error code or 0 (success) */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_getpropertycount(Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 * pCount); @@ -2873,7 +2873,7 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_setrelationshiptype(Lib3MF_Attach LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_writetofile(Lib3MF_Attachment pAttachment, const char * pFileName); /** -* Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer methods. * * @param[in] pAttachment - Attachment instance. * @param[in] pFileName - file to read from. @@ -2882,7 +2882,7 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_writetofile(Lib3MF_Attachment pAt LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_readfromfile(Lib3MF_Attachment pAttachment, const char * pFileName); /** -* Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer methods. * * @param[in] pAttachment - Attachment instance. * @param[in] pTheReadCallback - Callback to call for reading a data chunk @@ -2914,7 +2914,7 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_getstreamsize(Lib3MF_Attachment p LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_writetobuffer(Lib3MF_Attachment pAttachment, const Lib3MF_uint64 nBufferBufferSize, Lib3MF_uint64* pBufferNeededCount, Lib3MF_uint8 * pBufferBuffer); /** -* Reads an attachment from a memory buffer. This buffer is immediatly read (in contrast to the ReadFromCallback and ReadFromFile-methods). +* Reads an attachment from a memory buffer. This buffer is immediately read (in contrast to the ReadFromCallback and ReadFromFile-methods). * * @param[in] pAttachment - Attachment instance. * @param[in] nBufferBufferSize - Number of elements in buffer @@ -4026,6 +4026,233 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_unsignedmeshnode_getinputpos(Lib3MF_Unsigned */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_unsignedmeshnode_getoutputdistance(Lib3MF_UnsignedMeshNode pUnsignedMeshNode, Lib3MF_ImplicitPort * pDistance); +/************************************************************************************************************************* + Class definition for BeamLatticeNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the model resource id of the beam lattice +* +* @param[in] pBeamLatticeNode - BeamLatticeNode instance. +* @param[out] pBeamLattice - the input port for the model resource id of the beam lattice (mesh with beamlattice extension) +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlatticenode_getinputbeamlattice(Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_ImplicitPort * pBeamLattice); + +/** +* Retrieves the input for the position +* +* @param[in] pBeamLatticeNode - BeamLatticeNode instance. +* @param[out] pPos - the input port for the position +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlatticenode_getinputpos(Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_ImplicitPort * pPos); + +/** +* Retrieves the output +* +* @param[in] pBeamLatticeNode - BeamLatticeNode instance. +* @param[out] pDistance - the output port for the signed distance to the beam lattice +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlatticenode_getoutputdistance(Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_ImplicitPort * pDistance); + +/** +* Sets the accurate range for distance computation +* +* @param[in] pBeamLatticeNode - BeamLatticeNode instance. +* @param[in] dAccurateRange - the accurate range in model units +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlatticenode_setaccuraterange(Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_double dAccurateRange); + +/** +* Retrieves the accurate range for distance computation +* +* @param[in] pBeamLatticeNode - BeamLatticeNode instance. +* @param[out] pAccurateRange - the accurate range in model units +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlatticenode_getaccuraterange(Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_double * pAccurateRange); + +/************************************************************************************************************************* + Class definition for FunctionGradientNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the function id +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pFunction - the input port for the function +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functiongradientnode_getinputfunctionid(Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pFunction); + +/** +* Retrieves the input for the position +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pPos - the input port for the position +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functiongradientnode_getinputpos(Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pPos); + +/** +* Retrieves the input for the finite difference step +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pStep - the input port for the finite difference step +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functiongradientnode_getinputstep(Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pStep); + +/** +* Sets the name of the referenced scalar output +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[in] pScalarOutputName - the name of the scalar output of the referenced function +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functiongradientnode_setscalaroutputname(Lib3MF_FunctionGradientNode pFunctionGradientNode, const char * pScalarOutputName); + +/** +* Retrieves the name of the referenced scalar output +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[in] nScalarOutputNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pScalarOutputNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pScalarOutputNameBuffer - buffer of the name of the scalar output of the referenced function, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functiongradientnode_getscalaroutputname(Lib3MF_FunctionGradientNode pFunctionGradientNode, const Lib3MF_uint32 nScalarOutputNameBufferSize, Lib3MF_uint32* pScalarOutputNameNeededChars, char * pScalarOutputNameBuffer); + +/** +* Sets the name of the referenced vector input +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[in] pVectorInputName - the name of the vector input (float3) of the referenced function +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functiongradientnode_setvectorinputname(Lib3MF_FunctionGradientNode pFunctionGradientNode, const char * pVectorInputName); + +/** +* Retrieves the name of the referenced vector input +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[in] nVectorInputNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pVectorInputNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pVectorInputNameBuffer - buffer of the name of the vector input (float3) of the referenced function, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functiongradientnode_getvectorinputname(Lib3MF_FunctionGradientNode pFunctionGradientNode, const Lib3MF_uint32 nVectorInputNameBufferSize, Lib3MF_uint32* pVectorInputNameNeededChars, char * pVectorInputNameBuffer); + +/** +* Retrieves the normalized gradient output +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pVector - the output port for the normalized gradient +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functiongradientnode_getoutputvector(Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pVector); + +/** +* Retrieves the raw gradient output +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pGradient - the output port for the raw gradient +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functiongradientnode_getoutputgradient(Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pGradient); + +/** +* Retrieves the gradient magnitude output +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pMagnitude - the output port for the gradient magnitude +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functiongradientnode_getoutputmagnitude(Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pMagnitude); + +/************************************************************************************************************************* + Class definition for NormalizeDistanceNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the function id +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[out] pFunction - the input port for the function +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_normalizedistancenode_getinputfunctionid(Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pFunction); + +/** +* Retrieves the input for the position +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[out] pPos - the input port for the position (vector) +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_normalizedistancenode_getinputpos(Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pPos); + +/** +* Retrieves the input for the finite difference step +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[out] pStep - the input port for the finite difference step +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_normalizedistancenode_getinputstep(Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pStep); + +/** +* Sets the name of the referenced scalar output +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[in] pScalarOutputName - the name of the scalar output of the referenced function +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_normalizedistancenode_setscalaroutputname(Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const char * pScalarOutputName); + +/** +* Retrieves the name of the referenced scalar output +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[in] nScalarOutputNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pScalarOutputNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pScalarOutputNameBuffer - buffer of the name of the scalar output of the referenced function, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_normalizedistancenode_getscalaroutputname(Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const Lib3MF_uint32 nScalarOutputNameBufferSize, Lib3MF_uint32* pScalarOutputNameNeededChars, char * pScalarOutputNameBuffer); + +/** +* Sets the name of the referenced vector input +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[in] pVectorInputName - the name of the vector input (float3) of the referenced function +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_normalizedistancenode_setvectorinputname(Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const char * pVectorInputName); + +/** +* Retrieves the name of the referenced vector input +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[in] nVectorInputNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pVectorInputNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pVectorInputNameBuffer - buffer of the name of the vector input (float3) of the referenced function, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_normalizedistancenode_getvectorinputname(Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const Lib3MF_uint32 nVectorInputNameBufferSize, Lib3MF_uint32* pVectorInputNameNeededChars, char * pVectorInputNameBuffer); + +/** +* Retrieves the normalized result output +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[out] pResult - the output port for the normalized distance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_normalizedistancenode_getoutputresult(Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pResult); + /************************************************************************************************************************* Class definition for FunctionCallNode **************************************************************************************************************************/ @@ -4801,6 +5028,42 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addmeshnode(Lib3MF_Implicit */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addunsignedmeshnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_UnsignedMeshNode * pNode); +/** +* Add a BeamLatticeNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addbeamlatticenode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_BeamLatticeNode * pNode); + +/** +* Add a FunctionGradientNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addfunctiongradientnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_FunctionGradientNode * pNode); + +/** +* Add a NormalizeDistanceNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addnormalizedistancenode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_NormalizeDistanceNode * pNode); + /** * Add a FunctionCallNode * diff --git a/Autogenerated/Bindings/C/lib3mf_types.h b/Autogenerated/Bindings/C/lib3mf_types.h index 9e0b4012c..d87847a5b 100644 --- a/Autogenerated/Bindings/C/lib3mf_types.h +++ b/Autogenerated/Bindings/C/lib3mf_types.h @@ -24,12 +24,12 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha. +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. Abstract: This is an autogenerated plain C Header file with basic types in order to allow an easy use of the 3MF Library -Interface version: 2.4.1 +Interface version: 2.5.0 */ @@ -84,8 +84,8 @@ typedef void * Lib3MF_pvoid; **************************************************************************************************************************/ #define LIB3MF_VERSION_MAJOR 2 -#define LIB3MF_VERSION_MINOR 4 -#define LIB3MF_VERSION_MICRO 1 +#define LIB3MF_VERSION_MINOR 5 +#define LIB3MF_VERSION_MICRO 0 #define LIB3MF_VERSION_PRERELEASEINFO "" #define LIB3MF_VERSION_BUILDINFO "" @@ -310,6 +310,9 @@ typedef Lib3MFHandle Lib3MF_ConstVecNode; typedef Lib3MFHandle Lib3MF_ConstMatNode; typedef Lib3MFHandle Lib3MF_MeshNode; typedef Lib3MFHandle Lib3MF_UnsignedMeshNode; +typedef Lib3MFHandle Lib3MF_BeamLatticeNode; +typedef Lib3MFHandle Lib3MF_FunctionGradientNode; +typedef Lib3MFHandle Lib3MF_NormalizeDistanceNode; typedef Lib3MFHandle Lib3MF_FunctionCallNode; typedef Lib3MFHandle Lib3MF_NodeIterator; typedef Lib3MFHandle Lib3MF_Function; @@ -358,7 +361,8 @@ typedef enum eLib3MFObjectType { eObjectTypeOther = 0, eObjectTypeModel = 1, eObjectTypeSupport = 2, - eObjectTypeSolidSupport = 3 + eObjectTypeSolidSupport = 3, + eObjectTypeSurface = 4 } eLib3MFObjectType; typedef enum eLib3MFTextureType { @@ -472,11 +476,11 @@ typedef enum eLib3MFImplicitNodeType { eImplicitNodeTypeMatVecMultiplication = 14, /** Multiplies a matrix with a vector */ eImplicitNodeTypeTranspose = 15, /** Transposes a matrix */ eImplicitNodeTypeInverse = 16, /** Computes the inverse of a matrix */ - eImplicitNodeTypeSinus = 17, /** Calculates the sinus */ - eImplicitNodeTypeCosinus = 18, /** Calculates the cosinus */ + eImplicitNodeTypeSinus = 17, /** Calculates the sine */ + eImplicitNodeTypeCosinus = 18, /** Calculates the cosine */ eImplicitNodeTypeTan = 19, /** Calculates the tangent */ - eImplicitNodeTypeArcSin = 20, /** Calculates the arcsinus */ - eImplicitNodeTypeArcCos = 21, /** Calculates the arccosinus */ + eImplicitNodeTypeArcSin = 20, /** Calculates the arcsine */ + eImplicitNodeTypeArcCos = 21, /** Calculates the arccosine */ eImplicitNodeTypeArcTan = 22, /** Calculates the arctangent */ eImplicitNodeTypeArcTan2 = 23, /** Calculates the arctangent */ eImplicitNodeTypeMin = 24, /** Calculates the minimum of two values */ @@ -486,9 +490,9 @@ typedef enum eLib3MFImplicitNodeType { eImplicitNodeTypePow = 28, /** Calculates the power A^B */ eImplicitNodeTypeSqrt = 29, /** Calculates the square root */ eImplicitNodeTypeExp = 30, /** Exponential function */ - eImplicitNodeTypeLog = 31, /** Natural logarithmus */ - eImplicitNodeTypeLog2 = 32, /** Logarithmus to the base 2 */ - eImplicitNodeTypeLog10 = 33, /** Logarithmus to the base 10 */ + eImplicitNodeTypeLog = 31, /** Natural logarithm */ + eImplicitNodeTypeLog2 = 32, /** Logarithm to the base 2 */ + eImplicitNodeTypeLog10 = 33, /** Logarithm to the base 10 */ eImplicitNodeTypeSelect = 34, /** If A is less than B returns C, else D */ eImplicitNodeTypeClamp = 35, /** Clamps the input value to min and max */ eImplicitNodeTypeSinh = 36, /** Calculates the hyperbolic sine */ @@ -503,9 +507,12 @@ typedef enum eLib3MFImplicitNodeType { eImplicitNodeTypeMesh = 45, /** Calculates the signed distance to a mesh */ eImplicitNodeTypeLength = 46, /** Calculates the length of a vector */ eImplicitNodeTypeConstResourceID = 47, /** Selects a resource (function, mesh etc.) */ - eImplicitNodeTypeVectorFromScalar = 48, /** Creates a vector from one scalar values */ + eImplicitNodeTypeVectorFromScalar = 48, /** Creates a vector from one scalar value */ eImplicitNodeTypeUnsignedMesh = 49, /** Calculates the unsigned distance to a mesh */ - eImplicitNodeTypeMod = 50 /** Calculates the modulo of two values (same behaviour as glsl mod) */ + eImplicitNodeTypeMod = 50, /** Calculates the modulo of two values (same behaviour as glsl mod) */ + eImplicitNodeTypeBeamLattice = 51, /** Calculates the signed distance to a beam lattice */ + eImplicitNodeTypeFunctionGradient = 52, /** Calculates the gradient of a function */ + eImplicitNodeTypeNormalizeDistance = 53 /** Normalizes a distance field */ } eLib3MFImplicitNodeType; /** diff --git a/Autogenerated/Bindings/CDynamic/lib3mf_dynamic.cc b/Autogenerated/Bindings/CDynamic/lib3mf_dynamic.cc index f8ad9ebeb..0527a8587 100644 --- a/Autogenerated/Bindings/CDynamic/lib3mf_dynamic.cc +++ b/Autogenerated/Bindings/CDynamic/lib3mf_dynamic.cc @@ -24,12 +24,12 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha. +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. Abstract: This is an autogenerated plain C Header file in order to allow an easy use of the 3MF Library -Interface version: 2.4.1 +Interface version: 2.5.0 */ @@ -422,6 +422,29 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_UnsignedMeshNode_GetInputMesh = NULL; pWrapperTable->m_UnsignedMeshNode_GetInputPos = NULL; pWrapperTable->m_UnsignedMeshNode_GetOutputDistance = NULL; + pWrapperTable->m_BeamLatticeNode_GetInputBeamLattice = NULL; + pWrapperTable->m_BeamLatticeNode_GetInputPos = NULL; + pWrapperTable->m_BeamLatticeNode_GetOutputDistance = NULL; + pWrapperTable->m_BeamLatticeNode_SetAccurateRange = NULL; + pWrapperTable->m_BeamLatticeNode_GetAccurateRange = NULL; + pWrapperTable->m_FunctionGradientNode_GetInputFunctionID = NULL; + pWrapperTable->m_FunctionGradientNode_GetInputPos = NULL; + pWrapperTable->m_FunctionGradientNode_GetInputStep = NULL; + pWrapperTable->m_FunctionGradientNode_SetScalarOutputName = NULL; + pWrapperTable->m_FunctionGradientNode_GetScalarOutputName = NULL; + pWrapperTable->m_FunctionGradientNode_SetVectorInputName = NULL; + pWrapperTable->m_FunctionGradientNode_GetVectorInputName = NULL; + pWrapperTable->m_FunctionGradientNode_GetOutputVector = NULL; + pWrapperTable->m_FunctionGradientNode_GetOutputGradient = NULL; + pWrapperTable->m_FunctionGradientNode_GetOutputMagnitude = NULL; + pWrapperTable->m_NormalizeDistanceNode_GetInputFunctionID = NULL; + pWrapperTable->m_NormalizeDistanceNode_GetInputPos = NULL; + pWrapperTable->m_NormalizeDistanceNode_GetInputStep = NULL; + pWrapperTable->m_NormalizeDistanceNode_SetScalarOutputName = NULL; + pWrapperTable->m_NormalizeDistanceNode_GetScalarOutputName = NULL; + pWrapperTable->m_NormalizeDistanceNode_SetVectorInputName = NULL; + pWrapperTable->m_NormalizeDistanceNode_GetVectorInputName = NULL; + pWrapperTable->m_NormalizeDistanceNode_GetOutputResult = NULL; pWrapperTable->m_FunctionCallNode_GetInputFunctionID = NULL; pWrapperTable->m_NodeIterator_GetCurrent = NULL; pWrapperTable->m_Function_GetDisplayName = NULL; @@ -485,6 +508,9 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_ImplicitFunction_AddConstMatNode = NULL; pWrapperTable->m_ImplicitFunction_AddMeshNode = NULL; pWrapperTable->m_ImplicitFunction_AddUnsignedMeshNode = NULL; + pWrapperTable->m_ImplicitFunction_AddBeamLatticeNode = NULL; + pWrapperTable->m_ImplicitFunction_AddFunctionGradientNode = NULL; + pWrapperTable->m_ImplicitFunction_AddNormalizeDistanceNode = NULL; pWrapperTable->m_ImplicitFunction_AddFunctionCallNode = NULL; pWrapperTable->m_ImplicitFunction_GetNodes = NULL; pWrapperTable->m_ImplicitFunction_RemoveNode = NULL; @@ -4088,6 +4114,213 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, if (pWrapperTable->m_UnsignedMeshNode_GetOutputDistance == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_BeamLatticeNode_GetInputBeamLattice = (PLib3MFBeamLatticeNode_GetInputBeamLatticePtr) GetProcAddress(hLibrary, "lib3mf_beamlatticenode_getinputbeamlattice"); + #else // _WIN32 + pWrapperTable->m_BeamLatticeNode_GetInputBeamLattice = (PLib3MFBeamLatticeNode_GetInputBeamLatticePtr) dlsym(hLibrary, "lib3mf_beamlatticenode_getinputbeamlattice"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLatticeNode_GetInputBeamLattice == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLatticeNode_GetInputPos = (PLib3MFBeamLatticeNode_GetInputPosPtr) GetProcAddress(hLibrary, "lib3mf_beamlatticenode_getinputpos"); + #else // _WIN32 + pWrapperTable->m_BeamLatticeNode_GetInputPos = (PLib3MFBeamLatticeNode_GetInputPosPtr) dlsym(hLibrary, "lib3mf_beamlatticenode_getinputpos"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLatticeNode_GetInputPos == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLatticeNode_GetOutputDistance = (PLib3MFBeamLatticeNode_GetOutputDistancePtr) GetProcAddress(hLibrary, "lib3mf_beamlatticenode_getoutputdistance"); + #else // _WIN32 + pWrapperTable->m_BeamLatticeNode_GetOutputDistance = (PLib3MFBeamLatticeNode_GetOutputDistancePtr) dlsym(hLibrary, "lib3mf_beamlatticenode_getoutputdistance"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLatticeNode_GetOutputDistance == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLatticeNode_SetAccurateRange = (PLib3MFBeamLatticeNode_SetAccurateRangePtr) GetProcAddress(hLibrary, "lib3mf_beamlatticenode_setaccuraterange"); + #else // _WIN32 + pWrapperTable->m_BeamLatticeNode_SetAccurateRange = (PLib3MFBeamLatticeNode_SetAccurateRangePtr) dlsym(hLibrary, "lib3mf_beamlatticenode_setaccuraterange"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLatticeNode_SetAccurateRange == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLatticeNode_GetAccurateRange = (PLib3MFBeamLatticeNode_GetAccurateRangePtr) GetProcAddress(hLibrary, "lib3mf_beamlatticenode_getaccuraterange"); + #else // _WIN32 + pWrapperTable->m_BeamLatticeNode_GetAccurateRange = (PLib3MFBeamLatticeNode_GetAccurateRangePtr) dlsym(hLibrary, "lib3mf_beamlatticenode_getaccuraterange"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLatticeNode_GetAccurateRange == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_GetInputFunctionID = (PLib3MFFunctionGradientNode_GetInputFunctionIDPtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_getinputfunctionid"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_GetInputFunctionID = (PLib3MFFunctionGradientNode_GetInputFunctionIDPtr) dlsym(hLibrary, "lib3mf_functiongradientnode_getinputfunctionid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_GetInputFunctionID == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_GetInputPos = (PLib3MFFunctionGradientNode_GetInputPosPtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_getinputpos"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_GetInputPos = (PLib3MFFunctionGradientNode_GetInputPosPtr) dlsym(hLibrary, "lib3mf_functiongradientnode_getinputpos"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_GetInputPos == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_GetInputStep = (PLib3MFFunctionGradientNode_GetInputStepPtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_getinputstep"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_GetInputStep = (PLib3MFFunctionGradientNode_GetInputStepPtr) dlsym(hLibrary, "lib3mf_functiongradientnode_getinputstep"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_GetInputStep == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_SetScalarOutputName = (PLib3MFFunctionGradientNode_SetScalarOutputNamePtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_setscalaroutputname"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_SetScalarOutputName = (PLib3MFFunctionGradientNode_SetScalarOutputNamePtr) dlsym(hLibrary, "lib3mf_functiongradientnode_setscalaroutputname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_SetScalarOutputName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_GetScalarOutputName = (PLib3MFFunctionGradientNode_GetScalarOutputNamePtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_getscalaroutputname"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_GetScalarOutputName = (PLib3MFFunctionGradientNode_GetScalarOutputNamePtr) dlsym(hLibrary, "lib3mf_functiongradientnode_getscalaroutputname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_GetScalarOutputName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_SetVectorInputName = (PLib3MFFunctionGradientNode_SetVectorInputNamePtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_setvectorinputname"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_SetVectorInputName = (PLib3MFFunctionGradientNode_SetVectorInputNamePtr) dlsym(hLibrary, "lib3mf_functiongradientnode_setvectorinputname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_SetVectorInputName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_GetVectorInputName = (PLib3MFFunctionGradientNode_GetVectorInputNamePtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_getvectorinputname"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_GetVectorInputName = (PLib3MFFunctionGradientNode_GetVectorInputNamePtr) dlsym(hLibrary, "lib3mf_functiongradientnode_getvectorinputname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_GetVectorInputName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_GetOutputVector = (PLib3MFFunctionGradientNode_GetOutputVectorPtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_getoutputvector"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_GetOutputVector = (PLib3MFFunctionGradientNode_GetOutputVectorPtr) dlsym(hLibrary, "lib3mf_functiongradientnode_getoutputvector"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_GetOutputVector == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_GetOutputGradient = (PLib3MFFunctionGradientNode_GetOutputGradientPtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_getoutputgradient"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_GetOutputGradient = (PLib3MFFunctionGradientNode_GetOutputGradientPtr) dlsym(hLibrary, "lib3mf_functiongradientnode_getoutputgradient"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_GetOutputGradient == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_GetOutputMagnitude = (PLib3MFFunctionGradientNode_GetOutputMagnitudePtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_getoutputmagnitude"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_GetOutputMagnitude = (PLib3MFFunctionGradientNode_GetOutputMagnitudePtr) dlsym(hLibrary, "lib3mf_functiongradientnode_getoutputmagnitude"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_GetOutputMagnitude == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetInputFunctionID = (PLib3MFNormalizeDistanceNode_GetInputFunctionIDPtr) GetProcAddress(hLibrary, "lib3mf_normalizedistancenode_getinputfunctionid"); + #else // _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetInputFunctionID = (PLib3MFNormalizeDistanceNode_GetInputFunctionIDPtr) dlsym(hLibrary, "lib3mf_normalizedistancenode_getinputfunctionid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_NormalizeDistanceNode_GetInputFunctionID == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetInputPos = (PLib3MFNormalizeDistanceNode_GetInputPosPtr) GetProcAddress(hLibrary, "lib3mf_normalizedistancenode_getinputpos"); + #else // _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetInputPos = (PLib3MFNormalizeDistanceNode_GetInputPosPtr) dlsym(hLibrary, "lib3mf_normalizedistancenode_getinputpos"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_NormalizeDistanceNode_GetInputPos == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetInputStep = (PLib3MFNormalizeDistanceNode_GetInputStepPtr) GetProcAddress(hLibrary, "lib3mf_normalizedistancenode_getinputstep"); + #else // _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetInputStep = (PLib3MFNormalizeDistanceNode_GetInputStepPtr) dlsym(hLibrary, "lib3mf_normalizedistancenode_getinputstep"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_NormalizeDistanceNode_GetInputStep == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_NormalizeDistanceNode_SetScalarOutputName = (PLib3MFNormalizeDistanceNode_SetScalarOutputNamePtr) GetProcAddress(hLibrary, "lib3mf_normalizedistancenode_setscalaroutputname"); + #else // _WIN32 + pWrapperTable->m_NormalizeDistanceNode_SetScalarOutputName = (PLib3MFNormalizeDistanceNode_SetScalarOutputNamePtr) dlsym(hLibrary, "lib3mf_normalizedistancenode_setscalaroutputname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_NormalizeDistanceNode_SetScalarOutputName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetScalarOutputName = (PLib3MFNormalizeDistanceNode_GetScalarOutputNamePtr) GetProcAddress(hLibrary, "lib3mf_normalizedistancenode_getscalaroutputname"); + #else // _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetScalarOutputName = (PLib3MFNormalizeDistanceNode_GetScalarOutputNamePtr) dlsym(hLibrary, "lib3mf_normalizedistancenode_getscalaroutputname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_NormalizeDistanceNode_GetScalarOutputName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_NormalizeDistanceNode_SetVectorInputName = (PLib3MFNormalizeDistanceNode_SetVectorInputNamePtr) GetProcAddress(hLibrary, "lib3mf_normalizedistancenode_setvectorinputname"); + #else // _WIN32 + pWrapperTable->m_NormalizeDistanceNode_SetVectorInputName = (PLib3MFNormalizeDistanceNode_SetVectorInputNamePtr) dlsym(hLibrary, "lib3mf_normalizedistancenode_setvectorinputname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_NormalizeDistanceNode_SetVectorInputName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetVectorInputName = (PLib3MFNormalizeDistanceNode_GetVectorInputNamePtr) GetProcAddress(hLibrary, "lib3mf_normalizedistancenode_getvectorinputname"); + #else // _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetVectorInputName = (PLib3MFNormalizeDistanceNode_GetVectorInputNamePtr) dlsym(hLibrary, "lib3mf_normalizedistancenode_getvectorinputname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_NormalizeDistanceNode_GetVectorInputName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetOutputResult = (PLib3MFNormalizeDistanceNode_GetOutputResultPtr) GetProcAddress(hLibrary, "lib3mf_normalizedistancenode_getoutputresult"); + #else // _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetOutputResult = (PLib3MFNormalizeDistanceNode_GetOutputResultPtr) dlsym(hLibrary, "lib3mf_normalizedistancenode_getoutputresult"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_NormalizeDistanceNode_GetOutputResult == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_FunctionCallNode_GetInputFunctionID = (PLib3MFFunctionCallNode_GetInputFunctionIDPtr) GetProcAddress(hLibrary, "lib3mf_functioncallnode_getinputfunctionid"); #else // _WIN32 @@ -4655,6 +4888,33 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, if (pWrapperTable->m_ImplicitFunction_AddUnsignedMeshNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddBeamLatticeNode = (PLib3MFImplicitFunction_AddBeamLatticeNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addbeamlatticenode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddBeamLatticeNode = (PLib3MFImplicitFunction_AddBeamLatticeNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addbeamlatticenode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddBeamLatticeNode == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddFunctionGradientNode = (PLib3MFImplicitFunction_AddFunctionGradientNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addfunctiongradientnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddFunctionGradientNode = (PLib3MFImplicitFunction_AddFunctionGradientNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addfunctiongradientnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddFunctionGradientNode == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddNormalizeDistanceNode = (PLib3MFImplicitFunction_AddNormalizeDistanceNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addnormalizedistancenode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddNormalizeDistanceNode = (PLib3MFImplicitFunction_AddNormalizeDistanceNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addnormalizedistancenode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddNormalizeDistanceNode == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_ImplicitFunction_AddFunctionCallNode = (PLib3MFImplicitFunction_AddFunctionCallNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addfunctioncallnode"); #else // _WIN32 diff --git a/Autogenerated/Bindings/CDynamic/lib3mf_dynamic.h b/Autogenerated/Bindings/CDynamic/lib3mf_dynamic.h index 4063be4d8..516c266da 100644 --- a/Autogenerated/Bindings/CDynamic/lib3mf_dynamic.h +++ b/Autogenerated/Bindings/CDynamic/lib3mf_dynamic.h @@ -24,12 +24,12 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha. +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. Abstract: This is an autogenerated plain C Header file in order to allow an easy use of the 3MF Library -Interface version: 2.4.1 +Interface version: 2.5.0 */ @@ -1913,7 +1913,7 @@ typedef Lib3MFResult (*PLib3MFVolumeDataComposite_SetBaseMaterialGroupPtr) (Lib3 typedef Lib3MFResult (*PLib3MFVolumeDataComposite_GetMaterialMappingCountPtr) (Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 * pCount); /** -* Returns MaterialMappting with given index +* Returns MaterialMapping with given index * * @param[in] pVolumeDataComposite - VolumeDataComposite instance. * @param[in] nIndex - Index of the MaterialMapping in question. @@ -1923,7 +1923,7 @@ typedef Lib3MFResult (*PLib3MFVolumeDataComposite_GetMaterialMappingCountPtr) (L typedef Lib3MFResult (*PLib3MFVolumeDataComposite_GetMaterialMappingPtr) (Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 nIndex, Lib3MF_MaterialMapping * pTheMaterialMapping); /** -* Adds a the MaterialMapping +* Adds a MaterialMapping * * @param[in] pVolumeDataComposite - VolumeDataComposite instance. * @param[in] pTransform - new transformation matrix @@ -2035,7 +2035,7 @@ typedef Lib3MFResult (*PLib3MFVolumeData_RemoveColorPtr) (Lib3MF_VolumeData pVol * Returns the number of VolumeDataProperty * * @param[in] pVolumeData - VolumeData instance. -* @param[out] pCount - the number of VolumeDataProperty-elements within this VolumdeData +* @param[out] pCount - the number of VolumeDataProperty-elements within this VolumeData * @return error code or 0 (success) */ typedef Lib3MFResult (*PLib3MFVolumeData_GetPropertyCountPtr) (Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 * pCount); @@ -2860,7 +2860,7 @@ typedef Lib3MFResult (*PLib3MFAttachment_SetRelationShipTypePtr) (Lib3MF_Attachm typedef Lib3MFResult (*PLib3MFAttachment_WriteToFilePtr) (Lib3MF_Attachment pAttachment, const char * pFileName); /** -* Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer methods. * * @param[in] pAttachment - Attachment instance. * @param[in] pFileName - file to read from. @@ -2869,7 +2869,7 @@ typedef Lib3MFResult (*PLib3MFAttachment_WriteToFilePtr) (Lib3MF_Attachment pAtt typedef Lib3MFResult (*PLib3MFAttachment_ReadFromFilePtr) (Lib3MF_Attachment pAttachment, const char * pFileName); /** -* Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer methods. * * @param[in] pAttachment - Attachment instance. * @param[in] pTheReadCallback - Callback to call for reading a data chunk @@ -2901,7 +2901,7 @@ typedef Lib3MFResult (*PLib3MFAttachment_GetStreamSizePtr) (Lib3MF_Attachment pA typedef Lib3MFResult (*PLib3MFAttachment_WriteToBufferPtr) (Lib3MF_Attachment pAttachment, const Lib3MF_uint64 nBufferBufferSize, Lib3MF_uint64* pBufferNeededCount, Lib3MF_uint8 * pBufferBuffer); /** -* Reads an attachment from a memory buffer. This buffer is immediatly read (in contrast to the ReadFromCallback and ReadFromFile-methods). +* Reads an attachment from a memory buffer. This buffer is immediately read (in contrast to the ReadFromCallback and ReadFromFile-methods). * * @param[in] pAttachment - Attachment instance. * @param[in] nBufferBufferSize - Number of elements in buffer @@ -4013,6 +4013,233 @@ typedef Lib3MFResult (*PLib3MFUnsignedMeshNode_GetInputPosPtr) (Lib3MF_UnsignedM */ typedef Lib3MFResult (*PLib3MFUnsignedMeshNode_GetOutputDistancePtr) (Lib3MF_UnsignedMeshNode pUnsignedMeshNode, Lib3MF_ImplicitPort * pDistance); +/************************************************************************************************************************* + Class definition for BeamLatticeNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the model resource id of the beam lattice +* +* @param[in] pBeamLatticeNode - BeamLatticeNode instance. +* @param[out] pBeamLattice - the input port for the model resource id of the beam lattice (mesh with beamlattice extension) +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamLatticeNode_GetInputBeamLatticePtr) (Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_ImplicitPort * pBeamLattice); + +/** +* Retrieves the input for the position +* +* @param[in] pBeamLatticeNode - BeamLatticeNode instance. +* @param[out] pPos - the input port for the position +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamLatticeNode_GetInputPosPtr) (Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_ImplicitPort * pPos); + +/** +* Retrieves the output +* +* @param[in] pBeamLatticeNode - BeamLatticeNode instance. +* @param[out] pDistance - the output port for the signed distance to the beam lattice +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamLatticeNode_GetOutputDistancePtr) (Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_ImplicitPort * pDistance); + +/** +* Sets the accurate range for distance computation +* +* @param[in] pBeamLatticeNode - BeamLatticeNode instance. +* @param[in] dAccurateRange - the accurate range in model units +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamLatticeNode_SetAccurateRangePtr) (Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_double dAccurateRange); + +/** +* Retrieves the accurate range for distance computation +* +* @param[in] pBeamLatticeNode - BeamLatticeNode instance. +* @param[out] pAccurateRange - the accurate range in model units +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamLatticeNode_GetAccurateRangePtr) (Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_double * pAccurateRange); + +/************************************************************************************************************************* + Class definition for FunctionGradientNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the function id +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pFunction - the input port for the function +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_GetInputFunctionIDPtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pFunction); + +/** +* Retrieves the input for the position +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pPos - the input port for the position +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_GetInputPosPtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pPos); + +/** +* Retrieves the input for the finite difference step +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pStep - the input port for the finite difference step +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_GetInputStepPtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pStep); + +/** +* Sets the name of the referenced scalar output +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[in] pScalarOutputName - the name of the scalar output of the referenced function +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_SetScalarOutputNamePtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, const char * pScalarOutputName); + +/** +* Retrieves the name of the referenced scalar output +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[in] nScalarOutputNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pScalarOutputNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pScalarOutputNameBuffer - buffer of the name of the scalar output of the referenced function, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_GetScalarOutputNamePtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, const Lib3MF_uint32 nScalarOutputNameBufferSize, Lib3MF_uint32* pScalarOutputNameNeededChars, char * pScalarOutputNameBuffer); + +/** +* Sets the name of the referenced vector input +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[in] pVectorInputName - the name of the vector input (float3) of the referenced function +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_SetVectorInputNamePtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, const char * pVectorInputName); + +/** +* Retrieves the name of the referenced vector input +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[in] nVectorInputNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pVectorInputNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pVectorInputNameBuffer - buffer of the name of the vector input (float3) of the referenced function, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_GetVectorInputNamePtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, const Lib3MF_uint32 nVectorInputNameBufferSize, Lib3MF_uint32* pVectorInputNameNeededChars, char * pVectorInputNameBuffer); + +/** +* Retrieves the normalized gradient output +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pVector - the output port for the normalized gradient +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_GetOutputVectorPtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pVector); + +/** +* Retrieves the raw gradient output +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pGradient - the output port for the raw gradient +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_GetOutputGradientPtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pGradient); + +/** +* Retrieves the gradient magnitude output +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pMagnitude - the output port for the gradient magnitude +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_GetOutputMagnitudePtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pMagnitude); + +/************************************************************************************************************************* + Class definition for NormalizeDistanceNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the function id +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[out] pFunction - the input port for the function +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFNormalizeDistanceNode_GetInputFunctionIDPtr) (Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pFunction); + +/** +* Retrieves the input for the position +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[out] pPos - the input port for the position (vector) +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFNormalizeDistanceNode_GetInputPosPtr) (Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pPos); + +/** +* Retrieves the input for the finite difference step +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[out] pStep - the input port for the finite difference step +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFNormalizeDistanceNode_GetInputStepPtr) (Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pStep); + +/** +* Sets the name of the referenced scalar output +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[in] pScalarOutputName - the name of the scalar output of the referenced function +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFNormalizeDistanceNode_SetScalarOutputNamePtr) (Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const char * pScalarOutputName); + +/** +* Retrieves the name of the referenced scalar output +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[in] nScalarOutputNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pScalarOutputNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pScalarOutputNameBuffer - buffer of the name of the scalar output of the referenced function, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFNormalizeDistanceNode_GetScalarOutputNamePtr) (Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const Lib3MF_uint32 nScalarOutputNameBufferSize, Lib3MF_uint32* pScalarOutputNameNeededChars, char * pScalarOutputNameBuffer); + +/** +* Sets the name of the referenced vector input +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[in] pVectorInputName - the name of the vector input (float3) of the referenced function +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFNormalizeDistanceNode_SetVectorInputNamePtr) (Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const char * pVectorInputName); + +/** +* Retrieves the name of the referenced vector input +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[in] nVectorInputNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pVectorInputNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pVectorInputNameBuffer - buffer of the name of the vector input (float3) of the referenced function, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFNormalizeDistanceNode_GetVectorInputNamePtr) (Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const Lib3MF_uint32 nVectorInputNameBufferSize, Lib3MF_uint32* pVectorInputNameNeededChars, char * pVectorInputNameBuffer); + +/** +* Retrieves the normalized result output +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[out] pResult - the output port for the normalized distance +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFNormalizeDistanceNode_GetOutputResultPtr) (Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pResult); + /************************************************************************************************************************* Class definition for FunctionCallNode **************************************************************************************************************************/ @@ -4788,6 +5015,42 @@ typedef Lib3MFResult (*PLib3MFImplicitFunction_AddMeshNodePtr) (Lib3MF_ImplicitF */ typedef Lib3MFResult (*PLib3MFImplicitFunction_AddUnsignedMeshNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_UnsignedMeshNode * pNode); +/** +* Add a BeamLatticeNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddBeamLatticeNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_BeamLatticeNode * pNode); + +/** +* Add a FunctionGradientNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddFunctionGradientNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_FunctionGradientNode * pNode); + +/** +* Add a NormalizeDistanceNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddNormalizeDistanceNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_NormalizeDistanceNode * pNode); + /** * Add a FunctionCallNode * @@ -6997,6 +7260,29 @@ typedef struct { PLib3MFUnsignedMeshNode_GetInputMeshPtr m_UnsignedMeshNode_GetInputMesh; PLib3MFUnsignedMeshNode_GetInputPosPtr m_UnsignedMeshNode_GetInputPos; PLib3MFUnsignedMeshNode_GetOutputDistancePtr m_UnsignedMeshNode_GetOutputDistance; + PLib3MFBeamLatticeNode_GetInputBeamLatticePtr m_BeamLatticeNode_GetInputBeamLattice; + PLib3MFBeamLatticeNode_GetInputPosPtr m_BeamLatticeNode_GetInputPos; + PLib3MFBeamLatticeNode_GetOutputDistancePtr m_BeamLatticeNode_GetOutputDistance; + PLib3MFBeamLatticeNode_SetAccurateRangePtr m_BeamLatticeNode_SetAccurateRange; + PLib3MFBeamLatticeNode_GetAccurateRangePtr m_BeamLatticeNode_GetAccurateRange; + PLib3MFFunctionGradientNode_GetInputFunctionIDPtr m_FunctionGradientNode_GetInputFunctionID; + PLib3MFFunctionGradientNode_GetInputPosPtr m_FunctionGradientNode_GetInputPos; + PLib3MFFunctionGradientNode_GetInputStepPtr m_FunctionGradientNode_GetInputStep; + PLib3MFFunctionGradientNode_SetScalarOutputNamePtr m_FunctionGradientNode_SetScalarOutputName; + PLib3MFFunctionGradientNode_GetScalarOutputNamePtr m_FunctionGradientNode_GetScalarOutputName; + PLib3MFFunctionGradientNode_SetVectorInputNamePtr m_FunctionGradientNode_SetVectorInputName; + PLib3MFFunctionGradientNode_GetVectorInputNamePtr m_FunctionGradientNode_GetVectorInputName; + PLib3MFFunctionGradientNode_GetOutputVectorPtr m_FunctionGradientNode_GetOutputVector; + PLib3MFFunctionGradientNode_GetOutputGradientPtr m_FunctionGradientNode_GetOutputGradient; + PLib3MFFunctionGradientNode_GetOutputMagnitudePtr m_FunctionGradientNode_GetOutputMagnitude; + PLib3MFNormalizeDistanceNode_GetInputFunctionIDPtr m_NormalizeDistanceNode_GetInputFunctionID; + PLib3MFNormalizeDistanceNode_GetInputPosPtr m_NormalizeDistanceNode_GetInputPos; + PLib3MFNormalizeDistanceNode_GetInputStepPtr m_NormalizeDistanceNode_GetInputStep; + PLib3MFNormalizeDistanceNode_SetScalarOutputNamePtr m_NormalizeDistanceNode_SetScalarOutputName; + PLib3MFNormalizeDistanceNode_GetScalarOutputNamePtr m_NormalizeDistanceNode_GetScalarOutputName; + PLib3MFNormalizeDistanceNode_SetVectorInputNamePtr m_NormalizeDistanceNode_SetVectorInputName; + PLib3MFNormalizeDistanceNode_GetVectorInputNamePtr m_NormalizeDistanceNode_GetVectorInputName; + PLib3MFNormalizeDistanceNode_GetOutputResultPtr m_NormalizeDistanceNode_GetOutputResult; PLib3MFFunctionCallNode_GetInputFunctionIDPtr m_FunctionCallNode_GetInputFunctionID; PLib3MFNodeIterator_GetCurrentPtr m_NodeIterator_GetCurrent; PLib3MFFunction_GetDisplayNamePtr m_Function_GetDisplayName; @@ -7060,6 +7346,9 @@ typedef struct { PLib3MFImplicitFunction_AddConstMatNodePtr m_ImplicitFunction_AddConstMatNode; PLib3MFImplicitFunction_AddMeshNodePtr m_ImplicitFunction_AddMeshNode; PLib3MFImplicitFunction_AddUnsignedMeshNodePtr m_ImplicitFunction_AddUnsignedMeshNode; + PLib3MFImplicitFunction_AddBeamLatticeNodePtr m_ImplicitFunction_AddBeamLatticeNode; + PLib3MFImplicitFunction_AddFunctionGradientNodePtr m_ImplicitFunction_AddFunctionGradientNode; + PLib3MFImplicitFunction_AddNormalizeDistanceNodePtr m_ImplicitFunction_AddNormalizeDistanceNode; PLib3MFImplicitFunction_AddFunctionCallNodePtr m_ImplicitFunction_AddFunctionCallNode; PLib3MFImplicitFunction_GetNodesPtr m_ImplicitFunction_GetNodes; PLib3MFImplicitFunction_RemoveNodePtr m_ImplicitFunction_RemoveNode; diff --git a/Autogenerated/Bindings/CDynamic/lib3mf_types.h b/Autogenerated/Bindings/CDynamic/lib3mf_types.h index 9e0b4012c..d87847a5b 100644 --- a/Autogenerated/Bindings/CDynamic/lib3mf_types.h +++ b/Autogenerated/Bindings/CDynamic/lib3mf_types.h @@ -24,12 +24,12 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha. +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. Abstract: This is an autogenerated plain C Header file with basic types in order to allow an easy use of the 3MF Library -Interface version: 2.4.1 +Interface version: 2.5.0 */ @@ -84,8 +84,8 @@ typedef void * Lib3MF_pvoid; **************************************************************************************************************************/ #define LIB3MF_VERSION_MAJOR 2 -#define LIB3MF_VERSION_MINOR 4 -#define LIB3MF_VERSION_MICRO 1 +#define LIB3MF_VERSION_MINOR 5 +#define LIB3MF_VERSION_MICRO 0 #define LIB3MF_VERSION_PRERELEASEINFO "" #define LIB3MF_VERSION_BUILDINFO "" @@ -310,6 +310,9 @@ typedef Lib3MFHandle Lib3MF_ConstVecNode; typedef Lib3MFHandle Lib3MF_ConstMatNode; typedef Lib3MFHandle Lib3MF_MeshNode; typedef Lib3MFHandle Lib3MF_UnsignedMeshNode; +typedef Lib3MFHandle Lib3MF_BeamLatticeNode; +typedef Lib3MFHandle Lib3MF_FunctionGradientNode; +typedef Lib3MFHandle Lib3MF_NormalizeDistanceNode; typedef Lib3MFHandle Lib3MF_FunctionCallNode; typedef Lib3MFHandle Lib3MF_NodeIterator; typedef Lib3MFHandle Lib3MF_Function; @@ -358,7 +361,8 @@ typedef enum eLib3MFObjectType { eObjectTypeOther = 0, eObjectTypeModel = 1, eObjectTypeSupport = 2, - eObjectTypeSolidSupport = 3 + eObjectTypeSolidSupport = 3, + eObjectTypeSurface = 4 } eLib3MFObjectType; typedef enum eLib3MFTextureType { @@ -472,11 +476,11 @@ typedef enum eLib3MFImplicitNodeType { eImplicitNodeTypeMatVecMultiplication = 14, /** Multiplies a matrix with a vector */ eImplicitNodeTypeTranspose = 15, /** Transposes a matrix */ eImplicitNodeTypeInverse = 16, /** Computes the inverse of a matrix */ - eImplicitNodeTypeSinus = 17, /** Calculates the sinus */ - eImplicitNodeTypeCosinus = 18, /** Calculates the cosinus */ + eImplicitNodeTypeSinus = 17, /** Calculates the sine */ + eImplicitNodeTypeCosinus = 18, /** Calculates the cosine */ eImplicitNodeTypeTan = 19, /** Calculates the tangent */ - eImplicitNodeTypeArcSin = 20, /** Calculates the arcsinus */ - eImplicitNodeTypeArcCos = 21, /** Calculates the arccosinus */ + eImplicitNodeTypeArcSin = 20, /** Calculates the arcsine */ + eImplicitNodeTypeArcCos = 21, /** Calculates the arccosine */ eImplicitNodeTypeArcTan = 22, /** Calculates the arctangent */ eImplicitNodeTypeArcTan2 = 23, /** Calculates the arctangent */ eImplicitNodeTypeMin = 24, /** Calculates the minimum of two values */ @@ -486,9 +490,9 @@ typedef enum eLib3MFImplicitNodeType { eImplicitNodeTypePow = 28, /** Calculates the power A^B */ eImplicitNodeTypeSqrt = 29, /** Calculates the square root */ eImplicitNodeTypeExp = 30, /** Exponential function */ - eImplicitNodeTypeLog = 31, /** Natural logarithmus */ - eImplicitNodeTypeLog2 = 32, /** Logarithmus to the base 2 */ - eImplicitNodeTypeLog10 = 33, /** Logarithmus to the base 10 */ + eImplicitNodeTypeLog = 31, /** Natural logarithm */ + eImplicitNodeTypeLog2 = 32, /** Logarithm to the base 2 */ + eImplicitNodeTypeLog10 = 33, /** Logarithm to the base 10 */ eImplicitNodeTypeSelect = 34, /** If A is less than B returns C, else D */ eImplicitNodeTypeClamp = 35, /** Clamps the input value to min and max */ eImplicitNodeTypeSinh = 36, /** Calculates the hyperbolic sine */ @@ -503,9 +507,12 @@ typedef enum eLib3MFImplicitNodeType { eImplicitNodeTypeMesh = 45, /** Calculates the signed distance to a mesh */ eImplicitNodeTypeLength = 46, /** Calculates the length of a vector */ eImplicitNodeTypeConstResourceID = 47, /** Selects a resource (function, mesh etc.) */ - eImplicitNodeTypeVectorFromScalar = 48, /** Creates a vector from one scalar values */ + eImplicitNodeTypeVectorFromScalar = 48, /** Creates a vector from one scalar value */ eImplicitNodeTypeUnsignedMesh = 49, /** Calculates the unsigned distance to a mesh */ - eImplicitNodeTypeMod = 50 /** Calculates the modulo of two values (same behaviour as glsl mod) */ + eImplicitNodeTypeMod = 50, /** Calculates the modulo of two values (same behaviour as glsl mod) */ + eImplicitNodeTypeBeamLattice = 51, /** Calculates the signed distance to a beam lattice */ + eImplicitNodeTypeFunctionGradient = 52, /** Calculates the gradient of a function */ + eImplicitNodeTypeNormalizeDistance = 53 /** Normalizes a distance field */ } eLib3MFImplicitNodeType; /** diff --git a/Autogenerated/Bindings/CSharp/Lib3MF.cs b/Autogenerated/Bindings/CSharp/Lib3MF.cs index a84e9448b..a65fe077e 100644 --- a/Autogenerated/Bindings/CSharp/Lib3MF.cs +++ b/Autogenerated/Bindings/CSharp/Lib3MF.cs @@ -24,12 +24,12 @@ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha. +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. Abstract: This is an autogenerated CSharp file in order to allow an easy use of the 3MF Library -Interface version: 2.4.1 +Interface version: 2.5.0 */ @@ -39,6 +39,294 @@ use of the 3MF Library namespace Lib3MF { + /// + /// Exception class for Lib3MF errors + /// + public class ELib3MFException : Exception + { + private readonly int _errorCode; + private readonly string _errorMessage; + + /// + /// Initializes a new instance of the ELib3MFException class + /// + /// The error code + /// The error message + public ELib3MFException(int errorCode, string errorMessage = "") : base(FormatMessage(errorCode, errorMessage)) + { + _errorCode = errorCode; + _errorMessage = errorMessage; + } + + /// + /// Gets the error code + /// + public int ErrorCode => _errorCode; + + /// + /// Gets the custom error message + /// + public string ErrorMessage => _errorMessage; + + /// + /// Gets the error name (constant name) + /// + public string ErrorName + { + get + { + switch (_errorCode) + { + case 0: return "SUCCESS"; + case 1: return "NOTIMPLEMENTED"; + case 2: return "INVALIDPARAM"; + case 3: return "INVALIDCAST"; + case 4: return "BUFFERTOOSMALL"; + case 5: return "GENERICEXCEPTION"; + case 6: return "COULDNOTLOADLIBRARY"; + case 7: return "COULDNOTFINDLIBRARYEXPORT"; + case 8: return "INCOMPATIBLEBINARYVERSION"; + case 10: return "CALCULATIONABORTED"; + case 11: return "SHOULDNOTBECALLED"; + case 100: return "READERCLASSUNKNOWN"; + case 101: return "WRITERCLASSUNKNOWN"; + case 102: return "ITERATORINVALIDINDEX"; + case 103: return "INVALIDMODELRESOURCE"; + case 104: return "RESOURCENOTFOUND"; + case 105: return "INVALIDMODEL"; + case 106: return "INVALIDOBJECT"; + case 107: return "INVALIDMESHOBJECT"; + case 108: return "INVALIDCOMPONENTSOBJECT"; + case 109: return "INVALIDCOMPONENT"; + case 110: return "INVALIDBUILDITEM"; + case 111: return "INVALIDBASEMATERIALGROUP"; + case 112: return "INVALIDSLICESTACKRESOURCE"; + case 113: return "INVALIDTEXTURERESOURCE"; + case 114: return "INVALIDCOLORGROUP"; + case 115: return "INVALIDTEXTURE2DGROUP"; + case 116: return "INVALIDCOMPOSITEMATERIALS"; + case 117: return "INVALIDMULTIPROPERTYGROUP"; + case 120: return "INVALIDRESOURCEINDEX"; + case 121: return "ATTACHMENTNOTFOUND"; + case 130: return "FORBIDDENCYCLICREFERENCE"; + case 131: return "INVALIDATTACHMENTSTREAM"; + case 132: return "INVALIDPROPERTYCOUNT"; + case 140: return "UNKOWNPROGRESSIDENTIFIER"; + case 141: return "ELEMENTCOUNTEXCEEDSLIMIT"; + case 142: return "INVALIDRESOURCE"; + case 143: return "INVALIDLEVELSET"; + case 144: return "COULDNOTFINDTRIANGLESET"; + case 145: return "INVALIDTRIANGLESETINDEX"; + case 2000: return "BEAMLATTICE_INVALID_OBJECTTYPE"; + case 3000: return "INVALIDKEYSTORE"; + case 3001: return "INVALIDKEYSTORECONSUMER"; + case 3002: return "KEYSTORECONSUMERNOTFOUND"; + case 3003: return "KEYSTORERESOURCEDATANOTFOUND"; + case 3004: return "SECURECONTEXTNOTREGISTERED"; + case 3005: return "INVALIDKEYSIZE"; + case 4000: return "INCOMPATIBLEPORTTYPES"; + case 4001: return "GRAPHISCYCLIC"; + case 4002: return "INPUTNOTSET"; + case 4003: return "INVALIDNODECONFIGURATION"; + default: return "UNKNOWN"; + } + } + } + + /// + /// Gets the error description (human-readable) + /// + public string ErrorDescription + { + get + { + switch (_errorCode) + { + case 0: return "success"; + case 1: return "functionality not implemented"; + case 2: return "an invalid parameter was passed"; + case 3: return "a type cast failed"; + case 4: return "a provided buffer is too small"; + case 5: return "a generic exception occurred"; + case 6: return "the library could not be loaded"; + case 7: return "a required exported symbol could not be found in the library"; + case 8: return "the version of the binary interface does not match the bindings interface"; + case 10: return "a calculation has been aborted"; + case 11: return "functionality should not be called"; + case 100: return "the queried reader class is unknown"; + case 101: return "the queried writer class is unknown"; + case 102: return "the current index of an iterator is invalid"; + case 103: return "no Model Resource has been given"; + case 104: return "Resource not found"; + case 105: return "A model is invalid"; + case 106: return "An object is invalid"; + case 107: return "A mesh object is invalid"; + case 108: return "A components object is invalid"; + case 109: return "A component is invalid"; + case 110: return "A build item is invalid"; + case 111: return "A basematerialgroup is invalid"; + case 112: return "A slicestack resource is invalid"; + case 113: return "A texture resource is invalid"; + case 114: return "A color group resource is invalid"; + case 115: return "A texture2d group resource is invalid"; + case 116: return "A composite materials resource is invalid"; + case 117: return "A MultiPropertyGroup resource is invalid"; + case 120: return "A resource index is invalid"; + case 121: return "Attachment not found"; + case 130: return "A component references one of its ancestors"; + case 131: return "An attachment stream is invalid"; + case 132: return "Invalid property count."; + case 140: return "A progress identifier is unknown"; + case 141: return "An element buffer exceeds its spec limit"; + case 142: return "A resource is invalid"; + case 143: return "A level set is invalid"; + case 144: return "Could not find triangle set"; + case 145: return "Invalid triangle set index"; + case 2000: return "This object type is not valid for beamlattices"; + case 3000: return "The keystore object is invalid"; + case 3001: return "The consumer keystore object is invalid"; + case 3002: return "A consumer has not been found"; + case 3003: return "A resource data has not been found"; + case 3004: return "A Key or Conentent encryption callback has not been registered"; + case 3005: return "The key size is invalid"; + case 4000: return "Link could not be added, the port types are incompatible"; + case 4001: return "The functin graph is cyclic. Only dircected graphs are valid and can be topological sorted."; + case 4002: return "The input of a node is not set."; + case 4003: return "The selected node configuration is not supported"; + default: return "unknown error"; + } + } + } + + private static string FormatMessage(int errorCode, string errorMessage) + { + string errorName = GetErrorName(errorCode); + string errorDesc = GetErrorDescription(errorCode); + if (!string.IsNullOrEmpty(errorMessage)) + return $"ELib3MFException {errorName} ({errorCode}): {errorDesc} - {errorMessage}"; + else + return $"ELib3MFException {errorName} ({errorCode}): {errorDesc}"; + } + + private static string GetErrorName(int errorCode) + { + switch (errorCode) + { + case 0: return "SUCCESS"; + case 1: return "NOTIMPLEMENTED"; + case 2: return "INVALIDPARAM"; + case 3: return "INVALIDCAST"; + case 4: return "BUFFERTOOSMALL"; + case 5: return "GENERICEXCEPTION"; + case 6: return "COULDNOTLOADLIBRARY"; + case 7: return "COULDNOTFINDLIBRARYEXPORT"; + case 8: return "INCOMPATIBLEBINARYVERSION"; + case 10: return "CALCULATIONABORTED"; + case 11: return "SHOULDNOTBECALLED"; + case 100: return "READERCLASSUNKNOWN"; + case 101: return "WRITERCLASSUNKNOWN"; + case 102: return "ITERATORINVALIDINDEX"; + case 103: return "INVALIDMODELRESOURCE"; + case 104: return "RESOURCENOTFOUND"; + case 105: return "INVALIDMODEL"; + case 106: return "INVALIDOBJECT"; + case 107: return "INVALIDMESHOBJECT"; + case 108: return "INVALIDCOMPONENTSOBJECT"; + case 109: return "INVALIDCOMPONENT"; + case 110: return "INVALIDBUILDITEM"; + case 111: return "INVALIDBASEMATERIALGROUP"; + case 112: return "INVALIDSLICESTACKRESOURCE"; + case 113: return "INVALIDTEXTURERESOURCE"; + case 114: return "INVALIDCOLORGROUP"; + case 115: return "INVALIDTEXTURE2DGROUP"; + case 116: return "INVALIDCOMPOSITEMATERIALS"; + case 117: return "INVALIDMULTIPROPERTYGROUP"; + case 120: return "INVALIDRESOURCEINDEX"; + case 121: return "ATTACHMENTNOTFOUND"; + case 130: return "FORBIDDENCYCLICREFERENCE"; + case 131: return "INVALIDATTACHMENTSTREAM"; + case 132: return "INVALIDPROPERTYCOUNT"; + case 140: return "UNKOWNPROGRESSIDENTIFIER"; + case 141: return "ELEMENTCOUNTEXCEEDSLIMIT"; + case 142: return "INVALIDRESOURCE"; + case 143: return "INVALIDLEVELSET"; + case 144: return "COULDNOTFINDTRIANGLESET"; + case 145: return "INVALIDTRIANGLESETINDEX"; + case 2000: return "BEAMLATTICE_INVALID_OBJECTTYPE"; + case 3000: return "INVALIDKEYSTORE"; + case 3001: return "INVALIDKEYSTORECONSUMER"; + case 3002: return "KEYSTORECONSUMERNOTFOUND"; + case 3003: return "KEYSTORERESOURCEDATANOTFOUND"; + case 3004: return "SECURECONTEXTNOTREGISTERED"; + case 3005: return "INVALIDKEYSIZE"; + case 4000: return "INCOMPATIBLEPORTTYPES"; + case 4001: return "GRAPHISCYCLIC"; + case 4002: return "INPUTNOTSET"; + case 4003: return "INVALIDNODECONFIGURATION"; + default: return "UNKNOWN"; + } + } + + private static string GetErrorDescription(int errorCode) + { + switch (errorCode) + { + case 0: return "success"; + case 1: return "functionality not implemented"; + case 2: return "an invalid parameter was passed"; + case 3: return "a type cast failed"; + case 4: return "a provided buffer is too small"; + case 5: return "a generic exception occurred"; + case 6: return "the library could not be loaded"; + case 7: return "a required exported symbol could not be found in the library"; + case 8: return "the version of the binary interface does not match the bindings interface"; + case 10: return "a calculation has been aborted"; + case 11: return "functionality should not be called"; + case 100: return "the queried reader class is unknown"; + case 101: return "the queried writer class is unknown"; + case 102: return "the current index of an iterator is invalid"; + case 103: return "no Model Resource has been given"; + case 104: return "Resource not found"; + case 105: return "A model is invalid"; + case 106: return "An object is invalid"; + case 107: return "A mesh object is invalid"; + case 108: return "A components object is invalid"; + case 109: return "A component is invalid"; + case 110: return "A build item is invalid"; + case 111: return "A basematerialgroup is invalid"; + case 112: return "A slicestack resource is invalid"; + case 113: return "A texture resource is invalid"; + case 114: return "A color group resource is invalid"; + case 115: return "A texture2d group resource is invalid"; + case 116: return "A composite materials resource is invalid"; + case 117: return "A MultiPropertyGroup resource is invalid"; + case 120: return "A resource index is invalid"; + case 121: return "Attachment not found"; + case 130: return "A component references one of its ancestors"; + case 131: return "An attachment stream is invalid"; + case 132: return "Invalid property count."; + case 140: return "A progress identifier is unknown"; + case 141: return "An element buffer exceeds its spec limit"; + case 142: return "A resource is invalid"; + case 143: return "A level set is invalid"; + case 144: return "Could not find triangle set"; + case 145: return "Invalid triangle set index"; + case 2000: return "This object type is not valid for beamlattices"; + case 3000: return "The keystore object is invalid"; + case 3001: return "The consumer keystore object is invalid"; + case 3002: return "A consumer has not been found"; + case 3003: return "A resource data has not been found"; + case 3004: return "A Key or Conentent encryption callback has not been registered"; + case 3005: return "The key size is invalid"; + case 4000: return "Link could not be added, the port types are incompatible"; + case 4001: return "The functin graph is cyclic. Only dircected graphs are valid and can be topological sorted."; + case 4002: return "The input of a node is not set."; + case 4003: return "The selected node configuration is not supported"; + default: return "unknown error"; + } + } + } + public enum ePropertyType { NoPropertyType = 0, BaseMaterial = 1, @@ -66,7 +354,8 @@ public enum eObjectType { Other = 0, Model = 1, Support = 2, - SolidSupport = 3 + SolidSupport = 3, + Surface = 4 }; public enum eTextureType { @@ -210,7 +499,10 @@ public enum eImplicitNodeType { ConstResourceID = 47, VectorFromScalar = 48, UnsignedMesh = 49, - Mod = 50 + Mod = 50, + BeamLattice = 51, + FunctionGradient = 52, + NormalizeDistance = 53 }; public enum eImplicitPortType { @@ -1557,6 +1849,75 @@ public class Lib3MFWrapper [DllImport("lib3mf.dll", EntryPoint = "lib3mf_unsignedmeshnode_getoutputdistance", CallingConvention=CallingConvention.Cdecl)] public unsafe extern static Int32 UnsignedMeshNode_GetOutputDistance (IntPtr Handle, out IntPtr ADistance); + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_beamlatticenode_getinputbeamlattice", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 BeamLatticeNode_GetInputBeamLattice (IntPtr Handle, out IntPtr ABeamLattice); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_beamlatticenode_getinputpos", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 BeamLatticeNode_GetInputPos (IntPtr Handle, out IntPtr APos); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_beamlatticenode_getoutputdistance", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 BeamLatticeNode_GetOutputDistance (IntPtr Handle, out IntPtr ADistance); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_beamlatticenode_setaccuraterange", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 BeamLatticeNode_SetAccurateRange (IntPtr Handle, Double AAccurateRange); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_beamlatticenode_getaccuraterange", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 BeamLatticeNode_GetAccurateRange (IntPtr Handle, out Double AAccurateRange); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_functiongradientnode_getinputfunctionid", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 FunctionGradientNode_GetInputFunctionID (IntPtr Handle, out IntPtr AFunction); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_functiongradientnode_getinputpos", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 FunctionGradientNode_GetInputPos (IntPtr Handle, out IntPtr APos); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_functiongradientnode_getinputstep", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 FunctionGradientNode_GetInputStep (IntPtr Handle, out IntPtr AStep); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_functiongradientnode_setscalaroutputname", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 FunctionGradientNode_SetScalarOutputName (IntPtr Handle, byte[] AScalarOutputName); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_functiongradientnode_getscalaroutputname", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 FunctionGradientNode_GetScalarOutputName (IntPtr Handle, UInt32 sizeScalarOutputName, out UInt32 neededScalarOutputName, IntPtr dataScalarOutputName); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_functiongradientnode_setvectorinputname", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 FunctionGradientNode_SetVectorInputName (IntPtr Handle, byte[] AVectorInputName); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_functiongradientnode_getvectorinputname", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 FunctionGradientNode_GetVectorInputName (IntPtr Handle, UInt32 sizeVectorInputName, out UInt32 neededVectorInputName, IntPtr dataVectorInputName); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_functiongradientnode_getoutputvector", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 FunctionGradientNode_GetOutputVector (IntPtr Handle, out IntPtr AVector); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_functiongradientnode_getoutputgradient", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 FunctionGradientNode_GetOutputGradient (IntPtr Handle, out IntPtr AGradient); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_functiongradientnode_getoutputmagnitude", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 FunctionGradientNode_GetOutputMagnitude (IntPtr Handle, out IntPtr AMagnitude); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_normalizedistancenode_getinputfunctionid", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 NormalizeDistanceNode_GetInputFunctionID (IntPtr Handle, out IntPtr AFunction); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_normalizedistancenode_getinputpos", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 NormalizeDistanceNode_GetInputPos (IntPtr Handle, out IntPtr APos); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_normalizedistancenode_getinputstep", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 NormalizeDistanceNode_GetInputStep (IntPtr Handle, out IntPtr AStep); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_normalizedistancenode_setscalaroutputname", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 NormalizeDistanceNode_SetScalarOutputName (IntPtr Handle, byte[] AScalarOutputName); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_normalizedistancenode_getscalaroutputname", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 NormalizeDistanceNode_GetScalarOutputName (IntPtr Handle, UInt32 sizeScalarOutputName, out UInt32 neededScalarOutputName, IntPtr dataScalarOutputName); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_normalizedistancenode_setvectorinputname", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 NormalizeDistanceNode_SetVectorInputName (IntPtr Handle, byte[] AVectorInputName); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_normalizedistancenode_getvectorinputname", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 NormalizeDistanceNode_GetVectorInputName (IntPtr Handle, UInt32 sizeVectorInputName, out UInt32 neededVectorInputName, IntPtr dataVectorInputName); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_normalizedistancenode_getoutputresult", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 NormalizeDistanceNode_GetOutputResult (IntPtr Handle, out IntPtr AResult); + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_functioncallnode_getinputfunctionid", CallingConvention=CallingConvention.Cdecl)] public unsafe extern static Int32 FunctionCallNode_GetInputFunctionID (IntPtr Handle, out IntPtr AFunction); @@ -1746,6 +2107,15 @@ public class Lib3MFWrapper [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addunsignedmeshnode", CallingConvention=CallingConvention.Cdecl)] public unsafe extern static Int32 ImplicitFunction_AddUnsignedMeshNode (IntPtr Handle, byte[] AIdentifier, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addbeamlatticenode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddBeamLatticeNode (IntPtr Handle, byte[] AIdentifier, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addfunctiongradientnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddFunctionGradientNode (IntPtr Handle, byte[] AIdentifier, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addnormalizedistancenode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddNormalizeDistanceNode (IntPtr Handle, byte[] AIdentifier, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addfunctioncallnode", CallingConvention=CallingConvention.Cdecl)] public unsafe extern static Int32 ImplicitFunction_AddFunctionCallNode (IntPtr Handle, byte[] AIdentifier, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); @@ -2629,7 +2999,7 @@ public static void ThrowError(IntPtr Handle, Int32 errorCode) } } - throw new Exception(sMessage + "(# " + errorCode + ")"); + throw new ELib3MFException(errorCode, sMessage); } /** @@ -2750,6 +3120,9 @@ public static T PolymorphicFactory(IntPtr Handle) where T : class case 0xF85C90EDCE6F90A4: Object = new CConstMatNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::ConstMatNode" case 0x53601FD432E3DEF4: Object = new CMeshNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::MeshNode" case 0x29985A628251A9CD: Object = new CUnsignedMeshNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::UnsignedMeshNode" + case 0x0F3A4EE98F7FEC0C: Object = new CBeamLatticeNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::BeamLatticeNode" + case 0x0437E27AEF740121: Object = new CFunctionGradientNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionGradientNode" + case 0x817D2E566E73AA8F: Object = new CNormalizeDistanceNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::NormalizeDistanceNode" case 0x0765C17C952F24E3: Object = new CFunctionCallNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionCallNode" case 0xFC006BC888CAB4D0: Object = new CNodeIterator(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::NodeIterator" case 0x9EFB2757CA1A5231: Object = new CFunction(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::Function" @@ -6832,6 +7205,232 @@ public CImplicitPort GetOutputDistance () } + public class CBeamLatticeNode : CImplicitNode + { + public CBeamLatticeNode (IntPtr NewHandle) : base (NewHandle) + { + } + + public CImplicitPort GetInputBeamLattice () + { + IntPtr newBeamLattice = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.BeamLatticeNode_GetInputBeamLattice (Handle, out newBeamLattice)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newBeamLattice); + } + + public CImplicitPort GetInputPos () + { + IntPtr newPos = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.BeamLatticeNode_GetInputPos (Handle, out newPos)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newPos); + } + + public CImplicitPort GetOutputDistance () + { + IntPtr newDistance = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.BeamLatticeNode_GetOutputDistance (Handle, out newDistance)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newDistance); + } + + public void SetAccurateRange (Double AAccurateRange) + { + + CheckError(Internal.Lib3MFWrapper.BeamLatticeNode_SetAccurateRange (Handle, AAccurateRange)); + } + + public Double GetAccurateRange () + { + Double resultAccurateRange = 0; + + CheckError(Internal.Lib3MFWrapper.BeamLatticeNode_GetAccurateRange (Handle, out resultAccurateRange)); + return resultAccurateRange; + } + + } + + public class CFunctionGradientNode : CImplicitNode + { + public CFunctionGradientNode (IntPtr NewHandle) : base (NewHandle) + { + } + + public CImplicitPort GetInputFunctionID () + { + IntPtr newFunction = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.FunctionGradientNode_GetInputFunctionID (Handle, out newFunction)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newFunction); + } + + public CImplicitPort GetInputPos () + { + IntPtr newPos = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.FunctionGradientNode_GetInputPos (Handle, out newPos)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newPos); + } + + public CImplicitPort GetInputStep () + { + IntPtr newStep = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.FunctionGradientNode_GetInputStep (Handle, out newStep)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newStep); + } + + public void SetScalarOutputName (String AScalarOutputName) + { + byte[] byteScalarOutputName = Encoding.UTF8.GetBytes(AScalarOutputName + char.MinValue); + + CheckError(Internal.Lib3MFWrapper.FunctionGradientNode_SetScalarOutputName (Handle, byteScalarOutputName)); + } + + public String GetScalarOutputName () + { + UInt32 sizeScalarOutputName = 0; + UInt32 neededScalarOutputName = 0; + CheckError(Internal.Lib3MFWrapper.FunctionGradientNode_GetScalarOutputName (Handle, sizeScalarOutputName, out neededScalarOutputName, IntPtr.Zero)); + sizeScalarOutputName = neededScalarOutputName; + byte[] bytesScalarOutputName = new byte[sizeScalarOutputName]; + GCHandle dataScalarOutputName = GCHandle.Alloc(bytesScalarOutputName, GCHandleType.Pinned); + + CheckError(Internal.Lib3MFWrapper.FunctionGradientNode_GetScalarOutputName (Handle, sizeScalarOutputName, out neededScalarOutputName, dataScalarOutputName.AddrOfPinnedObject())); + dataScalarOutputName.Free(); + return Encoding.UTF8.GetString(bytesScalarOutputName).TrimEnd(char.MinValue); + } + + public void SetVectorInputName (String AVectorInputName) + { + byte[] byteVectorInputName = Encoding.UTF8.GetBytes(AVectorInputName + char.MinValue); + + CheckError(Internal.Lib3MFWrapper.FunctionGradientNode_SetVectorInputName (Handle, byteVectorInputName)); + } + + public String GetVectorInputName () + { + UInt32 sizeVectorInputName = 0; + UInt32 neededVectorInputName = 0; + CheckError(Internal.Lib3MFWrapper.FunctionGradientNode_GetVectorInputName (Handle, sizeVectorInputName, out neededVectorInputName, IntPtr.Zero)); + sizeVectorInputName = neededVectorInputName; + byte[] bytesVectorInputName = new byte[sizeVectorInputName]; + GCHandle dataVectorInputName = GCHandle.Alloc(bytesVectorInputName, GCHandleType.Pinned); + + CheckError(Internal.Lib3MFWrapper.FunctionGradientNode_GetVectorInputName (Handle, sizeVectorInputName, out neededVectorInputName, dataVectorInputName.AddrOfPinnedObject())); + dataVectorInputName.Free(); + return Encoding.UTF8.GetString(bytesVectorInputName).TrimEnd(char.MinValue); + } + + public CImplicitPort GetOutputVector () + { + IntPtr newVector = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.FunctionGradientNode_GetOutputVector (Handle, out newVector)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newVector); + } + + public CImplicitPort GetOutputGradient () + { + IntPtr newGradient = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.FunctionGradientNode_GetOutputGradient (Handle, out newGradient)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newGradient); + } + + public CImplicitPort GetOutputMagnitude () + { + IntPtr newMagnitude = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.FunctionGradientNode_GetOutputMagnitude (Handle, out newMagnitude)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newMagnitude); + } + + } + + public class CNormalizeDistanceNode : CImplicitNode + { + public CNormalizeDistanceNode (IntPtr NewHandle) : base (NewHandle) + { + } + + public CImplicitPort GetInputFunctionID () + { + IntPtr newFunction = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.NormalizeDistanceNode_GetInputFunctionID (Handle, out newFunction)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newFunction); + } + + public CImplicitPort GetInputPos () + { + IntPtr newPos = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.NormalizeDistanceNode_GetInputPos (Handle, out newPos)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newPos); + } + + public CImplicitPort GetInputStep () + { + IntPtr newStep = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.NormalizeDistanceNode_GetInputStep (Handle, out newStep)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newStep); + } + + public void SetScalarOutputName (String AScalarOutputName) + { + byte[] byteScalarOutputName = Encoding.UTF8.GetBytes(AScalarOutputName + char.MinValue); + + CheckError(Internal.Lib3MFWrapper.NormalizeDistanceNode_SetScalarOutputName (Handle, byteScalarOutputName)); + } + + public String GetScalarOutputName () + { + UInt32 sizeScalarOutputName = 0; + UInt32 neededScalarOutputName = 0; + CheckError(Internal.Lib3MFWrapper.NormalizeDistanceNode_GetScalarOutputName (Handle, sizeScalarOutputName, out neededScalarOutputName, IntPtr.Zero)); + sizeScalarOutputName = neededScalarOutputName; + byte[] bytesScalarOutputName = new byte[sizeScalarOutputName]; + GCHandle dataScalarOutputName = GCHandle.Alloc(bytesScalarOutputName, GCHandleType.Pinned); + + CheckError(Internal.Lib3MFWrapper.NormalizeDistanceNode_GetScalarOutputName (Handle, sizeScalarOutputName, out neededScalarOutputName, dataScalarOutputName.AddrOfPinnedObject())); + dataScalarOutputName.Free(); + return Encoding.UTF8.GetString(bytesScalarOutputName).TrimEnd(char.MinValue); + } + + public void SetVectorInputName (String AVectorInputName) + { + byte[] byteVectorInputName = Encoding.UTF8.GetBytes(AVectorInputName + char.MinValue); + + CheckError(Internal.Lib3MFWrapper.NormalizeDistanceNode_SetVectorInputName (Handle, byteVectorInputName)); + } + + public String GetVectorInputName () + { + UInt32 sizeVectorInputName = 0; + UInt32 neededVectorInputName = 0; + CheckError(Internal.Lib3MFWrapper.NormalizeDistanceNode_GetVectorInputName (Handle, sizeVectorInputName, out neededVectorInputName, IntPtr.Zero)); + sizeVectorInputName = neededVectorInputName; + byte[] bytesVectorInputName = new byte[sizeVectorInputName]; + GCHandle dataVectorInputName = GCHandle.Alloc(bytesVectorInputName, GCHandleType.Pinned); + + CheckError(Internal.Lib3MFWrapper.NormalizeDistanceNode_GetVectorInputName (Handle, sizeVectorInputName, out neededVectorInputName, dataVectorInputName.AddrOfPinnedObject())); + dataVectorInputName.Free(); + return Encoding.UTF8.GetString(bytesVectorInputName).TrimEnd(char.MinValue); + } + + public CImplicitPort GetOutputResult () + { + IntPtr newResult = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.NormalizeDistanceNode_GetOutputResult (Handle, out newResult)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newResult); + } + + } + public class CFunctionCallNode : CImplicitNode { public CFunctionCallNode (IntPtr NewHandle) : base (NewHandle) @@ -7566,6 +8165,39 @@ public CUnsignedMeshNode AddUnsignedMeshNode (String AIdentifier, String ADispla return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); } + public CBeamLatticeNode AddBeamLatticeNode (String AIdentifier, String ADisplayName, String ATag) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddBeamLatticeNode (Handle, byteIdentifier, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); + } + + public CFunctionGradientNode AddFunctionGradientNode (String AIdentifier, String ADisplayName, String ATag) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddFunctionGradientNode (Handle, byteIdentifier, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); + } + + public CNormalizeDistanceNode AddNormalizeDistanceNode (String AIdentifier, String ADisplayName, String ATag) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddNormalizeDistanceNode (Handle, byteIdentifier, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); + } + public CFunctionCallNode AddFunctionCallNode (String AIdentifier, String ADisplayName, String ATag) { byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); @@ -9141,7 +9773,7 @@ public void RemoveResource (CResource AResource) } - class Wrapper + public class Wrapper { private static void CheckError (Int32 errorCode) { diff --git a/Autogenerated/Bindings/Cpp/lib3mf_abi.hpp b/Autogenerated/Bindings/Cpp/lib3mf_abi.hpp index 30d3538d0..0742297d0 100644 --- a/Autogenerated/Bindings/Cpp/lib3mf_abi.hpp +++ b/Autogenerated/Bindings/Cpp/lib3mf_abi.hpp @@ -24,12 +24,12 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha. +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. Abstract: This is an autogenerated C++-Header file in order to allow an easy use of the 3MF Library -Interface version: 2.4.1 +Interface version: 2.5.0 */ @@ -1926,7 +1926,7 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedatacomposite_setbasematerialgroup(Lib LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedatacomposite_getmaterialmappingcount(Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 * pCount); /** -* Returns MaterialMappting with given index +* Returns MaterialMapping with given index * * @param[in] pVolumeDataComposite - VolumeDataComposite instance. * @param[in] nIndex - Index of the MaterialMapping in question. @@ -1936,7 +1936,7 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedatacomposite_getmaterialmappingcount( LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedatacomposite_getmaterialmapping(Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 nIndex, Lib3MF_MaterialMapping * pTheMaterialMapping); /** -* Adds a the MaterialMapping +* Adds a MaterialMapping * * @param[in] pVolumeDataComposite - VolumeDataComposite instance. * @param[in] pTransform - new transformation matrix @@ -2048,7 +2048,7 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_removecolor(Lib3MF_VolumeData pVo * Returns the number of VolumeDataProperty * * @param[in] pVolumeData - VolumeData instance. -* @param[out] pCount - the number of VolumeDataProperty-elements within this VolumdeData +* @param[out] pCount - the number of VolumeDataProperty-elements within this VolumeData * @return error code or 0 (success) */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_getpropertycount(Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 * pCount); @@ -2873,7 +2873,7 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_setrelationshiptype(Lib3MF_Attach LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_writetofile(Lib3MF_Attachment pAttachment, const char * pFileName); /** -* Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer methods. * * @param[in] pAttachment - Attachment instance. * @param[in] pFileName - file to read from. @@ -2882,7 +2882,7 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_writetofile(Lib3MF_Attachment pAt LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_readfromfile(Lib3MF_Attachment pAttachment, const char * pFileName); /** -* Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer methods. * * @param[in] pAttachment - Attachment instance. * @param[in] pTheReadCallback - Callback to call for reading a data chunk @@ -2914,7 +2914,7 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_getstreamsize(Lib3MF_Attachment p LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_writetobuffer(Lib3MF_Attachment pAttachment, const Lib3MF_uint64 nBufferBufferSize, Lib3MF_uint64* pBufferNeededCount, Lib3MF_uint8 * pBufferBuffer); /** -* Reads an attachment from a memory buffer. This buffer is immediatly read (in contrast to the ReadFromCallback and ReadFromFile-methods). +* Reads an attachment from a memory buffer. This buffer is immediately read (in contrast to the ReadFromCallback and ReadFromFile-methods). * * @param[in] pAttachment - Attachment instance. * @param[in] nBufferBufferSize - Number of elements in buffer @@ -4026,6 +4026,233 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_unsignedmeshnode_getinputpos(Lib3MF_Unsigned */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_unsignedmeshnode_getoutputdistance(Lib3MF_UnsignedMeshNode pUnsignedMeshNode, Lib3MF_ImplicitPort * pDistance); +/************************************************************************************************************************* + Class definition for BeamLatticeNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the model resource id of the beam lattice +* +* @param[in] pBeamLatticeNode - BeamLatticeNode instance. +* @param[out] pBeamLattice - the input port for the model resource id of the beam lattice (mesh with beamlattice extension) +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlatticenode_getinputbeamlattice(Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_ImplicitPort * pBeamLattice); + +/** +* Retrieves the input for the position +* +* @param[in] pBeamLatticeNode - BeamLatticeNode instance. +* @param[out] pPos - the input port for the position +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlatticenode_getinputpos(Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_ImplicitPort * pPos); + +/** +* Retrieves the output +* +* @param[in] pBeamLatticeNode - BeamLatticeNode instance. +* @param[out] pDistance - the output port for the signed distance to the beam lattice +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlatticenode_getoutputdistance(Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_ImplicitPort * pDistance); + +/** +* Sets the accurate range for distance computation +* +* @param[in] pBeamLatticeNode - BeamLatticeNode instance. +* @param[in] dAccurateRange - the accurate range in model units +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlatticenode_setaccuraterange(Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_double dAccurateRange); + +/** +* Retrieves the accurate range for distance computation +* +* @param[in] pBeamLatticeNode - BeamLatticeNode instance. +* @param[out] pAccurateRange - the accurate range in model units +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlatticenode_getaccuraterange(Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_double * pAccurateRange); + +/************************************************************************************************************************* + Class definition for FunctionGradientNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the function id +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pFunction - the input port for the function +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functiongradientnode_getinputfunctionid(Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pFunction); + +/** +* Retrieves the input for the position +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pPos - the input port for the position +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functiongradientnode_getinputpos(Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pPos); + +/** +* Retrieves the input for the finite difference step +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pStep - the input port for the finite difference step +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functiongradientnode_getinputstep(Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pStep); + +/** +* Sets the name of the referenced scalar output +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[in] pScalarOutputName - the name of the scalar output of the referenced function +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functiongradientnode_setscalaroutputname(Lib3MF_FunctionGradientNode pFunctionGradientNode, const char * pScalarOutputName); + +/** +* Retrieves the name of the referenced scalar output +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[in] nScalarOutputNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pScalarOutputNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pScalarOutputNameBuffer - buffer of the name of the scalar output of the referenced function, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functiongradientnode_getscalaroutputname(Lib3MF_FunctionGradientNode pFunctionGradientNode, const Lib3MF_uint32 nScalarOutputNameBufferSize, Lib3MF_uint32* pScalarOutputNameNeededChars, char * pScalarOutputNameBuffer); + +/** +* Sets the name of the referenced vector input +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[in] pVectorInputName - the name of the vector input (float3) of the referenced function +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functiongradientnode_setvectorinputname(Lib3MF_FunctionGradientNode pFunctionGradientNode, const char * pVectorInputName); + +/** +* Retrieves the name of the referenced vector input +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[in] nVectorInputNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pVectorInputNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pVectorInputNameBuffer - buffer of the name of the vector input (float3) of the referenced function, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functiongradientnode_getvectorinputname(Lib3MF_FunctionGradientNode pFunctionGradientNode, const Lib3MF_uint32 nVectorInputNameBufferSize, Lib3MF_uint32* pVectorInputNameNeededChars, char * pVectorInputNameBuffer); + +/** +* Retrieves the normalized gradient output +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pVector - the output port for the normalized gradient +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functiongradientnode_getoutputvector(Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pVector); + +/** +* Retrieves the raw gradient output +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pGradient - the output port for the raw gradient +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functiongradientnode_getoutputgradient(Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pGradient); + +/** +* Retrieves the gradient magnitude output +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pMagnitude - the output port for the gradient magnitude +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functiongradientnode_getoutputmagnitude(Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pMagnitude); + +/************************************************************************************************************************* + Class definition for NormalizeDistanceNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the function id +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[out] pFunction - the input port for the function +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_normalizedistancenode_getinputfunctionid(Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pFunction); + +/** +* Retrieves the input for the position +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[out] pPos - the input port for the position (vector) +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_normalizedistancenode_getinputpos(Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pPos); + +/** +* Retrieves the input for the finite difference step +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[out] pStep - the input port for the finite difference step +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_normalizedistancenode_getinputstep(Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pStep); + +/** +* Sets the name of the referenced scalar output +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[in] pScalarOutputName - the name of the scalar output of the referenced function +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_normalizedistancenode_setscalaroutputname(Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const char * pScalarOutputName); + +/** +* Retrieves the name of the referenced scalar output +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[in] nScalarOutputNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pScalarOutputNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pScalarOutputNameBuffer - buffer of the name of the scalar output of the referenced function, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_normalizedistancenode_getscalaroutputname(Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const Lib3MF_uint32 nScalarOutputNameBufferSize, Lib3MF_uint32* pScalarOutputNameNeededChars, char * pScalarOutputNameBuffer); + +/** +* Sets the name of the referenced vector input +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[in] pVectorInputName - the name of the vector input (float3) of the referenced function +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_normalizedistancenode_setvectorinputname(Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const char * pVectorInputName); + +/** +* Retrieves the name of the referenced vector input +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[in] nVectorInputNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pVectorInputNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pVectorInputNameBuffer - buffer of the name of the vector input (float3) of the referenced function, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_normalizedistancenode_getvectorinputname(Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const Lib3MF_uint32 nVectorInputNameBufferSize, Lib3MF_uint32* pVectorInputNameNeededChars, char * pVectorInputNameBuffer); + +/** +* Retrieves the normalized result output +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[out] pResult - the output port for the normalized distance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_normalizedistancenode_getoutputresult(Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pResult); + /************************************************************************************************************************* Class definition for FunctionCallNode **************************************************************************************************************************/ @@ -4801,6 +5028,42 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addmeshnode(Lib3MF_Implicit */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addunsignedmeshnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_UnsignedMeshNode * pNode); +/** +* Add a BeamLatticeNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addbeamlatticenode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_BeamLatticeNode * pNode); + +/** +* Add a FunctionGradientNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addfunctiongradientnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_FunctionGradientNode * pNode); + +/** +* Add a NormalizeDistanceNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addnormalizedistancenode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_NormalizeDistanceNode * pNode); + /** * Add a FunctionCallNode * diff --git a/Autogenerated/Bindings/Cpp/lib3mf_implicit.hpp b/Autogenerated/Bindings/Cpp/lib3mf_implicit.hpp index 53e9902a0..6d80c0d7d 100644 --- a/Autogenerated/Bindings/Cpp/lib3mf_implicit.hpp +++ b/Autogenerated/Bindings/Cpp/lib3mf_implicit.hpp @@ -24,12 +24,12 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha. +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. Abstract: This is an autogenerated C++-Header file in order to allow an easy use of the 3MF Library -Interface version: 2.4.1 +Interface version: 2.5.0 */ @@ -157,6 +157,9 @@ class CConstVecNode; class CConstMatNode; class CMeshNode; class CUnsignedMeshNode; +class CBeamLatticeNode; +class CFunctionGradientNode; +class CNormalizeDistanceNode; class CFunctionCallNode; class CNodeIterator; class CFunction; @@ -278,6 +281,9 @@ typedef CConstVecNode CLib3MFConstVecNode; typedef CConstMatNode CLib3MFConstMatNode; typedef CMeshNode CLib3MFMeshNode; typedef CUnsignedMeshNode CLib3MFUnsignedMeshNode; +typedef CBeamLatticeNode CLib3MFBeamLatticeNode; +typedef CFunctionGradientNode CLib3MFFunctionGradientNode; +typedef CNormalizeDistanceNode CLib3MFNormalizeDistanceNode; typedef CFunctionCallNode CLib3MFFunctionCallNode; typedef CNodeIterator CLib3MFNodeIterator; typedef CFunction CLib3MFFunction; @@ -399,6 +405,9 @@ typedef std::shared_ptr PConstVecNode; typedef std::shared_ptr PConstMatNode; typedef std::shared_ptr PMeshNode; typedef std::shared_ptr PUnsignedMeshNode; +typedef std::shared_ptr PBeamLatticeNode; +typedef std::shared_ptr PFunctionGradientNode; +typedef std::shared_ptr PNormalizeDistanceNode; typedef std::shared_ptr PFunctionCallNode; typedef std::shared_ptr PNodeIterator; typedef std::shared_ptr PFunction; @@ -520,6 +529,9 @@ typedef PConstVecNode PLib3MFConstVecNode; typedef PConstMatNode PLib3MFConstMatNode; typedef PMeshNode PLib3MFMeshNode; typedef PUnsignedMeshNode PLib3MFUnsignedMeshNode; +typedef PBeamLatticeNode PLib3MFBeamLatticeNode; +typedef PFunctionGradientNode PLib3MFFunctionGradientNode; +typedef PNormalizeDistanceNode PLib3MFNormalizeDistanceNode; typedef PFunctionCallNode PLib3MFFunctionCallNode; typedef PNodeIterator PLib3MFNodeIterator; typedef PFunction PLib3MFFunction; @@ -933,6 +945,9 @@ class CWrapper { friend class CConstMatNode; friend class CMeshNode; friend class CUnsignedMeshNode; + friend class CBeamLatticeNode; + friend class CFunctionGradientNode; + friend class CNormalizeDistanceNode; friend class CFunctionCallNode; friend class CNodeIterator; friend class CFunction; @@ -1008,6 +1023,8 @@ class CBase { friend class CWrapper; inline Lib3MF_uint64 ClassTypeId(); + +protected: }; /************************************************************************************************************************* @@ -2967,6 +2984,77 @@ class CUnsignedMeshNode : public CImplicitNode { inline PImplicitPort GetOutputDistance(); }; +/************************************************************************************************************************* + Class CBeamLatticeNode +**************************************************************************************************************************/ +class CBeamLatticeNode : public CImplicitNode { +public: + + /** + * CBeamLatticeNode::CBeamLatticeNode - Constructor for BeamLatticeNode class. + */ + CBeamLatticeNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CImplicitNode(pWrapper, pHandle) + { + } + + inline PImplicitPort GetInputBeamLattice(); + inline PImplicitPort GetInputPos(); + inline PImplicitPort GetOutputDistance(); + inline void SetAccurateRange(const Lib3MF_double dAccurateRange); + inline Lib3MF_double GetAccurateRange(); +}; + +/************************************************************************************************************************* + Class CFunctionGradientNode +**************************************************************************************************************************/ +class CFunctionGradientNode : public CImplicitNode { +public: + + /** + * CFunctionGradientNode::CFunctionGradientNode - Constructor for FunctionGradientNode class. + */ + CFunctionGradientNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CImplicitNode(pWrapper, pHandle) + { + } + + inline PImplicitPort GetInputFunctionID(); + inline PImplicitPort GetInputPos(); + inline PImplicitPort GetInputStep(); + inline void SetScalarOutputName(const std::string & sScalarOutputName); + inline std::string GetScalarOutputName(); + inline void SetVectorInputName(const std::string & sVectorInputName); + inline std::string GetVectorInputName(); + inline PImplicitPort GetOutputVector(); + inline PImplicitPort GetOutputGradient(); + inline PImplicitPort GetOutputMagnitude(); +}; + +/************************************************************************************************************************* + Class CNormalizeDistanceNode +**************************************************************************************************************************/ +class CNormalizeDistanceNode : public CImplicitNode { +public: + + /** + * CNormalizeDistanceNode::CNormalizeDistanceNode - Constructor for NormalizeDistanceNode class. + */ + CNormalizeDistanceNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CImplicitNode(pWrapper, pHandle) + { + } + + inline PImplicitPort GetInputFunctionID(); + inline PImplicitPort GetInputPos(); + inline PImplicitPort GetInputStep(); + inline void SetScalarOutputName(const std::string & sScalarOutputName); + inline std::string GetScalarOutputName(); + inline void SetVectorInputName(const std::string & sVectorInputName); + inline std::string GetVectorInputName(); + inline PImplicitPort GetOutputResult(); +}; + /************************************************************************************************************************* Class CFunctionCallNode **************************************************************************************************************************/ @@ -3092,6 +3180,9 @@ class CImplicitFunction : public CFunction { inline PConstMatNode AddConstMatNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); inline PMeshNode AddMeshNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); inline PUnsignedMeshNode AddUnsignedMeshNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PBeamLatticeNode AddBeamLatticeNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PFunctionGradientNode AddFunctionGradientNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PNormalizeDistanceNode AddNormalizeDistanceNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); inline PFunctionCallNode AddFunctionCallNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); inline PNodeIterator GetNodes(); inline void RemoveNode(classParam pNode); @@ -3566,6 +3657,9 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) case 0xF85C90EDCE6F90A4UL: return new CConstMatNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ConstMatNode" case 0x53601FD432E3DEF4UL: return new CMeshNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MeshNode" case 0x29985A628251A9CDUL: return new CUnsignedMeshNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::UnsignedMeshNode" + case 0x0F3A4EE98F7FEC0CUL: return new CBeamLatticeNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::BeamLatticeNode" + case 0x0437E27AEF740121UL: return new CFunctionGradientNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionGradientNode" + case 0x817D2E566E73AA8FUL: return new CNormalizeDistanceNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::NormalizeDistanceNode" case 0x0765C17C952F24E3UL: return new CFunctionCallNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionCallNode" case 0xFC006BC888CAB4D0UL: return new CNodeIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::NodeIterator" case 0x9EFB2757CA1A5231UL: return new CFunction(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Function" @@ -6182,7 +6276,7 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) } /** - * CVolumeDataComposite::GetMaterialMapping - Returns MaterialMappting with given index + * CVolumeDataComposite::GetMaterialMapping - Returns MaterialMapping with given index * @param[in] nIndex - Index of the MaterialMapping in question. * @return MaterialMapping used in this element */ @@ -6198,7 +6292,7 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) } /** - * CVolumeDataComposite::AddMaterialMapping - Adds a the MaterialMapping + * CVolumeDataComposite::AddMaterialMapping - Adds a MaterialMapping * @param[in] Transform - new transformation matrix * @return The new MaterialMapping */ @@ -6348,7 +6442,7 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) /** * CVolumeData::GetPropertyCount - Returns the number of VolumeDataProperty - * @return the number of VolumeDataProperty-elements within this VolumdeData + * @return the number of VolumeDataProperty-elements within this VolumeData */ Lib3MF_uint32 CVolumeData::GetPropertyCount() { @@ -7377,7 +7471,7 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) } /** - * CAttachment::ReadFromFile - Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. + * CAttachment::ReadFromFile - Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer methods. * @param[in] sFileName - file to read from. */ void CAttachment::ReadFromFile(const std::string & sFileName) @@ -7386,7 +7480,7 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) } /** - * CAttachment::ReadFromCallback - Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. + * CAttachment::ReadFromCallback - Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer methods. * @param[in] pTheReadCallback - Callback to call for reading a data chunk * @param[in] nStreamSize - number of bytes the callback returns * @param[in] pTheSeekCallback - Callback to call for seeking in the stream. @@ -7423,7 +7517,7 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) } /** - * CAttachment::ReadFromBuffer - Reads an attachment from a memory buffer. This buffer is immediatly read (in contrast to the ReadFromCallback and ReadFromFile-methods). + * CAttachment::ReadFromBuffer - Reads an attachment from a memory buffer. This buffer is immediately read (in contrast to the ReadFromCallback and ReadFromFile-methods). * @param[in] BufferBuffer - Buffer to read from */ void CAttachment::ReadFromBuffer(const CInputVector & BufferBuffer) @@ -8968,6 +9062,330 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hDistance))); } + /** + * Method definitions for class CBeamLatticeNode + */ + + /** + * CBeamLatticeNode::GetInputBeamLattice - Retrieves the input for the model resource id of the beam lattice + * @return the input port for the model resource id of the beam lattice (mesh with beamlattice extension) + */ + PImplicitPort CBeamLatticeNode::GetInputBeamLattice() + { + Lib3MFHandle hBeamLattice = (Lib3MFHandle)nullptr; + CheckError(lib3mf_beamlatticenode_getinputbeamlattice(m_pHandle, &hBeamLattice)); + + if (!hBeamLattice) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hBeamLattice))); + } + + /** + * CBeamLatticeNode::GetInputPos - Retrieves the input for the position + * @return the input port for the position + */ + PImplicitPort CBeamLatticeNode::GetInputPos() + { + Lib3MFHandle hPos = (Lib3MFHandle)nullptr; + CheckError(lib3mf_beamlatticenode_getinputpos(m_pHandle, &hPos)); + + if (!hPos) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hPos))); + } + + /** + * CBeamLatticeNode::GetOutputDistance - Retrieves the output + * @return the output port for the signed distance to the beam lattice + */ + PImplicitPort CBeamLatticeNode::GetOutputDistance() + { + Lib3MFHandle hDistance = (Lib3MFHandle)nullptr; + CheckError(lib3mf_beamlatticenode_getoutputdistance(m_pHandle, &hDistance)); + + if (!hDistance) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hDistance))); + } + + /** + * CBeamLatticeNode::SetAccurateRange - Sets the accurate range for distance computation + * @param[in] dAccurateRange - the accurate range in model units + */ + void CBeamLatticeNode::SetAccurateRange(const Lib3MF_double dAccurateRange) + { + CheckError(lib3mf_beamlatticenode_setaccuraterange(m_pHandle, dAccurateRange)); + } + + /** + * CBeamLatticeNode::GetAccurateRange - Retrieves the accurate range for distance computation + * @return the accurate range in model units + */ + Lib3MF_double CBeamLatticeNode::GetAccurateRange() + { + Lib3MF_double resultAccurateRange = 0; + CheckError(lib3mf_beamlatticenode_getaccuraterange(m_pHandle, &resultAccurateRange)); + + return resultAccurateRange; + } + + /** + * Method definitions for class CFunctionGradientNode + */ + + /** + * CFunctionGradientNode::GetInputFunctionID - Retrieves the input for the function id + * @return the input port for the function + */ + PImplicitPort CFunctionGradientNode::GetInputFunctionID() + { + Lib3MFHandle hFunction = (Lib3MFHandle)nullptr; + CheckError(lib3mf_functiongradientnode_getinputfunctionid(m_pHandle, &hFunction)); + + if (!hFunction) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hFunction))); + } + + /** + * CFunctionGradientNode::GetInputPos - Retrieves the input for the position + * @return the input port for the position + */ + PImplicitPort CFunctionGradientNode::GetInputPos() + { + Lib3MFHandle hPos = (Lib3MFHandle)nullptr; + CheckError(lib3mf_functiongradientnode_getinputpos(m_pHandle, &hPos)); + + if (!hPos) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hPos))); + } + + /** + * CFunctionGradientNode::GetInputStep - Retrieves the input for the finite difference step + * @return the input port for the finite difference step + */ + PImplicitPort CFunctionGradientNode::GetInputStep() + { + Lib3MFHandle hStep = (Lib3MFHandle)nullptr; + CheckError(lib3mf_functiongradientnode_getinputstep(m_pHandle, &hStep)); + + if (!hStep) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hStep))); + } + + /** + * CFunctionGradientNode::SetScalarOutputName - Sets the name of the referenced scalar output + * @param[in] sScalarOutputName - the name of the scalar output of the referenced function + */ + void CFunctionGradientNode::SetScalarOutputName(const std::string & sScalarOutputName) + { + CheckError(lib3mf_functiongradientnode_setscalaroutputname(m_pHandle, sScalarOutputName.c_str())); + } + + /** + * CFunctionGradientNode::GetScalarOutputName - Retrieves the name of the referenced scalar output + * @return the name of the scalar output of the referenced function + */ + std::string CFunctionGradientNode::GetScalarOutputName() + { + Lib3MF_uint32 bytesNeededScalarOutputName = 0; + Lib3MF_uint32 bytesWrittenScalarOutputName = 0; + CheckError(lib3mf_functiongradientnode_getscalaroutputname(m_pHandle, 0, &bytesNeededScalarOutputName, nullptr)); + std::vector bufferScalarOutputName(bytesNeededScalarOutputName); + CheckError(lib3mf_functiongradientnode_getscalaroutputname(m_pHandle, bytesNeededScalarOutputName, &bytesWrittenScalarOutputName, &bufferScalarOutputName[0])); + + return std::string(&bufferScalarOutputName[0]); + } + + /** + * CFunctionGradientNode::SetVectorInputName - Sets the name of the referenced vector input + * @param[in] sVectorInputName - the name of the vector input (float3) of the referenced function + */ + void CFunctionGradientNode::SetVectorInputName(const std::string & sVectorInputName) + { + CheckError(lib3mf_functiongradientnode_setvectorinputname(m_pHandle, sVectorInputName.c_str())); + } + + /** + * CFunctionGradientNode::GetVectorInputName - Retrieves the name of the referenced vector input + * @return the name of the vector input (float3) of the referenced function + */ + std::string CFunctionGradientNode::GetVectorInputName() + { + Lib3MF_uint32 bytesNeededVectorInputName = 0; + Lib3MF_uint32 bytesWrittenVectorInputName = 0; + CheckError(lib3mf_functiongradientnode_getvectorinputname(m_pHandle, 0, &bytesNeededVectorInputName, nullptr)); + std::vector bufferVectorInputName(bytesNeededVectorInputName); + CheckError(lib3mf_functiongradientnode_getvectorinputname(m_pHandle, bytesNeededVectorInputName, &bytesWrittenVectorInputName, &bufferVectorInputName[0])); + + return std::string(&bufferVectorInputName[0]); + } + + /** + * CFunctionGradientNode::GetOutputVector - Retrieves the normalized gradient output + * @return the output port for the normalized gradient + */ + PImplicitPort CFunctionGradientNode::GetOutputVector() + { + Lib3MFHandle hVector = (Lib3MFHandle)nullptr; + CheckError(lib3mf_functiongradientnode_getoutputvector(m_pHandle, &hVector)); + + if (!hVector) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hVector))); + } + + /** + * CFunctionGradientNode::GetOutputGradient - Retrieves the raw gradient output + * @return the output port for the raw gradient + */ + PImplicitPort CFunctionGradientNode::GetOutputGradient() + { + Lib3MFHandle hGradient = (Lib3MFHandle)nullptr; + CheckError(lib3mf_functiongradientnode_getoutputgradient(m_pHandle, &hGradient)); + + if (!hGradient) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hGradient))); + } + + /** + * CFunctionGradientNode::GetOutputMagnitude - Retrieves the gradient magnitude output + * @return the output port for the gradient magnitude + */ + PImplicitPort CFunctionGradientNode::GetOutputMagnitude() + { + Lib3MFHandle hMagnitude = (Lib3MFHandle)nullptr; + CheckError(lib3mf_functiongradientnode_getoutputmagnitude(m_pHandle, &hMagnitude)); + + if (!hMagnitude) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hMagnitude))); + } + + /** + * Method definitions for class CNormalizeDistanceNode + */ + + /** + * CNormalizeDistanceNode::GetInputFunctionID - Retrieves the input for the function id + * @return the input port for the function + */ + PImplicitPort CNormalizeDistanceNode::GetInputFunctionID() + { + Lib3MFHandle hFunction = (Lib3MFHandle)nullptr; + CheckError(lib3mf_normalizedistancenode_getinputfunctionid(m_pHandle, &hFunction)); + + if (!hFunction) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hFunction))); + } + + /** + * CNormalizeDistanceNode::GetInputPos - Retrieves the input for the position + * @return the input port for the position (vector) + */ + PImplicitPort CNormalizeDistanceNode::GetInputPos() + { + Lib3MFHandle hPos = (Lib3MFHandle)nullptr; + CheckError(lib3mf_normalizedistancenode_getinputpos(m_pHandle, &hPos)); + + if (!hPos) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hPos))); + } + + /** + * CNormalizeDistanceNode::GetInputStep - Retrieves the input for the finite difference step + * @return the input port for the finite difference step + */ + PImplicitPort CNormalizeDistanceNode::GetInputStep() + { + Lib3MFHandle hStep = (Lib3MFHandle)nullptr; + CheckError(lib3mf_normalizedistancenode_getinputstep(m_pHandle, &hStep)); + + if (!hStep) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hStep))); + } + + /** + * CNormalizeDistanceNode::SetScalarOutputName - Sets the name of the referenced scalar output + * @param[in] sScalarOutputName - the name of the scalar output of the referenced function + */ + void CNormalizeDistanceNode::SetScalarOutputName(const std::string & sScalarOutputName) + { + CheckError(lib3mf_normalizedistancenode_setscalaroutputname(m_pHandle, sScalarOutputName.c_str())); + } + + /** + * CNormalizeDistanceNode::GetScalarOutputName - Retrieves the name of the referenced scalar output + * @return the name of the scalar output of the referenced function + */ + std::string CNormalizeDistanceNode::GetScalarOutputName() + { + Lib3MF_uint32 bytesNeededScalarOutputName = 0; + Lib3MF_uint32 bytesWrittenScalarOutputName = 0; + CheckError(lib3mf_normalizedistancenode_getscalaroutputname(m_pHandle, 0, &bytesNeededScalarOutputName, nullptr)); + std::vector bufferScalarOutputName(bytesNeededScalarOutputName); + CheckError(lib3mf_normalizedistancenode_getscalaroutputname(m_pHandle, bytesNeededScalarOutputName, &bytesWrittenScalarOutputName, &bufferScalarOutputName[0])); + + return std::string(&bufferScalarOutputName[0]); + } + + /** + * CNormalizeDistanceNode::SetVectorInputName - Sets the name of the referenced vector input + * @param[in] sVectorInputName - the name of the vector input (float3) of the referenced function + */ + void CNormalizeDistanceNode::SetVectorInputName(const std::string & sVectorInputName) + { + CheckError(lib3mf_normalizedistancenode_setvectorinputname(m_pHandle, sVectorInputName.c_str())); + } + + /** + * CNormalizeDistanceNode::GetVectorInputName - Retrieves the name of the referenced vector input + * @return the name of the vector input (float3) of the referenced function + */ + std::string CNormalizeDistanceNode::GetVectorInputName() + { + Lib3MF_uint32 bytesNeededVectorInputName = 0; + Lib3MF_uint32 bytesWrittenVectorInputName = 0; + CheckError(lib3mf_normalizedistancenode_getvectorinputname(m_pHandle, 0, &bytesNeededVectorInputName, nullptr)); + std::vector bufferVectorInputName(bytesNeededVectorInputName); + CheckError(lib3mf_normalizedistancenode_getvectorinputname(m_pHandle, bytesNeededVectorInputName, &bytesWrittenVectorInputName, &bufferVectorInputName[0])); + + return std::string(&bufferVectorInputName[0]); + } + + /** + * CNormalizeDistanceNode::GetOutputResult - Retrieves the normalized result output + * @return the output port for the normalized distance + */ + PImplicitPort CNormalizeDistanceNode::GetOutputResult() + { + Lib3MFHandle hResult = (Lib3MFHandle)nullptr; + CheckError(lib3mf_normalizedistancenode_getoutputresult(m_pHandle, &hResult)); + + if (!hResult) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResult))); + } + /** * Method definitions for class CFunctionCallNode */ @@ -10095,6 +10513,60 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } + /** + * CImplicitFunction::AddBeamLatticeNode - Add a BeamLatticeNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + PBeamLatticeNode CImplicitFunction::AddBeamLatticeNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) + { + Lib3MFHandle hNode = (Lib3MFHandle)nullptr; + CheckError(lib3mf_implicitfunction_addbeamlatticenode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); + } + + /** + * CImplicitFunction::AddFunctionGradientNode - Add a FunctionGradientNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + PFunctionGradientNode CImplicitFunction::AddFunctionGradientNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) + { + Lib3MFHandle hNode = (Lib3MFHandle)nullptr; + CheckError(lib3mf_implicitfunction_addfunctiongradientnode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); + } + + /** + * CImplicitFunction::AddNormalizeDistanceNode - Add a NormalizeDistanceNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + PNormalizeDistanceNode CImplicitFunction::AddNormalizeDistanceNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) + { + Lib3MFHandle hNode = (Lib3MFHandle)nullptr; + CheckError(lib3mf_implicitfunction_addnormalizedistancenode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); + } + /** * CImplicitFunction::AddFunctionCallNode - Add a FunctionCallNode * @param[in] sIdentifier - the identifier of the node diff --git a/Autogenerated/Bindings/Cpp/lib3mf_types.hpp b/Autogenerated/Bindings/Cpp/lib3mf_types.hpp index 12bc83060..2ae400ad6 100644 --- a/Autogenerated/Bindings/Cpp/lib3mf_types.hpp +++ b/Autogenerated/Bindings/Cpp/lib3mf_types.hpp @@ -24,12 +24,12 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha. +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. Abstract: This is an autogenerated C++-Header file with basic types in order to allow an easy use of the 3MF Library -Interface version: 2.4.1 +Interface version: 2.5.0 */ @@ -83,8 +83,8 @@ typedef void * Lib3MF_pvoid; **************************************************************************************************************************/ #define LIB3MF_VERSION_MAJOR 2 -#define LIB3MF_VERSION_MINOR 4 -#define LIB3MF_VERSION_MICRO 1 +#define LIB3MF_VERSION_MINOR 5 +#define LIB3MF_VERSION_MICRO 0 #define LIB3MF_VERSION_PRERELEASEINFO "" #define LIB3MF_VERSION_BUILDINFO "" @@ -309,6 +309,9 @@ typedef Lib3MFHandle Lib3MF_ConstVecNode; typedef Lib3MFHandle Lib3MF_ConstMatNode; typedef Lib3MFHandle Lib3MF_MeshNode; typedef Lib3MFHandle Lib3MF_UnsignedMeshNode; +typedef Lib3MFHandle Lib3MF_BeamLatticeNode; +typedef Lib3MFHandle Lib3MF_FunctionGradientNode; +typedef Lib3MFHandle Lib3MF_NormalizeDistanceNode; typedef Lib3MFHandle Lib3MF_FunctionCallNode; typedef Lib3MFHandle Lib3MF_NodeIterator; typedef Lib3MFHandle Lib3MF_Function; @@ -359,7 +362,8 @@ namespace Lib3MF { Other = 0, Model = 1, Support = 2, - SolidSupport = 3 + SolidSupport = 3, + Surface = 4 }; enum class eTextureType : Lib3MF_int32 { @@ -473,11 +477,11 @@ namespace Lib3MF { MatVecMultiplication = 14, /** Multiplies a matrix with a vector */ Transpose = 15, /** Transposes a matrix */ Inverse = 16, /** Computes the inverse of a matrix */ - Sinus = 17, /** Calculates the sinus */ - Cosinus = 18, /** Calculates the cosinus */ + Sinus = 17, /** Calculates the sine */ + Cosinus = 18, /** Calculates the cosine */ Tan = 19, /** Calculates the tangent */ - ArcSin = 20, /** Calculates the arcsinus */ - ArcCos = 21, /** Calculates the arccosinus */ + ArcSin = 20, /** Calculates the arcsine */ + ArcCos = 21, /** Calculates the arccosine */ ArcTan = 22, /** Calculates the arctangent */ ArcTan2 = 23, /** Calculates the arctangent */ Min = 24, /** Calculates the minimum of two values */ @@ -487,9 +491,9 @@ namespace Lib3MF { Pow = 28, /** Calculates the power A^B */ Sqrt = 29, /** Calculates the square root */ Exp = 30, /** Exponential function */ - Log = 31, /** Natural logarithmus */ - Log2 = 32, /** Logarithmus to the base 2 */ - Log10 = 33, /** Logarithmus to the base 10 */ + Log = 31, /** Natural logarithm */ + Log2 = 32, /** Logarithm to the base 2 */ + Log10 = 33, /** Logarithm to the base 10 */ Select = 34, /** If A is less than B returns C, else D */ Clamp = 35, /** Clamps the input value to min and max */ Sinh = 36, /** Calculates the hyperbolic sine */ @@ -504,9 +508,12 @@ namespace Lib3MF { Mesh = 45, /** Calculates the signed distance to a mesh */ Length = 46, /** Calculates the length of a vector */ ConstResourceID = 47, /** Selects a resource (function, mesh etc.) */ - VectorFromScalar = 48, /** Creates a vector from one scalar values */ + VectorFromScalar = 48, /** Creates a vector from one scalar value */ UnsignedMesh = 49, /** Calculates the unsigned distance to a mesh */ - Mod = 50 /** Calculates the modulo of two values (same behaviour as glsl mod) */ + Mod = 50, /** Calculates the modulo of two values (same behaviour as glsl mod) */ + BeamLattice = 51, /** Calculates the signed distance to a beam lattice */ + FunctionGradient = 52, /** Calculates the gradient of a function */ + NormalizeDistance = 53 /** Normalizes a distance field */ }; /** diff --git a/Autogenerated/Bindings/CppDynamic/lib3mf_dynamic.h b/Autogenerated/Bindings/CppDynamic/lib3mf_dynamic.h index d45f87df5..cfedb8001 100644 --- a/Autogenerated/Bindings/CppDynamic/lib3mf_dynamic.h +++ b/Autogenerated/Bindings/CppDynamic/lib3mf_dynamic.h @@ -24,12 +24,12 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha. +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. Abstract: This is an autogenerated C++-Header file in order to allow an easy use of the 3MF Library -Interface version: 2.4.1 +Interface version: 2.5.0 */ @@ -1913,7 +1913,7 @@ typedef Lib3MFResult (*PLib3MFVolumeDataComposite_SetBaseMaterialGroupPtr) (Lib3 typedef Lib3MFResult (*PLib3MFVolumeDataComposite_GetMaterialMappingCountPtr) (Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 * pCount); /** -* Returns MaterialMappting with given index +* Returns MaterialMapping with given index * * @param[in] pVolumeDataComposite - VolumeDataComposite instance. * @param[in] nIndex - Index of the MaterialMapping in question. @@ -1923,7 +1923,7 @@ typedef Lib3MFResult (*PLib3MFVolumeDataComposite_GetMaterialMappingCountPtr) (L typedef Lib3MFResult (*PLib3MFVolumeDataComposite_GetMaterialMappingPtr) (Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 nIndex, Lib3MF_MaterialMapping * pTheMaterialMapping); /** -* Adds a the MaterialMapping +* Adds a MaterialMapping * * @param[in] pVolumeDataComposite - VolumeDataComposite instance. * @param[in] pTransform - new transformation matrix @@ -2035,7 +2035,7 @@ typedef Lib3MFResult (*PLib3MFVolumeData_RemoveColorPtr) (Lib3MF_VolumeData pVol * Returns the number of VolumeDataProperty * * @param[in] pVolumeData - VolumeData instance. -* @param[out] pCount - the number of VolumeDataProperty-elements within this VolumdeData +* @param[out] pCount - the number of VolumeDataProperty-elements within this VolumeData * @return error code or 0 (success) */ typedef Lib3MFResult (*PLib3MFVolumeData_GetPropertyCountPtr) (Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 * pCount); @@ -2860,7 +2860,7 @@ typedef Lib3MFResult (*PLib3MFAttachment_SetRelationShipTypePtr) (Lib3MF_Attachm typedef Lib3MFResult (*PLib3MFAttachment_WriteToFilePtr) (Lib3MF_Attachment pAttachment, const char * pFileName); /** -* Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer methods. * * @param[in] pAttachment - Attachment instance. * @param[in] pFileName - file to read from. @@ -2869,7 +2869,7 @@ typedef Lib3MFResult (*PLib3MFAttachment_WriteToFilePtr) (Lib3MF_Attachment pAtt typedef Lib3MFResult (*PLib3MFAttachment_ReadFromFilePtr) (Lib3MF_Attachment pAttachment, const char * pFileName); /** -* Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer methods. * * @param[in] pAttachment - Attachment instance. * @param[in] pTheReadCallback - Callback to call for reading a data chunk @@ -2901,7 +2901,7 @@ typedef Lib3MFResult (*PLib3MFAttachment_GetStreamSizePtr) (Lib3MF_Attachment pA typedef Lib3MFResult (*PLib3MFAttachment_WriteToBufferPtr) (Lib3MF_Attachment pAttachment, const Lib3MF_uint64 nBufferBufferSize, Lib3MF_uint64* pBufferNeededCount, Lib3MF_uint8 * pBufferBuffer); /** -* Reads an attachment from a memory buffer. This buffer is immediatly read (in contrast to the ReadFromCallback and ReadFromFile-methods). +* Reads an attachment from a memory buffer. This buffer is immediately read (in contrast to the ReadFromCallback and ReadFromFile-methods). * * @param[in] pAttachment - Attachment instance. * @param[in] nBufferBufferSize - Number of elements in buffer @@ -4013,6 +4013,233 @@ typedef Lib3MFResult (*PLib3MFUnsignedMeshNode_GetInputPosPtr) (Lib3MF_UnsignedM */ typedef Lib3MFResult (*PLib3MFUnsignedMeshNode_GetOutputDistancePtr) (Lib3MF_UnsignedMeshNode pUnsignedMeshNode, Lib3MF_ImplicitPort * pDistance); +/************************************************************************************************************************* + Class definition for BeamLatticeNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the model resource id of the beam lattice +* +* @param[in] pBeamLatticeNode - BeamLatticeNode instance. +* @param[out] pBeamLattice - the input port for the model resource id of the beam lattice (mesh with beamlattice extension) +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamLatticeNode_GetInputBeamLatticePtr) (Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_ImplicitPort * pBeamLattice); + +/** +* Retrieves the input for the position +* +* @param[in] pBeamLatticeNode - BeamLatticeNode instance. +* @param[out] pPos - the input port for the position +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamLatticeNode_GetInputPosPtr) (Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_ImplicitPort * pPos); + +/** +* Retrieves the output +* +* @param[in] pBeamLatticeNode - BeamLatticeNode instance. +* @param[out] pDistance - the output port for the signed distance to the beam lattice +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamLatticeNode_GetOutputDistancePtr) (Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_ImplicitPort * pDistance); + +/** +* Sets the accurate range for distance computation +* +* @param[in] pBeamLatticeNode - BeamLatticeNode instance. +* @param[in] dAccurateRange - the accurate range in model units +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamLatticeNode_SetAccurateRangePtr) (Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_double dAccurateRange); + +/** +* Retrieves the accurate range for distance computation +* +* @param[in] pBeamLatticeNode - BeamLatticeNode instance. +* @param[out] pAccurateRange - the accurate range in model units +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamLatticeNode_GetAccurateRangePtr) (Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_double * pAccurateRange); + +/************************************************************************************************************************* + Class definition for FunctionGradientNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the function id +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pFunction - the input port for the function +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_GetInputFunctionIDPtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pFunction); + +/** +* Retrieves the input for the position +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pPos - the input port for the position +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_GetInputPosPtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pPos); + +/** +* Retrieves the input for the finite difference step +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pStep - the input port for the finite difference step +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_GetInputStepPtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pStep); + +/** +* Sets the name of the referenced scalar output +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[in] pScalarOutputName - the name of the scalar output of the referenced function +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_SetScalarOutputNamePtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, const char * pScalarOutputName); + +/** +* Retrieves the name of the referenced scalar output +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[in] nScalarOutputNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pScalarOutputNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pScalarOutputNameBuffer - buffer of the name of the scalar output of the referenced function, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_GetScalarOutputNamePtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, const Lib3MF_uint32 nScalarOutputNameBufferSize, Lib3MF_uint32* pScalarOutputNameNeededChars, char * pScalarOutputNameBuffer); + +/** +* Sets the name of the referenced vector input +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[in] pVectorInputName - the name of the vector input (float3) of the referenced function +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_SetVectorInputNamePtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, const char * pVectorInputName); + +/** +* Retrieves the name of the referenced vector input +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[in] nVectorInputNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pVectorInputNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pVectorInputNameBuffer - buffer of the name of the vector input (float3) of the referenced function, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_GetVectorInputNamePtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, const Lib3MF_uint32 nVectorInputNameBufferSize, Lib3MF_uint32* pVectorInputNameNeededChars, char * pVectorInputNameBuffer); + +/** +* Retrieves the normalized gradient output +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pVector - the output port for the normalized gradient +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_GetOutputVectorPtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pVector); + +/** +* Retrieves the raw gradient output +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pGradient - the output port for the raw gradient +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_GetOutputGradientPtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pGradient); + +/** +* Retrieves the gradient magnitude output +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pMagnitude - the output port for the gradient magnitude +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_GetOutputMagnitudePtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pMagnitude); + +/************************************************************************************************************************* + Class definition for NormalizeDistanceNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the function id +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[out] pFunction - the input port for the function +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFNormalizeDistanceNode_GetInputFunctionIDPtr) (Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pFunction); + +/** +* Retrieves the input for the position +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[out] pPos - the input port for the position (vector) +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFNormalizeDistanceNode_GetInputPosPtr) (Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pPos); + +/** +* Retrieves the input for the finite difference step +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[out] pStep - the input port for the finite difference step +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFNormalizeDistanceNode_GetInputStepPtr) (Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pStep); + +/** +* Sets the name of the referenced scalar output +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[in] pScalarOutputName - the name of the scalar output of the referenced function +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFNormalizeDistanceNode_SetScalarOutputNamePtr) (Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const char * pScalarOutputName); + +/** +* Retrieves the name of the referenced scalar output +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[in] nScalarOutputNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pScalarOutputNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pScalarOutputNameBuffer - buffer of the name of the scalar output of the referenced function, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFNormalizeDistanceNode_GetScalarOutputNamePtr) (Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const Lib3MF_uint32 nScalarOutputNameBufferSize, Lib3MF_uint32* pScalarOutputNameNeededChars, char * pScalarOutputNameBuffer); + +/** +* Sets the name of the referenced vector input +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[in] pVectorInputName - the name of the vector input (float3) of the referenced function +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFNormalizeDistanceNode_SetVectorInputNamePtr) (Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const char * pVectorInputName); + +/** +* Retrieves the name of the referenced vector input +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[in] nVectorInputNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pVectorInputNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pVectorInputNameBuffer - buffer of the name of the vector input (float3) of the referenced function, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFNormalizeDistanceNode_GetVectorInputNamePtr) (Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const Lib3MF_uint32 nVectorInputNameBufferSize, Lib3MF_uint32* pVectorInputNameNeededChars, char * pVectorInputNameBuffer); + +/** +* Retrieves the normalized result output +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[out] pResult - the output port for the normalized distance +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFNormalizeDistanceNode_GetOutputResultPtr) (Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pResult); + /************************************************************************************************************************* Class definition for FunctionCallNode **************************************************************************************************************************/ @@ -4788,6 +5015,42 @@ typedef Lib3MFResult (*PLib3MFImplicitFunction_AddMeshNodePtr) (Lib3MF_ImplicitF */ typedef Lib3MFResult (*PLib3MFImplicitFunction_AddUnsignedMeshNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_UnsignedMeshNode * pNode); +/** +* Add a BeamLatticeNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddBeamLatticeNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_BeamLatticeNode * pNode); + +/** +* Add a FunctionGradientNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddFunctionGradientNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_FunctionGradientNode * pNode); + +/** +* Add a NormalizeDistanceNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddNormalizeDistanceNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_NormalizeDistanceNode * pNode); + /** * Add a FunctionCallNode * @@ -6997,6 +7260,29 @@ typedef struct { PLib3MFUnsignedMeshNode_GetInputMeshPtr m_UnsignedMeshNode_GetInputMesh; PLib3MFUnsignedMeshNode_GetInputPosPtr m_UnsignedMeshNode_GetInputPos; PLib3MFUnsignedMeshNode_GetOutputDistancePtr m_UnsignedMeshNode_GetOutputDistance; + PLib3MFBeamLatticeNode_GetInputBeamLatticePtr m_BeamLatticeNode_GetInputBeamLattice; + PLib3MFBeamLatticeNode_GetInputPosPtr m_BeamLatticeNode_GetInputPos; + PLib3MFBeamLatticeNode_GetOutputDistancePtr m_BeamLatticeNode_GetOutputDistance; + PLib3MFBeamLatticeNode_SetAccurateRangePtr m_BeamLatticeNode_SetAccurateRange; + PLib3MFBeamLatticeNode_GetAccurateRangePtr m_BeamLatticeNode_GetAccurateRange; + PLib3MFFunctionGradientNode_GetInputFunctionIDPtr m_FunctionGradientNode_GetInputFunctionID; + PLib3MFFunctionGradientNode_GetInputPosPtr m_FunctionGradientNode_GetInputPos; + PLib3MFFunctionGradientNode_GetInputStepPtr m_FunctionGradientNode_GetInputStep; + PLib3MFFunctionGradientNode_SetScalarOutputNamePtr m_FunctionGradientNode_SetScalarOutputName; + PLib3MFFunctionGradientNode_GetScalarOutputNamePtr m_FunctionGradientNode_GetScalarOutputName; + PLib3MFFunctionGradientNode_SetVectorInputNamePtr m_FunctionGradientNode_SetVectorInputName; + PLib3MFFunctionGradientNode_GetVectorInputNamePtr m_FunctionGradientNode_GetVectorInputName; + PLib3MFFunctionGradientNode_GetOutputVectorPtr m_FunctionGradientNode_GetOutputVector; + PLib3MFFunctionGradientNode_GetOutputGradientPtr m_FunctionGradientNode_GetOutputGradient; + PLib3MFFunctionGradientNode_GetOutputMagnitudePtr m_FunctionGradientNode_GetOutputMagnitude; + PLib3MFNormalizeDistanceNode_GetInputFunctionIDPtr m_NormalizeDistanceNode_GetInputFunctionID; + PLib3MFNormalizeDistanceNode_GetInputPosPtr m_NormalizeDistanceNode_GetInputPos; + PLib3MFNormalizeDistanceNode_GetInputStepPtr m_NormalizeDistanceNode_GetInputStep; + PLib3MFNormalizeDistanceNode_SetScalarOutputNamePtr m_NormalizeDistanceNode_SetScalarOutputName; + PLib3MFNormalizeDistanceNode_GetScalarOutputNamePtr m_NormalizeDistanceNode_GetScalarOutputName; + PLib3MFNormalizeDistanceNode_SetVectorInputNamePtr m_NormalizeDistanceNode_SetVectorInputName; + PLib3MFNormalizeDistanceNode_GetVectorInputNamePtr m_NormalizeDistanceNode_GetVectorInputName; + PLib3MFNormalizeDistanceNode_GetOutputResultPtr m_NormalizeDistanceNode_GetOutputResult; PLib3MFFunctionCallNode_GetInputFunctionIDPtr m_FunctionCallNode_GetInputFunctionID; PLib3MFNodeIterator_GetCurrentPtr m_NodeIterator_GetCurrent; PLib3MFFunction_GetDisplayNamePtr m_Function_GetDisplayName; @@ -7060,6 +7346,9 @@ typedef struct { PLib3MFImplicitFunction_AddConstMatNodePtr m_ImplicitFunction_AddConstMatNode; PLib3MFImplicitFunction_AddMeshNodePtr m_ImplicitFunction_AddMeshNode; PLib3MFImplicitFunction_AddUnsignedMeshNodePtr m_ImplicitFunction_AddUnsignedMeshNode; + PLib3MFImplicitFunction_AddBeamLatticeNodePtr m_ImplicitFunction_AddBeamLatticeNode; + PLib3MFImplicitFunction_AddFunctionGradientNodePtr m_ImplicitFunction_AddFunctionGradientNode; + PLib3MFImplicitFunction_AddNormalizeDistanceNodePtr m_ImplicitFunction_AddNormalizeDistanceNode; PLib3MFImplicitFunction_AddFunctionCallNodePtr m_ImplicitFunction_AddFunctionCallNode; PLib3MFImplicitFunction_GetNodesPtr m_ImplicitFunction_GetNodes; PLib3MFImplicitFunction_RemoveNodePtr m_ImplicitFunction_RemoveNode; diff --git a/Autogenerated/Bindings/CppDynamic/lib3mf_dynamic.hpp b/Autogenerated/Bindings/CppDynamic/lib3mf_dynamic.hpp index d4db147a6..2c014804d 100644 --- a/Autogenerated/Bindings/CppDynamic/lib3mf_dynamic.hpp +++ b/Autogenerated/Bindings/CppDynamic/lib3mf_dynamic.hpp @@ -24,12 +24,12 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha. +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. Abstract: This is an autogenerated C++-Header file in order to allow an easy use of the 3MF Library -Interface version: 2.4.1 +Interface version: 2.5.0 */ @@ -157,6 +157,9 @@ class CConstVecNode; class CConstMatNode; class CMeshNode; class CUnsignedMeshNode; +class CBeamLatticeNode; +class CFunctionGradientNode; +class CNormalizeDistanceNode; class CFunctionCallNode; class CNodeIterator; class CFunction; @@ -278,6 +281,9 @@ typedef CConstVecNode CLib3MFConstVecNode; typedef CConstMatNode CLib3MFConstMatNode; typedef CMeshNode CLib3MFMeshNode; typedef CUnsignedMeshNode CLib3MFUnsignedMeshNode; +typedef CBeamLatticeNode CLib3MFBeamLatticeNode; +typedef CFunctionGradientNode CLib3MFFunctionGradientNode; +typedef CNormalizeDistanceNode CLib3MFNormalizeDistanceNode; typedef CFunctionCallNode CLib3MFFunctionCallNode; typedef CNodeIterator CLib3MFNodeIterator; typedef CFunction CLib3MFFunction; @@ -399,6 +405,9 @@ typedef std::shared_ptr PConstVecNode; typedef std::shared_ptr PConstMatNode; typedef std::shared_ptr PMeshNode; typedef std::shared_ptr PUnsignedMeshNode; +typedef std::shared_ptr PBeamLatticeNode; +typedef std::shared_ptr PFunctionGradientNode; +typedef std::shared_ptr PNormalizeDistanceNode; typedef std::shared_ptr PFunctionCallNode; typedef std::shared_ptr PNodeIterator; typedef std::shared_ptr PFunction; @@ -520,6 +529,9 @@ typedef PConstVecNode PLib3MFConstVecNode; typedef PConstMatNode PLib3MFConstMatNode; typedef PMeshNode PLib3MFMeshNode; typedef PUnsignedMeshNode PLib3MFUnsignedMeshNode; +typedef PBeamLatticeNode PLib3MFBeamLatticeNode; +typedef PFunctionGradientNode PLib3MFFunctionGradientNode; +typedef PNormalizeDistanceNode PLib3MFNormalizeDistanceNode; typedef PFunctionCallNode PLib3MFFunctionCallNode; typedef PNodeIterator PLib3MFNodeIterator; typedef PFunction PLib3MFFunction; @@ -957,6 +969,9 @@ class CWrapper { friend class CConstMatNode; friend class CMeshNode; friend class CUnsignedMeshNode; + friend class CBeamLatticeNode; + friend class CFunctionGradientNode; + friend class CNormalizeDistanceNode; friend class CFunctionCallNode; friend class CNodeIterator; friend class CFunction; @@ -1032,6 +1047,8 @@ class CBase { friend class CWrapper; inline Lib3MF_uint64 ClassTypeId(); + +protected: }; /************************************************************************************************************************* @@ -2991,6 +3008,77 @@ class CUnsignedMeshNode : public CImplicitNode { inline PImplicitPort GetOutputDistance(); }; +/************************************************************************************************************************* + Class CBeamLatticeNode +**************************************************************************************************************************/ +class CBeamLatticeNode : public CImplicitNode { +public: + + /** + * CBeamLatticeNode::CBeamLatticeNode - Constructor for BeamLatticeNode class. + */ + CBeamLatticeNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CImplicitNode(pWrapper, pHandle) + { + } + + inline PImplicitPort GetInputBeamLattice(); + inline PImplicitPort GetInputPos(); + inline PImplicitPort GetOutputDistance(); + inline void SetAccurateRange(const Lib3MF_double dAccurateRange); + inline Lib3MF_double GetAccurateRange(); +}; + +/************************************************************************************************************************* + Class CFunctionGradientNode +**************************************************************************************************************************/ +class CFunctionGradientNode : public CImplicitNode { +public: + + /** + * CFunctionGradientNode::CFunctionGradientNode - Constructor for FunctionGradientNode class. + */ + CFunctionGradientNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CImplicitNode(pWrapper, pHandle) + { + } + + inline PImplicitPort GetInputFunctionID(); + inline PImplicitPort GetInputPos(); + inline PImplicitPort GetInputStep(); + inline void SetScalarOutputName(const std::string & sScalarOutputName); + inline std::string GetScalarOutputName(); + inline void SetVectorInputName(const std::string & sVectorInputName); + inline std::string GetVectorInputName(); + inline PImplicitPort GetOutputVector(); + inline PImplicitPort GetOutputGradient(); + inline PImplicitPort GetOutputMagnitude(); +}; + +/************************************************************************************************************************* + Class CNormalizeDistanceNode +**************************************************************************************************************************/ +class CNormalizeDistanceNode : public CImplicitNode { +public: + + /** + * CNormalizeDistanceNode::CNormalizeDistanceNode - Constructor for NormalizeDistanceNode class. + */ + CNormalizeDistanceNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CImplicitNode(pWrapper, pHandle) + { + } + + inline PImplicitPort GetInputFunctionID(); + inline PImplicitPort GetInputPos(); + inline PImplicitPort GetInputStep(); + inline void SetScalarOutputName(const std::string & sScalarOutputName); + inline std::string GetScalarOutputName(); + inline void SetVectorInputName(const std::string & sVectorInputName); + inline std::string GetVectorInputName(); + inline PImplicitPort GetOutputResult(); +}; + /************************************************************************************************************************* Class CFunctionCallNode **************************************************************************************************************************/ @@ -3116,6 +3204,9 @@ class CImplicitFunction : public CFunction { inline PConstMatNode AddConstMatNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); inline PMeshNode AddMeshNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); inline PUnsignedMeshNode AddUnsignedMeshNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PBeamLatticeNode AddBeamLatticeNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PFunctionGradientNode AddFunctionGradientNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PNormalizeDistanceNode AddNormalizeDistanceNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); inline PFunctionCallNode AddFunctionCallNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); inline PNodeIterator GetNodes(); inline void RemoveNode(classParam pNode); @@ -3590,6 +3681,9 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) case 0xF85C90EDCE6F90A4UL: return new CConstMatNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ConstMatNode" case 0x53601FD432E3DEF4UL: return new CMeshNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MeshNode" case 0x29985A628251A9CDUL: return new CUnsignedMeshNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::UnsignedMeshNode" + case 0x0F3A4EE98F7FEC0CUL: return new CBeamLatticeNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::BeamLatticeNode" + case 0x0437E27AEF740121UL: return new CFunctionGradientNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionGradientNode" + case 0x817D2E566E73AA8FUL: return new CNormalizeDistanceNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::NormalizeDistanceNode" case 0x0765C17C952F24E3UL: return new CFunctionCallNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionCallNode" case 0xFC006BC888CAB4D0UL: return new CNodeIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::NodeIterator" case 0x9EFB2757CA1A5231UL: return new CFunction(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Function" @@ -4266,6 +4360,29 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) pWrapperTable->m_UnsignedMeshNode_GetInputMesh = nullptr; pWrapperTable->m_UnsignedMeshNode_GetInputPos = nullptr; pWrapperTable->m_UnsignedMeshNode_GetOutputDistance = nullptr; + pWrapperTable->m_BeamLatticeNode_GetInputBeamLattice = nullptr; + pWrapperTable->m_BeamLatticeNode_GetInputPos = nullptr; + pWrapperTable->m_BeamLatticeNode_GetOutputDistance = nullptr; + pWrapperTable->m_BeamLatticeNode_SetAccurateRange = nullptr; + pWrapperTable->m_BeamLatticeNode_GetAccurateRange = nullptr; + pWrapperTable->m_FunctionGradientNode_GetInputFunctionID = nullptr; + pWrapperTable->m_FunctionGradientNode_GetInputPos = nullptr; + pWrapperTable->m_FunctionGradientNode_GetInputStep = nullptr; + pWrapperTable->m_FunctionGradientNode_SetScalarOutputName = nullptr; + pWrapperTable->m_FunctionGradientNode_GetScalarOutputName = nullptr; + pWrapperTable->m_FunctionGradientNode_SetVectorInputName = nullptr; + pWrapperTable->m_FunctionGradientNode_GetVectorInputName = nullptr; + pWrapperTable->m_FunctionGradientNode_GetOutputVector = nullptr; + pWrapperTable->m_FunctionGradientNode_GetOutputGradient = nullptr; + pWrapperTable->m_FunctionGradientNode_GetOutputMagnitude = nullptr; + pWrapperTable->m_NormalizeDistanceNode_GetInputFunctionID = nullptr; + pWrapperTable->m_NormalizeDistanceNode_GetInputPos = nullptr; + pWrapperTable->m_NormalizeDistanceNode_GetInputStep = nullptr; + pWrapperTable->m_NormalizeDistanceNode_SetScalarOutputName = nullptr; + pWrapperTable->m_NormalizeDistanceNode_GetScalarOutputName = nullptr; + pWrapperTable->m_NormalizeDistanceNode_SetVectorInputName = nullptr; + pWrapperTable->m_NormalizeDistanceNode_GetVectorInputName = nullptr; + pWrapperTable->m_NormalizeDistanceNode_GetOutputResult = nullptr; pWrapperTable->m_FunctionCallNode_GetInputFunctionID = nullptr; pWrapperTable->m_NodeIterator_GetCurrent = nullptr; pWrapperTable->m_Function_GetDisplayName = nullptr; @@ -4329,6 +4446,9 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) pWrapperTable->m_ImplicitFunction_AddConstMatNode = nullptr; pWrapperTable->m_ImplicitFunction_AddMeshNode = nullptr; pWrapperTable->m_ImplicitFunction_AddUnsignedMeshNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddBeamLatticeNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddFunctionGradientNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddNormalizeDistanceNode = nullptr; pWrapperTable->m_ImplicitFunction_AddFunctionCallNode = nullptr; pWrapperTable->m_ImplicitFunction_GetNodes = nullptr; pWrapperTable->m_ImplicitFunction_RemoveNode = nullptr; @@ -7928,6 +8048,213 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) if (pWrapperTable->m_UnsignedMeshNode_GetOutputDistance == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_BeamLatticeNode_GetInputBeamLattice = (PLib3MFBeamLatticeNode_GetInputBeamLatticePtr) GetProcAddress(hLibrary, "lib3mf_beamlatticenode_getinputbeamlattice"); + #else // _WIN32 + pWrapperTable->m_BeamLatticeNode_GetInputBeamLattice = (PLib3MFBeamLatticeNode_GetInputBeamLatticePtr) dlsym(hLibrary, "lib3mf_beamlatticenode_getinputbeamlattice"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLatticeNode_GetInputBeamLattice == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLatticeNode_GetInputPos = (PLib3MFBeamLatticeNode_GetInputPosPtr) GetProcAddress(hLibrary, "lib3mf_beamlatticenode_getinputpos"); + #else // _WIN32 + pWrapperTable->m_BeamLatticeNode_GetInputPos = (PLib3MFBeamLatticeNode_GetInputPosPtr) dlsym(hLibrary, "lib3mf_beamlatticenode_getinputpos"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLatticeNode_GetInputPos == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLatticeNode_GetOutputDistance = (PLib3MFBeamLatticeNode_GetOutputDistancePtr) GetProcAddress(hLibrary, "lib3mf_beamlatticenode_getoutputdistance"); + #else // _WIN32 + pWrapperTable->m_BeamLatticeNode_GetOutputDistance = (PLib3MFBeamLatticeNode_GetOutputDistancePtr) dlsym(hLibrary, "lib3mf_beamlatticenode_getoutputdistance"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLatticeNode_GetOutputDistance == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLatticeNode_SetAccurateRange = (PLib3MFBeamLatticeNode_SetAccurateRangePtr) GetProcAddress(hLibrary, "lib3mf_beamlatticenode_setaccuraterange"); + #else // _WIN32 + pWrapperTable->m_BeamLatticeNode_SetAccurateRange = (PLib3MFBeamLatticeNode_SetAccurateRangePtr) dlsym(hLibrary, "lib3mf_beamlatticenode_setaccuraterange"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLatticeNode_SetAccurateRange == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLatticeNode_GetAccurateRange = (PLib3MFBeamLatticeNode_GetAccurateRangePtr) GetProcAddress(hLibrary, "lib3mf_beamlatticenode_getaccuraterange"); + #else // _WIN32 + pWrapperTable->m_BeamLatticeNode_GetAccurateRange = (PLib3MFBeamLatticeNode_GetAccurateRangePtr) dlsym(hLibrary, "lib3mf_beamlatticenode_getaccuraterange"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLatticeNode_GetAccurateRange == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_GetInputFunctionID = (PLib3MFFunctionGradientNode_GetInputFunctionIDPtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_getinputfunctionid"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_GetInputFunctionID = (PLib3MFFunctionGradientNode_GetInputFunctionIDPtr) dlsym(hLibrary, "lib3mf_functiongradientnode_getinputfunctionid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_GetInputFunctionID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_GetInputPos = (PLib3MFFunctionGradientNode_GetInputPosPtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_getinputpos"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_GetInputPos = (PLib3MFFunctionGradientNode_GetInputPosPtr) dlsym(hLibrary, "lib3mf_functiongradientnode_getinputpos"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_GetInputPos == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_GetInputStep = (PLib3MFFunctionGradientNode_GetInputStepPtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_getinputstep"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_GetInputStep = (PLib3MFFunctionGradientNode_GetInputStepPtr) dlsym(hLibrary, "lib3mf_functiongradientnode_getinputstep"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_GetInputStep == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_SetScalarOutputName = (PLib3MFFunctionGradientNode_SetScalarOutputNamePtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_setscalaroutputname"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_SetScalarOutputName = (PLib3MFFunctionGradientNode_SetScalarOutputNamePtr) dlsym(hLibrary, "lib3mf_functiongradientnode_setscalaroutputname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_SetScalarOutputName == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_GetScalarOutputName = (PLib3MFFunctionGradientNode_GetScalarOutputNamePtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_getscalaroutputname"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_GetScalarOutputName = (PLib3MFFunctionGradientNode_GetScalarOutputNamePtr) dlsym(hLibrary, "lib3mf_functiongradientnode_getscalaroutputname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_GetScalarOutputName == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_SetVectorInputName = (PLib3MFFunctionGradientNode_SetVectorInputNamePtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_setvectorinputname"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_SetVectorInputName = (PLib3MFFunctionGradientNode_SetVectorInputNamePtr) dlsym(hLibrary, "lib3mf_functiongradientnode_setvectorinputname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_SetVectorInputName == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_GetVectorInputName = (PLib3MFFunctionGradientNode_GetVectorInputNamePtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_getvectorinputname"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_GetVectorInputName = (PLib3MFFunctionGradientNode_GetVectorInputNamePtr) dlsym(hLibrary, "lib3mf_functiongradientnode_getvectorinputname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_GetVectorInputName == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_GetOutputVector = (PLib3MFFunctionGradientNode_GetOutputVectorPtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_getoutputvector"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_GetOutputVector = (PLib3MFFunctionGradientNode_GetOutputVectorPtr) dlsym(hLibrary, "lib3mf_functiongradientnode_getoutputvector"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_GetOutputVector == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_GetOutputGradient = (PLib3MFFunctionGradientNode_GetOutputGradientPtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_getoutputgradient"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_GetOutputGradient = (PLib3MFFunctionGradientNode_GetOutputGradientPtr) dlsym(hLibrary, "lib3mf_functiongradientnode_getoutputgradient"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_GetOutputGradient == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_GetOutputMagnitude = (PLib3MFFunctionGradientNode_GetOutputMagnitudePtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_getoutputmagnitude"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_GetOutputMagnitude = (PLib3MFFunctionGradientNode_GetOutputMagnitudePtr) dlsym(hLibrary, "lib3mf_functiongradientnode_getoutputmagnitude"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_GetOutputMagnitude == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetInputFunctionID = (PLib3MFNormalizeDistanceNode_GetInputFunctionIDPtr) GetProcAddress(hLibrary, "lib3mf_normalizedistancenode_getinputfunctionid"); + #else // _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetInputFunctionID = (PLib3MFNormalizeDistanceNode_GetInputFunctionIDPtr) dlsym(hLibrary, "lib3mf_normalizedistancenode_getinputfunctionid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_NormalizeDistanceNode_GetInputFunctionID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetInputPos = (PLib3MFNormalizeDistanceNode_GetInputPosPtr) GetProcAddress(hLibrary, "lib3mf_normalizedistancenode_getinputpos"); + #else // _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetInputPos = (PLib3MFNormalizeDistanceNode_GetInputPosPtr) dlsym(hLibrary, "lib3mf_normalizedistancenode_getinputpos"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_NormalizeDistanceNode_GetInputPos == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetInputStep = (PLib3MFNormalizeDistanceNode_GetInputStepPtr) GetProcAddress(hLibrary, "lib3mf_normalizedistancenode_getinputstep"); + #else // _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetInputStep = (PLib3MFNormalizeDistanceNode_GetInputStepPtr) dlsym(hLibrary, "lib3mf_normalizedistancenode_getinputstep"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_NormalizeDistanceNode_GetInputStep == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_NormalizeDistanceNode_SetScalarOutputName = (PLib3MFNormalizeDistanceNode_SetScalarOutputNamePtr) GetProcAddress(hLibrary, "lib3mf_normalizedistancenode_setscalaroutputname"); + #else // _WIN32 + pWrapperTable->m_NormalizeDistanceNode_SetScalarOutputName = (PLib3MFNormalizeDistanceNode_SetScalarOutputNamePtr) dlsym(hLibrary, "lib3mf_normalizedistancenode_setscalaroutputname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_NormalizeDistanceNode_SetScalarOutputName == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetScalarOutputName = (PLib3MFNormalizeDistanceNode_GetScalarOutputNamePtr) GetProcAddress(hLibrary, "lib3mf_normalizedistancenode_getscalaroutputname"); + #else // _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetScalarOutputName = (PLib3MFNormalizeDistanceNode_GetScalarOutputNamePtr) dlsym(hLibrary, "lib3mf_normalizedistancenode_getscalaroutputname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_NormalizeDistanceNode_GetScalarOutputName == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_NormalizeDistanceNode_SetVectorInputName = (PLib3MFNormalizeDistanceNode_SetVectorInputNamePtr) GetProcAddress(hLibrary, "lib3mf_normalizedistancenode_setvectorinputname"); + #else // _WIN32 + pWrapperTable->m_NormalizeDistanceNode_SetVectorInputName = (PLib3MFNormalizeDistanceNode_SetVectorInputNamePtr) dlsym(hLibrary, "lib3mf_normalizedistancenode_setvectorinputname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_NormalizeDistanceNode_SetVectorInputName == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetVectorInputName = (PLib3MFNormalizeDistanceNode_GetVectorInputNamePtr) GetProcAddress(hLibrary, "lib3mf_normalizedistancenode_getvectorinputname"); + #else // _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetVectorInputName = (PLib3MFNormalizeDistanceNode_GetVectorInputNamePtr) dlsym(hLibrary, "lib3mf_normalizedistancenode_getvectorinputname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_NormalizeDistanceNode_GetVectorInputName == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetOutputResult = (PLib3MFNormalizeDistanceNode_GetOutputResultPtr) GetProcAddress(hLibrary, "lib3mf_normalizedistancenode_getoutputresult"); + #else // _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetOutputResult = (PLib3MFNormalizeDistanceNode_GetOutputResultPtr) dlsym(hLibrary, "lib3mf_normalizedistancenode_getoutputresult"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_NormalizeDistanceNode_GetOutputResult == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_FunctionCallNode_GetInputFunctionID = (PLib3MFFunctionCallNode_GetInputFunctionIDPtr) GetProcAddress(hLibrary, "lib3mf_functioncallnode_getinputfunctionid"); #else // _WIN32 @@ -8495,6 +8822,33 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) if (pWrapperTable->m_ImplicitFunction_AddUnsignedMeshNode == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddBeamLatticeNode = (PLib3MFImplicitFunction_AddBeamLatticeNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addbeamlatticenode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddBeamLatticeNode = (PLib3MFImplicitFunction_AddBeamLatticeNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addbeamlatticenode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddBeamLatticeNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddFunctionGradientNode = (PLib3MFImplicitFunction_AddFunctionGradientNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addfunctiongradientnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddFunctionGradientNode = (PLib3MFImplicitFunction_AddFunctionGradientNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addfunctiongradientnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddFunctionGradientNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddNormalizeDistanceNode = (PLib3MFImplicitFunction_AddNormalizeDistanceNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addnormalizedistancenode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddNormalizeDistanceNode = (PLib3MFImplicitFunction_AddNormalizeDistanceNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addnormalizedistancenode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddNormalizeDistanceNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_ImplicitFunction_AddFunctionCallNode = (PLib3MFImplicitFunction_AddFunctionCallNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addfunctioncallnode"); #else // _WIN32 @@ -11654,6 +12008,98 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) if ( (eLookupError != 0) || (pWrapperTable->m_UnsignedMeshNode_GetOutputDistance == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + eLookupError = (*pLookup)("lib3mf_beamlatticenode_getinputbeamlattice", (void**)&(pWrapperTable->m_BeamLatticeNode_GetInputBeamLattice)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamLatticeNode_GetInputBeamLattice == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_beamlatticenode_getinputpos", (void**)&(pWrapperTable->m_BeamLatticeNode_GetInputPos)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamLatticeNode_GetInputPos == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_beamlatticenode_getoutputdistance", (void**)&(pWrapperTable->m_BeamLatticeNode_GetOutputDistance)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamLatticeNode_GetOutputDistance == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_beamlatticenode_setaccuraterange", (void**)&(pWrapperTable->m_BeamLatticeNode_SetAccurateRange)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamLatticeNode_SetAccurateRange == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_beamlatticenode_getaccuraterange", (void**)&(pWrapperTable->m_BeamLatticeNode_GetAccurateRange)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamLatticeNode_GetAccurateRange == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_functiongradientnode_getinputfunctionid", (void**)&(pWrapperTable->m_FunctionGradientNode_GetInputFunctionID)); + if ( (eLookupError != 0) || (pWrapperTable->m_FunctionGradientNode_GetInputFunctionID == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_functiongradientnode_getinputpos", (void**)&(pWrapperTable->m_FunctionGradientNode_GetInputPos)); + if ( (eLookupError != 0) || (pWrapperTable->m_FunctionGradientNode_GetInputPos == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_functiongradientnode_getinputstep", (void**)&(pWrapperTable->m_FunctionGradientNode_GetInputStep)); + if ( (eLookupError != 0) || (pWrapperTable->m_FunctionGradientNode_GetInputStep == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_functiongradientnode_setscalaroutputname", (void**)&(pWrapperTable->m_FunctionGradientNode_SetScalarOutputName)); + if ( (eLookupError != 0) || (pWrapperTable->m_FunctionGradientNode_SetScalarOutputName == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_functiongradientnode_getscalaroutputname", (void**)&(pWrapperTable->m_FunctionGradientNode_GetScalarOutputName)); + if ( (eLookupError != 0) || (pWrapperTable->m_FunctionGradientNode_GetScalarOutputName == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_functiongradientnode_setvectorinputname", (void**)&(pWrapperTable->m_FunctionGradientNode_SetVectorInputName)); + if ( (eLookupError != 0) || (pWrapperTable->m_FunctionGradientNode_SetVectorInputName == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_functiongradientnode_getvectorinputname", (void**)&(pWrapperTable->m_FunctionGradientNode_GetVectorInputName)); + if ( (eLookupError != 0) || (pWrapperTable->m_FunctionGradientNode_GetVectorInputName == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_functiongradientnode_getoutputvector", (void**)&(pWrapperTable->m_FunctionGradientNode_GetOutputVector)); + if ( (eLookupError != 0) || (pWrapperTable->m_FunctionGradientNode_GetOutputVector == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_functiongradientnode_getoutputgradient", (void**)&(pWrapperTable->m_FunctionGradientNode_GetOutputGradient)); + if ( (eLookupError != 0) || (pWrapperTable->m_FunctionGradientNode_GetOutputGradient == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_functiongradientnode_getoutputmagnitude", (void**)&(pWrapperTable->m_FunctionGradientNode_GetOutputMagnitude)); + if ( (eLookupError != 0) || (pWrapperTable->m_FunctionGradientNode_GetOutputMagnitude == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_normalizedistancenode_getinputfunctionid", (void**)&(pWrapperTable->m_NormalizeDistanceNode_GetInputFunctionID)); + if ( (eLookupError != 0) || (pWrapperTable->m_NormalizeDistanceNode_GetInputFunctionID == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_normalizedistancenode_getinputpos", (void**)&(pWrapperTable->m_NormalizeDistanceNode_GetInputPos)); + if ( (eLookupError != 0) || (pWrapperTable->m_NormalizeDistanceNode_GetInputPos == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_normalizedistancenode_getinputstep", (void**)&(pWrapperTable->m_NormalizeDistanceNode_GetInputStep)); + if ( (eLookupError != 0) || (pWrapperTable->m_NormalizeDistanceNode_GetInputStep == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_normalizedistancenode_setscalaroutputname", (void**)&(pWrapperTable->m_NormalizeDistanceNode_SetScalarOutputName)); + if ( (eLookupError != 0) || (pWrapperTable->m_NormalizeDistanceNode_SetScalarOutputName == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_normalizedistancenode_getscalaroutputname", (void**)&(pWrapperTable->m_NormalizeDistanceNode_GetScalarOutputName)); + if ( (eLookupError != 0) || (pWrapperTable->m_NormalizeDistanceNode_GetScalarOutputName == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_normalizedistancenode_setvectorinputname", (void**)&(pWrapperTable->m_NormalizeDistanceNode_SetVectorInputName)); + if ( (eLookupError != 0) || (pWrapperTable->m_NormalizeDistanceNode_SetVectorInputName == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_normalizedistancenode_getvectorinputname", (void**)&(pWrapperTable->m_NormalizeDistanceNode_GetVectorInputName)); + if ( (eLookupError != 0) || (pWrapperTable->m_NormalizeDistanceNode_GetVectorInputName == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_normalizedistancenode_getoutputresult", (void**)&(pWrapperTable->m_NormalizeDistanceNode_GetOutputResult)); + if ( (eLookupError != 0) || (pWrapperTable->m_NormalizeDistanceNode_GetOutputResult == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + eLookupError = (*pLookup)("lib3mf_functioncallnode_getinputfunctionid", (void**)&(pWrapperTable->m_FunctionCallNode_GetInputFunctionID)); if ( (eLookupError != 0) || (pWrapperTable->m_FunctionCallNode_GetInputFunctionID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; @@ -11906,6 +12352,18 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddUnsignedMeshNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + eLookupError = (*pLookup)("lib3mf_implicitfunction_addbeamlatticenode", (void**)&(pWrapperTable->m_ImplicitFunction_AddBeamLatticeNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddBeamLatticeNode == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_implicitfunction_addfunctiongradientnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddFunctionGradientNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddFunctionGradientNode == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_implicitfunction_addnormalizedistancenode", (void**)&(pWrapperTable->m_ImplicitFunction_AddNormalizeDistanceNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddNormalizeDistanceNode == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + eLookupError = (*pLookup)("lib3mf_implicitfunction_addfunctioncallnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddFunctionCallNode)); if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddFunctionCallNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; @@ -14961,7 +15419,7 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) } /** - * CVolumeDataComposite::GetMaterialMapping - Returns MaterialMappting with given index + * CVolumeDataComposite::GetMaterialMapping - Returns MaterialMapping with given index * @param[in] nIndex - Index of the MaterialMapping in question. * @return MaterialMapping used in this element */ @@ -14977,7 +15435,7 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) } /** - * CVolumeDataComposite::AddMaterialMapping - Adds a the MaterialMapping + * CVolumeDataComposite::AddMaterialMapping - Adds a MaterialMapping * @param[in] Transform - new transformation matrix * @return The new MaterialMapping */ @@ -15127,7 +15585,7 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) /** * CVolumeData::GetPropertyCount - Returns the number of VolumeDataProperty - * @return the number of VolumeDataProperty-elements within this VolumdeData + * @return the number of VolumeDataProperty-elements within this VolumeData */ Lib3MF_uint32 CVolumeData::GetPropertyCount() { @@ -16156,7 +16614,7 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) } /** - * CAttachment::ReadFromFile - Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. + * CAttachment::ReadFromFile - Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer methods. * @param[in] sFileName - file to read from. */ void CAttachment::ReadFromFile(const std::string & sFileName) @@ -16165,7 +16623,7 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) } /** - * CAttachment::ReadFromCallback - Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. + * CAttachment::ReadFromCallback - Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer methods. * @param[in] pTheReadCallback - Callback to call for reading a data chunk * @param[in] nStreamSize - number of bytes the callback returns * @param[in] pTheSeekCallback - Callback to call for seeking in the stream. @@ -16202,7 +16660,7 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) } /** - * CAttachment::ReadFromBuffer - Reads an attachment from a memory buffer. This buffer is immediatly read (in contrast to the ReadFromCallback and ReadFromFile-methods). + * CAttachment::ReadFromBuffer - Reads an attachment from a memory buffer. This buffer is immediately read (in contrast to the ReadFromCallback and ReadFromFile-methods). * @param[in] BufferBuffer - Buffer to read from */ void CAttachment::ReadFromBuffer(const CInputVector & BufferBuffer) @@ -17747,6 +18205,330 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hDistance))); } + /** + * Method definitions for class CBeamLatticeNode + */ + + /** + * CBeamLatticeNode::GetInputBeamLattice - Retrieves the input for the model resource id of the beam lattice + * @return the input port for the model resource id of the beam lattice (mesh with beamlattice extension) + */ + PImplicitPort CBeamLatticeNode::GetInputBeamLattice() + { + Lib3MFHandle hBeamLattice = (Lib3MFHandle)nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_BeamLatticeNode_GetInputBeamLattice(m_pHandle, &hBeamLattice)); + + if (!hBeamLattice) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hBeamLattice))); + } + + /** + * CBeamLatticeNode::GetInputPos - Retrieves the input for the position + * @return the input port for the position + */ + PImplicitPort CBeamLatticeNode::GetInputPos() + { + Lib3MFHandle hPos = (Lib3MFHandle)nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_BeamLatticeNode_GetInputPos(m_pHandle, &hPos)); + + if (!hPos) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hPos))); + } + + /** + * CBeamLatticeNode::GetOutputDistance - Retrieves the output + * @return the output port for the signed distance to the beam lattice + */ + PImplicitPort CBeamLatticeNode::GetOutputDistance() + { + Lib3MFHandle hDistance = (Lib3MFHandle)nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_BeamLatticeNode_GetOutputDistance(m_pHandle, &hDistance)); + + if (!hDistance) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hDistance))); + } + + /** + * CBeamLatticeNode::SetAccurateRange - Sets the accurate range for distance computation + * @param[in] dAccurateRange - the accurate range in model units + */ + void CBeamLatticeNode::SetAccurateRange(const Lib3MF_double dAccurateRange) + { + CheckError(m_pWrapper->m_WrapperTable.m_BeamLatticeNode_SetAccurateRange(m_pHandle, dAccurateRange)); + } + + /** + * CBeamLatticeNode::GetAccurateRange - Retrieves the accurate range for distance computation + * @return the accurate range in model units + */ + Lib3MF_double CBeamLatticeNode::GetAccurateRange() + { + Lib3MF_double resultAccurateRange = 0; + CheckError(m_pWrapper->m_WrapperTable.m_BeamLatticeNode_GetAccurateRange(m_pHandle, &resultAccurateRange)); + + return resultAccurateRange; + } + + /** + * Method definitions for class CFunctionGradientNode + */ + + /** + * CFunctionGradientNode::GetInputFunctionID - Retrieves the input for the function id + * @return the input port for the function + */ + PImplicitPort CFunctionGradientNode::GetInputFunctionID() + { + Lib3MFHandle hFunction = (Lib3MFHandle)nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_FunctionGradientNode_GetInputFunctionID(m_pHandle, &hFunction)); + + if (!hFunction) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hFunction))); + } + + /** + * CFunctionGradientNode::GetInputPos - Retrieves the input for the position + * @return the input port for the position + */ + PImplicitPort CFunctionGradientNode::GetInputPos() + { + Lib3MFHandle hPos = (Lib3MFHandle)nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_FunctionGradientNode_GetInputPos(m_pHandle, &hPos)); + + if (!hPos) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hPos))); + } + + /** + * CFunctionGradientNode::GetInputStep - Retrieves the input for the finite difference step + * @return the input port for the finite difference step + */ + PImplicitPort CFunctionGradientNode::GetInputStep() + { + Lib3MFHandle hStep = (Lib3MFHandle)nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_FunctionGradientNode_GetInputStep(m_pHandle, &hStep)); + + if (!hStep) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hStep))); + } + + /** + * CFunctionGradientNode::SetScalarOutputName - Sets the name of the referenced scalar output + * @param[in] sScalarOutputName - the name of the scalar output of the referenced function + */ + void CFunctionGradientNode::SetScalarOutputName(const std::string & sScalarOutputName) + { + CheckError(m_pWrapper->m_WrapperTable.m_FunctionGradientNode_SetScalarOutputName(m_pHandle, sScalarOutputName.c_str())); + } + + /** + * CFunctionGradientNode::GetScalarOutputName - Retrieves the name of the referenced scalar output + * @return the name of the scalar output of the referenced function + */ + std::string CFunctionGradientNode::GetScalarOutputName() + { + Lib3MF_uint32 bytesNeededScalarOutputName = 0; + Lib3MF_uint32 bytesWrittenScalarOutputName = 0; + CheckError(m_pWrapper->m_WrapperTable.m_FunctionGradientNode_GetScalarOutputName(m_pHandle, 0, &bytesNeededScalarOutputName, nullptr)); + std::vector bufferScalarOutputName(bytesNeededScalarOutputName); + CheckError(m_pWrapper->m_WrapperTable.m_FunctionGradientNode_GetScalarOutputName(m_pHandle, bytesNeededScalarOutputName, &bytesWrittenScalarOutputName, &bufferScalarOutputName[0])); + + return std::string(&bufferScalarOutputName[0]); + } + + /** + * CFunctionGradientNode::SetVectorInputName - Sets the name of the referenced vector input + * @param[in] sVectorInputName - the name of the vector input (float3) of the referenced function + */ + void CFunctionGradientNode::SetVectorInputName(const std::string & sVectorInputName) + { + CheckError(m_pWrapper->m_WrapperTable.m_FunctionGradientNode_SetVectorInputName(m_pHandle, sVectorInputName.c_str())); + } + + /** + * CFunctionGradientNode::GetVectorInputName - Retrieves the name of the referenced vector input + * @return the name of the vector input (float3) of the referenced function + */ + std::string CFunctionGradientNode::GetVectorInputName() + { + Lib3MF_uint32 bytesNeededVectorInputName = 0; + Lib3MF_uint32 bytesWrittenVectorInputName = 0; + CheckError(m_pWrapper->m_WrapperTable.m_FunctionGradientNode_GetVectorInputName(m_pHandle, 0, &bytesNeededVectorInputName, nullptr)); + std::vector bufferVectorInputName(bytesNeededVectorInputName); + CheckError(m_pWrapper->m_WrapperTable.m_FunctionGradientNode_GetVectorInputName(m_pHandle, bytesNeededVectorInputName, &bytesWrittenVectorInputName, &bufferVectorInputName[0])); + + return std::string(&bufferVectorInputName[0]); + } + + /** + * CFunctionGradientNode::GetOutputVector - Retrieves the normalized gradient output + * @return the output port for the normalized gradient + */ + PImplicitPort CFunctionGradientNode::GetOutputVector() + { + Lib3MFHandle hVector = (Lib3MFHandle)nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_FunctionGradientNode_GetOutputVector(m_pHandle, &hVector)); + + if (!hVector) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hVector))); + } + + /** + * CFunctionGradientNode::GetOutputGradient - Retrieves the raw gradient output + * @return the output port for the raw gradient + */ + PImplicitPort CFunctionGradientNode::GetOutputGradient() + { + Lib3MFHandle hGradient = (Lib3MFHandle)nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_FunctionGradientNode_GetOutputGradient(m_pHandle, &hGradient)); + + if (!hGradient) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hGradient))); + } + + /** + * CFunctionGradientNode::GetOutputMagnitude - Retrieves the gradient magnitude output + * @return the output port for the gradient magnitude + */ + PImplicitPort CFunctionGradientNode::GetOutputMagnitude() + { + Lib3MFHandle hMagnitude = (Lib3MFHandle)nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_FunctionGradientNode_GetOutputMagnitude(m_pHandle, &hMagnitude)); + + if (!hMagnitude) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hMagnitude))); + } + + /** + * Method definitions for class CNormalizeDistanceNode + */ + + /** + * CNormalizeDistanceNode::GetInputFunctionID - Retrieves the input for the function id + * @return the input port for the function + */ + PImplicitPort CNormalizeDistanceNode::GetInputFunctionID() + { + Lib3MFHandle hFunction = (Lib3MFHandle)nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_NormalizeDistanceNode_GetInputFunctionID(m_pHandle, &hFunction)); + + if (!hFunction) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hFunction))); + } + + /** + * CNormalizeDistanceNode::GetInputPos - Retrieves the input for the position + * @return the input port for the position (vector) + */ + PImplicitPort CNormalizeDistanceNode::GetInputPos() + { + Lib3MFHandle hPos = (Lib3MFHandle)nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_NormalizeDistanceNode_GetInputPos(m_pHandle, &hPos)); + + if (!hPos) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hPos))); + } + + /** + * CNormalizeDistanceNode::GetInputStep - Retrieves the input for the finite difference step + * @return the input port for the finite difference step + */ + PImplicitPort CNormalizeDistanceNode::GetInputStep() + { + Lib3MFHandle hStep = (Lib3MFHandle)nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_NormalizeDistanceNode_GetInputStep(m_pHandle, &hStep)); + + if (!hStep) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hStep))); + } + + /** + * CNormalizeDistanceNode::SetScalarOutputName - Sets the name of the referenced scalar output + * @param[in] sScalarOutputName - the name of the scalar output of the referenced function + */ + void CNormalizeDistanceNode::SetScalarOutputName(const std::string & sScalarOutputName) + { + CheckError(m_pWrapper->m_WrapperTable.m_NormalizeDistanceNode_SetScalarOutputName(m_pHandle, sScalarOutputName.c_str())); + } + + /** + * CNormalizeDistanceNode::GetScalarOutputName - Retrieves the name of the referenced scalar output + * @return the name of the scalar output of the referenced function + */ + std::string CNormalizeDistanceNode::GetScalarOutputName() + { + Lib3MF_uint32 bytesNeededScalarOutputName = 0; + Lib3MF_uint32 bytesWrittenScalarOutputName = 0; + CheckError(m_pWrapper->m_WrapperTable.m_NormalizeDistanceNode_GetScalarOutputName(m_pHandle, 0, &bytesNeededScalarOutputName, nullptr)); + std::vector bufferScalarOutputName(bytesNeededScalarOutputName); + CheckError(m_pWrapper->m_WrapperTable.m_NormalizeDistanceNode_GetScalarOutputName(m_pHandle, bytesNeededScalarOutputName, &bytesWrittenScalarOutputName, &bufferScalarOutputName[0])); + + return std::string(&bufferScalarOutputName[0]); + } + + /** + * CNormalizeDistanceNode::SetVectorInputName - Sets the name of the referenced vector input + * @param[in] sVectorInputName - the name of the vector input (float3) of the referenced function + */ + void CNormalizeDistanceNode::SetVectorInputName(const std::string & sVectorInputName) + { + CheckError(m_pWrapper->m_WrapperTable.m_NormalizeDistanceNode_SetVectorInputName(m_pHandle, sVectorInputName.c_str())); + } + + /** + * CNormalizeDistanceNode::GetVectorInputName - Retrieves the name of the referenced vector input + * @return the name of the vector input (float3) of the referenced function + */ + std::string CNormalizeDistanceNode::GetVectorInputName() + { + Lib3MF_uint32 bytesNeededVectorInputName = 0; + Lib3MF_uint32 bytesWrittenVectorInputName = 0; + CheckError(m_pWrapper->m_WrapperTable.m_NormalizeDistanceNode_GetVectorInputName(m_pHandle, 0, &bytesNeededVectorInputName, nullptr)); + std::vector bufferVectorInputName(bytesNeededVectorInputName); + CheckError(m_pWrapper->m_WrapperTable.m_NormalizeDistanceNode_GetVectorInputName(m_pHandle, bytesNeededVectorInputName, &bytesWrittenVectorInputName, &bufferVectorInputName[0])); + + return std::string(&bufferVectorInputName[0]); + } + + /** + * CNormalizeDistanceNode::GetOutputResult - Retrieves the normalized result output + * @return the output port for the normalized distance + */ + PImplicitPort CNormalizeDistanceNode::GetOutputResult() + { + Lib3MFHandle hResult = (Lib3MFHandle)nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_NormalizeDistanceNode_GetOutputResult(m_pHandle, &hResult)); + + if (!hResult) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResult))); + } + /** * Method definitions for class CFunctionCallNode */ @@ -18874,6 +19656,60 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } + /** + * CImplicitFunction::AddBeamLatticeNode - Add a BeamLatticeNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + PBeamLatticeNode CImplicitFunction::AddBeamLatticeNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) + { + Lib3MFHandle hNode = (Lib3MFHandle)nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddBeamLatticeNode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); + } + + /** + * CImplicitFunction::AddFunctionGradientNode - Add a FunctionGradientNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + PFunctionGradientNode CImplicitFunction::AddFunctionGradientNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) + { + Lib3MFHandle hNode = (Lib3MFHandle)nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddFunctionGradientNode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); + } + + /** + * CImplicitFunction::AddNormalizeDistanceNode - Add a NormalizeDistanceNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + PNormalizeDistanceNode CImplicitFunction::AddNormalizeDistanceNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) + { + Lib3MFHandle hNode = (Lib3MFHandle)nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddNormalizeDistanceNode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); + } + /** * CImplicitFunction::AddFunctionCallNode - Add a FunctionCallNode * @param[in] sIdentifier - the identifier of the node diff --git a/Autogenerated/Bindings/CppDynamic/lib3mf_types.hpp b/Autogenerated/Bindings/CppDynamic/lib3mf_types.hpp index 12bc83060..2ae400ad6 100644 --- a/Autogenerated/Bindings/CppDynamic/lib3mf_types.hpp +++ b/Autogenerated/Bindings/CppDynamic/lib3mf_types.hpp @@ -24,12 +24,12 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha. +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. Abstract: This is an autogenerated C++-Header file with basic types in order to allow an easy use of the 3MF Library -Interface version: 2.4.1 +Interface version: 2.5.0 */ @@ -83,8 +83,8 @@ typedef void * Lib3MF_pvoid; **************************************************************************************************************************/ #define LIB3MF_VERSION_MAJOR 2 -#define LIB3MF_VERSION_MINOR 4 -#define LIB3MF_VERSION_MICRO 1 +#define LIB3MF_VERSION_MINOR 5 +#define LIB3MF_VERSION_MICRO 0 #define LIB3MF_VERSION_PRERELEASEINFO "" #define LIB3MF_VERSION_BUILDINFO "" @@ -309,6 +309,9 @@ typedef Lib3MFHandle Lib3MF_ConstVecNode; typedef Lib3MFHandle Lib3MF_ConstMatNode; typedef Lib3MFHandle Lib3MF_MeshNode; typedef Lib3MFHandle Lib3MF_UnsignedMeshNode; +typedef Lib3MFHandle Lib3MF_BeamLatticeNode; +typedef Lib3MFHandle Lib3MF_FunctionGradientNode; +typedef Lib3MFHandle Lib3MF_NormalizeDistanceNode; typedef Lib3MFHandle Lib3MF_FunctionCallNode; typedef Lib3MFHandle Lib3MF_NodeIterator; typedef Lib3MFHandle Lib3MF_Function; @@ -359,7 +362,8 @@ namespace Lib3MF { Other = 0, Model = 1, Support = 2, - SolidSupport = 3 + SolidSupport = 3, + Surface = 4 }; enum class eTextureType : Lib3MF_int32 { @@ -473,11 +477,11 @@ namespace Lib3MF { MatVecMultiplication = 14, /** Multiplies a matrix with a vector */ Transpose = 15, /** Transposes a matrix */ Inverse = 16, /** Computes the inverse of a matrix */ - Sinus = 17, /** Calculates the sinus */ - Cosinus = 18, /** Calculates the cosinus */ + Sinus = 17, /** Calculates the sine */ + Cosinus = 18, /** Calculates the cosine */ Tan = 19, /** Calculates the tangent */ - ArcSin = 20, /** Calculates the arcsinus */ - ArcCos = 21, /** Calculates the arccosinus */ + ArcSin = 20, /** Calculates the arcsine */ + ArcCos = 21, /** Calculates the arccosine */ ArcTan = 22, /** Calculates the arctangent */ ArcTan2 = 23, /** Calculates the arctangent */ Min = 24, /** Calculates the minimum of two values */ @@ -487,9 +491,9 @@ namespace Lib3MF { Pow = 28, /** Calculates the power A^B */ Sqrt = 29, /** Calculates the square root */ Exp = 30, /** Exponential function */ - Log = 31, /** Natural logarithmus */ - Log2 = 32, /** Logarithmus to the base 2 */ - Log10 = 33, /** Logarithmus to the base 10 */ + Log = 31, /** Natural logarithm */ + Log2 = 32, /** Logarithm to the base 2 */ + Log10 = 33, /** Logarithm to the base 10 */ Select = 34, /** If A is less than B returns C, else D */ Clamp = 35, /** Clamps the input value to min and max */ Sinh = 36, /** Calculates the hyperbolic sine */ @@ -504,9 +508,12 @@ namespace Lib3MF { Mesh = 45, /** Calculates the signed distance to a mesh */ Length = 46, /** Calculates the length of a vector */ ConstResourceID = 47, /** Selects a resource (function, mesh etc.) */ - VectorFromScalar = 48, /** Creates a vector from one scalar values */ + VectorFromScalar = 48, /** Creates a vector from one scalar value */ UnsignedMesh = 49, /** Calculates the unsigned distance to a mesh */ - Mod = 50 /** Calculates the modulo of two values (same behaviour as glsl mod) */ + Mod = 50, /** Calculates the modulo of two values (same behaviour as glsl mod) */ + BeamLattice = 51, /** Calculates the signed distance to a beam lattice */ + FunctionGradient = 52, /** Calculates the gradient of a function */ + NormalizeDistance = 53 /** Normalizes a distance field */ }; /** diff --git a/Autogenerated/Bindings/Go/cfunc.go b/Autogenerated/Bindings/Go/cfunc.go index 880f2c084..6bbe16a03 100644 --- a/Autogenerated/Bindings/Go/cfunc.go +++ b/Autogenerated/Bindings/Go/cfunc.go @@ -24,12 +24,12 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha. +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. Abstract: This is an autogenerated Go wrapper file in order to allow an easy use of the 3MF Library. -Interface version: 2.4.1 +Interface version: 2.5.0 */ diff --git a/Autogenerated/Bindings/Go/lib3mf.go b/Autogenerated/Bindings/Go/lib3mf.go index 8b4faff90..c77e568ad 100644 --- a/Autogenerated/Bindings/Go/lib3mf.go +++ b/Autogenerated/Bindings/Go/lib3mf.go @@ -24,12 +24,12 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha. +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. Abstract: This is an autogenerated Go wrapper file in order to allow an easy use of the 3MF Library. -Interface version: 2.4.1 +Interface version: 2.5.0 */ @@ -93,6 +93,7 @@ const ( ObjectType_Model = 1 ObjectType_Support = 2 ObjectType_SolidSupport = 3 + ObjectType_Surface = 4 ) // TextureType represents a Lib3MF enum. @@ -273,6 +274,9 @@ const ( ImplicitNodeType_VectorFromScalar = 48 ImplicitNodeType_UnsignedMesh = 49 ImplicitNodeType_Mod = 50 + ImplicitNodeType_BeamLattice = 51 + ImplicitNodeType_FunctionGradient = 52 + ImplicitNodeType_NormalizeDistance = 53 ) // ImplicitPortType represents a Lib3MF enum. @@ -2960,7 +2964,7 @@ func (inst VolumeDataComposite) GetMaterialMappingCount() (uint32, error) { return uint32(count), nil } -// GetMaterialMapping returns MaterialMappting with given index. +// GetMaterialMapping returns MaterialMapping with given index. func (inst VolumeDataComposite) GetMaterialMapping(index uint32) (MaterialMapping, error) { var theMaterialMapping ref ret := C.CCall_lib3mf_volumedatacomposite_getmaterialmapping(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), &theMaterialMapping) @@ -2970,7 +2974,7 @@ func (inst VolumeDataComposite) GetMaterialMapping(index uint32) (MaterialMappin return inst.wrapperRef.NewMaterialMapping(theMaterialMapping), nil } -// AddMaterialMapping adds a the MaterialMapping. +// AddMaterialMapping adds a MaterialMapping. func (inst VolumeDataComposite) AddMaterialMapping(transform Transform) (MaterialMapping, error) { var theMaterialMapping ref ret := C.CCall_lib3mf_volumedatacomposite_addmaterialmapping(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.sLib3MFTransform)(unsafe.Pointer(&transform)), &theMaterialMapping) @@ -4102,7 +4106,7 @@ func (inst Attachment) WriteToFile(fileName string) error { return nil } -// ReadFromFile reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +// ReadFromFile reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer methods. func (inst Attachment) ReadFromFile(fileName string) error { ret := C.CCall_lib3mf_attachment_readfromfile(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(fileName)[0]))) if ret != 0 { @@ -4111,7 +4115,7 @@ func (inst Attachment) ReadFromFile(fileName string) error { return nil } -// ReadFromCallback reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +// ReadFromCallback reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer methods. func (inst Attachment) ReadFromCallback(theReadCallback ReadCallbackFunc, streamSize uint64, theSeekCallback SeekCallbackFunc, userData uintptr) error { ret := C.CCall_lib3mf_attachment_readfromcallback(inst.wrapperRef.LibraryHandle, inst.Ref, (C.Lib3MFReadCallback)(unsafe.Pointer(&theReadCallback)), C.uint64_t(streamSize), (C.Lib3MFSeekCallback)(unsafe.Pointer(&theSeekCallback)), (C.Lib3MF_pvoid)(userData)) if ret != 0 { @@ -4149,7 +4153,7 @@ func (inst Attachment) WriteToBuffer(buffer []uint8) ([]uint8, error) { return buffer[:int(neededforbuffer)], nil } -// ReadFromBuffer reads an attachment from a memory buffer. This buffer is immediatly read (in contrast to the ReadFromCallback and ReadFromFile-methods). +// ReadFromBuffer reads an attachment from a memory buffer. This buffer is immediately read (in contrast to the ReadFromCallback and ReadFromFile-methods). func (inst Attachment) ReadFromBuffer(buffer []uint8) error { ret := C.CCall_lib3mf_attachment_readfrombuffer(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint64_t(len(buffer)), (*C.uint8_t)(unsafe.Pointer(&buffer[0]))) if ret != 0 { @@ -5717,6 +5721,289 @@ func (inst UnsignedMeshNode) GetOutputDistance() (ImplicitPort, error) { } +// BeamLatticeNode represents a Lib3MF class. +type BeamLatticeNode struct { + ImplicitNode +} + +func (wrapper Wrapper) NewBeamLatticeNode(r ref) BeamLatticeNode { + return BeamLatticeNode{wrapper.NewImplicitNode(r)} +} + +// GetInputBeamLattice retrieves the input for the model resource id of the beam lattice. +func (inst BeamLatticeNode) GetInputBeamLattice() (ImplicitPort, error) { + var beamLattice ref + ret := C.CCall_lib3mf_beamlatticenode_getinputbeamlattice(inst.wrapperRef.LibraryHandle, inst.Ref, &beamLattice) + if ret != 0 { + return ImplicitPort{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewImplicitPort(beamLattice), nil +} + +// GetInputPos retrieves the input for the position. +func (inst BeamLatticeNode) GetInputPos() (ImplicitPort, error) { + var pos ref + ret := C.CCall_lib3mf_beamlatticenode_getinputpos(inst.wrapperRef.LibraryHandle, inst.Ref, &pos) + if ret != 0 { + return ImplicitPort{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewImplicitPort(pos), nil +} + +// GetOutputDistance retrieves the output. +func (inst BeamLatticeNode) GetOutputDistance() (ImplicitPort, error) { + var distance ref + ret := C.CCall_lib3mf_beamlatticenode_getoutputdistance(inst.wrapperRef.LibraryHandle, inst.Ref, &distance) + if ret != 0 { + return ImplicitPort{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewImplicitPort(distance), nil +} + +// SetAccurateRange sets the accurate range for distance computation. +func (inst BeamLatticeNode) SetAccurateRange(accurateRange float64) error { + ret := C.CCall_lib3mf_beamlatticenode_setaccuraterange(inst.wrapperRef.LibraryHandle, inst.Ref, C.double(accurateRange)) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetAccurateRange retrieves the accurate range for distance computation. +func (inst BeamLatticeNode) GetAccurateRange() (float64, error) { + var accurateRange C.double + ret := C.CCall_lib3mf_beamlatticenode_getaccuraterange(inst.wrapperRef.LibraryHandle, inst.Ref, &accurateRange) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return float64(accurateRange), nil +} + + +// FunctionGradientNode represents a Lib3MF class. +type FunctionGradientNode struct { + ImplicitNode +} + +func (wrapper Wrapper) NewFunctionGradientNode(r ref) FunctionGradientNode { + return FunctionGradientNode{wrapper.NewImplicitNode(r)} +} + +// GetInputFunctionID retrieves the input for the function id. +func (inst FunctionGradientNode) GetInputFunctionID() (ImplicitPort, error) { + var function ref + ret := C.CCall_lib3mf_functiongradientnode_getinputfunctionid(inst.wrapperRef.LibraryHandle, inst.Ref, &function) + if ret != 0 { + return ImplicitPort{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewImplicitPort(function), nil +} + +// GetInputPos retrieves the input for the position. +func (inst FunctionGradientNode) GetInputPos() (ImplicitPort, error) { + var pos ref + ret := C.CCall_lib3mf_functiongradientnode_getinputpos(inst.wrapperRef.LibraryHandle, inst.Ref, &pos) + if ret != 0 { + return ImplicitPort{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewImplicitPort(pos), nil +} + +// GetInputStep retrieves the input for the finite difference step. +func (inst FunctionGradientNode) GetInputStep() (ImplicitPort, error) { + var step ref + ret := C.CCall_lib3mf_functiongradientnode_getinputstep(inst.wrapperRef.LibraryHandle, inst.Ref, &step) + if ret != 0 { + return ImplicitPort{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewImplicitPort(step), nil +} + +// SetScalarOutputName sets the name of the referenced scalar output. +func (inst FunctionGradientNode) SetScalarOutputName(scalarOutputName string) error { + ret := C.CCall_lib3mf_functiongradientnode_setscalaroutputname(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(scalarOutputName)[0]))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetScalarOutputName retrieves the name of the referenced scalar output. +func (inst FunctionGradientNode) GetScalarOutputName() (string, error) { + var neededforscalarOutputName C.uint32_t + var filledinscalarOutputName C.uint32_t + ret := C.CCall_lib3mf_functiongradientnode_getscalaroutputname(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforscalarOutputName, nil) + if ret != 0 { + return "", makeError(uint32(ret)) + } + bufferSizescalarOutputName := neededforscalarOutputName + bufferscalarOutputName := make([]byte, bufferSizescalarOutputName) + ret = C.CCall_lib3mf_functiongradientnode_getscalaroutputname(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizescalarOutputName, &filledinscalarOutputName, (*C.char)(unsafe.Pointer(&bufferscalarOutputName[0]))) + if ret != 0 { + return "", makeError(uint32(ret)) + } + return string(bufferscalarOutputName[:(filledinscalarOutputName-1)]), nil +} + +// SetVectorInputName sets the name of the referenced vector input. +func (inst FunctionGradientNode) SetVectorInputName(vectorInputName string) error { + ret := C.CCall_lib3mf_functiongradientnode_setvectorinputname(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(vectorInputName)[0]))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetVectorInputName retrieves the name of the referenced vector input. +func (inst FunctionGradientNode) GetVectorInputName() (string, error) { + var neededforvectorInputName C.uint32_t + var filledinvectorInputName C.uint32_t + ret := C.CCall_lib3mf_functiongradientnode_getvectorinputname(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforvectorInputName, nil) + if ret != 0 { + return "", makeError(uint32(ret)) + } + bufferSizevectorInputName := neededforvectorInputName + buffervectorInputName := make([]byte, bufferSizevectorInputName) + ret = C.CCall_lib3mf_functiongradientnode_getvectorinputname(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizevectorInputName, &filledinvectorInputName, (*C.char)(unsafe.Pointer(&buffervectorInputName[0]))) + if ret != 0 { + return "", makeError(uint32(ret)) + } + return string(buffervectorInputName[:(filledinvectorInputName-1)]), nil +} + +// GetOutputVector retrieves the normalized gradient output. +func (inst FunctionGradientNode) GetOutputVector() (ImplicitPort, error) { + var vector ref + ret := C.CCall_lib3mf_functiongradientnode_getoutputvector(inst.wrapperRef.LibraryHandle, inst.Ref, &vector) + if ret != 0 { + return ImplicitPort{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewImplicitPort(vector), nil +} + +// GetOutputGradient retrieves the raw gradient output. +func (inst FunctionGradientNode) GetOutputGradient() (ImplicitPort, error) { + var gradient ref + ret := C.CCall_lib3mf_functiongradientnode_getoutputgradient(inst.wrapperRef.LibraryHandle, inst.Ref, &gradient) + if ret != 0 { + return ImplicitPort{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewImplicitPort(gradient), nil +} + +// GetOutputMagnitude retrieves the gradient magnitude output. +func (inst FunctionGradientNode) GetOutputMagnitude() (ImplicitPort, error) { + var magnitude ref + ret := C.CCall_lib3mf_functiongradientnode_getoutputmagnitude(inst.wrapperRef.LibraryHandle, inst.Ref, &magnitude) + if ret != 0 { + return ImplicitPort{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewImplicitPort(magnitude), nil +} + + +// NormalizeDistanceNode represents a Lib3MF class. +type NormalizeDistanceNode struct { + ImplicitNode +} + +func (wrapper Wrapper) NewNormalizeDistanceNode(r ref) NormalizeDistanceNode { + return NormalizeDistanceNode{wrapper.NewImplicitNode(r)} +} + +// GetInputFunctionID retrieves the input for the function id. +func (inst NormalizeDistanceNode) GetInputFunctionID() (ImplicitPort, error) { + var function ref + ret := C.CCall_lib3mf_normalizedistancenode_getinputfunctionid(inst.wrapperRef.LibraryHandle, inst.Ref, &function) + if ret != 0 { + return ImplicitPort{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewImplicitPort(function), nil +} + +// GetInputPos retrieves the input for the position. +func (inst NormalizeDistanceNode) GetInputPos() (ImplicitPort, error) { + var pos ref + ret := C.CCall_lib3mf_normalizedistancenode_getinputpos(inst.wrapperRef.LibraryHandle, inst.Ref, &pos) + if ret != 0 { + return ImplicitPort{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewImplicitPort(pos), nil +} + +// GetInputStep retrieves the input for the finite difference step. +func (inst NormalizeDistanceNode) GetInputStep() (ImplicitPort, error) { + var step ref + ret := C.CCall_lib3mf_normalizedistancenode_getinputstep(inst.wrapperRef.LibraryHandle, inst.Ref, &step) + if ret != 0 { + return ImplicitPort{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewImplicitPort(step), nil +} + +// SetScalarOutputName sets the name of the referenced scalar output. +func (inst NormalizeDistanceNode) SetScalarOutputName(scalarOutputName string) error { + ret := C.CCall_lib3mf_normalizedistancenode_setscalaroutputname(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(scalarOutputName)[0]))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetScalarOutputName retrieves the name of the referenced scalar output. +func (inst NormalizeDistanceNode) GetScalarOutputName() (string, error) { + var neededforscalarOutputName C.uint32_t + var filledinscalarOutputName C.uint32_t + ret := C.CCall_lib3mf_normalizedistancenode_getscalaroutputname(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforscalarOutputName, nil) + if ret != 0 { + return "", makeError(uint32(ret)) + } + bufferSizescalarOutputName := neededforscalarOutputName + bufferscalarOutputName := make([]byte, bufferSizescalarOutputName) + ret = C.CCall_lib3mf_normalizedistancenode_getscalaroutputname(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizescalarOutputName, &filledinscalarOutputName, (*C.char)(unsafe.Pointer(&bufferscalarOutputName[0]))) + if ret != 0 { + return "", makeError(uint32(ret)) + } + return string(bufferscalarOutputName[:(filledinscalarOutputName-1)]), nil +} + +// SetVectorInputName sets the name of the referenced vector input. +func (inst NormalizeDistanceNode) SetVectorInputName(vectorInputName string) error { + ret := C.CCall_lib3mf_normalizedistancenode_setvectorinputname(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(vectorInputName)[0]))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetVectorInputName retrieves the name of the referenced vector input. +func (inst NormalizeDistanceNode) GetVectorInputName() (string, error) { + var neededforvectorInputName C.uint32_t + var filledinvectorInputName C.uint32_t + ret := C.CCall_lib3mf_normalizedistancenode_getvectorinputname(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforvectorInputName, nil) + if ret != 0 { + return "", makeError(uint32(ret)) + } + bufferSizevectorInputName := neededforvectorInputName + buffervectorInputName := make([]byte, bufferSizevectorInputName) + ret = C.CCall_lib3mf_normalizedistancenode_getvectorinputname(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizevectorInputName, &filledinvectorInputName, (*C.char)(unsafe.Pointer(&buffervectorInputName[0]))) + if ret != 0 { + return "", makeError(uint32(ret)) + } + return string(buffervectorInputName[:(filledinvectorInputName-1)]), nil +} + +// GetOutputResult retrieves the normalized result output. +func (inst NormalizeDistanceNode) GetOutputResult() (ImplicitPort, error) { + var result ref + ret := C.CCall_lib3mf_normalizedistancenode_getoutputresult(inst.wrapperRef.LibraryHandle, inst.Ref, &result) + if ret != 0 { + return ImplicitPort{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewImplicitPort(result), nil +} + + // FunctionCallNode represents a Lib3MF class. type FunctionCallNode struct { ImplicitNode @@ -6396,6 +6683,36 @@ func (inst ImplicitFunction) AddUnsignedMeshNode(identifier string, displayName return inst.wrapperRef.NewUnsignedMeshNode(node), nil } +// AddBeamLatticeNode add a BeamLatticeNode. +func (inst ImplicitFunction) AddBeamLatticeNode(identifier string, displayName string, tag string) (BeamLatticeNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addbeamlatticenode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) + if ret != 0 { + return BeamLatticeNode{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewBeamLatticeNode(node), nil +} + +// AddFunctionGradientNode add a FunctionGradientNode. +func (inst ImplicitFunction) AddFunctionGradientNode(identifier string, displayName string, tag string) (FunctionGradientNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addfunctiongradientnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) + if ret != 0 { + return FunctionGradientNode{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewFunctionGradientNode(node), nil +} + +// AddNormalizeDistanceNode add a NormalizeDistanceNode. +func (inst ImplicitFunction) AddNormalizeDistanceNode(identifier string, displayName string, tag string) (NormalizeDistanceNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addnormalizedistancenode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) + if ret != 0 { + return NormalizeDistanceNode{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewNormalizeDistanceNode(node), nil +} + // AddFunctionCallNode add a FunctionCallNode. func (inst ImplicitFunction) AddFunctionCallNode(identifier string, displayName string, tag string) (FunctionCallNode, error) { var node ref @@ -8517,7 +8834,7 @@ func (wrapper Wrapper) releaseC(r *ref) error { func (wrapper Wrapper) CheckBinaryVersion() error { var nBindingMajor uint32 = 2; - var nBindingMinor uint32 = 4; + var nBindingMinor uint32 = 5; nMajor, nMinor, _, err := wrapper.GetLibraryVersion() if err != nil { return err; diff --git a/Autogenerated/Bindings/Go/lib3mf_dynamic.c b/Autogenerated/Bindings/Go/lib3mf_dynamic.c index 8b7de96a2..c1282eab7 100644 --- a/Autogenerated/Bindings/Go/lib3mf_dynamic.c +++ b/Autogenerated/Bindings/Go/lib3mf_dynamic.c @@ -24,12 +24,12 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha. +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. Abstract: This is an autogenerated plain C Header file in order to allow an easy use of the 3MF Library -Interface version: 2.4.1 +Interface version: 2.5.0 */ @@ -422,6 +422,29 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_UnsignedMeshNode_GetInputMesh = NULL; pWrapperTable->m_UnsignedMeshNode_GetInputPos = NULL; pWrapperTable->m_UnsignedMeshNode_GetOutputDistance = NULL; + pWrapperTable->m_BeamLatticeNode_GetInputBeamLattice = NULL; + pWrapperTable->m_BeamLatticeNode_GetInputPos = NULL; + pWrapperTable->m_BeamLatticeNode_GetOutputDistance = NULL; + pWrapperTable->m_BeamLatticeNode_SetAccurateRange = NULL; + pWrapperTable->m_BeamLatticeNode_GetAccurateRange = NULL; + pWrapperTable->m_FunctionGradientNode_GetInputFunctionID = NULL; + pWrapperTable->m_FunctionGradientNode_GetInputPos = NULL; + pWrapperTable->m_FunctionGradientNode_GetInputStep = NULL; + pWrapperTable->m_FunctionGradientNode_SetScalarOutputName = NULL; + pWrapperTable->m_FunctionGradientNode_GetScalarOutputName = NULL; + pWrapperTable->m_FunctionGradientNode_SetVectorInputName = NULL; + pWrapperTable->m_FunctionGradientNode_GetVectorInputName = NULL; + pWrapperTable->m_FunctionGradientNode_GetOutputVector = NULL; + pWrapperTable->m_FunctionGradientNode_GetOutputGradient = NULL; + pWrapperTable->m_FunctionGradientNode_GetOutputMagnitude = NULL; + pWrapperTable->m_NormalizeDistanceNode_GetInputFunctionID = NULL; + pWrapperTable->m_NormalizeDistanceNode_GetInputPos = NULL; + pWrapperTable->m_NormalizeDistanceNode_GetInputStep = NULL; + pWrapperTable->m_NormalizeDistanceNode_SetScalarOutputName = NULL; + pWrapperTable->m_NormalizeDistanceNode_GetScalarOutputName = NULL; + pWrapperTable->m_NormalizeDistanceNode_SetVectorInputName = NULL; + pWrapperTable->m_NormalizeDistanceNode_GetVectorInputName = NULL; + pWrapperTable->m_NormalizeDistanceNode_GetOutputResult = NULL; pWrapperTable->m_FunctionCallNode_GetInputFunctionID = NULL; pWrapperTable->m_NodeIterator_GetCurrent = NULL; pWrapperTable->m_Function_GetDisplayName = NULL; @@ -485,6 +508,9 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_ImplicitFunction_AddConstMatNode = NULL; pWrapperTable->m_ImplicitFunction_AddMeshNode = NULL; pWrapperTable->m_ImplicitFunction_AddUnsignedMeshNode = NULL; + pWrapperTable->m_ImplicitFunction_AddBeamLatticeNode = NULL; + pWrapperTable->m_ImplicitFunction_AddFunctionGradientNode = NULL; + pWrapperTable->m_ImplicitFunction_AddNormalizeDistanceNode = NULL; pWrapperTable->m_ImplicitFunction_AddFunctionCallNode = NULL; pWrapperTable->m_ImplicitFunction_GetNodes = NULL; pWrapperTable->m_ImplicitFunction_RemoveNode = NULL; @@ -4088,6 +4114,213 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, if (pWrapperTable->m_UnsignedMeshNode_GetOutputDistance == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_BeamLatticeNode_GetInputBeamLattice = (PLib3MFBeamLatticeNode_GetInputBeamLatticePtr) GetProcAddress(hLibrary, "lib3mf_beamlatticenode_getinputbeamlattice"); + #else // _WIN32 + pWrapperTable->m_BeamLatticeNode_GetInputBeamLattice = (PLib3MFBeamLatticeNode_GetInputBeamLatticePtr) dlsym(hLibrary, "lib3mf_beamlatticenode_getinputbeamlattice"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLatticeNode_GetInputBeamLattice == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLatticeNode_GetInputPos = (PLib3MFBeamLatticeNode_GetInputPosPtr) GetProcAddress(hLibrary, "lib3mf_beamlatticenode_getinputpos"); + #else // _WIN32 + pWrapperTable->m_BeamLatticeNode_GetInputPos = (PLib3MFBeamLatticeNode_GetInputPosPtr) dlsym(hLibrary, "lib3mf_beamlatticenode_getinputpos"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLatticeNode_GetInputPos == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLatticeNode_GetOutputDistance = (PLib3MFBeamLatticeNode_GetOutputDistancePtr) GetProcAddress(hLibrary, "lib3mf_beamlatticenode_getoutputdistance"); + #else // _WIN32 + pWrapperTable->m_BeamLatticeNode_GetOutputDistance = (PLib3MFBeamLatticeNode_GetOutputDistancePtr) dlsym(hLibrary, "lib3mf_beamlatticenode_getoutputdistance"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLatticeNode_GetOutputDistance == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLatticeNode_SetAccurateRange = (PLib3MFBeamLatticeNode_SetAccurateRangePtr) GetProcAddress(hLibrary, "lib3mf_beamlatticenode_setaccuraterange"); + #else // _WIN32 + pWrapperTable->m_BeamLatticeNode_SetAccurateRange = (PLib3MFBeamLatticeNode_SetAccurateRangePtr) dlsym(hLibrary, "lib3mf_beamlatticenode_setaccuraterange"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLatticeNode_SetAccurateRange == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLatticeNode_GetAccurateRange = (PLib3MFBeamLatticeNode_GetAccurateRangePtr) GetProcAddress(hLibrary, "lib3mf_beamlatticenode_getaccuraterange"); + #else // _WIN32 + pWrapperTable->m_BeamLatticeNode_GetAccurateRange = (PLib3MFBeamLatticeNode_GetAccurateRangePtr) dlsym(hLibrary, "lib3mf_beamlatticenode_getaccuraterange"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLatticeNode_GetAccurateRange == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_GetInputFunctionID = (PLib3MFFunctionGradientNode_GetInputFunctionIDPtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_getinputfunctionid"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_GetInputFunctionID = (PLib3MFFunctionGradientNode_GetInputFunctionIDPtr) dlsym(hLibrary, "lib3mf_functiongradientnode_getinputfunctionid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_GetInputFunctionID == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_GetInputPos = (PLib3MFFunctionGradientNode_GetInputPosPtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_getinputpos"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_GetInputPos = (PLib3MFFunctionGradientNode_GetInputPosPtr) dlsym(hLibrary, "lib3mf_functiongradientnode_getinputpos"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_GetInputPos == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_GetInputStep = (PLib3MFFunctionGradientNode_GetInputStepPtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_getinputstep"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_GetInputStep = (PLib3MFFunctionGradientNode_GetInputStepPtr) dlsym(hLibrary, "lib3mf_functiongradientnode_getinputstep"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_GetInputStep == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_SetScalarOutputName = (PLib3MFFunctionGradientNode_SetScalarOutputNamePtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_setscalaroutputname"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_SetScalarOutputName = (PLib3MFFunctionGradientNode_SetScalarOutputNamePtr) dlsym(hLibrary, "lib3mf_functiongradientnode_setscalaroutputname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_SetScalarOutputName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_GetScalarOutputName = (PLib3MFFunctionGradientNode_GetScalarOutputNamePtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_getscalaroutputname"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_GetScalarOutputName = (PLib3MFFunctionGradientNode_GetScalarOutputNamePtr) dlsym(hLibrary, "lib3mf_functiongradientnode_getscalaroutputname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_GetScalarOutputName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_SetVectorInputName = (PLib3MFFunctionGradientNode_SetVectorInputNamePtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_setvectorinputname"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_SetVectorInputName = (PLib3MFFunctionGradientNode_SetVectorInputNamePtr) dlsym(hLibrary, "lib3mf_functiongradientnode_setvectorinputname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_SetVectorInputName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_GetVectorInputName = (PLib3MFFunctionGradientNode_GetVectorInputNamePtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_getvectorinputname"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_GetVectorInputName = (PLib3MFFunctionGradientNode_GetVectorInputNamePtr) dlsym(hLibrary, "lib3mf_functiongradientnode_getvectorinputname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_GetVectorInputName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_GetOutputVector = (PLib3MFFunctionGradientNode_GetOutputVectorPtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_getoutputvector"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_GetOutputVector = (PLib3MFFunctionGradientNode_GetOutputVectorPtr) dlsym(hLibrary, "lib3mf_functiongradientnode_getoutputvector"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_GetOutputVector == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_GetOutputGradient = (PLib3MFFunctionGradientNode_GetOutputGradientPtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_getoutputgradient"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_GetOutputGradient = (PLib3MFFunctionGradientNode_GetOutputGradientPtr) dlsym(hLibrary, "lib3mf_functiongradientnode_getoutputgradient"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_GetOutputGradient == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_GetOutputMagnitude = (PLib3MFFunctionGradientNode_GetOutputMagnitudePtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_getoutputmagnitude"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_GetOutputMagnitude = (PLib3MFFunctionGradientNode_GetOutputMagnitudePtr) dlsym(hLibrary, "lib3mf_functiongradientnode_getoutputmagnitude"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_GetOutputMagnitude == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetInputFunctionID = (PLib3MFNormalizeDistanceNode_GetInputFunctionIDPtr) GetProcAddress(hLibrary, "lib3mf_normalizedistancenode_getinputfunctionid"); + #else // _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetInputFunctionID = (PLib3MFNormalizeDistanceNode_GetInputFunctionIDPtr) dlsym(hLibrary, "lib3mf_normalizedistancenode_getinputfunctionid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_NormalizeDistanceNode_GetInputFunctionID == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetInputPos = (PLib3MFNormalizeDistanceNode_GetInputPosPtr) GetProcAddress(hLibrary, "lib3mf_normalizedistancenode_getinputpos"); + #else // _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetInputPos = (PLib3MFNormalizeDistanceNode_GetInputPosPtr) dlsym(hLibrary, "lib3mf_normalizedistancenode_getinputpos"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_NormalizeDistanceNode_GetInputPos == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetInputStep = (PLib3MFNormalizeDistanceNode_GetInputStepPtr) GetProcAddress(hLibrary, "lib3mf_normalizedistancenode_getinputstep"); + #else // _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetInputStep = (PLib3MFNormalizeDistanceNode_GetInputStepPtr) dlsym(hLibrary, "lib3mf_normalizedistancenode_getinputstep"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_NormalizeDistanceNode_GetInputStep == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_NormalizeDistanceNode_SetScalarOutputName = (PLib3MFNormalizeDistanceNode_SetScalarOutputNamePtr) GetProcAddress(hLibrary, "lib3mf_normalizedistancenode_setscalaroutputname"); + #else // _WIN32 + pWrapperTable->m_NormalizeDistanceNode_SetScalarOutputName = (PLib3MFNormalizeDistanceNode_SetScalarOutputNamePtr) dlsym(hLibrary, "lib3mf_normalizedistancenode_setscalaroutputname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_NormalizeDistanceNode_SetScalarOutputName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetScalarOutputName = (PLib3MFNormalizeDistanceNode_GetScalarOutputNamePtr) GetProcAddress(hLibrary, "lib3mf_normalizedistancenode_getscalaroutputname"); + #else // _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetScalarOutputName = (PLib3MFNormalizeDistanceNode_GetScalarOutputNamePtr) dlsym(hLibrary, "lib3mf_normalizedistancenode_getscalaroutputname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_NormalizeDistanceNode_GetScalarOutputName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_NormalizeDistanceNode_SetVectorInputName = (PLib3MFNormalizeDistanceNode_SetVectorInputNamePtr) GetProcAddress(hLibrary, "lib3mf_normalizedistancenode_setvectorinputname"); + #else // _WIN32 + pWrapperTable->m_NormalizeDistanceNode_SetVectorInputName = (PLib3MFNormalizeDistanceNode_SetVectorInputNamePtr) dlsym(hLibrary, "lib3mf_normalizedistancenode_setvectorinputname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_NormalizeDistanceNode_SetVectorInputName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetVectorInputName = (PLib3MFNormalizeDistanceNode_GetVectorInputNamePtr) GetProcAddress(hLibrary, "lib3mf_normalizedistancenode_getvectorinputname"); + #else // _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetVectorInputName = (PLib3MFNormalizeDistanceNode_GetVectorInputNamePtr) dlsym(hLibrary, "lib3mf_normalizedistancenode_getvectorinputname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_NormalizeDistanceNode_GetVectorInputName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetOutputResult = (PLib3MFNormalizeDistanceNode_GetOutputResultPtr) GetProcAddress(hLibrary, "lib3mf_normalizedistancenode_getoutputresult"); + #else // _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetOutputResult = (PLib3MFNormalizeDistanceNode_GetOutputResultPtr) dlsym(hLibrary, "lib3mf_normalizedistancenode_getoutputresult"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_NormalizeDistanceNode_GetOutputResult == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_FunctionCallNode_GetInputFunctionID = (PLib3MFFunctionCallNode_GetInputFunctionIDPtr) GetProcAddress(hLibrary, "lib3mf_functioncallnode_getinputfunctionid"); #else // _WIN32 @@ -4655,6 +4888,33 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, if (pWrapperTable->m_ImplicitFunction_AddUnsignedMeshNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddBeamLatticeNode = (PLib3MFImplicitFunction_AddBeamLatticeNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addbeamlatticenode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddBeamLatticeNode = (PLib3MFImplicitFunction_AddBeamLatticeNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addbeamlatticenode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddBeamLatticeNode == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddFunctionGradientNode = (PLib3MFImplicitFunction_AddFunctionGradientNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addfunctiongradientnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddFunctionGradientNode = (PLib3MFImplicitFunction_AddFunctionGradientNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addfunctiongradientnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddFunctionGradientNode == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddNormalizeDistanceNode = (PLib3MFImplicitFunction_AddNormalizeDistanceNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addnormalizedistancenode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddNormalizeDistanceNode = (PLib3MFImplicitFunction_AddNormalizeDistanceNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addnormalizedistancenode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddNormalizeDistanceNode == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_ImplicitFunction_AddFunctionCallNode = (PLib3MFImplicitFunction_AddFunctionCallNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addfunctioncallnode"); #else // _WIN32 @@ -9703,6 +9963,213 @@ Lib3MFResult CCall_lib3mf_unsignedmeshnode_getoutputdistance(Lib3MFHandle librar } +Lib3MFResult CCall_lib3mf_beamlatticenode_getinputbeamlattice(Lib3MFHandle libraryHandle, Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_ImplicitPort * pBeamLattice) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_BeamLatticeNode_GetInputBeamLattice (pBeamLatticeNode, pBeamLattice); +} + + +Lib3MFResult CCall_lib3mf_beamlatticenode_getinputpos(Lib3MFHandle libraryHandle, Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_ImplicitPort * pPos) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_BeamLatticeNode_GetInputPos (pBeamLatticeNode, pPos); +} + + +Lib3MFResult CCall_lib3mf_beamlatticenode_getoutputdistance(Lib3MFHandle libraryHandle, Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_ImplicitPort * pDistance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_BeamLatticeNode_GetOutputDistance (pBeamLatticeNode, pDistance); +} + + +Lib3MFResult CCall_lib3mf_beamlatticenode_setaccuraterange(Lib3MFHandle libraryHandle, Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_double dAccurateRange) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_BeamLatticeNode_SetAccurateRange (pBeamLatticeNode, dAccurateRange); +} + + +Lib3MFResult CCall_lib3mf_beamlatticenode_getaccuraterange(Lib3MFHandle libraryHandle, Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_double * pAccurateRange) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_BeamLatticeNode_GetAccurateRange (pBeamLatticeNode, pAccurateRange); +} + + +Lib3MFResult CCall_lib3mf_functiongradientnode_getinputfunctionid(Lib3MFHandle libraryHandle, Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pFunction) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_FunctionGradientNode_GetInputFunctionID (pFunctionGradientNode, pFunction); +} + + +Lib3MFResult CCall_lib3mf_functiongradientnode_getinputpos(Lib3MFHandle libraryHandle, Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pPos) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_FunctionGradientNode_GetInputPos (pFunctionGradientNode, pPos); +} + + +Lib3MFResult CCall_lib3mf_functiongradientnode_getinputstep(Lib3MFHandle libraryHandle, Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pStep) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_FunctionGradientNode_GetInputStep (pFunctionGradientNode, pStep); +} + + +Lib3MFResult CCall_lib3mf_functiongradientnode_setscalaroutputname(Lib3MFHandle libraryHandle, Lib3MF_FunctionGradientNode pFunctionGradientNode, const char * pScalarOutputName) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_FunctionGradientNode_SetScalarOutputName (pFunctionGradientNode, pScalarOutputName); +} + + +Lib3MFResult CCall_lib3mf_functiongradientnode_getscalaroutputname(Lib3MFHandle libraryHandle, Lib3MF_FunctionGradientNode pFunctionGradientNode, const Lib3MF_uint32 nScalarOutputNameBufferSize, Lib3MF_uint32* pScalarOutputNameNeededChars, char * pScalarOutputNameBuffer) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_FunctionGradientNode_GetScalarOutputName (pFunctionGradientNode, nScalarOutputNameBufferSize, pScalarOutputNameNeededChars, pScalarOutputNameBuffer); +} + + +Lib3MFResult CCall_lib3mf_functiongradientnode_setvectorinputname(Lib3MFHandle libraryHandle, Lib3MF_FunctionGradientNode pFunctionGradientNode, const char * pVectorInputName) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_FunctionGradientNode_SetVectorInputName (pFunctionGradientNode, pVectorInputName); +} + + +Lib3MFResult CCall_lib3mf_functiongradientnode_getvectorinputname(Lib3MFHandle libraryHandle, Lib3MF_FunctionGradientNode pFunctionGradientNode, const Lib3MF_uint32 nVectorInputNameBufferSize, Lib3MF_uint32* pVectorInputNameNeededChars, char * pVectorInputNameBuffer) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_FunctionGradientNode_GetVectorInputName (pFunctionGradientNode, nVectorInputNameBufferSize, pVectorInputNameNeededChars, pVectorInputNameBuffer); +} + + +Lib3MFResult CCall_lib3mf_functiongradientnode_getoutputvector(Lib3MFHandle libraryHandle, Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pVector) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_FunctionGradientNode_GetOutputVector (pFunctionGradientNode, pVector); +} + + +Lib3MFResult CCall_lib3mf_functiongradientnode_getoutputgradient(Lib3MFHandle libraryHandle, Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pGradient) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_FunctionGradientNode_GetOutputGradient (pFunctionGradientNode, pGradient); +} + + +Lib3MFResult CCall_lib3mf_functiongradientnode_getoutputmagnitude(Lib3MFHandle libraryHandle, Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pMagnitude) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_FunctionGradientNode_GetOutputMagnitude (pFunctionGradientNode, pMagnitude); +} + + +Lib3MFResult CCall_lib3mf_normalizedistancenode_getinputfunctionid(Lib3MFHandle libraryHandle, Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pFunction) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_NormalizeDistanceNode_GetInputFunctionID (pNormalizeDistanceNode, pFunction); +} + + +Lib3MFResult CCall_lib3mf_normalizedistancenode_getinputpos(Lib3MFHandle libraryHandle, Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pPos) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_NormalizeDistanceNode_GetInputPos (pNormalizeDistanceNode, pPos); +} + + +Lib3MFResult CCall_lib3mf_normalizedistancenode_getinputstep(Lib3MFHandle libraryHandle, Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pStep) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_NormalizeDistanceNode_GetInputStep (pNormalizeDistanceNode, pStep); +} + + +Lib3MFResult CCall_lib3mf_normalizedistancenode_setscalaroutputname(Lib3MFHandle libraryHandle, Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const char * pScalarOutputName) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_NormalizeDistanceNode_SetScalarOutputName (pNormalizeDistanceNode, pScalarOutputName); +} + + +Lib3MFResult CCall_lib3mf_normalizedistancenode_getscalaroutputname(Lib3MFHandle libraryHandle, Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const Lib3MF_uint32 nScalarOutputNameBufferSize, Lib3MF_uint32* pScalarOutputNameNeededChars, char * pScalarOutputNameBuffer) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_NormalizeDistanceNode_GetScalarOutputName (pNormalizeDistanceNode, nScalarOutputNameBufferSize, pScalarOutputNameNeededChars, pScalarOutputNameBuffer); +} + + +Lib3MFResult CCall_lib3mf_normalizedistancenode_setvectorinputname(Lib3MFHandle libraryHandle, Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const char * pVectorInputName) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_NormalizeDistanceNode_SetVectorInputName (pNormalizeDistanceNode, pVectorInputName); +} + + +Lib3MFResult CCall_lib3mf_normalizedistancenode_getvectorinputname(Lib3MFHandle libraryHandle, Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const Lib3MF_uint32 nVectorInputNameBufferSize, Lib3MF_uint32* pVectorInputNameNeededChars, char * pVectorInputNameBuffer) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_NormalizeDistanceNode_GetVectorInputName (pNormalizeDistanceNode, nVectorInputNameBufferSize, pVectorInputNameNeededChars, pVectorInputNameBuffer); +} + + +Lib3MFResult CCall_lib3mf_normalizedistancenode_getoutputresult(Lib3MFHandle libraryHandle, Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pResult) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_NormalizeDistanceNode_GetOutputResult (pNormalizeDistanceNode, pResult); +} + + Lib3MFResult CCall_lib3mf_functioncallnode_getinputfunctionid(Lib3MFHandle libraryHandle, Lib3MF_FunctionCallNode pFunctionCallNode, Lib3MF_ImplicitPort * pFunction) { if (libraryHandle == 0) @@ -10270,6 +10737,33 @@ Lib3MFResult CCall_lib3mf_implicitfunction_addunsignedmeshnode(Lib3MFHandle libr } +Lib3MFResult CCall_lib3mf_implicitfunction_addbeamlatticenode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_BeamLatticeNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddBeamLatticeNode (pImplicitFunction, pIdentifier, pDisplayName, pTag, pNode); +} + + +Lib3MFResult CCall_lib3mf_implicitfunction_addfunctiongradientnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_FunctionGradientNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddFunctionGradientNode (pImplicitFunction, pIdentifier, pDisplayName, pTag, pNode); +} + + +Lib3MFResult CCall_lib3mf_implicitfunction_addnormalizedistancenode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_NormalizeDistanceNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddNormalizeDistanceNode (pImplicitFunction, pIdentifier, pDisplayName, pTag, pNode); +} + + Lib3MFResult CCall_lib3mf_implicitfunction_addfunctioncallnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_FunctionCallNode * pNode) { if (libraryHandle == 0) diff --git a/Autogenerated/Bindings/Go/lib3mf_dynamic.cc b/Autogenerated/Bindings/Go/lib3mf_dynamic.cc index 5f56b68c5..e15559ef4 100644 --- a/Autogenerated/Bindings/Go/lib3mf_dynamic.cc +++ b/Autogenerated/Bindings/Go/lib3mf_dynamic.cc @@ -29,7 +29,7 @@ This file has been generated by the Automatic Component Toolkit (ACT) version 1. Abstract: This is an autogenerated plain C Header file in order to allow an easy use of the 3MF Library -Interface version: 2.4.1-alpha +Interface version: 2.4.0 */ diff --git a/Autogenerated/Bindings/Go/lib3mf_dynamic.h b/Autogenerated/Bindings/Go/lib3mf_dynamic.h index 4e51af808..1605cbbdc 100644 --- a/Autogenerated/Bindings/Go/lib3mf_dynamic.h +++ b/Autogenerated/Bindings/Go/lib3mf_dynamic.h @@ -24,12 +24,12 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha. +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. Abstract: This is an autogenerated plain C Header file in order to allow an easy use of the 3MF Library -Interface version: 2.4.1 +Interface version: 2.5.0 */ @@ -1913,7 +1913,7 @@ typedef Lib3MFResult (*PLib3MFVolumeDataComposite_SetBaseMaterialGroupPtr) (Lib3 typedef Lib3MFResult (*PLib3MFVolumeDataComposite_GetMaterialMappingCountPtr) (Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 * pCount); /** -* Returns MaterialMappting with given index +* Returns MaterialMapping with given index * * @param[in] pVolumeDataComposite - VolumeDataComposite instance. * @param[in] nIndex - Index of the MaterialMapping in question. @@ -1923,7 +1923,7 @@ typedef Lib3MFResult (*PLib3MFVolumeDataComposite_GetMaterialMappingCountPtr) (L typedef Lib3MFResult (*PLib3MFVolumeDataComposite_GetMaterialMappingPtr) (Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 nIndex, Lib3MF_MaterialMapping * pTheMaterialMapping); /** -* Adds a the MaterialMapping +* Adds a MaterialMapping * * @param[in] pVolumeDataComposite - VolumeDataComposite instance. * @param[in] pTransform - new transformation matrix @@ -2035,7 +2035,7 @@ typedef Lib3MFResult (*PLib3MFVolumeData_RemoveColorPtr) (Lib3MF_VolumeData pVol * Returns the number of VolumeDataProperty * * @param[in] pVolumeData - VolumeData instance. -* @param[out] pCount - the number of VolumeDataProperty-elements within this VolumdeData +* @param[out] pCount - the number of VolumeDataProperty-elements within this VolumeData * @return error code or 0 (success) */ typedef Lib3MFResult (*PLib3MFVolumeData_GetPropertyCountPtr) (Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 * pCount); @@ -2860,7 +2860,7 @@ typedef Lib3MFResult (*PLib3MFAttachment_SetRelationShipTypePtr) (Lib3MF_Attachm typedef Lib3MFResult (*PLib3MFAttachment_WriteToFilePtr) (Lib3MF_Attachment pAttachment, const char * pFileName); /** -* Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer methods. * * @param[in] pAttachment - Attachment instance. * @param[in] pFileName - file to read from. @@ -2869,7 +2869,7 @@ typedef Lib3MFResult (*PLib3MFAttachment_WriteToFilePtr) (Lib3MF_Attachment pAtt typedef Lib3MFResult (*PLib3MFAttachment_ReadFromFilePtr) (Lib3MF_Attachment pAttachment, const char * pFileName); /** -* Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer methods. * * @param[in] pAttachment - Attachment instance. * @param[in] pTheReadCallback - Callback to call for reading a data chunk @@ -2901,7 +2901,7 @@ typedef Lib3MFResult (*PLib3MFAttachment_GetStreamSizePtr) (Lib3MF_Attachment pA typedef Lib3MFResult (*PLib3MFAttachment_WriteToBufferPtr) (Lib3MF_Attachment pAttachment, const Lib3MF_uint64 nBufferBufferSize, Lib3MF_uint64* pBufferNeededCount, Lib3MF_uint8 * pBufferBuffer); /** -* Reads an attachment from a memory buffer. This buffer is immediatly read (in contrast to the ReadFromCallback and ReadFromFile-methods). +* Reads an attachment from a memory buffer. This buffer is immediately read (in contrast to the ReadFromCallback and ReadFromFile-methods). * * @param[in] pAttachment - Attachment instance. * @param[in] nBufferBufferSize - Number of elements in buffer @@ -4013,6 +4013,233 @@ typedef Lib3MFResult (*PLib3MFUnsignedMeshNode_GetInputPosPtr) (Lib3MF_UnsignedM */ typedef Lib3MFResult (*PLib3MFUnsignedMeshNode_GetOutputDistancePtr) (Lib3MF_UnsignedMeshNode pUnsignedMeshNode, Lib3MF_ImplicitPort * pDistance); +/************************************************************************************************************************* + Class definition for BeamLatticeNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the model resource id of the beam lattice +* +* @param[in] pBeamLatticeNode - BeamLatticeNode instance. +* @param[out] pBeamLattice - the input port for the model resource id of the beam lattice (mesh with beamlattice extension) +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamLatticeNode_GetInputBeamLatticePtr) (Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_ImplicitPort * pBeamLattice); + +/** +* Retrieves the input for the position +* +* @param[in] pBeamLatticeNode - BeamLatticeNode instance. +* @param[out] pPos - the input port for the position +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamLatticeNode_GetInputPosPtr) (Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_ImplicitPort * pPos); + +/** +* Retrieves the output +* +* @param[in] pBeamLatticeNode - BeamLatticeNode instance. +* @param[out] pDistance - the output port for the signed distance to the beam lattice +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamLatticeNode_GetOutputDistancePtr) (Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_ImplicitPort * pDistance); + +/** +* Sets the accurate range for distance computation +* +* @param[in] pBeamLatticeNode - BeamLatticeNode instance. +* @param[in] dAccurateRange - the accurate range in model units +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamLatticeNode_SetAccurateRangePtr) (Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_double dAccurateRange); + +/** +* Retrieves the accurate range for distance computation +* +* @param[in] pBeamLatticeNode - BeamLatticeNode instance. +* @param[out] pAccurateRange - the accurate range in model units +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamLatticeNode_GetAccurateRangePtr) (Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_double * pAccurateRange); + +/************************************************************************************************************************* + Class definition for FunctionGradientNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the function id +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pFunction - the input port for the function +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_GetInputFunctionIDPtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pFunction); + +/** +* Retrieves the input for the position +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pPos - the input port for the position +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_GetInputPosPtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pPos); + +/** +* Retrieves the input for the finite difference step +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pStep - the input port for the finite difference step +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_GetInputStepPtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pStep); + +/** +* Sets the name of the referenced scalar output +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[in] pScalarOutputName - the name of the scalar output of the referenced function +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_SetScalarOutputNamePtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, const char * pScalarOutputName); + +/** +* Retrieves the name of the referenced scalar output +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[in] nScalarOutputNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pScalarOutputNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pScalarOutputNameBuffer - buffer of the name of the scalar output of the referenced function, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_GetScalarOutputNamePtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, const Lib3MF_uint32 nScalarOutputNameBufferSize, Lib3MF_uint32* pScalarOutputNameNeededChars, char * pScalarOutputNameBuffer); + +/** +* Sets the name of the referenced vector input +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[in] pVectorInputName - the name of the vector input (float3) of the referenced function +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_SetVectorInputNamePtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, const char * pVectorInputName); + +/** +* Retrieves the name of the referenced vector input +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[in] nVectorInputNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pVectorInputNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pVectorInputNameBuffer - buffer of the name of the vector input (float3) of the referenced function, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_GetVectorInputNamePtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, const Lib3MF_uint32 nVectorInputNameBufferSize, Lib3MF_uint32* pVectorInputNameNeededChars, char * pVectorInputNameBuffer); + +/** +* Retrieves the normalized gradient output +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pVector - the output port for the normalized gradient +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_GetOutputVectorPtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pVector); + +/** +* Retrieves the raw gradient output +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pGradient - the output port for the raw gradient +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_GetOutputGradientPtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pGradient); + +/** +* Retrieves the gradient magnitude output +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pMagnitude - the output port for the gradient magnitude +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_GetOutputMagnitudePtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pMagnitude); + +/************************************************************************************************************************* + Class definition for NormalizeDistanceNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the function id +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[out] pFunction - the input port for the function +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFNormalizeDistanceNode_GetInputFunctionIDPtr) (Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pFunction); + +/** +* Retrieves the input for the position +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[out] pPos - the input port for the position (vector) +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFNormalizeDistanceNode_GetInputPosPtr) (Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pPos); + +/** +* Retrieves the input for the finite difference step +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[out] pStep - the input port for the finite difference step +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFNormalizeDistanceNode_GetInputStepPtr) (Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pStep); + +/** +* Sets the name of the referenced scalar output +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[in] pScalarOutputName - the name of the scalar output of the referenced function +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFNormalizeDistanceNode_SetScalarOutputNamePtr) (Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const char * pScalarOutputName); + +/** +* Retrieves the name of the referenced scalar output +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[in] nScalarOutputNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pScalarOutputNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pScalarOutputNameBuffer - buffer of the name of the scalar output of the referenced function, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFNormalizeDistanceNode_GetScalarOutputNamePtr) (Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const Lib3MF_uint32 nScalarOutputNameBufferSize, Lib3MF_uint32* pScalarOutputNameNeededChars, char * pScalarOutputNameBuffer); + +/** +* Sets the name of the referenced vector input +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[in] pVectorInputName - the name of the vector input (float3) of the referenced function +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFNormalizeDistanceNode_SetVectorInputNamePtr) (Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const char * pVectorInputName); + +/** +* Retrieves the name of the referenced vector input +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[in] nVectorInputNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pVectorInputNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pVectorInputNameBuffer - buffer of the name of the vector input (float3) of the referenced function, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFNormalizeDistanceNode_GetVectorInputNamePtr) (Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const Lib3MF_uint32 nVectorInputNameBufferSize, Lib3MF_uint32* pVectorInputNameNeededChars, char * pVectorInputNameBuffer); + +/** +* Retrieves the normalized result output +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[out] pResult - the output port for the normalized distance +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFNormalizeDistanceNode_GetOutputResultPtr) (Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pResult); + /************************************************************************************************************************* Class definition for FunctionCallNode **************************************************************************************************************************/ @@ -4788,6 +5015,42 @@ typedef Lib3MFResult (*PLib3MFImplicitFunction_AddMeshNodePtr) (Lib3MF_ImplicitF */ typedef Lib3MFResult (*PLib3MFImplicitFunction_AddUnsignedMeshNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_UnsignedMeshNode * pNode); +/** +* Add a BeamLatticeNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddBeamLatticeNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_BeamLatticeNode * pNode); + +/** +* Add a FunctionGradientNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddFunctionGradientNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_FunctionGradientNode * pNode); + +/** +* Add a NormalizeDistanceNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddNormalizeDistanceNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_NormalizeDistanceNode * pNode); + /** * Add a FunctionCallNode * @@ -6997,6 +7260,29 @@ typedef struct { PLib3MFUnsignedMeshNode_GetInputMeshPtr m_UnsignedMeshNode_GetInputMesh; PLib3MFUnsignedMeshNode_GetInputPosPtr m_UnsignedMeshNode_GetInputPos; PLib3MFUnsignedMeshNode_GetOutputDistancePtr m_UnsignedMeshNode_GetOutputDistance; + PLib3MFBeamLatticeNode_GetInputBeamLatticePtr m_BeamLatticeNode_GetInputBeamLattice; + PLib3MFBeamLatticeNode_GetInputPosPtr m_BeamLatticeNode_GetInputPos; + PLib3MFBeamLatticeNode_GetOutputDistancePtr m_BeamLatticeNode_GetOutputDistance; + PLib3MFBeamLatticeNode_SetAccurateRangePtr m_BeamLatticeNode_SetAccurateRange; + PLib3MFBeamLatticeNode_GetAccurateRangePtr m_BeamLatticeNode_GetAccurateRange; + PLib3MFFunctionGradientNode_GetInputFunctionIDPtr m_FunctionGradientNode_GetInputFunctionID; + PLib3MFFunctionGradientNode_GetInputPosPtr m_FunctionGradientNode_GetInputPos; + PLib3MFFunctionGradientNode_GetInputStepPtr m_FunctionGradientNode_GetInputStep; + PLib3MFFunctionGradientNode_SetScalarOutputNamePtr m_FunctionGradientNode_SetScalarOutputName; + PLib3MFFunctionGradientNode_GetScalarOutputNamePtr m_FunctionGradientNode_GetScalarOutputName; + PLib3MFFunctionGradientNode_SetVectorInputNamePtr m_FunctionGradientNode_SetVectorInputName; + PLib3MFFunctionGradientNode_GetVectorInputNamePtr m_FunctionGradientNode_GetVectorInputName; + PLib3MFFunctionGradientNode_GetOutputVectorPtr m_FunctionGradientNode_GetOutputVector; + PLib3MFFunctionGradientNode_GetOutputGradientPtr m_FunctionGradientNode_GetOutputGradient; + PLib3MFFunctionGradientNode_GetOutputMagnitudePtr m_FunctionGradientNode_GetOutputMagnitude; + PLib3MFNormalizeDistanceNode_GetInputFunctionIDPtr m_NormalizeDistanceNode_GetInputFunctionID; + PLib3MFNormalizeDistanceNode_GetInputPosPtr m_NormalizeDistanceNode_GetInputPos; + PLib3MFNormalizeDistanceNode_GetInputStepPtr m_NormalizeDistanceNode_GetInputStep; + PLib3MFNormalizeDistanceNode_SetScalarOutputNamePtr m_NormalizeDistanceNode_SetScalarOutputName; + PLib3MFNormalizeDistanceNode_GetScalarOutputNamePtr m_NormalizeDistanceNode_GetScalarOutputName; + PLib3MFNormalizeDistanceNode_SetVectorInputNamePtr m_NormalizeDistanceNode_SetVectorInputName; + PLib3MFNormalizeDistanceNode_GetVectorInputNamePtr m_NormalizeDistanceNode_GetVectorInputName; + PLib3MFNormalizeDistanceNode_GetOutputResultPtr m_NormalizeDistanceNode_GetOutputResult; PLib3MFFunctionCallNode_GetInputFunctionIDPtr m_FunctionCallNode_GetInputFunctionID; PLib3MFNodeIterator_GetCurrentPtr m_NodeIterator_GetCurrent; PLib3MFFunction_GetDisplayNamePtr m_Function_GetDisplayName; @@ -7060,6 +7346,9 @@ typedef struct { PLib3MFImplicitFunction_AddConstMatNodePtr m_ImplicitFunction_AddConstMatNode; PLib3MFImplicitFunction_AddMeshNodePtr m_ImplicitFunction_AddMeshNode; PLib3MFImplicitFunction_AddUnsignedMeshNodePtr m_ImplicitFunction_AddUnsignedMeshNode; + PLib3MFImplicitFunction_AddBeamLatticeNodePtr m_ImplicitFunction_AddBeamLatticeNode; + PLib3MFImplicitFunction_AddFunctionGradientNodePtr m_ImplicitFunction_AddFunctionGradientNode; + PLib3MFImplicitFunction_AddNormalizeDistanceNodePtr m_ImplicitFunction_AddNormalizeDistanceNode; PLib3MFImplicitFunction_AddFunctionCallNodePtr m_ImplicitFunction_AddFunctionCallNode; PLib3MFImplicitFunction_GetNodesPtr m_ImplicitFunction_GetNodes; PLib3MFImplicitFunction_RemoveNodePtr m_ImplicitFunction_RemoveNode; @@ -8380,6 +8669,75 @@ Lib3MFResult CCall_lib3mf_unsignedmeshnode_getinputpos(Lib3MFHandle libraryHandl Lib3MFResult CCall_lib3mf_unsignedmeshnode_getoutputdistance(Lib3MFHandle libraryHandle, Lib3MF_UnsignedMeshNode pUnsignedMeshNode, Lib3MF_ImplicitPort * pDistance); +Lib3MFResult CCall_lib3mf_beamlatticenode_getinputbeamlattice(Lib3MFHandle libraryHandle, Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_ImplicitPort * pBeamLattice); + + +Lib3MFResult CCall_lib3mf_beamlatticenode_getinputpos(Lib3MFHandle libraryHandle, Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_ImplicitPort * pPos); + + +Lib3MFResult CCall_lib3mf_beamlatticenode_getoutputdistance(Lib3MFHandle libraryHandle, Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_ImplicitPort * pDistance); + + +Lib3MFResult CCall_lib3mf_beamlatticenode_setaccuraterange(Lib3MFHandle libraryHandle, Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_double dAccurateRange); + + +Lib3MFResult CCall_lib3mf_beamlatticenode_getaccuraterange(Lib3MFHandle libraryHandle, Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_double * pAccurateRange); + + +Lib3MFResult CCall_lib3mf_functiongradientnode_getinputfunctionid(Lib3MFHandle libraryHandle, Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pFunction); + + +Lib3MFResult CCall_lib3mf_functiongradientnode_getinputpos(Lib3MFHandle libraryHandle, Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pPos); + + +Lib3MFResult CCall_lib3mf_functiongradientnode_getinputstep(Lib3MFHandle libraryHandle, Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pStep); + + +Lib3MFResult CCall_lib3mf_functiongradientnode_setscalaroutputname(Lib3MFHandle libraryHandle, Lib3MF_FunctionGradientNode pFunctionGradientNode, const char * pScalarOutputName); + + +Lib3MFResult CCall_lib3mf_functiongradientnode_getscalaroutputname(Lib3MFHandle libraryHandle, Lib3MF_FunctionGradientNode pFunctionGradientNode, const Lib3MF_uint32 nScalarOutputNameBufferSize, Lib3MF_uint32* pScalarOutputNameNeededChars, char * pScalarOutputNameBuffer); + + +Lib3MFResult CCall_lib3mf_functiongradientnode_setvectorinputname(Lib3MFHandle libraryHandle, Lib3MF_FunctionGradientNode pFunctionGradientNode, const char * pVectorInputName); + + +Lib3MFResult CCall_lib3mf_functiongradientnode_getvectorinputname(Lib3MFHandle libraryHandle, Lib3MF_FunctionGradientNode pFunctionGradientNode, const Lib3MF_uint32 nVectorInputNameBufferSize, Lib3MF_uint32* pVectorInputNameNeededChars, char * pVectorInputNameBuffer); + + +Lib3MFResult CCall_lib3mf_functiongradientnode_getoutputvector(Lib3MFHandle libraryHandle, Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pVector); + + +Lib3MFResult CCall_lib3mf_functiongradientnode_getoutputgradient(Lib3MFHandle libraryHandle, Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pGradient); + + +Lib3MFResult CCall_lib3mf_functiongradientnode_getoutputmagnitude(Lib3MFHandle libraryHandle, Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pMagnitude); + + +Lib3MFResult CCall_lib3mf_normalizedistancenode_getinputfunctionid(Lib3MFHandle libraryHandle, Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pFunction); + + +Lib3MFResult CCall_lib3mf_normalizedistancenode_getinputpos(Lib3MFHandle libraryHandle, Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pPos); + + +Lib3MFResult CCall_lib3mf_normalizedistancenode_getinputstep(Lib3MFHandle libraryHandle, Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pStep); + + +Lib3MFResult CCall_lib3mf_normalizedistancenode_setscalaroutputname(Lib3MFHandle libraryHandle, Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const char * pScalarOutputName); + + +Lib3MFResult CCall_lib3mf_normalizedistancenode_getscalaroutputname(Lib3MFHandle libraryHandle, Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const Lib3MF_uint32 nScalarOutputNameBufferSize, Lib3MF_uint32* pScalarOutputNameNeededChars, char * pScalarOutputNameBuffer); + + +Lib3MFResult CCall_lib3mf_normalizedistancenode_setvectorinputname(Lib3MFHandle libraryHandle, Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const char * pVectorInputName); + + +Lib3MFResult CCall_lib3mf_normalizedistancenode_getvectorinputname(Lib3MFHandle libraryHandle, Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const Lib3MF_uint32 nVectorInputNameBufferSize, Lib3MF_uint32* pVectorInputNameNeededChars, char * pVectorInputNameBuffer); + + +Lib3MFResult CCall_lib3mf_normalizedistancenode_getoutputresult(Lib3MFHandle libraryHandle, Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pResult); + + Lib3MFResult CCall_lib3mf_functioncallnode_getinputfunctionid(Lib3MFHandle libraryHandle, Lib3MF_FunctionCallNode pFunctionCallNode, Lib3MF_ImplicitPort * pFunction); @@ -8569,6 +8927,15 @@ Lib3MFResult CCall_lib3mf_implicitfunction_addmeshnode(Lib3MFHandle libraryHandl Lib3MFResult CCall_lib3mf_implicitfunction_addunsignedmeshnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_UnsignedMeshNode * pNode); +Lib3MFResult CCall_lib3mf_implicitfunction_addbeamlatticenode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_BeamLatticeNode * pNode); + + +Lib3MFResult CCall_lib3mf_implicitfunction_addfunctiongradientnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_FunctionGradientNode * pNode); + + +Lib3MFResult CCall_lib3mf_implicitfunction_addnormalizedistancenode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_NormalizeDistanceNode * pNode); + + Lib3MFResult CCall_lib3mf_implicitfunction_addfunctioncallnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_FunctionCallNode * pNode); diff --git a/Autogenerated/Bindings/Go/lib3mf_types.h b/Autogenerated/Bindings/Go/lib3mf_types.h index 9e0b4012c..d87847a5b 100644 --- a/Autogenerated/Bindings/Go/lib3mf_types.h +++ b/Autogenerated/Bindings/Go/lib3mf_types.h @@ -24,12 +24,12 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha. +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. Abstract: This is an autogenerated plain C Header file with basic types in order to allow an easy use of the 3MF Library -Interface version: 2.4.1 +Interface version: 2.5.0 */ @@ -84,8 +84,8 @@ typedef void * Lib3MF_pvoid; **************************************************************************************************************************/ #define LIB3MF_VERSION_MAJOR 2 -#define LIB3MF_VERSION_MINOR 4 -#define LIB3MF_VERSION_MICRO 1 +#define LIB3MF_VERSION_MINOR 5 +#define LIB3MF_VERSION_MICRO 0 #define LIB3MF_VERSION_PRERELEASEINFO "" #define LIB3MF_VERSION_BUILDINFO "" @@ -310,6 +310,9 @@ typedef Lib3MFHandle Lib3MF_ConstVecNode; typedef Lib3MFHandle Lib3MF_ConstMatNode; typedef Lib3MFHandle Lib3MF_MeshNode; typedef Lib3MFHandle Lib3MF_UnsignedMeshNode; +typedef Lib3MFHandle Lib3MF_BeamLatticeNode; +typedef Lib3MFHandle Lib3MF_FunctionGradientNode; +typedef Lib3MFHandle Lib3MF_NormalizeDistanceNode; typedef Lib3MFHandle Lib3MF_FunctionCallNode; typedef Lib3MFHandle Lib3MF_NodeIterator; typedef Lib3MFHandle Lib3MF_Function; @@ -358,7 +361,8 @@ typedef enum eLib3MFObjectType { eObjectTypeOther = 0, eObjectTypeModel = 1, eObjectTypeSupport = 2, - eObjectTypeSolidSupport = 3 + eObjectTypeSolidSupport = 3, + eObjectTypeSurface = 4 } eLib3MFObjectType; typedef enum eLib3MFTextureType { @@ -472,11 +476,11 @@ typedef enum eLib3MFImplicitNodeType { eImplicitNodeTypeMatVecMultiplication = 14, /** Multiplies a matrix with a vector */ eImplicitNodeTypeTranspose = 15, /** Transposes a matrix */ eImplicitNodeTypeInverse = 16, /** Computes the inverse of a matrix */ - eImplicitNodeTypeSinus = 17, /** Calculates the sinus */ - eImplicitNodeTypeCosinus = 18, /** Calculates the cosinus */ + eImplicitNodeTypeSinus = 17, /** Calculates the sine */ + eImplicitNodeTypeCosinus = 18, /** Calculates the cosine */ eImplicitNodeTypeTan = 19, /** Calculates the tangent */ - eImplicitNodeTypeArcSin = 20, /** Calculates the arcsinus */ - eImplicitNodeTypeArcCos = 21, /** Calculates the arccosinus */ + eImplicitNodeTypeArcSin = 20, /** Calculates the arcsine */ + eImplicitNodeTypeArcCos = 21, /** Calculates the arccosine */ eImplicitNodeTypeArcTan = 22, /** Calculates the arctangent */ eImplicitNodeTypeArcTan2 = 23, /** Calculates the arctangent */ eImplicitNodeTypeMin = 24, /** Calculates the minimum of two values */ @@ -486,9 +490,9 @@ typedef enum eLib3MFImplicitNodeType { eImplicitNodeTypePow = 28, /** Calculates the power A^B */ eImplicitNodeTypeSqrt = 29, /** Calculates the square root */ eImplicitNodeTypeExp = 30, /** Exponential function */ - eImplicitNodeTypeLog = 31, /** Natural logarithmus */ - eImplicitNodeTypeLog2 = 32, /** Logarithmus to the base 2 */ - eImplicitNodeTypeLog10 = 33, /** Logarithmus to the base 10 */ + eImplicitNodeTypeLog = 31, /** Natural logarithm */ + eImplicitNodeTypeLog2 = 32, /** Logarithm to the base 2 */ + eImplicitNodeTypeLog10 = 33, /** Logarithm to the base 10 */ eImplicitNodeTypeSelect = 34, /** If A is less than B returns C, else D */ eImplicitNodeTypeClamp = 35, /** Clamps the input value to min and max */ eImplicitNodeTypeSinh = 36, /** Calculates the hyperbolic sine */ @@ -503,9 +507,12 @@ typedef enum eLib3MFImplicitNodeType { eImplicitNodeTypeMesh = 45, /** Calculates the signed distance to a mesh */ eImplicitNodeTypeLength = 46, /** Calculates the length of a vector */ eImplicitNodeTypeConstResourceID = 47, /** Selects a resource (function, mesh etc.) */ - eImplicitNodeTypeVectorFromScalar = 48, /** Creates a vector from one scalar values */ + eImplicitNodeTypeVectorFromScalar = 48, /** Creates a vector from one scalar value */ eImplicitNodeTypeUnsignedMesh = 49, /** Calculates the unsigned distance to a mesh */ - eImplicitNodeTypeMod = 50 /** Calculates the modulo of two values (same behaviour as glsl mod) */ + eImplicitNodeTypeMod = 50, /** Calculates the modulo of two values (same behaviour as glsl mod) */ + eImplicitNodeTypeBeamLattice = 51, /** Calculates the signed distance to a beam lattice */ + eImplicitNodeTypeFunctionGradient = 52, /** Calculates the gradient of a function */ + eImplicitNodeTypeNormalizeDistance = 53 /** Normalizes a distance field */ } eLib3MFImplicitNodeType; /** diff --git a/Autogenerated/Bindings/Java8/build_jar.sh b/Autogenerated/Bindings/Java8/build_jar.sh new file mode 100644 index 000000000..02819608f --- /dev/null +++ b/Autogenerated/Bindings/Java8/build_jar.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -euxo pipefail + +cd "$(dirname "$0")" +echo "Download JNA" +[ -f jna-5.5.0.jar ] || curl -O https://repo1.maven.org/maven2/net/java/dev/jna/jna/5.5.0/jna-5.5.0.jar + +echo "Compile Java Bindings" +javac -classpath *.jar lib3mf/* + +echo "Create JAR" +jar cvf lib3mf-2.5.0.jar lib3mf diff --git a/Autogenerated/Bindings/Java8/lib3mf/AbsNode.java b/Autogenerated/Bindings/Java8/lib3mf/AbsNode.java new file mode 100644 index 000000000..048755683 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/AbsNode.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class AbsNode extends OneInputNode { + + public AbsNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/AccessRight.java b/Autogenerated/Bindings/Java8/lib3mf/AccessRight.java new file mode 100644 index 000000000..a5fa54964 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/AccessRight.java @@ -0,0 +1,110 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class AccessRight extends Base { + + public AccessRight(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Gets the consumer associated with this access right + * + * @return The consumer instance + * @throws Lib3MFException + */ + public Consumer getConsumer() throws Lib3MFException { + Pointer bufferConsumer = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_accessright_getconsumer.invokeInt(new java.lang.Object[]{mHandle, bufferConsumer})); + Pointer valueConsumer = bufferConsumer.getPointer(0); + Consumer consumer = null; + if (valueConsumer == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Consumer was a null pointer"); + } + consumer = mWrapper.PolymorphicFactory(valueConsumer, Consumer.class); + return consumer; + } + + /** + * Gets the associated encryption algorithm + * + * @return The algorithm used for the key in this accessright + * @throws Lib3MFException + */ + public Lib3MFWrapper.WrappingAlgorithm getWrappingAlgorithm() throws Lib3MFException { + Pointer bufferAlgorithm = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_accessright_getwrappingalgorithm.invokeInt(new java.lang.Object[]{mHandle, bufferAlgorithm})); + return Lib3MFWrapper.EnumConversion.convertConstToWrappingAlgorithm(bufferAlgorithm.getInt(0)); + } + + /** + * Gets the associated mask generation function algorithm + * + * @return The MFG1 algorithm + * @throws Lib3MFException + */ + public Lib3MFWrapper.MgfAlgorithm getMgfAlgorithm() throws Lib3MFException { + Pointer bufferAlgorithm = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_accessright_getmgfalgorithm.invokeInt(new java.lang.Object[]{mHandle, bufferAlgorithm})); + return Lib3MFWrapper.EnumConversion.convertConstToMgfAlgorithm(bufferAlgorithm.getInt(0)); + } + + /** + * Gets the digest method assoicated + * + * @return The digest method for this accessright + * @throws Lib3MFException + */ + public Lib3MFWrapper.DigestMethod getDigestMethod() throws Lib3MFException { + Pointer bufferAlgorithm = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_accessright_getdigestmethod.invokeInt(new java.lang.Object[]{mHandle, bufferAlgorithm})); + return Lib3MFWrapper.EnumConversion.convertConstToDigestMethod(bufferAlgorithm.getInt(0)); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/AdditionNode.java b/Autogenerated/Bindings/Java8/lib3mf/AdditionNode.java new file mode 100644 index 000000000..79b8c4f85 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/AdditionNode.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class AdditionNode extends TwoInputNode { + + public AdditionNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/ArcCosNode.java b/Autogenerated/Bindings/Java8/lib3mf/ArcCosNode.java new file mode 100644 index 000000000..b06fe14a4 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/ArcCosNode.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ArcCosNode extends OneInputNode { + + public ArcCosNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/ArcSinNode.java b/Autogenerated/Bindings/Java8/lib3mf/ArcSinNode.java new file mode 100644 index 000000000..8e2d874b0 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/ArcSinNode.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ArcSinNode extends OneInputNode { + + public ArcSinNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/ArcTan2Node.java b/Autogenerated/Bindings/Java8/lib3mf/ArcTan2Node.java new file mode 100644 index 000000000..b8faa14c1 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/ArcTan2Node.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ArcTan2Node extends TwoInputNode { + + public ArcTan2Node(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/ArcTanNode.java b/Autogenerated/Bindings/Java8/lib3mf/ArcTanNode.java new file mode 100644 index 000000000..d5bef49b6 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/ArcTanNode.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ArcTanNode extends OneInputNode { + + public ArcTanNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/Attachment.java b/Autogenerated/Bindings/Java8/lib3mf/Attachment.java new file mode 100644 index 000000000..825f204c7 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/Attachment.java @@ -0,0 +1,214 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Attachment extends Base { + + public Attachment(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves an attachment's package path. This function will be removed in a later release. + * + * @return returns the attachment's package path string + * @throws Lib3MFException + */ + public String getPath() throws Lib3MFException { + Pointer bytesNeededPath = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_attachment_getpath.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededPath, null})); + int sizePath = bytesNeededPath.getInt(0); + Pointer bufferPath = new Memory(sizePath); + mWrapper.checkError(this, mWrapper.lib3mf_attachment_getpath.invokeInt(new java.lang.Object[]{mHandle, sizePath, bytesNeededPath, bufferPath})); + return new String(bufferPath.getByteArray(0, sizePath - 1), StandardCharsets.UTF_8); + } + + /** + * Sets an attachment's package path. This function will be removed in a later release. + * + * @param path new path of the attachment. + * @throws Lib3MFException + */ + public void setPath(String path) throws Lib3MFException { + byte[] bytesPath = path.getBytes(StandardCharsets.UTF_8); + Memory bufferPath = new Memory(bytesPath.length + 1); + bufferPath.write(0, bytesPath, 0, bytesPath.length); + bufferPath.setByte(bytesPath.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_attachment_setpath.invokeInt(new java.lang.Object[]{mHandle, bufferPath})); + } + + /** + * Returns the PackagePart that is this attachment. + * + * @return The PackagePart of this attachment. + * @throws Lib3MFException + */ + public PackagePart packagePart() throws Lib3MFException { + Pointer bufferPackagePart = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_attachment_packagepart.invokeInt(new java.lang.Object[]{mHandle, bufferPackagePart})); + Pointer valuePackagePart = bufferPackagePart.getPointer(0); + PackagePart packagePart = null; + if (valuePackagePart == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "PackagePart was a null pointer"); + } + packagePart = mWrapper.PolymorphicFactory(valuePackagePart, PackagePart.class); + return packagePart; + } + + /** + * Retrieves an attachment's relationship type + * + * @return returns the attachment's package relationship type string + * @throws Lib3MFException + */ + public String getRelationShipType() throws Lib3MFException { + Pointer bytesNeededPath = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_attachment_getrelationshiptype.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededPath, null})); + int sizePath = bytesNeededPath.getInt(0); + Pointer bufferPath = new Memory(sizePath); + mWrapper.checkError(this, mWrapper.lib3mf_attachment_getrelationshiptype.invokeInt(new java.lang.Object[]{mHandle, sizePath, bytesNeededPath, bufferPath})); + return new String(bufferPath.getByteArray(0, sizePath - 1), StandardCharsets.UTF_8); + } + + /** + * Sets an attachment's relationship type. + * + * @param path new relationship type string. + * @throws Lib3MFException + */ + public void setRelationShipType(String path) throws Lib3MFException { + byte[] bytesPath = path.getBytes(StandardCharsets.UTF_8); + Memory bufferPath = new Memory(bytesPath.length + 1); + bufferPath.write(0, bytesPath, 0, bytesPath.length); + bufferPath.setByte(bytesPath.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_attachment_setrelationshiptype.invokeInt(new java.lang.Object[]{mHandle, bufferPath})); + } + + /** + * Writes out the attachment as file. + * + * @param fileName file to write into. + * @throws Lib3MFException + */ + public void writeToFile(String fileName) throws Lib3MFException { + byte[] bytesFileName = fileName.getBytes(StandardCharsets.UTF_8); + Memory bufferFileName = new Memory(bytesFileName.length + 1); + bufferFileName.write(0, bytesFileName, 0, bytesFileName.length); + bufferFileName.setByte(bytesFileName.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_attachment_writetofile.invokeInt(new java.lang.Object[]{mHandle, bufferFileName})); + } + + /** + * Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer methods. + * + * @param fileName file to read from. + * @throws Lib3MFException + */ + public void readFromFile(String fileName) throws Lib3MFException { + byte[] bytesFileName = fileName.getBytes(StandardCharsets.UTF_8); + Memory bufferFileName = new Memory(bytesFileName.length + 1); + bufferFileName.write(0, bytesFileName, 0, bytesFileName.length); + bufferFileName.setByte(bytesFileName.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_attachment_readfromfile.invokeInt(new java.lang.Object[]{mHandle, bufferFileName})); + } + + /** + * Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer methods. + * + * @param theReadCallback Callback to call for reading a data chunk + * @param streamSize number of bytes the callback returns + * @param theSeekCallback Callback to call for seeking in the stream. + * @param userData Userdata that is passed to the callback function + * @throws Lib3MFException + */ + public void readFromCallback(Lib3MFWrapper.ReadCallback theReadCallback, long streamSize, Lib3MFWrapper.SeekCallback theSeekCallback, Pointer userData) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_attachment_readfromcallback.invokeInt(new java.lang.Object[]{mHandle, theReadCallback, streamSize, theSeekCallback, userData})); + } + + /** + * Retrieves the size of the attachment stream + * + * @return the stream size + * @throws Lib3MFException + */ + public long getStreamSize() throws Lib3MFException { + Pointer bufferStreamSize = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_attachment_getstreamsize.invokeInt(new java.lang.Object[]{mHandle, bufferStreamSize})); + return bufferStreamSize.getLong(0); + } + + /** + * Writes out the attachment into a buffer + * + * @return Buffer to write into + * @throws Lib3MFException + */ + public byte[] writeToBuffer() throws Lib3MFException { + Pointer countNeededBuffer = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_attachment_writetobuffer.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededBuffer, Pointer.NULL})); + long countBuffer = countNeededBuffer.getLong(0); + Pointer bufferBuffer = new Memory(Math.max(1, 1 * countBuffer)); + mWrapper.checkError(this, mWrapper.lib3mf_attachment_writetobuffer.invokeInt(new java.lang.Object[]{mHandle, countBuffer, countNeededBuffer, bufferBuffer})); + return bufferBuffer.getByteArray(0, (int)countBuffer); + } + + /** + * Reads an attachment from a memory buffer. This buffer is immediately read (in contrast to the ReadFromCallback and ReadFromFile-methods). + * + * @param buffer Buffer to read from + * @throws Lib3MFException + */ + public void readFromBuffer(byte[] buffer) throws Lib3MFException { + Pointer bufferBuffer = new Memory(Math.max(1, 1 * buffer.length)); + for (int i = 0; i < buffer.length; i++) { + bufferBuffer.setByte(1 * i, buffer[i]); + } + mWrapper.checkError(this, mWrapper.lib3mf_attachment_readfrombuffer.invokeInt(new java.lang.Object[]{mHandle, (long) buffer.length, bufferBuffer})); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/Ball.java b/Autogenerated/Bindings/Java8/lib3mf/Ball.java new file mode 100644 index 000000000..c01b96185 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/Ball.java @@ -0,0 +1,63 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Memory; +import com.sun.jna.Pointer; + +import java.util.Arrays; +import java.util.List; + +public class Ball { + + public int Index; + + public double Radius; + + public static final int SIZE = 12; + + public void readFromPointer(Pointer p, long offset) { + Index = p.getInt(offset + 0); + Radius = p.getDouble(offset + 4); + } + + public void writeToPointer(Pointer p, long offset) { + p.setInt(offset + 0, Index); + p.setDouble(offset + 4, Radius); + } + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/Base.java b/Autogenerated/Bindings/Java8/lib3mf/Base.java new file mode 100644 index 000000000..af354ada6 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/Base.java @@ -0,0 +1,82 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Base { + + protected Pointer mHandle; + + protected Lib3MFWrapper mWrapper; + + public Base(Lib3MFWrapper wrapper, Pointer handle) { + mHandle = handle; + mWrapper = wrapper; + } + + public Pointer getHandle() { + return mHandle; + } + + @Override + protected void finalize() throws Throwable { + super.finalize(); + mWrapper.release(this); + } + /** + * Get Class Type Id + * + * @return Class type as a 64 bits integer + * @throws Lib3MFException + */ + public long classTypeId() throws Lib3MFException { + Pointer bufferClassTypeId = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_base_classtypeid.invokeInt(new java.lang.Object[]{mHandle, bufferClassTypeId})); + return bufferClassTypeId.getLong(0); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/BaseMaterialGroup.java b/Autogenerated/Bindings/Java8/lib3mf/BaseMaterialGroup.java new file mode 100644 index 000000000..9c4bb88a1 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/BaseMaterialGroup.java @@ -0,0 +1,172 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class BaseMaterialGroup extends Resource { + + public BaseMaterialGroup(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the count of base materials in the material group. + * + * @return returns the count of base materials. + * @throws Lib3MFException + */ + public int getCount() throws Lib3MFException { + Pointer bufferCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_basematerialgroup_getcount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getInt(0); + } + + /** + * returns all the PropertyIDs of all materials in this group + * + * @return PropertyID of the material in the material group. + * @throws Lib3MFException + */ + public int[] getAllPropertyIDs() throws Lib3MFException { + Pointer countNeededPropertyIDs = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_basematerialgroup_getallpropertyids.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededPropertyIDs, Pointer.NULL})); + long countPropertyIDs = countNeededPropertyIDs.getLong(0); + Pointer bufferPropertyIDs = new Memory(Math.max(1, 4 * countPropertyIDs)); + mWrapper.checkError(this, mWrapper.lib3mf_basematerialgroup_getallpropertyids.invokeInt(new java.lang.Object[]{mHandle, countPropertyIDs, countNeededPropertyIDs, bufferPropertyIDs})); + return bufferPropertyIDs.getIntArray(0, (int)countPropertyIDs); + } + + /** + * Adds a new material to the material group + * + * @param name new name of the base material. + * @param displayColor Display color of the material + * @return returns new PropertyID of the new material in the material group. + * @throws Lib3MFException + */ + public int addMaterial(String name, Color displayColor) throws Lib3MFException { + byte[] bytesName = name.getBytes(StandardCharsets.UTF_8); + Memory bufferName = new Memory(bytesName.length + 1); + bufferName.write(0, bytesName, 0, bytesName.length); + bufferName.setByte(bytesName.length, (byte)0); + Pointer bufferDisplayColor = new Memory(Color.SIZE); + displayColor.writeToPointer(bufferDisplayColor, 0); + Pointer bufferPropertyID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_basematerialgroup_addmaterial.invokeInt(new java.lang.Object[]{mHandle, bufferName, bufferDisplayColor, bufferPropertyID})); + return bufferPropertyID.getInt(0); + } + + /** + * Removes a material from the material group. + * + * @param propertyID PropertyID of the material in the material group. + * @throws Lib3MFException + */ + public void removeMaterial(int propertyID) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_basematerialgroup_removematerial.invokeInt(new java.lang.Object[]{mHandle, propertyID})); + } + + /** + * Returns the base material's name + * + * @param propertyID PropertyID of the material in the material group. + * @return returns the name of the base material. + * @throws Lib3MFException + */ + public String getName(int propertyID) throws Lib3MFException { + Pointer bytesNeededName = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_basematerialgroup_getname.invokeInt(new java.lang.Object[]{mHandle, propertyID, 0, bytesNeededName, null})); + int sizeName = bytesNeededName.getInt(0); + Pointer bufferName = new Memory(sizeName); + mWrapper.checkError(this, mWrapper.lib3mf_basematerialgroup_getname.invokeInt(new java.lang.Object[]{mHandle, propertyID, sizeName, bytesNeededName, bufferName})); + return new String(bufferName.getByteArray(0, sizeName - 1), StandardCharsets.UTF_8); + } + + /** + * Sets a base material's name + * + * @param propertyID PropertyID of the material in the material group. + * @param name new name of the base material. + * @throws Lib3MFException + */ + public void setName(int propertyID, String name) throws Lib3MFException { + byte[] bytesName = name.getBytes(StandardCharsets.UTF_8); + Memory bufferName = new Memory(bytesName.length + 1); + bufferName.write(0, bytesName, 0, bytesName.length); + bufferName.setByte(bytesName.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_basematerialgroup_setname.invokeInt(new java.lang.Object[]{mHandle, propertyID, bufferName})); + } + + /** + * Sets a base material's display color. + * + * @param propertyID PropertyID of the material in the material group. + * @param theColor The base material's display color + * @throws Lib3MFException + */ + public void setDisplayColor(int propertyID, Color theColor) throws Lib3MFException { + Pointer bufferTheColor = new Memory(Color.SIZE); + theColor.writeToPointer(bufferTheColor, 0); + mWrapper.checkError(this, mWrapper.lib3mf_basematerialgroup_setdisplaycolor.invokeInt(new java.lang.Object[]{mHandle, propertyID, bufferTheColor})); + } + + /** + * Returns a base material's display color. + * + * @param propertyID PropertyID of the material in the material group. + * @return The base material's display color + * @throws Lib3MFException + */ + public Color getDisplayColor(int propertyID) throws Lib3MFException { + Pointer bufferTheColor = new Memory(Color.SIZE); + mWrapper.checkError(this, mWrapper.lib3mf_basematerialgroup_getdisplaycolor.invokeInt(new java.lang.Object[]{mHandle, propertyID, bufferTheColor})); + Color theColor = new Color(); + theColor.readFromPointer(bufferTheColor, 0); + return theColor; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/BaseMaterialGroupIterator.java b/Autogenerated/Bindings/Java8/lib3mf/BaseMaterialGroupIterator.java new file mode 100644 index 000000000..de0cfea77 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/BaseMaterialGroupIterator.java @@ -0,0 +1,74 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class BaseMaterialGroupIterator extends ResourceIterator { + + public BaseMaterialGroupIterator(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the MaterialGroup the iterator points at. + * + * @return returns the BaseMaterialGroup instance. + * @throws Lib3MFException + */ + public BaseMaterialGroup getCurrentBaseMaterialGroup() throws Lib3MFException { + Pointer bufferResource = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_basematerialgroupiterator_getcurrentbasematerialgroup.invokeInt(new java.lang.Object[]{mHandle, bufferResource})); + Pointer valueResource = bufferResource.getPointer(0); + BaseMaterialGroup resource = null; + if (valueResource == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Resource was a null pointer"); + } + resource = mWrapper.PolymorphicFactory(valueResource, BaseMaterialGroup.class); + return resource; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/Beam.java b/Autogenerated/Bindings/Java8/lib3mf/Beam.java new file mode 100644 index 000000000..40cbe6400 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/Beam.java @@ -0,0 +1,73 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Memory; +import com.sun.jna.Pointer; + +import java.util.Arrays; +import java.util.List; + +public class Beam { + + public int[] Indices = new int[2]; + + public double[] Radii = new double[2]; + + public int[] CapModes = new int[2]; + + public static final int SIZE = 32; + + public void readFromPointer(Pointer p, long offset) { + Indices[0] = p.getInt(offset + 0); + Indices[1] = p.getInt(offset + 4); + Radii[0] = p.getDouble(offset + 8); + Radii[1] = p.getDouble(offset + 16); + CapModes[0] = p.getInt(offset + 24); + CapModes[1] = p.getInt(offset + 28); + } + + public void writeToPointer(Pointer p, long offset) { + p.setInt(offset + 0, Indices[0]); + p.setInt(offset + 4, Indices[1]); + p.setDouble(offset + 8, Radii[0]); + p.setDouble(offset + 16, Radii[1]); + p.setInt(offset + 24, CapModes[0]); + p.setInt(offset + 28, CapModes[1]); + } + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/BeamLattice.java b/Autogenerated/Bindings/Java8/lib3mf/BeamLattice.java new file mode 100644 index 000000000..8328f24f3 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/BeamLattice.java @@ -0,0 +1,421 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class BeamLattice extends Base { + + public BeamLattice(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the minimal length of beams for the beamlattice. + * + * @return minimal length of beams for the beamlattice + * @throws Lib3MFException + */ + public double getMinLength() throws Lib3MFException { + Pointer bufferMinLength = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_getminlength.invokeInt(new java.lang.Object[]{mHandle, bufferMinLength})); + return bufferMinLength.getDouble(0); + } + + /** + * Sets the minimal length of beams for the beamlattice. + * + * @param minLength minimal length of beams for the beamlattice + * @throws Lib3MFException + */ + public void setMinLength(double minLength) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_setminlength.invokeInt(new java.lang.Object[]{mHandle, minLength})); + } + + /** + * Returns the clipping mode and the clipping-mesh for the beamlattice of this mesh. + * + * @return GetClipping Result Tuple + * @throws Lib3MFException + */ + public GetClippingResult getClipping() throws Lib3MFException { + Pointer bufferClipMode = new Memory(4); + Pointer bufferUniqueResourceID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_getclipping.invokeInt(new java.lang.Object[]{mHandle, bufferClipMode, bufferUniqueResourceID})); + GetClippingResult returnTuple = new GetClippingResult(); + returnTuple.ClipMode = Lib3MFWrapper.EnumConversion.convertConstToBeamLatticeClipMode(bufferClipMode.getInt(0)); + returnTuple.UniqueResourceID = bufferUniqueResourceID.getInt(0); + return returnTuple; + } + + public static class GetClippingResult { + /** + * contains the clip mode of this mesh + */ + public Lib3MFWrapper.BeamLatticeClipMode ClipMode; + + /** + * filled with the UniqueResourceID of the clipping mesh-object or an undefined value if pClipMode is MODELBEAMLATTICECLIPMODE_NONE + */ + public int UniqueResourceID; + + } + /** + * Sets the clipping mode and the clipping-mesh for the beamlattice of this mesh. + * + * @param clipMode contains the clip mode of this mesh + * @param uniqueResourceID the UniqueResourceID of the clipping mesh-object. This mesh-object has to be defined before setting the Clipping. + * @throws Lib3MFException + */ + public void setClipping(Lib3MFWrapper.BeamLatticeClipMode clipMode, int uniqueResourceID) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_setclipping.invokeInt(new java.lang.Object[]{mHandle, Lib3MFWrapper.EnumConversion.convertBeamLatticeClipModeToConst(clipMode), uniqueResourceID})); + } + + /** + * Returns the representation-mesh for the beamlattice of this mesh. + * + * @return GetRepresentation Result Tuple + * @throws Lib3MFException + */ + public GetRepresentationResult getRepresentation() throws Lib3MFException { + Pointer bufferHasRepresentation = new Memory(1); + Pointer bufferUniqueResourceID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_getrepresentation.invokeInt(new java.lang.Object[]{mHandle, bufferHasRepresentation, bufferUniqueResourceID})); + GetRepresentationResult returnTuple = new GetRepresentationResult(); + returnTuple.HasRepresentation = bufferHasRepresentation.getByte(0) != 0; + returnTuple.UniqueResourceID = bufferUniqueResourceID.getInt(0); + return returnTuple; + } + + public static class GetRepresentationResult { + /** + * flag whether the beamlattice has a representation mesh. + */ + public boolean HasRepresentation; + + /** + * filled with the UniqueResourceID of the clipping mesh-object. + */ + public int UniqueResourceID; + + } + /** + * Sets the representation-mesh for the beamlattice of this mesh. + * + * @param uniqueResourceID the UniqueResourceID of the representation mesh-object. This mesh-object has to be defined before setting the representation. + * @throws Lib3MFException + */ + public void setRepresentation(int uniqueResourceID) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_setrepresentation.invokeInt(new java.lang.Object[]{mHandle, uniqueResourceID})); + } + + /** + * Returns the ball mode and the default ball radius for the beamlattice of this mesh. + * + * @return GetBallOptions Result Tuple + * @throws Lib3MFException + */ + public GetBallOptionsResult getBallOptions() throws Lib3MFException { + Pointer bufferBallMode = new Memory(4); + Pointer bufferBallRadius = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_getballoptions.invokeInt(new java.lang.Object[]{mHandle, bufferBallMode, bufferBallRadius})); + GetBallOptionsResult returnTuple = new GetBallOptionsResult(); + returnTuple.BallMode = Lib3MFWrapper.EnumConversion.convertConstToBeamLatticeBallMode(bufferBallMode.getInt(0)); + returnTuple.BallRadius = bufferBallRadius.getDouble(0); + return returnTuple; + } + + public static class GetBallOptionsResult { + /** + * contains the ball mode of this mesh + */ + public Lib3MFWrapper.BeamLatticeBallMode BallMode; + + /** + * default ball radius of balls for the beamlattice + */ + public double BallRadius; + + } + /** + * Sets the ball mode and thedefault ball radius for the beamlattice. + * + * @param ballMode contains the ball mode of this mesh + * @param ballRadius default ball radius of balls for the beamlattice + * @throws Lib3MFException + */ + public void setBallOptions(Lib3MFWrapper.BeamLatticeBallMode ballMode, double ballRadius) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_setballoptions.invokeInt(new java.lang.Object[]{mHandle, Lib3MFWrapper.EnumConversion.convertBeamLatticeBallModeToConst(ballMode), ballRadius})); + } + + /** + * Returns the beam count of a mesh object. + * + * @return filled with the beam count. + * @throws Lib3MFException + */ + public int getBeamCount() throws Lib3MFException { + Pointer bufferCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_getbeamcount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getInt(0); + } + + /** + * Returns indices, radii and capmodes of a single beam of a mesh object. + * + * @param index Index of the beam (0 to beamcount - 1). + * @return filled with the beam indices, radii and capmodes. + * @throws Lib3MFException + */ + public Beam getBeam(int index) throws Lib3MFException { + Pointer bufferBeamInfo = new Memory(Beam.SIZE); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_getbeam.invokeInt(new java.lang.Object[]{mHandle, index, bufferBeamInfo})); + Beam beamInfo = new Beam(); + beamInfo.readFromPointer(bufferBeamInfo, 0); + return beamInfo; + } + + /** + * Adds a single beam to a mesh object. + * + * @param beamInfo contains the node indices, radii and capmodes. + * @return filled with the new Index of the beam. + * @throws Lib3MFException + */ + public int addBeam(Beam beamInfo) throws Lib3MFException { + Pointer bufferBeamInfo = new Memory(Beam.SIZE); + beamInfo.writeToPointer(bufferBeamInfo, 0); + Pointer bufferIndex = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_addbeam.invokeInt(new java.lang.Object[]{mHandle, bufferBeamInfo, bufferIndex})); + return bufferIndex.getInt(0); + } + + /** + * Sets the indices, radii and capmodes of a single beam of a mesh object. + * + * @param index Index of the beam (0 to beamcount - 1). + * @param beamInfo filled with the beam indices, radii and capmodes. + * @throws Lib3MFException + */ + public void setBeam(int index, Beam beamInfo) throws Lib3MFException { + Pointer bufferBeamInfo = new Memory(Beam.SIZE); + beamInfo.writeToPointer(bufferBeamInfo, 0); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_setbeam.invokeInt(new java.lang.Object[]{mHandle, index, bufferBeamInfo})); + } + + /** + * Sets all beam indices, radii and capmodes of a mesh object. + * + * @param beamInfo contains information of a number of beams + * @throws Lib3MFException + */ + public void setBeams(Beam[] beamInfo) throws Lib3MFException { + Pointer bufferBeamInfo = new Memory(Math.max(1, Beam.SIZE * beamInfo.length)); + for (int i = 0; i < beamInfo.length; i++) { + beamInfo[i].writeToPointer(bufferBeamInfo, i * Beam.SIZE); + } + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_setbeams.invokeInt(new java.lang.Object[]{mHandle, (long) beamInfo.length, bufferBeamInfo})); + } + + /** + * obtains all beam indices, radii and capmodes of a mesh object. + * + * @return contains information of all beams + * @throws Lib3MFException + */ + public Beam[] getBeams() throws Lib3MFException { + Pointer countNeededBeamInfo = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_getbeams.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededBeamInfo, null})); + long countBeamInfo = countNeededBeamInfo.getLong(0); + Pointer bufferBeamInfo = new Memory(Math.max(1, countBeamInfo * Beam.SIZE)); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_getbeams.invokeInt(new java.lang.Object[]{mHandle, countBeamInfo, countNeededBeamInfo, bufferBeamInfo})); + Beam beamInfo[] = new Beam[(int)countBeamInfo]; + for (int i = 0; i < (int)countBeamInfo; i++) { + beamInfo[i] = new Beam(); + beamInfo[i].readFromPointer(bufferBeamInfo, i * Beam.SIZE); + } + return beamInfo; + } + + /** + * Returns the ball count of a mesh object. + * + * @return filled with the ball count. + * @throws Lib3MFException + */ + public int getBallCount() throws Lib3MFException { + Pointer bufferCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_getballcount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getInt(0); + } + + /** + * Returns index and radius of a single ball of a mesh object. + * + * @param index Index of the ball (0 to ballcount - 1). + * @return filled with the ball node index and radius. + * @throws Lib3MFException + */ + public Ball getBall(int index) throws Lib3MFException { + Pointer bufferBallInfo = new Memory(Ball.SIZE); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_getball.invokeInt(new java.lang.Object[]{mHandle, index, bufferBallInfo})); + Ball ballInfo = new Ball(); + ballInfo.readFromPointer(bufferBallInfo, 0); + return ballInfo; + } + + /** + * Adds a single ball to a mesh object. + * + * @param ballInfo contains the node index and radius. + * @return filled with the new Index of the ball. + * @throws Lib3MFException + */ + public int addBall(Ball ballInfo) throws Lib3MFException { + Pointer bufferBallInfo = new Memory(Ball.SIZE); + ballInfo.writeToPointer(bufferBallInfo, 0); + Pointer bufferIndex = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_addball.invokeInt(new java.lang.Object[]{mHandle, bufferBallInfo, bufferIndex})); + return bufferIndex.getInt(0); + } + + /** + * Sets the index and radius of a single ball of a mesh object. + * + * @param index Index of the ball (0 to ballcount - 1). + * @param ballInfo filled with the ball node index and radius. + * @throws Lib3MFException + */ + public void setBall(int index, Ball ballInfo) throws Lib3MFException { + Pointer bufferBallInfo = new Memory(Ball.SIZE); + ballInfo.writeToPointer(bufferBallInfo, 0); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_setball.invokeInt(new java.lang.Object[]{mHandle, index, bufferBallInfo})); + } + + /** + * Sets all ball indices and radii of a mesh object. + * + * @param ballInfo contains information of a number of balls + * @throws Lib3MFException + */ + public void setBalls(Ball[] ballInfo) throws Lib3MFException { + Pointer bufferBallInfo = new Memory(Math.max(1, Ball.SIZE * ballInfo.length)); + for (int i = 0; i < ballInfo.length; i++) { + ballInfo[i].writeToPointer(bufferBallInfo, i * Ball.SIZE); + } + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_setballs.invokeInt(new java.lang.Object[]{mHandle, (long) ballInfo.length, bufferBallInfo})); + } + + /** + * obtains all ball indices and radii of a mesh object. + * + * @return contains information of all balls + * @throws Lib3MFException + */ + public Ball[] getBalls() throws Lib3MFException { + Pointer countNeededBallInfo = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_getballs.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededBallInfo, null})); + long countBallInfo = countNeededBallInfo.getLong(0); + Pointer bufferBallInfo = new Memory(Math.max(1, countBallInfo * Ball.SIZE)); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_getballs.invokeInt(new java.lang.Object[]{mHandle, countBallInfo, countNeededBallInfo, bufferBallInfo})); + Ball ballInfo[] = new Ball[(int)countBallInfo]; + for (int i = 0; i < (int)countBallInfo; i++) { + ballInfo[i] = new Ball(); + ballInfo[i].readFromPointer(bufferBallInfo, i * Ball.SIZE); + } + return ballInfo; + } + + /** + * Returns the number of beamsets of a mesh object. + * + * @return filled with the beamset count. + * @throws Lib3MFException + */ + public int getBeamSetCount() throws Lib3MFException { + Pointer bufferCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_getbeamsetcount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getInt(0); + } + + /** + * Adds an empty beamset to a mesh object + * + * @return the new beamset + * @throws Lib3MFException + */ + public BeamSet addBeamSet() throws Lib3MFException { + Pointer bufferBeamSet = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_addbeamset.invokeInt(new java.lang.Object[]{mHandle, bufferBeamSet})); + Pointer valueBeamSet = bufferBeamSet.getPointer(0); + BeamSet beamSet = null; + if (valueBeamSet == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "BeamSet was a null pointer"); + } + beamSet = mWrapper.PolymorphicFactory(valueBeamSet, BeamSet.class); + return beamSet; + } + + /** + * Returns a beamset of a mesh object + * + * @param index index of the requested beamset (0 ... beamsetcount-1). + * @return the requested beamset + * @throws Lib3MFException + */ + public BeamSet getBeamSet(int index) throws Lib3MFException { + Pointer bufferBeamSet = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_getbeamset.invokeInt(new java.lang.Object[]{mHandle, index, bufferBeamSet})); + Pointer valueBeamSet = bufferBeamSet.getPointer(0); + BeamSet beamSet = null; + if (valueBeamSet == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "BeamSet was a null pointer"); + } + beamSet = mWrapper.PolymorphicFactory(valueBeamSet, BeamSet.class); + return beamSet; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/BeamLatticeNode.java b/Autogenerated/Bindings/Java8/lib3mf/BeamLatticeNode.java new file mode 100644 index 000000000..59f2122f6 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/BeamLatticeNode.java @@ -0,0 +1,132 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class BeamLatticeNode extends ImplicitNode { + + public BeamLatticeNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the input for the model resource id of the beam lattice + * + * @return the input port for the model resource id of the beam lattice (mesh with beamlattice extension) + * @throws Lib3MFException + */ + public ImplicitPort getInputBeamLattice() throws Lib3MFException { + Pointer bufferBeamLattice = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_beamlatticenode_getinputbeamlattice.invokeInt(new java.lang.Object[]{mHandle, bufferBeamLattice})); + Pointer valueBeamLattice = bufferBeamLattice.getPointer(0); + ImplicitPort beamLattice = null; + if (valueBeamLattice == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "BeamLattice was a null pointer"); + } + beamLattice = mWrapper.PolymorphicFactory(valueBeamLattice, ImplicitPort.class); + return beamLattice; + } + + /** + * Retrieves the input for the position + * + * @return the input port for the position + * @throws Lib3MFException + */ + public ImplicitPort getInputPos() throws Lib3MFException { + Pointer bufferPos = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_beamlatticenode_getinputpos.invokeInt(new java.lang.Object[]{mHandle, bufferPos})); + Pointer valuePos = bufferPos.getPointer(0); + ImplicitPort pos = null; + if (valuePos == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Pos was a null pointer"); + } + pos = mWrapper.PolymorphicFactory(valuePos, ImplicitPort.class); + return pos; + } + + /** + * Retrieves the output + * + * @return the output port for the signed distance to the beam lattice + * @throws Lib3MFException + */ + public ImplicitPort getOutputDistance() throws Lib3MFException { + Pointer bufferDistance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_beamlatticenode_getoutputdistance.invokeInt(new java.lang.Object[]{mHandle, bufferDistance})); + Pointer valueDistance = bufferDistance.getPointer(0); + ImplicitPort distance = null; + if (valueDistance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Distance was a null pointer"); + } + distance = mWrapper.PolymorphicFactory(valueDistance, ImplicitPort.class); + return distance; + } + + /** + * Sets the accurate range for distance computation + * + * @param accurateRange the accurate range in model units + * @throws Lib3MFException + */ + public void setAccurateRange(double accurateRange) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_beamlatticenode_setaccuraterange.invokeInt(new java.lang.Object[]{mHandle, accurateRange})); + } + + /** + * Retrieves the accurate range for distance computation + * + * @return the accurate range in model units + * @throws Lib3MFException + */ + public double getAccurateRange() throws Lib3MFException { + Pointer bufferAccurateRange = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_beamlatticenode_getaccuraterange.invokeInt(new java.lang.Object[]{mHandle, bufferAccurateRange})); + return bufferAccurateRange.getDouble(0); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/BeamSet.java b/Autogenerated/Bindings/Java8/lib3mf/BeamSet.java new file mode 100644 index 000000000..4e3337151 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/BeamSet.java @@ -0,0 +1,196 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class BeamSet extends Base { + + public BeamSet(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Sets a beamset's name string + * + * @param name new name of the beamset. + * @throws Lib3MFException + */ + public void setName(String name) throws Lib3MFException { + byte[] bytesName = name.getBytes(StandardCharsets.UTF_8); + Memory bufferName = new Memory(bytesName.length + 1); + bufferName.write(0, bytesName, 0, bytesName.length); + bufferName.setByte(bytesName.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_beamset_setname.invokeInt(new java.lang.Object[]{mHandle, bufferName})); + } + + /** + * Retrieves a beamset's name string + * + * @return returns the name of the beamset. + * @throws Lib3MFException + */ + public String getName() throws Lib3MFException { + Pointer bytesNeededName = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_beamset_getname.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededName, null})); + int sizeName = bytesNeededName.getInt(0); + Pointer bufferName = new Memory(sizeName); + mWrapper.checkError(this, mWrapper.lib3mf_beamset_getname.invokeInt(new java.lang.Object[]{mHandle, sizeName, bytesNeededName, bufferName})); + return new String(bufferName.getByteArray(0, sizeName - 1), StandardCharsets.UTF_8); + } + + /** + * Sets a beamset's identifier string + * + * @param identifier new name of the beamset. + * @throws Lib3MFException + */ + public void setIdentifier(String identifier) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_beamset_setidentifier.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier})); + } + + /** + * Retrieves a beamset's identifier string + * + * @return returns the identifier of the beamset. + * @throws Lib3MFException + */ + public String getIdentifier() throws Lib3MFException { + Pointer bytesNeededIdentifier = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_beamset_getidentifier.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededIdentifier, null})); + int sizeIdentifier = bytesNeededIdentifier.getInt(0); + Pointer bufferIdentifier = new Memory(sizeIdentifier); + mWrapper.checkError(this, mWrapper.lib3mf_beamset_getidentifier.invokeInt(new java.lang.Object[]{mHandle, sizeIdentifier, bytesNeededIdentifier, bufferIdentifier})); + return new String(bufferIdentifier.getByteArray(0, sizeIdentifier - 1), StandardCharsets.UTF_8); + } + + /** + * Retrieves the reference count of a beamset + * + * @return returns the reference count + * @throws Lib3MFException + */ + public int getReferenceCount() throws Lib3MFException { + Pointer bufferCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_beamset_getreferencecount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getInt(0); + } + + /** + * Sets the references of a beamset + * + * @param references the new indices of all beams in this beamset + * @throws Lib3MFException + */ + public void setReferences(int[] references) throws Lib3MFException { + Pointer bufferReferences = new Memory(Math.max(1, 4 * references.length)); + for (int i = 0; i < references.length; i++) { + bufferReferences.setInt(4 * i, references[i]); + } + mWrapper.checkError(this, mWrapper.lib3mf_beamset_setreferences.invokeInt(new java.lang.Object[]{mHandle, (long) references.length, bufferReferences})); + } + + /** + * Retrieves the references of a beamset + * + * @return retrieves the indices of all beams in this beamset + * @throws Lib3MFException + */ + public int[] getReferences() throws Lib3MFException { + Pointer countNeededReferences = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_beamset_getreferences.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededReferences, Pointer.NULL})); + long countReferences = countNeededReferences.getLong(0); + Pointer bufferReferences = new Memory(Math.max(1, 4 * countReferences)); + mWrapper.checkError(this, mWrapper.lib3mf_beamset_getreferences.invokeInt(new java.lang.Object[]{mHandle, countReferences, countNeededReferences, bufferReferences})); + return bufferReferences.getIntArray(0, (int)countReferences); + } + + /** + * Retrieves the ball reference count of a beamset + * + * @return returns the ball reference count + * @throws Lib3MFException + */ + public int getBallReferenceCount() throws Lib3MFException { + Pointer bufferCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_beamset_getballreferencecount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getInt(0); + } + + /** + * Sets the ball references of a beamset + * + * @param ballReferences the new indices of all balls in this beamset + * @throws Lib3MFException + */ + public void setBallReferences(int[] ballReferences) throws Lib3MFException { + Pointer bufferBallReferences = new Memory(Math.max(1, 4 * ballReferences.length)); + for (int i = 0; i < ballReferences.length; i++) { + bufferBallReferences.setInt(4 * i, ballReferences[i]); + } + mWrapper.checkError(this, mWrapper.lib3mf_beamset_setballreferences.invokeInt(new java.lang.Object[]{mHandle, (long) ballReferences.length, bufferBallReferences})); + } + + /** + * Retrieves the ball references of a beamset + * + * @return retrieves the indices of all balls in this beamset + * @throws Lib3MFException + */ + public int[] getBallReferences() throws Lib3MFException { + Pointer countNeededBallReferences = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_beamset_getballreferences.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededBallReferences, Pointer.NULL})); + long countBallReferences = countNeededBallReferences.getLong(0); + Pointer bufferBallReferences = new Memory(Math.max(1, 4 * countBallReferences)); + mWrapper.checkError(this, mWrapper.lib3mf_beamset_getballreferences.invokeInt(new java.lang.Object[]{mHandle, countBallReferences, countNeededBallReferences, bufferBallReferences})); + return bufferBallReferences.getIntArray(0, (int)countBallReferences); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/Box.java b/Autogenerated/Bindings/Java8/lib3mf/Box.java new file mode 100644 index 000000000..70a3484e0 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/Box.java @@ -0,0 +1,71 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Memory; +import com.sun.jna.Pointer; + +import java.util.Arrays; +import java.util.List; + +public class Box { + + public float[] MinCoordinate = new float[3]; + + public float[] MaxCoordinate = new float[3]; + + public static final int SIZE = 24; + + public void readFromPointer(Pointer p, long offset) { + MinCoordinate[0] = p.getFloat(offset + 0); + MinCoordinate[1] = p.getFloat(offset + 4); + MinCoordinate[2] = p.getFloat(offset + 8); + MaxCoordinate[0] = p.getFloat(offset + 12); + MaxCoordinate[1] = p.getFloat(offset + 16); + MaxCoordinate[2] = p.getFloat(offset + 20); + } + + public void writeToPointer(Pointer p, long offset) { + p.setFloat(offset + 0, MinCoordinate[0]); + p.setFloat(offset + 4, MinCoordinate[1]); + p.setFloat(offset + 8, MinCoordinate[2]); + p.setFloat(offset + 12, MaxCoordinate[0]); + p.setFloat(offset + 16, MaxCoordinate[1]); + p.setFloat(offset + 20, MaxCoordinate[2]); + } + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/BuildItem.java b/Autogenerated/Bindings/Java8/lib3mf/BuildItem.java new file mode 100644 index 000000000..94d552c6f --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/BuildItem.java @@ -0,0 +1,230 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class BuildItem extends Base { + + public BuildItem(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the object resource associated to a build item + * + * @return returns the associated resource instance + * @throws Lib3MFException + */ + public Object getObjectResource() throws Lib3MFException { + Pointer bufferObjectResource = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_builditem_getobjectresource.invokeInt(new java.lang.Object[]{mHandle, bufferObjectResource})); + Pointer valueObjectResource = bufferObjectResource.getPointer(0); + Object objectResource = null; + if (valueObjectResource == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ObjectResource was a null pointer"); + } + objectResource = mWrapper.PolymorphicFactory(valueObjectResource, Object.class); + return objectResource; + } + + /** + * returns, whether a build item has a UUID and, if true, the build item's UUID + * + * @return GetUUID Result Tuple + * @throws Lib3MFException + */ + public GetUUIDResult getUUID() throws Lib3MFException { + Pointer bufferHasUUID = new Memory(1); + Pointer bytesNeededUUID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_builditem_getuuid.invokeInt(new java.lang.Object[]{mHandle, bufferHasUUID, 0, bytesNeededUUID, null})); + int sizeUUID = bytesNeededUUID.getInt(0); + Pointer bufferUUID = new Memory(sizeUUID); + mWrapper.checkError(this, mWrapper.lib3mf_builditem_getuuid.invokeInt(new java.lang.Object[]{mHandle, bufferHasUUID, sizeUUID, bytesNeededUUID, bufferUUID})); + GetUUIDResult returnTuple = new GetUUIDResult(); + returnTuple.HasUUID = bufferHasUUID.getByte(0) != 0; + returnTuple.UUID = new String(bufferUUID.getByteArray(0, sizeUUID - 1), StandardCharsets.UTF_8); + return returnTuple; + } + + public static class GetUUIDResult { + /** + * flag whether the build item has a UUID + */ + public boolean HasUUID; + + /** + * the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' + */ + public String UUID; + + } + /** + * sets the build item's UUID + * + * @param uUID the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' + * @throws Lib3MFException + */ + public void setUUID(String uUID) throws Lib3MFException { + byte[] bytesUUID = uUID.getBytes(StandardCharsets.UTF_8); + Memory bufferUUID = new Memory(bytesUUID.length + 1); + bufferUUID.write(0, bytesUUID, 0, bytesUUID.length); + bufferUUID.setByte(bytesUUID.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_builditem_setuuid.invokeInt(new java.lang.Object[]{mHandle, bufferUUID})); + } + + /** + * Retrieves the object UniqueResourceID associated to a build item + * + * @return returns the UniqueResourceID of the object + * @throws Lib3MFException + */ + public int getObjectResourceID() throws Lib3MFException { + Pointer bufferUniqueResourceID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_builditem_getobjectresourceid.invokeInt(new java.lang.Object[]{mHandle, bufferUniqueResourceID})); + return bufferUniqueResourceID.getInt(0); + } + + /** + * Checks, if a build item has a non-identity transformation matrix + * + * @return returns true, if the transformation matrix is not the identity + * @throws Lib3MFException + */ + public boolean hasObjectTransform() throws Lib3MFException { + Pointer bufferHasTransform = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_builditem_hasobjecttransform.invokeInt(new java.lang.Object[]{mHandle, bufferHasTransform})); + return bufferHasTransform.getByte(0) != 0; + } + + /** + * Retrieves a build item's transformation matrix. + * + * @return returns the transformation matrix + * @throws Lib3MFException + */ + public Transform getObjectTransform() throws Lib3MFException { + Pointer bufferTransform = new Memory(Transform.SIZE); + mWrapper.checkError(this, mWrapper.lib3mf_builditem_getobjecttransform.invokeInt(new java.lang.Object[]{mHandle, bufferTransform})); + Transform transform = new Transform(); + transform.readFromPointer(bufferTransform, 0); + return transform; + } + + /** + * Sets a build item's transformation matrix. + * + * @param transform new transformation matrix + * @throws Lib3MFException + */ + public void setObjectTransform(Transform transform) throws Lib3MFException { + Pointer bufferTransform = new Memory(Transform.SIZE); + transform.writeToPointer(bufferTransform, 0); + mWrapper.checkError(this, mWrapper.lib3mf_builditem_setobjecttransform.invokeInt(new java.lang.Object[]{mHandle, bufferTransform})); + } + + /** + * Retrieves a build item's part number string + * + * @return Returns a build item's part number string + * @throws Lib3MFException + */ + public String getPartNumber() throws Lib3MFException { + Pointer bytesNeededPartNumber = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_builditem_getpartnumber.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededPartNumber, null})); + int sizePartNumber = bytesNeededPartNumber.getInt(0); + Pointer bufferPartNumber = new Memory(sizePartNumber); + mWrapper.checkError(this, mWrapper.lib3mf_builditem_getpartnumber.invokeInt(new java.lang.Object[]{mHandle, sizePartNumber, bytesNeededPartNumber, bufferPartNumber})); + return new String(bufferPartNumber.getByteArray(0, sizePartNumber - 1), StandardCharsets.UTF_8); + } + + /** + * Sets a build item's part number string + * + * @param setPartnumber new part number string for referencing parts from the outside world + * @throws Lib3MFException + */ + public void setPartNumber(String setPartnumber) throws Lib3MFException { + byte[] bytesSetPartnumber = setPartnumber.getBytes(StandardCharsets.UTF_8); + Memory bufferSetPartnumber = new Memory(bytesSetPartnumber.length + 1); + bufferSetPartnumber.write(0, bytesSetPartnumber, 0, bytesSetPartnumber.length); + bufferSetPartnumber.setByte(bytesSetPartnumber.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_builditem_setpartnumber.invokeInt(new java.lang.Object[]{mHandle, bufferSetPartnumber})); + } + + /** + * Returns the metadatagroup of this build item + * + * @return returns an Instance of the metadatagroup of this build item + * @throws Lib3MFException + */ + public MetaDataGroup getMetaDataGroup() throws Lib3MFException { + Pointer bufferMetaDataGroup = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_builditem_getmetadatagroup.invokeInt(new java.lang.Object[]{mHandle, bufferMetaDataGroup})); + Pointer valueMetaDataGroup = bufferMetaDataGroup.getPointer(0); + MetaDataGroup metaDataGroup = null; + if (valueMetaDataGroup == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "MetaDataGroup was a null pointer"); + } + metaDataGroup = mWrapper.PolymorphicFactory(valueMetaDataGroup, MetaDataGroup.class); + return metaDataGroup; + } + + /** + * Returns the outbox of a build item + * + * @return Outbox of this build item + * @throws Lib3MFException + */ + public Box getOutbox() throws Lib3MFException { + Pointer bufferOutbox = new Memory(Box.SIZE); + mWrapper.checkError(this, mWrapper.lib3mf_builditem_getoutbox.invokeInt(new java.lang.Object[]{mHandle, bufferOutbox})); + Box outbox = new Box(); + outbox.readFromPointer(bufferOutbox, 0); + return outbox; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/BuildItemIterator.java b/Autogenerated/Bindings/Java8/lib3mf/BuildItemIterator.java new file mode 100644 index 000000000..ce259bbc6 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/BuildItemIterator.java @@ -0,0 +1,128 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class BuildItemIterator extends Base { + + public BuildItemIterator(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Iterates to the next build item in the list. + * + * @return Iterates to the next build item in the list. + * @throws Lib3MFException + */ + public boolean moveNext() throws Lib3MFException { + Pointer bufferHasNext = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_builditemiterator_movenext.invokeInt(new java.lang.Object[]{mHandle, bufferHasNext})); + return bufferHasNext.getByte(0) != 0; + } + + /** + * Iterates to the previous build item in the list. + * + * @return Iterates to the previous build item in the list. + * @throws Lib3MFException + */ + public boolean movePrevious() throws Lib3MFException { + Pointer bufferHasPrevious = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_builditemiterator_moveprevious.invokeInt(new java.lang.Object[]{mHandle, bufferHasPrevious})); + return bufferHasPrevious.getByte(0) != 0; + } + + /** + * Returns the build item the iterator points at. + * + * @return returns the build item instance. + * @throws Lib3MFException + */ + public BuildItem getCurrent() throws Lib3MFException { + Pointer bufferBuildItem = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_builditemiterator_getcurrent.invokeInt(new java.lang.Object[]{mHandle, bufferBuildItem})); + Pointer valueBuildItem = bufferBuildItem.getPointer(0); + BuildItem buildItem = null; + if (valueBuildItem == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "BuildItem was a null pointer"); + } + buildItem = mWrapper.PolymorphicFactory(valueBuildItem, BuildItem.class); + return buildItem; + } + + /** + * Creates a new build item iterator with the same build item list. + * + * @return returns the cloned Iterator instance + * @throws Lib3MFException + */ + public BuildItemIterator clone_() throws Lib3MFException { + Pointer bufferOutBuildItemIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_builditemiterator_clone.invokeInt(new java.lang.Object[]{mHandle, bufferOutBuildItemIterator})); + Pointer valueOutBuildItemIterator = bufferOutBuildItemIterator.getPointer(0); + BuildItemIterator outBuildItemIterator = null; + if (valueOutBuildItemIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "OutBuildItemIterator was a null pointer"); + } + outBuildItemIterator = mWrapper.PolymorphicFactory(valueOutBuildItemIterator, BuildItemIterator.class); + return outBuildItemIterator; + } + + /** + * Returns the number of build items the iterator captures. + * + * @return returns the number of build items the iterator captures. + * @throws Lib3MFException + */ + public long count() throws Lib3MFException { + Pointer bufferCount = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_builditemiterator_count.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getLong(0); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/CeilNode.java b/Autogenerated/Bindings/Java8/lib3mf/CeilNode.java new file mode 100644 index 000000000..aac96b448 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/CeilNode.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class CeilNode extends OneInputNode { + + public CeilNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/ClampNode.java b/Autogenerated/Bindings/Java8/lib3mf/ClampNode.java new file mode 100644 index 000000000..e22fc3446 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/ClampNode.java @@ -0,0 +1,92 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ClampNode extends OneInputNode { + + public ClampNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the input for the lower limit + * + * @return the input for the lower limit + * @throws Lib3MFException + */ + public ImplicitPort getInputMin() throws Lib3MFException { + Pointer bufferMin = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_clampnode_getinputmin.invokeInt(new java.lang.Object[]{mHandle, bufferMin})); + Pointer valueMin = bufferMin.getPointer(0); + ImplicitPort min = null; + if (valueMin == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Min was a null pointer"); + } + min = mWrapper.PolymorphicFactory(valueMin, ImplicitPort.class); + return min; + } + + /** + * Retrieves the input for the upper limit + * + * @return the input for the upper limit + * @throws Lib3MFException + */ + public ImplicitPort getInputMax() throws Lib3MFException { + Pointer bufferMax = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_clampnode_getinputmax.invokeInt(new java.lang.Object[]{mHandle, bufferMax})); + Pointer valueMax = bufferMax.getPointer(0); + ImplicitPort max = null; + if (valueMax == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Max was a null pointer"); + } + max = mWrapper.PolymorphicFactory(valueMax, ImplicitPort.class); + return max; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/Color.java b/Autogenerated/Bindings/Java8/lib3mf/Color.java new file mode 100644 index 000000000..66de0245e --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/Color.java @@ -0,0 +1,71 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Memory; +import com.sun.jna.Pointer; + +import java.util.Arrays; +import java.util.List; + +public class Color { + + public byte Red; + + public byte Green; + + public byte Blue; + + public byte Alpha; + + public static final int SIZE = 4; + + public void readFromPointer(Pointer p, long offset) { + Red = p.getByte(offset + 0); + Green = p.getByte(offset + 1); + Blue = p.getByte(offset + 2); + Alpha = p.getByte(offset + 3); + } + + public void writeToPointer(Pointer p, long offset) { + p.setByte(offset + 0, Red); + p.setByte(offset + 1, Green); + p.setByte(offset + 2, Blue); + p.setByte(offset + 3, Alpha); + } + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/ColorGroup.java b/Autogenerated/Bindings/Java8/lib3mf/ColorGroup.java new file mode 100644 index 000000000..f2018a23a --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/ColorGroup.java @@ -0,0 +1,136 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ColorGroup extends Resource { + + public ColorGroup(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the count of base materials in this Color Group. + * + * @return returns the count of colors within this color group. + * @throws Lib3MFException + */ + public int getCount() throws Lib3MFException { + Pointer bufferCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_colorgroup_getcount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getInt(0); + } + + /** + * returns all the PropertyIDs of all colors within this group + * + * @return PropertyID of the color in the color group. + * @throws Lib3MFException + */ + public int[] getAllPropertyIDs() throws Lib3MFException { + Pointer countNeededPropertyIDs = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_colorgroup_getallpropertyids.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededPropertyIDs, Pointer.NULL})); + long countPropertyIDs = countNeededPropertyIDs.getLong(0); + Pointer bufferPropertyIDs = new Memory(Math.max(1, 4 * countPropertyIDs)); + mWrapper.checkError(this, mWrapper.lib3mf_colorgroup_getallpropertyids.invokeInt(new java.lang.Object[]{mHandle, countPropertyIDs, countNeededPropertyIDs, bufferPropertyIDs})); + return bufferPropertyIDs.getIntArray(0, (int)countPropertyIDs); + } + + /** + * Adds a new value. + * + * @param theColor The new color + * @return PropertyID of the new color within this color group. + * @throws Lib3MFException + */ + public int addColor(Color theColor) throws Lib3MFException { + Pointer bufferTheColor = new Memory(Color.SIZE); + theColor.writeToPointer(bufferTheColor, 0); + Pointer bufferPropertyID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_colorgroup_addcolor.invokeInt(new java.lang.Object[]{mHandle, bufferTheColor, bufferPropertyID})); + return bufferPropertyID.getInt(0); + } + + /** + * Removes a color from the color group. + * + * @param propertyID PropertyID of the color to be removed from the color group. + * @throws Lib3MFException + */ + public void removeColor(int propertyID) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_colorgroup_removecolor.invokeInt(new java.lang.Object[]{mHandle, propertyID})); + } + + /** + * Sets a color value. + * + * @param propertyID PropertyID of a color within this color group. + * @param theColor The color + * @throws Lib3MFException + */ + public void setColor(int propertyID, Color theColor) throws Lib3MFException { + Pointer bufferTheColor = new Memory(Color.SIZE); + theColor.writeToPointer(bufferTheColor, 0); + mWrapper.checkError(this, mWrapper.lib3mf_colorgroup_setcolor.invokeInt(new java.lang.Object[]{mHandle, propertyID, bufferTheColor})); + } + + /** + * Sets a color value. + * + * @param propertyID PropertyID of a color within this color group. + * @return The color + * @throws Lib3MFException + */ + public Color getColor(int propertyID) throws Lib3MFException { + Pointer bufferTheColor = new Memory(Color.SIZE); + mWrapper.checkError(this, mWrapper.lib3mf_colorgroup_getcolor.invokeInt(new java.lang.Object[]{mHandle, propertyID, bufferTheColor})); + Color theColor = new Color(); + theColor.readFromPointer(bufferTheColor, 0); + return theColor; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/ColorGroupIterator.java b/Autogenerated/Bindings/Java8/lib3mf/ColorGroupIterator.java new file mode 100644 index 000000000..ad58d7092 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/ColorGroupIterator.java @@ -0,0 +1,74 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ColorGroupIterator extends ResourceIterator { + + public ColorGroupIterator(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the ColorGroup the iterator points at. + * + * @return returns the ColorGroup instance. + * @throws Lib3MFException + */ + public ColorGroup getCurrentColorGroup() throws Lib3MFException { + Pointer bufferResource = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_colorgroupiterator_getcurrentcolorgroup.invokeInt(new java.lang.Object[]{mHandle, bufferResource})); + Pointer valueResource = bufferResource.getPointer(0); + ColorGroup resource = null; + if (valueResource == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Resource was a null pointer"); + } + resource = mWrapper.PolymorphicFactory(valueResource, ColorGroup.class); + return resource; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/Component.java b/Autogenerated/Bindings/Java8/lib3mf/Component.java new file mode 100644 index 000000000..8817b0a1a --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/Component.java @@ -0,0 +1,169 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Component extends Base { + + public Component(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the Resource Instance of the component. + * + * @return filled with the Resource Instance. + * @throws Lib3MFException + */ + public Object getObjectResource() throws Lib3MFException { + Pointer bufferObjectResource = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_component_getobjectresource.invokeInt(new java.lang.Object[]{mHandle, bufferObjectResource})); + Pointer valueObjectResource = bufferObjectResource.getPointer(0); + Object objectResource = null; + if (valueObjectResource == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ObjectResource was a null pointer"); + } + objectResource = mWrapper.PolymorphicFactory(valueObjectResource, Object.class); + return objectResource; + } + + /** + * Returns the UniqueResourceID of the component. + * + * @return returns the UniqueResourceID. + * @throws Lib3MFException + */ + public int getObjectResourceID() throws Lib3MFException { + Pointer bufferUniqueResourceID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_component_getobjectresourceid.invokeInt(new java.lang.Object[]{mHandle, bufferUniqueResourceID})); + return bufferUniqueResourceID.getInt(0); + } + + /** + * returns, whether a component has a UUID and, if true, the component's UUID + * + * @return GetUUID Result Tuple + * @throws Lib3MFException + */ + public GetUUIDResult getUUID() throws Lib3MFException { + Pointer bufferHasUUID = new Memory(1); + Pointer bytesNeededUUID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_component_getuuid.invokeInt(new java.lang.Object[]{mHandle, bufferHasUUID, 0, bytesNeededUUID, null})); + int sizeUUID = bytesNeededUUID.getInt(0); + Pointer bufferUUID = new Memory(sizeUUID); + mWrapper.checkError(this, mWrapper.lib3mf_component_getuuid.invokeInt(new java.lang.Object[]{mHandle, bufferHasUUID, sizeUUID, bytesNeededUUID, bufferUUID})); + GetUUIDResult returnTuple = new GetUUIDResult(); + returnTuple.HasUUID = bufferHasUUID.getByte(0) != 0; + returnTuple.UUID = new String(bufferUUID.getByteArray(0, sizeUUID - 1), StandardCharsets.UTF_8); + return returnTuple; + } + + public static class GetUUIDResult { + /** + * flag whether the component has a UUID + */ + public boolean HasUUID; + + /** + * the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' + */ + public String UUID; + + } + /** + * sets the component's UUID + * + * @param uUID the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' + * @throws Lib3MFException + */ + public void setUUID(String uUID) throws Lib3MFException { + byte[] bytesUUID = uUID.getBytes(StandardCharsets.UTF_8); + Memory bufferUUID = new Memory(bytesUUID.length + 1); + bufferUUID.write(0, bytesUUID, 0, bytesUUID.length); + bufferUUID.setByte(bytesUUID.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_component_setuuid.invokeInt(new java.lang.Object[]{mHandle, bufferUUID})); + } + + /** + * Returns, if the component has a different transformation than the identity matrix + * + * @return if true is returned, the transformation is not equal than the identity + * @throws Lib3MFException + */ + public boolean hasTransform() throws Lib3MFException { + Pointer bufferHasTransform = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_component_hastransform.invokeInt(new java.lang.Object[]{mHandle, bufferHasTransform})); + return bufferHasTransform.getByte(0) != 0; + } + + /** + * Returns the transformation matrix of the component. + * + * @return filled with the component transformation matrix + * @throws Lib3MFException + */ + public Transform getTransform() throws Lib3MFException { + Pointer bufferTransform = new Memory(Transform.SIZE); + mWrapper.checkError(this, mWrapper.lib3mf_component_gettransform.invokeInt(new java.lang.Object[]{mHandle, bufferTransform})); + Transform transform = new Transform(); + transform.readFromPointer(bufferTransform, 0); + return transform; + } + + /** + * Sets the transformation matrix of the component. + * + * @param transform new transformation matrix + * @throws Lib3MFException + */ + public void setTransform(Transform transform) throws Lib3MFException { + Pointer bufferTransform = new Memory(Transform.SIZE); + transform.writeToPointer(bufferTransform, 0); + mWrapper.checkError(this, mWrapper.lib3mf_component_settransform.invokeInt(new java.lang.Object[]{mHandle, bufferTransform})); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/ComponentsObject.java b/Autogenerated/Bindings/Java8/lib3mf/ComponentsObject.java new file mode 100644 index 000000000..52a5a8e16 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/ComponentsObject.java @@ -0,0 +1,115 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ComponentsObject extends Object { + + public ComponentsObject(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Adds a new component to a components object. + * + * @param objectResource object to add as component. Must not lead to circular references! + * @param transform optional transform matrix for the component. + * @return new component instance + * @throws Lib3MFException + */ + public Component addComponent(Object objectResource, Transform transform) throws Lib3MFException { + Pointer objectResourceHandle = null; + if (objectResource != null) { + objectResourceHandle = objectResource.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ObjectResource is a null value."); + } + Pointer bufferTransform = new Memory(Transform.SIZE); + transform.writeToPointer(bufferTransform, 0); + Pointer bufferComponentInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_componentsobject_addcomponent.invokeInt(new java.lang.Object[]{mHandle, objectResourceHandle, bufferTransform, bufferComponentInstance})); + Pointer valueComponentInstance = bufferComponentInstance.getPointer(0); + Component componentInstance = null; + if (valueComponentInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ComponentInstance was a null pointer"); + } + componentInstance = mWrapper.PolymorphicFactory(valueComponentInstance, Component.class); + return componentInstance; + } + + /** + * Retrieves a component from a component object. + * + * @param index index of the component to retrieve (0 to componentcount - 1) + * @return component instance + * @throws Lib3MFException + */ + public Component getComponent(int index) throws Lib3MFException { + Pointer bufferComponentInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_componentsobject_getcomponent.invokeInt(new java.lang.Object[]{mHandle, index, bufferComponentInstance})); + Pointer valueComponentInstance = bufferComponentInstance.getPointer(0); + Component componentInstance = null; + if (valueComponentInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ComponentInstance was a null pointer"); + } + componentInstance = mWrapper.PolymorphicFactory(valueComponentInstance, Component.class); + return componentInstance; + } + + /** + * Retrieves a component count of a component object. + * + * @return returns the component count + * @throws Lib3MFException + */ + public int getComponentCount() throws Lib3MFException { + Pointer bufferCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_componentsobject_getcomponentcount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getInt(0); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/ComponentsObjectIterator.java b/Autogenerated/Bindings/Java8/lib3mf/ComponentsObjectIterator.java new file mode 100644 index 000000000..8c2a5050d --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/ComponentsObjectIterator.java @@ -0,0 +1,74 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ComponentsObjectIterator extends ResourceIterator { + + public ComponentsObjectIterator(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the ComponentsObject the iterator points at. + * + * @return returns the ComponentsObject instance. + * @throws Lib3MFException + */ + public ComponentsObject getCurrentComponentsObject() throws Lib3MFException { + Pointer bufferResource = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_componentsobjectiterator_getcurrentcomponentsobject.invokeInt(new java.lang.Object[]{mHandle, bufferResource})); + Pointer valueResource = bufferResource.getPointer(0); + ComponentsObject resource = null; + if (valueResource == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Resource was a null pointer"); + } + resource = mWrapper.PolymorphicFactory(valueResource, ComponentsObject.class); + return resource; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/ComposeMatrixNode.java b/Autogenerated/Bindings/Java8/lib3mf/ComposeMatrixNode.java new file mode 100644 index 000000000..f74e83338 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/ComposeMatrixNode.java @@ -0,0 +1,362 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ComposeMatrixNode extends ImplicitNode { + + public ComposeMatrixNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the input for the element 0 0 + * + * @return the input for the m00 element + * @throws Lib3MFException + */ + public ImplicitPort getInputM00() throws Lib3MFException { + Pointer bufferM00 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composematrixnode_getinputm00.invokeInt(new java.lang.Object[]{mHandle, bufferM00})); + Pointer valueM00 = bufferM00.getPointer(0); + ImplicitPort m00 = null; + if (valueM00 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "M00 was a null pointer"); + } + m00 = mWrapper.PolymorphicFactory(valueM00, ImplicitPort.class); + return m00; + } + + /** + * Retrieves the input for the element 0 1 + * + * @return the input for the m01 element + * @throws Lib3MFException + */ + public ImplicitPort getInputM01() throws Lib3MFException { + Pointer bufferM01 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composematrixnode_getinputm01.invokeInt(new java.lang.Object[]{mHandle, bufferM01})); + Pointer valueM01 = bufferM01.getPointer(0); + ImplicitPort m01 = null; + if (valueM01 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "M01 was a null pointer"); + } + m01 = mWrapper.PolymorphicFactory(valueM01, ImplicitPort.class); + return m01; + } + + /** + * Retrieves the input for the element 0 2 + * + * @return the input for the m02 element + * @throws Lib3MFException + */ + public ImplicitPort getInputM02() throws Lib3MFException { + Pointer bufferM02 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composematrixnode_getinputm02.invokeInt(new java.lang.Object[]{mHandle, bufferM02})); + Pointer valueM02 = bufferM02.getPointer(0); + ImplicitPort m02 = null; + if (valueM02 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "M02 was a null pointer"); + } + m02 = mWrapper.PolymorphicFactory(valueM02, ImplicitPort.class); + return m02; + } + + /** + * Retrieves the input for the element 0 3 + * + * @return the input for the m03 element + * @throws Lib3MFException + */ + public ImplicitPort getInputM03() throws Lib3MFException { + Pointer bufferM03 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composematrixnode_getinputm03.invokeInt(new java.lang.Object[]{mHandle, bufferM03})); + Pointer valueM03 = bufferM03.getPointer(0); + ImplicitPort m03 = null; + if (valueM03 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "M03 was a null pointer"); + } + m03 = mWrapper.PolymorphicFactory(valueM03, ImplicitPort.class); + return m03; + } + + /** + * Retrieves the input for the element 1 0 + * + * @return the input for the m10 element + * @throws Lib3MFException + */ + public ImplicitPort getInputM10() throws Lib3MFException { + Pointer bufferM10 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composematrixnode_getinputm10.invokeInt(new java.lang.Object[]{mHandle, bufferM10})); + Pointer valueM10 = bufferM10.getPointer(0); + ImplicitPort m10 = null; + if (valueM10 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "M10 was a null pointer"); + } + m10 = mWrapper.PolymorphicFactory(valueM10, ImplicitPort.class); + return m10; + } + + /** + * Retrieves the input for the element 1 1 + * + * @return the input for the m11 element + * @throws Lib3MFException + */ + public ImplicitPort getInputM11() throws Lib3MFException { + Pointer bufferM11 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composematrixnode_getinputm11.invokeInt(new java.lang.Object[]{mHandle, bufferM11})); + Pointer valueM11 = bufferM11.getPointer(0); + ImplicitPort m11 = null; + if (valueM11 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "M11 was a null pointer"); + } + m11 = mWrapper.PolymorphicFactory(valueM11, ImplicitPort.class); + return m11; + } + + /** + * Retrieves the input for the element 1 2 + * + * @return the input for the m12 element + * @throws Lib3MFException + */ + public ImplicitPort getInputM12() throws Lib3MFException { + Pointer bufferM12 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composematrixnode_getinputm12.invokeInt(new java.lang.Object[]{mHandle, bufferM12})); + Pointer valueM12 = bufferM12.getPointer(0); + ImplicitPort m12 = null; + if (valueM12 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "M12 was a null pointer"); + } + m12 = mWrapper.PolymorphicFactory(valueM12, ImplicitPort.class); + return m12; + } + + /** + * Retrieves the input for the element 1 3 + * + * @return the input for the m13 element + * @throws Lib3MFException + */ + public ImplicitPort getInputM13() throws Lib3MFException { + Pointer bufferM13 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composematrixnode_getinputm13.invokeInt(new java.lang.Object[]{mHandle, bufferM13})); + Pointer valueM13 = bufferM13.getPointer(0); + ImplicitPort m13 = null; + if (valueM13 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "M13 was a null pointer"); + } + m13 = mWrapper.PolymorphicFactory(valueM13, ImplicitPort.class); + return m13; + } + + /** + * Retrieves the input for the element 2 0 + * + * @return the input for the m20 element + * @throws Lib3MFException + */ + public ImplicitPort getInputM20() throws Lib3MFException { + Pointer bufferM20 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composematrixnode_getinputm20.invokeInt(new java.lang.Object[]{mHandle, bufferM20})); + Pointer valueM20 = bufferM20.getPointer(0); + ImplicitPort m20 = null; + if (valueM20 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "M20 was a null pointer"); + } + m20 = mWrapper.PolymorphicFactory(valueM20, ImplicitPort.class); + return m20; + } + + /** + * Retrieves the input for the element 2 1 + * + * @return + * @throws Lib3MFException + */ + public ImplicitPort getInputM21() throws Lib3MFException { + Pointer bufferM21 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composematrixnode_getinputm21.invokeInt(new java.lang.Object[]{mHandle, bufferM21})); + Pointer valueM21 = bufferM21.getPointer(0); + ImplicitPort m21 = null; + if (valueM21 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "M21 was a null pointer"); + } + m21 = mWrapper.PolymorphicFactory(valueM21, ImplicitPort.class); + return m21; + } + + /** + * Retrieves the input for the element 2 2 + * + * @return the input for the m22 element + * @throws Lib3MFException + */ + public ImplicitPort getInputM22() throws Lib3MFException { + Pointer bufferM22 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composematrixnode_getinputm22.invokeInt(new java.lang.Object[]{mHandle, bufferM22})); + Pointer valueM22 = bufferM22.getPointer(0); + ImplicitPort m22 = null; + if (valueM22 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "M22 was a null pointer"); + } + m22 = mWrapper.PolymorphicFactory(valueM22, ImplicitPort.class); + return m22; + } + + /** + * Retrieves the input for the element 2 3 + * + * @return the input for the m23 element + * @throws Lib3MFException + */ + public ImplicitPort getInputM23() throws Lib3MFException { + Pointer bufferM23 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composematrixnode_getinputm23.invokeInt(new java.lang.Object[]{mHandle, bufferM23})); + Pointer valueM23 = bufferM23.getPointer(0); + ImplicitPort m23 = null; + if (valueM23 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "M23 was a null pointer"); + } + m23 = mWrapper.PolymorphicFactory(valueM23, ImplicitPort.class); + return m23; + } + + /** + * Retrieves the input for the element 3 0 + * + * @return the input for the m30 element + * @throws Lib3MFException + */ + public ImplicitPort getInputM30() throws Lib3MFException { + Pointer bufferM30 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composematrixnode_getinputm30.invokeInt(new java.lang.Object[]{mHandle, bufferM30})); + Pointer valueM30 = bufferM30.getPointer(0); + ImplicitPort m30 = null; + if (valueM30 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "M30 was a null pointer"); + } + m30 = mWrapper.PolymorphicFactory(valueM30, ImplicitPort.class); + return m30; + } + + /** + * Retrieves the input for the element 3 1 + * + * @return the input for the m31 element + * @throws Lib3MFException + */ + public ImplicitPort getInputM31() throws Lib3MFException { + Pointer bufferM31 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composematrixnode_getinputm31.invokeInt(new java.lang.Object[]{mHandle, bufferM31})); + Pointer valueM31 = bufferM31.getPointer(0); + ImplicitPort m31 = null; + if (valueM31 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "M31 was a null pointer"); + } + m31 = mWrapper.PolymorphicFactory(valueM31, ImplicitPort.class); + return m31; + } + + /** + * Retrieves the input for the element 3 2 + * + * @return the input for the m32 element + * @throws Lib3MFException + */ + public ImplicitPort getInputM32() throws Lib3MFException { + Pointer bufferM32 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composematrixnode_getinputm32.invokeInt(new java.lang.Object[]{mHandle, bufferM32})); + Pointer valueM32 = bufferM32.getPointer(0); + ImplicitPort m32 = null; + if (valueM32 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "M32 was a null pointer"); + } + m32 = mWrapper.PolymorphicFactory(valueM32, ImplicitPort.class); + return m32; + } + + /** + * Retrieves the input for the element 3 3 + * + * @return the input for the m33 element + * @throws Lib3MFException + */ + public ImplicitPort getInputM33() throws Lib3MFException { + Pointer bufferM33 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composematrixnode_getinputm33.invokeInt(new java.lang.Object[]{mHandle, bufferM33})); + Pointer valueM33 = bufferM33.getPointer(0); + ImplicitPort m33 = null; + if (valueM33 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "M33 was a null pointer"); + } + m33 = mWrapper.PolymorphicFactory(valueM33, ImplicitPort.class); + return m33; + } + + /** + * Retrieves the output + * + * @return the output + * @throws Lib3MFException + */ + public ImplicitPort getOutputResult() throws Lib3MFException { + Pointer bufferResult = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composematrixnode_getoutputresult.invokeInt(new java.lang.Object[]{mHandle, bufferResult})); + Pointer valueResult = bufferResult.getPointer(0); + ImplicitPort result = null; + if (valueResult == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Result was a null pointer"); + } + result = mWrapper.PolymorphicFactory(valueResult, ImplicitPort.class); + return result; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/ComposeVectorNode.java b/Autogenerated/Bindings/Java8/lib3mf/ComposeVectorNode.java new file mode 100644 index 000000000..2fcc5aa31 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/ComposeVectorNode.java @@ -0,0 +1,128 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ComposeVectorNode extends ImplicitNode { + + public ComposeVectorNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the input for the x component + * + * @return the input for the x component + * @throws Lib3MFException + */ + public ImplicitPort getInputX() throws Lib3MFException { + Pointer bufferX = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composevectornode_getinputx.invokeInt(new java.lang.Object[]{mHandle, bufferX})); + Pointer valueX = bufferX.getPointer(0); + ImplicitPort x = null; + if (valueX == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "X was a null pointer"); + } + x = mWrapper.PolymorphicFactory(valueX, ImplicitPort.class); + return x; + } + + /** + * Retrieves the input for the y component + * + * @return the input for the y component + * @throws Lib3MFException + */ + public ImplicitPort getInputY() throws Lib3MFException { + Pointer bufferY = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composevectornode_getinputy.invokeInt(new java.lang.Object[]{mHandle, bufferY})); + Pointer valueY = bufferY.getPointer(0); + ImplicitPort y = null; + if (valueY == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Y was a null pointer"); + } + y = mWrapper.PolymorphicFactory(valueY, ImplicitPort.class); + return y; + } + + /** + * Retrieves the input for the z component + * + * @return the input for the z component + * @throws Lib3MFException + */ + public ImplicitPort getInputZ() throws Lib3MFException { + Pointer bufferZ = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composevectornode_getinputz.invokeInt(new java.lang.Object[]{mHandle, bufferZ})); + Pointer valueZ = bufferZ.getPointer(0); + ImplicitPort z = null; + if (valueZ == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Z was a null pointer"); + } + z = mWrapper.PolymorphicFactory(valueZ, ImplicitPort.class); + return z; + } + + /** + * Retrieves the output + * + * @return the output + * @throws Lib3MFException + */ + public ImplicitPort getOutputResult() throws Lib3MFException { + Pointer bufferResult = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composevectornode_getoutputresult.invokeInt(new java.lang.Object[]{mHandle, bufferResult})); + Pointer valueResult = bufferResult.getPointer(0); + ImplicitPort result = null; + if (valueResult == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Result was a null pointer"); + } + result = mWrapper.PolymorphicFactory(valueResult, ImplicitPort.class); + return result; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/CompositeConstituent.java b/Autogenerated/Bindings/Java8/lib3mf/CompositeConstituent.java new file mode 100644 index 000000000..8a799bd84 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/CompositeConstituent.java @@ -0,0 +1,63 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Memory; +import com.sun.jna.Pointer; + +import java.util.Arrays; +import java.util.List; + +public class CompositeConstituent { + + public int PropertyID; + + public double MixingRatio; + + public static final int SIZE = 12; + + public void readFromPointer(Pointer p, long offset) { + PropertyID = p.getInt(offset + 0); + MixingRatio = p.getDouble(offset + 4); + } + + public void writeToPointer(Pointer p, long offset) { + p.setInt(offset + 0, PropertyID); + p.setDouble(offset + 4, MixingRatio); + } + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/CompositeMaterials.java b/Autogenerated/Bindings/Java8/lib3mf/CompositeMaterials.java new file mode 100644 index 000000000..2be3800cc --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/CompositeMaterials.java @@ -0,0 +1,149 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class CompositeMaterials extends Resource { + + public CompositeMaterials(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the count of Composite-s in the CompositeMaterials. + * + * @return returns the count of Composite-s + * @throws Lib3MFException + */ + public int getCount() throws Lib3MFException { + Pointer bufferCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_compositematerials_getcount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getInt(0); + } + + /** + * returns all the PropertyIDs of all Composite-Mixing Values in this CompositeMaterials + * + * @return PropertyID of the Composite-Mixing Values in the CompositeMaterials. + * @throws Lib3MFException + */ + public int[] getAllPropertyIDs() throws Lib3MFException { + Pointer countNeededPropertyIDs = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_compositematerials_getallpropertyids.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededPropertyIDs, Pointer.NULL})); + long countPropertyIDs = countNeededPropertyIDs.getLong(0); + Pointer bufferPropertyIDs = new Memory(Math.max(1, 4 * countPropertyIDs)); + mWrapper.checkError(this, mWrapper.lib3mf_compositematerials_getallpropertyids.invokeInt(new java.lang.Object[]{mHandle, countPropertyIDs, countNeededPropertyIDs, bufferPropertyIDs})); + return bufferPropertyIDs.getIntArray(0, (int)countPropertyIDs); + } + + /** + * Obtains the BaseMaterialGroup instance of this CompositeMaterials. + * + * @return returns the BaseMaterialGroup instance of this CompositeMaterials + * @throws Lib3MFException + */ + public BaseMaterialGroup getBaseMaterialGroup() throws Lib3MFException { + Pointer bufferBaseMaterialGroupInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_compositematerials_getbasematerialgroup.invokeInt(new java.lang.Object[]{mHandle, bufferBaseMaterialGroupInstance})); + Pointer valueBaseMaterialGroupInstance = bufferBaseMaterialGroupInstance.getPointer(0); + BaseMaterialGroup baseMaterialGroupInstance = null; + if (valueBaseMaterialGroupInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "BaseMaterialGroupInstance was a null pointer"); + } + baseMaterialGroupInstance = mWrapper.PolymorphicFactory(valueBaseMaterialGroupInstance, BaseMaterialGroup.class); + return baseMaterialGroupInstance; + } + + /** + * Adds a new Composite-Mixing Values to the CompositeMaterials. + * + * @param composite The Composite Constituents to be added as composite + * @return returns new PropertyID of the new Composite in the CompositeMaterials. + * @throws Lib3MFException + */ + public int addComposite(CompositeConstituent[] composite) throws Lib3MFException { + Pointer bufferComposite = new Memory(Math.max(1, CompositeConstituent.SIZE * composite.length)); + for (int i = 0; i < composite.length; i++) { + composite[i].writeToPointer(bufferComposite, i * CompositeConstituent.SIZE); + } + Pointer bufferPropertyID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_compositematerials_addcomposite.invokeInt(new java.lang.Object[]{mHandle, (long) composite.length, bufferComposite, bufferPropertyID})); + return bufferPropertyID.getInt(0); + } + + /** + * Removes a Composite-Maxing Ratio from the CompositeMaterials. + * + * @param propertyID PropertyID of the Composite-Mixing Values in the CompositeMaterials to be removed. + * @throws Lib3MFException + */ + public void removeComposite(int propertyID) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_compositematerials_removecomposite.invokeInt(new java.lang.Object[]{mHandle, propertyID})); + } + + /** + * Obtains a Composite-Maxing Ratio of this CompositeMaterials. + * + * @param propertyID the PropertyID of the Composite-Maxing Ratio in the CompositeMaterials. + * @return The Composite-Mixing Values with the given PropertyID + * @throws Lib3MFException + */ + public CompositeConstituent[] getComposite(int propertyID) throws Lib3MFException { + Pointer countNeededComposite = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_compositematerials_getcomposite.invokeInt(new java.lang.Object[]{mHandle, propertyID, 0L, countNeededComposite, null})); + long countComposite = countNeededComposite.getLong(0); + Pointer bufferComposite = new Memory(Math.max(1, countComposite * CompositeConstituent.SIZE)); + mWrapper.checkError(this, mWrapper.lib3mf_compositematerials_getcomposite.invokeInt(new java.lang.Object[]{mHandle, propertyID, countComposite, countNeededComposite, bufferComposite})); + CompositeConstituent composite[] = new CompositeConstituent[(int)countComposite]; + for (int i = 0; i < (int)countComposite; i++) { + composite[i] = new CompositeConstituent(); + composite[i].readFromPointer(bufferComposite, i * CompositeConstituent.SIZE); + } + return composite; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/CompositeMaterialsIterator.java b/Autogenerated/Bindings/Java8/lib3mf/CompositeMaterialsIterator.java new file mode 100644 index 000000000..e761f69cf --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/CompositeMaterialsIterator.java @@ -0,0 +1,74 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class CompositeMaterialsIterator extends ResourceIterator { + + public CompositeMaterialsIterator(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the CompositeMaterials the iterator points at. + * + * @return returns the CompositeMaterials instance. + * @throws Lib3MFException + */ + public CompositeMaterials getCurrentCompositeMaterials() throws Lib3MFException { + Pointer bufferResource = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_compositematerialsiterator_getcurrentcompositematerials.invokeInt(new java.lang.Object[]{mHandle, bufferResource})); + Pointer valueResource = bufferResource.getPointer(0); + CompositeMaterials resource = null; + if (valueResource == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Resource was a null pointer"); + } + resource = mWrapper.PolymorphicFactory(valueResource, CompositeMaterials.class); + return resource; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/ConstMatNode.java b/Autogenerated/Bindings/Java8/lib3mf/ConstMatNode.java new file mode 100644 index 000000000..7de80bd61 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/ConstMatNode.java @@ -0,0 +1,100 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ConstMatNode extends ImplicitNode { + + public ConstMatNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Sets the matrix value of the node + * + * @param value the value + * @throws Lib3MFException + */ + public void setMatrix(Matrix4x4 value) throws Lib3MFException { + Pointer bufferValue = new Memory(Matrix4x4.SIZE); + value.writeToPointer(bufferValue, 0); + mWrapper.checkError(this, mWrapper.lib3mf_constmatnode_setmatrix.invokeInt(new java.lang.Object[]{mHandle, bufferValue})); + } + + /** + * Retrieves the matrix value of the node + * + * @return the matrix + * @throws Lib3MFException + */ + public Matrix4x4 getMatrix() throws Lib3MFException { + Pointer bufferValue = new Memory(Matrix4x4.SIZE); + mWrapper.checkError(this, mWrapper.lib3mf_constmatnode_getmatrix.invokeInt(new java.lang.Object[]{mHandle, bufferValue})); + Matrix4x4 value = new Matrix4x4(); + value.readFromPointer(bufferValue, 0); + return value; + } + + /** + * Retrieves the output + * + * @return the output + * @throws Lib3MFException + */ + public ImplicitPort getOutputMatrix() throws Lib3MFException { + Pointer bufferMatrix = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_constmatnode_getoutputmatrix.invokeInt(new java.lang.Object[]{mHandle, bufferMatrix})); + Pointer valueMatrix = bufferMatrix.getPointer(0); + ImplicitPort matrix = null; + if (valueMatrix == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Matrix was a null pointer"); + } + matrix = mWrapper.PolymorphicFactory(valueMatrix, ImplicitPort.class); + return matrix; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/ConstVecNode.java b/Autogenerated/Bindings/Java8/lib3mf/ConstVecNode.java new file mode 100644 index 000000000..9458b56bb --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/ConstVecNode.java @@ -0,0 +1,100 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ConstVecNode extends ImplicitNode { + + public ConstVecNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Sets the vector value of the node + * + * @param value the value + * @throws Lib3MFException + */ + public void setVector(Vector value) throws Lib3MFException { + Pointer bufferValue = new Memory(Vector.SIZE); + value.writeToPointer(bufferValue, 0); + mWrapper.checkError(this, mWrapper.lib3mf_constvecnode_setvector.invokeInt(new java.lang.Object[]{mHandle, bufferValue})); + } + + /** + * Retrieves the vector value of the node + * + * @return the value + * @throws Lib3MFException + */ + public Vector getVector() throws Lib3MFException { + Pointer bufferValue = new Memory(Vector.SIZE); + mWrapper.checkError(this, mWrapper.lib3mf_constvecnode_getvector.invokeInt(new java.lang.Object[]{mHandle, bufferValue})); + Vector value = new Vector(); + value.readFromPointer(bufferValue, 0); + return value; + } + + /** + * Retrieves the output + * + * @return the output + * @throws Lib3MFException + */ + public ImplicitPort getOutputVector() throws Lib3MFException { + Pointer bufferVector = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_constvecnode_getoutputvector.invokeInt(new java.lang.Object[]{mHandle, bufferVector})); + Pointer valueVector = bufferVector.getPointer(0); + ImplicitPort vector = null; + if (valueVector == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Vector was a null pointer"); + } + vector = mWrapper.PolymorphicFactory(valueVector, ImplicitPort.class); + return vector; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/ConstantNode.java b/Autogenerated/Bindings/Java8/lib3mf/ConstantNode.java new file mode 100644 index 000000000..58ddce61b --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/ConstantNode.java @@ -0,0 +1,96 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ConstantNode extends ImplicitNode { + + public ConstantNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Sets the constant value of the node + * + * @param value the value + * @throws Lib3MFException + */ + public void setConstant(double value) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_constantnode_setconstant.invokeInt(new java.lang.Object[]{mHandle, value})); + } + + /** + * Retrieves the constant value of the node + * + * @return the value + * @throws Lib3MFException + */ + public double getConstant() throws Lib3MFException { + Pointer bufferValue = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_constantnode_getconstant.invokeInt(new java.lang.Object[]{mHandle, bufferValue})); + return bufferValue.getDouble(0); + } + + /** + * Retrieves the output + * + * @return the output + * @throws Lib3MFException + */ + public ImplicitPort getOutputValue() throws Lib3MFException { + Pointer bufferValue = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_constantnode_getoutputvalue.invokeInt(new java.lang.Object[]{mHandle, bufferValue})); + Pointer valueValue = bufferValue.getPointer(0); + ImplicitPort value = null; + if (valueValue == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Value was a null pointer"); + } + value = mWrapper.PolymorphicFactory(valueValue, ImplicitPort.class); + return value; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/Consumer.java b/Autogenerated/Bindings/Java8/lib3mf/Consumer.java new file mode 100644 index 000000000..5de66765f --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/Consumer.java @@ -0,0 +1,101 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Consumer extends Base { + + public Consumer(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Gets the consumerid + * + * @return A unique identifier for the consumers + * @throws Lib3MFException + */ + public String getConsumerID() throws Lib3MFException { + Pointer bytesNeededConsumerID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_consumer_getconsumerid.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededConsumerID, null})); + int sizeConsumerID = bytesNeededConsumerID.getInt(0); + Pointer bufferConsumerID = new Memory(sizeConsumerID); + mWrapper.checkError(this, mWrapper.lib3mf_consumer_getconsumerid.invokeInt(new java.lang.Object[]{mHandle, sizeConsumerID, bytesNeededConsumerID, bufferConsumerID})); + return new String(bufferConsumerID.getByteArray(0, sizeConsumerID - 1), StandardCharsets.UTF_8); + } + + /** + * Getts the keyid + * + * @return The identifier for the key of this consumer + * @throws Lib3MFException + */ + public String getKeyID() throws Lib3MFException { + Pointer bytesNeededKeyID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_consumer_getkeyid.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededKeyID, null})); + int sizeKeyID = bytesNeededKeyID.getInt(0); + Pointer bufferKeyID = new Memory(sizeKeyID); + mWrapper.checkError(this, mWrapper.lib3mf_consumer_getkeyid.invokeInt(new java.lang.Object[]{mHandle, sizeKeyID, bytesNeededKeyID, bufferKeyID})); + return new String(bufferKeyID.getByteArray(0, sizeKeyID - 1), StandardCharsets.UTF_8); + } + + /** + * Gets the keyvalue associated with this consumer + * + * @return The public key, when available, of this consumer + * @throws Lib3MFException + */ + public String getKeyValue() throws Lib3MFException { + Pointer bytesNeededKeyValue = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_consumer_getkeyvalue.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededKeyValue, null})); + int sizeKeyValue = bytesNeededKeyValue.getInt(0); + Pointer bufferKeyValue = new Memory(sizeKeyValue); + mWrapper.checkError(this, mWrapper.lib3mf_consumer_getkeyvalue.invokeInt(new java.lang.Object[]{mHandle, sizeKeyValue, bytesNeededKeyValue, bufferKeyValue})); + return new String(bufferKeyValue.getByteArray(0, sizeKeyValue - 1), StandardCharsets.UTF_8); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/ContentEncryptionParams.java b/Autogenerated/Bindings/Java8/lib3mf/ContentEncryptionParams.java new file mode 100644 index 000000000..74f1e2fdc --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/ContentEncryptionParams.java @@ -0,0 +1,169 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ContentEncryptionParams extends Base { + + public ContentEncryptionParams(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the encryption method to be used in this encryption process + * + * @return + * @throws Lib3MFException + */ + public Lib3MFWrapper.EncryptionAlgorithm getEncryptionAlgorithm() throws Lib3MFException { + Pointer bufferAlgorithm = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_contentencryptionparams_getencryptionalgorithm.invokeInt(new java.lang.Object[]{mHandle, bufferAlgorithm})); + return Lib3MFWrapper.EnumConversion.convertConstToEncryptionAlgorithm(bufferAlgorithm.getInt(0)); + } + + /** + * Gets the key for the resource associated + * + * @return Pointer to a buffer where to place the key. + * @throws Lib3MFException + */ + public byte[] getKey() throws Lib3MFException { + Pointer countNeededByteData = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_contentencryptionparams_getkey.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededByteData, Pointer.NULL})); + long countByteData = countNeededByteData.getLong(0); + Pointer bufferByteData = new Memory(Math.max(1, 1 * countByteData)); + mWrapper.checkError(this, mWrapper.lib3mf_contentencryptionparams_getkey.invokeInt(new java.lang.Object[]{mHandle, countByteData, countNeededByteData, bufferByteData})); + return bufferByteData.getByteArray(0, (int)countByteData); + } + + /** + * Gets the IV data + * + * @return Pointer to a buffer where to place the data. + * @throws Lib3MFException + */ + public byte[] getInitializationVector() throws Lib3MFException { + Pointer countNeededByteData = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_contentencryptionparams_getinitializationvector.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededByteData, Pointer.NULL})); + long countByteData = countNeededByteData.getLong(0); + Pointer bufferByteData = new Memory(Math.max(1, 1 * countByteData)); + mWrapper.checkError(this, mWrapper.lib3mf_contentencryptionparams_getinitializationvector.invokeInt(new java.lang.Object[]{mHandle, countByteData, countNeededByteData, bufferByteData})); + return bufferByteData.getByteArray(0, (int)countByteData); + } + + /** + * A handler descriptor that uniquely identifies the context of the resource. Each resource will be assigned a different value + * + * @return Pointer to a buffer where to place the data. + * @throws Lib3MFException + */ + public byte[] getAuthenticationTag() throws Lib3MFException { + Pointer countNeededByteData = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_contentencryptionparams_getauthenticationtag.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededByteData, Pointer.NULL})); + long countByteData = countNeededByteData.getLong(0); + Pointer bufferByteData = new Memory(Math.max(1, 1 * countByteData)); + mWrapper.checkError(this, mWrapper.lib3mf_contentencryptionparams_getauthenticationtag.invokeInt(new java.lang.Object[]{mHandle, countByteData, countNeededByteData, bufferByteData})); + return bufferByteData.getByteArray(0, (int)countByteData); + } + + /** + * Sets the authentication tag + * + * @param byteData The authentication tag size + * @throws Lib3MFException + */ + public void setAuthenticationTag(byte[] byteData) throws Lib3MFException { + Pointer bufferByteData = new Memory(Math.max(1, 1 * byteData.length)); + for (int i = 0; i < byteData.length; i++) { + bufferByteData.setByte(1 * i, byteData[i]); + } + mWrapper.checkError(this, mWrapper.lib3mf_contentencryptionparams_setauthenticationtag.invokeInt(new java.lang.Object[]{mHandle, (long) byteData.length, bufferByteData})); + } + + /** + * A handler descriptor that uniquely identifies the context of the resource. Each resource will be assigned a different value + * + * @return Buffer where the data will be placed + * @throws Lib3MFException + */ + public byte[] getAdditionalAuthenticationData() throws Lib3MFException { + Pointer countNeededByteData = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_contentencryptionparams_getadditionalauthenticationdata.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededByteData, Pointer.NULL})); + long countByteData = countNeededByteData.getLong(0); + Pointer bufferByteData = new Memory(Math.max(1, 1 * countByteData)); + mWrapper.checkError(this, mWrapper.lib3mf_contentencryptionparams_getadditionalauthenticationdata.invokeInt(new java.lang.Object[]{mHandle, countByteData, countNeededByteData, bufferByteData})); + return bufferByteData.getByteArray(0, (int)countByteData); + } + + /** + * A handler descriptor that uniquely identifies the context of the resource. Each resource will be assigned a different value + * + * @return + * @throws Lib3MFException + */ + public long getDescriptor() throws Lib3MFException { + Pointer bufferDescriptor = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_contentencryptionparams_getdescriptor.invokeInt(new java.lang.Object[]{mHandle, bufferDescriptor})); + return bufferDescriptor.getLong(0); + } + + /** + * Gets the resourcedatagroup keyuuid + * + * @return The resourcedatagroup keyuuid that may be use to reference an external key + * @throws Lib3MFException + */ + public String getKeyUUID() throws Lib3MFException { + Pointer bytesNeededUUID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_contentencryptionparams_getkeyuuid.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededUUID, null})); + int sizeUUID = bytesNeededUUID.getInt(0); + Pointer bufferUUID = new Memory(sizeUUID); + mWrapper.checkError(this, mWrapper.lib3mf_contentencryptionparams_getkeyuuid.invokeInt(new java.lang.Object[]{mHandle, sizeUUID, bytesNeededUUID, bufferUUID})); + return new String(bufferUUID.getByteArray(0, sizeUUID - 1), StandardCharsets.UTF_8); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/CosNode.java b/Autogenerated/Bindings/Java8/lib3mf/CosNode.java new file mode 100644 index 000000000..ad499ed27 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/CosNode.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class CosNode extends OneInputNode { + + public CosNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/CoshNode.java b/Autogenerated/Bindings/Java8/lib3mf/CoshNode.java new file mode 100644 index 000000000..78475175a --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/CoshNode.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class CoshNode extends OneInputNode { + + public CoshNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/CrossNode.java b/Autogenerated/Bindings/Java8/lib3mf/CrossNode.java new file mode 100644 index 000000000..59a61b517 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/CrossNode.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class CrossNode extends TwoInputNode { + + public CrossNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/DecomposeVectorNode.java b/Autogenerated/Bindings/Java8/lib3mf/DecomposeVectorNode.java new file mode 100644 index 000000000..6cf2d49db --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/DecomposeVectorNode.java @@ -0,0 +1,128 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class DecomposeVectorNode extends ImplicitNode { + + public DecomposeVectorNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the input + * + * @return the input port for the vector to decompose + * @throws Lib3MFException + */ + public ImplicitPort getInputA() throws Lib3MFException { + Pointer bufferA = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_decomposevectornode_getinputa.invokeInt(new java.lang.Object[]{mHandle, bufferA})); + Pointer valueA = bufferA.getPointer(0); + ImplicitPort a = null; + if (valueA == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "A was a null pointer"); + } + a = mWrapper.PolymorphicFactory(valueA, ImplicitPort.class); + return a; + } + + /** + * Retrieves the output for the x component + * + * @return the output for the x component + * @throws Lib3MFException + */ + public ImplicitPort getOutputX() throws Lib3MFException { + Pointer bufferX = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_decomposevectornode_getoutputx.invokeInt(new java.lang.Object[]{mHandle, bufferX})); + Pointer valueX = bufferX.getPointer(0); + ImplicitPort x = null; + if (valueX == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "X was a null pointer"); + } + x = mWrapper.PolymorphicFactory(valueX, ImplicitPort.class); + return x; + } + + /** + * Retrieves the output for the y component + * + * @return the output for the y component + * @throws Lib3MFException + */ + public ImplicitPort getOutputY() throws Lib3MFException { + Pointer bufferY = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_decomposevectornode_getoutputy.invokeInt(new java.lang.Object[]{mHandle, bufferY})); + Pointer valueY = bufferY.getPointer(0); + ImplicitPort y = null; + if (valueY == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Y was a null pointer"); + } + y = mWrapper.PolymorphicFactory(valueY, ImplicitPort.class); + return y; + } + + /** + * Retrieves the output for the z component + * + * @return the output for the z component + * @throws Lib3MFException + */ + public ImplicitPort getOutputZ() throws Lib3MFException { + Pointer bufferZ = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_decomposevectornode_getoutputz.invokeInt(new java.lang.Object[]{mHandle, bufferZ})); + Pointer valueZ = bufferZ.getPointer(0); + ImplicitPort z = null; + if (valueZ == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Z was a null pointer"); + } + z = mWrapper.PolymorphicFactory(valueZ, ImplicitPort.class); + return z; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/DivisionNode.java b/Autogenerated/Bindings/Java8/lib3mf/DivisionNode.java new file mode 100644 index 000000000..d4731a1c1 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/DivisionNode.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class DivisionNode extends TwoInputNode { + + public DivisionNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/DotNode.java b/Autogenerated/Bindings/Java8/lib3mf/DotNode.java new file mode 100644 index 000000000..43aeef1f6 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/DotNode.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class DotNode extends TwoInputNode { + + public DotNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/ExpNode.java b/Autogenerated/Bindings/Java8/lib3mf/ExpNode.java new file mode 100644 index 000000000..33f07a2d9 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/ExpNode.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ExpNode extends OneInputNode { + + public ExpNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/FloorNode.java b/Autogenerated/Bindings/Java8/lib3mf/FloorNode.java new file mode 100644 index 000000000..02f584802 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/FloorNode.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class FloorNode extends OneInputNode { + + public FloorNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/FmodNode.java b/Autogenerated/Bindings/Java8/lib3mf/FmodNode.java new file mode 100644 index 000000000..b49001fad --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/FmodNode.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class FmodNode extends TwoInputNode { + + public FmodNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/FractNode.java b/Autogenerated/Bindings/Java8/lib3mf/FractNode.java new file mode 100644 index 000000000..18a88fa7c --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/FractNode.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class FractNode extends OneInputNode { + + public FractNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/Function.java b/Autogenerated/Bindings/Java8/lib3mf/Function.java new file mode 100644 index 000000000..8f33a7c6b --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/Function.java @@ -0,0 +1,257 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Function extends Resource { + + public Function(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the display name of the function + * + * @return the display name + * @throws Lib3MFException + */ + public String getDisplayName() throws Lib3MFException { + Pointer bytesNeededDisplayName = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_function_getdisplayname.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededDisplayName, null})); + int sizeDisplayName = bytesNeededDisplayName.getInt(0); + Pointer bufferDisplayName = new Memory(sizeDisplayName); + mWrapper.checkError(this, mWrapper.lib3mf_function_getdisplayname.invokeInt(new java.lang.Object[]{mHandle, sizeDisplayName, bytesNeededDisplayName, bufferDisplayName})); + return new String(bufferDisplayName.getByteArray(0, sizeDisplayName - 1), StandardCharsets.UTF_8); + } + + /** + * Sets the display name of the function + * + * @param displayName the display name + * @throws Lib3MFException + */ + public void setDisplayName(String displayName) throws Lib3MFException { + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_function_setdisplayname.invokeInt(new java.lang.Object[]{mHandle, bufferDisplayName})); + } + + /** + * Add an input + * + * @param identifier the identifier of the input + * @param displayName the display name of the input + * @param type the type of the input + * @return The added input port + * @throws Lib3MFException + */ + public ImplicitPort addInput(String identifier, String displayName, Lib3MFWrapper.ImplicitPortType type) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + Pointer bufferPort = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_function_addinput.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, Lib3MFWrapper.EnumConversion.convertImplicitPortTypeToConst(type), bufferPort})); + Pointer valuePort = bufferPort.getPointer(0); + ImplicitPort port = null; + if (valuePort == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Port was a null pointer"); + } + port = mWrapper.PolymorphicFactory(valuePort, ImplicitPort.class); + return port; + } + + /** + * Retrieves the inputs + * + * @return iterator for the list of inputs + * @throws Lib3MFException + */ + public ImplicitPortIterator getInputs() throws Lib3MFException { + Pointer bufferIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_function_getinputs.invokeInt(new java.lang.Object[]{mHandle, bufferIterator})); + Pointer valueIterator = bufferIterator.getPointer(0); + ImplicitPortIterator iterator = null; + if (valueIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Iterator was a null pointer"); + } + iterator = mWrapper.PolymorphicFactory(valueIterator, ImplicitPortIterator.class); + return iterator; + } + + /** + * Removes an input + * + * @param input The input to be removed + * @throws Lib3MFException + */ + public void removeInput(ImplicitPort input) throws Lib3MFException { + Pointer inputHandle = null; + if (input != null) { + inputHandle = input.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Input is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_function_removeinput.invokeInt(new java.lang.Object[]{mHandle, inputHandle})); + } + + /** + * Add an output + * + * @param identifier the identifier of the output + * @param displayName the display name of the output + * @param type the type of the input + * @return The added input port + * @throws Lib3MFException + */ + public ImplicitPort addOutput(String identifier, String displayName, Lib3MFWrapper.ImplicitPortType type) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + Pointer bufferPort = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_function_addoutput.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, Lib3MFWrapper.EnumConversion.convertImplicitPortTypeToConst(type), bufferPort})); + Pointer valuePort = bufferPort.getPointer(0); + ImplicitPort port = null; + if (valuePort == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Port was a null pointer"); + } + port = mWrapper.PolymorphicFactory(valuePort, ImplicitPort.class); + return port; + } + + /** + * Retrieves the outputs + * + * @return iterator for the outputs + * @throws Lib3MFException + */ + public ImplicitPortIterator getOutputs() throws Lib3MFException { + Pointer bufferIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_function_getoutputs.invokeInt(new java.lang.Object[]{mHandle, bufferIterator})); + Pointer valueIterator = bufferIterator.getPointer(0); + ImplicitPortIterator iterator = null; + if (valueIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Iterator was a null pointer"); + } + iterator = mWrapper.PolymorphicFactory(valueIterator, ImplicitPortIterator.class); + return iterator; + } + + /** + * Removes an output + * + * @param output The output to be removed + * @throws Lib3MFException + */ + public void removeOutput(ImplicitPort output) throws Lib3MFException { + Pointer outputHandle = null; + if (output != null) { + outputHandle = output.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Output is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_function_removeoutput.invokeInt(new java.lang.Object[]{mHandle, outputHandle})); + } + + /** + * Retrieves an input + * + * @param identifier the identifier of the input + * @return the input port + * @throws Lib3MFException + */ + public ImplicitPort findInput(String identifier) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + Pointer bufferInput = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_function_findinput.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferInput})); + Pointer valueInput = bufferInput.getPointer(0); + ImplicitPort input = null; + if (valueInput == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Input was a null pointer"); + } + input = mWrapper.PolymorphicFactory(valueInput, ImplicitPort.class); + return input; + } + + /** + * Retrieves an output + * + * @param identifier the identifier of the output + * @return the output port + * @throws Lib3MFException + */ + public ImplicitPort findOutput(String identifier) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + Pointer bufferOutput = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_function_findoutput.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferOutput})); + Pointer valueOutput = bufferOutput.getPointer(0); + ImplicitPort output = null; + if (valueOutput == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Output was a null pointer"); + } + output = mWrapper.PolymorphicFactory(valueOutput, ImplicitPort.class); + return output; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/FunctionCallNode.java b/Autogenerated/Bindings/Java8/lib3mf/FunctionCallNode.java new file mode 100644 index 000000000..f849b396e --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/FunctionCallNode.java @@ -0,0 +1,74 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class FunctionCallNode extends ImplicitNode { + + public FunctionCallNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the input for the function id + * + * @return the input port for the function + * @throws Lib3MFException + */ + public ImplicitPort getInputFunctionID() throws Lib3MFException { + Pointer bufferFunction = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_functioncallnode_getinputfunctionid.invokeInt(new java.lang.Object[]{mHandle, bufferFunction})); + Pointer valueFunction = bufferFunction.getPointer(0); + ImplicitPort function = null; + if (valueFunction == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Function was a null pointer"); + } + function = mWrapper.PolymorphicFactory(valueFunction, ImplicitPort.class); + return function; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/FunctionFromImage3D.java b/Autogenerated/Bindings/Java8/lib3mf/FunctionFromImage3D.java new file mode 100644 index 000000000..dcafeb36a --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/FunctionFromImage3D.java @@ -0,0 +1,203 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class FunctionFromImage3D extends Function { + + public FunctionFromImage3D(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the selected 3D image. + * + * @return image instance + * @throws Lib3MFException + */ + public Image3D getImage3D() throws Lib3MFException { + Pointer bufferImage3D = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_functionfromimage3d_getimage3d.invokeInt(new java.lang.Object[]{mHandle, bufferImage3D})); + Pointer valueImage3D = bufferImage3D.getPointer(0); + Image3D image3D = null; + if (valueImage3D == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Image3D was a null pointer"); + } + image3D = mWrapper.PolymorphicFactory(valueImage3D, Image3D.class); + return image3D; + } + + /** + * Sets the 3D image of the selector. + * + * @param image3D image instance + * @throws Lib3MFException + */ + public void setImage3D(Image3D image3D) throws Lib3MFException { + Pointer image3DHandle = null; + if (image3D != null) { + image3DHandle = image3D.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Image3D is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_functionfromimage3d_setimage3d.invokeInt(new java.lang.Object[]{mHandle, image3DHandle})); + } + + /** + * Sets the texture filter of the selector. + * + * @param filter texture filter + * @throws Lib3MFException + */ + public void setFilter(Lib3MFWrapper.TextureFilter filter) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_functionfromimage3d_setfilter.invokeInt(new java.lang.Object[]{mHandle, Lib3MFWrapper.EnumConversion.convertTextureFilterToConst(filter)})); + } + + /** + * Returns the texture filter of the selector. + * + * @return texture filter + * @throws Lib3MFException + */ + public Lib3MFWrapper.TextureFilter getFilter() throws Lib3MFException { + Pointer bufferFilter = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_functionfromimage3d_getfilter.invokeInt(new java.lang.Object[]{mHandle, bufferFilter})); + return Lib3MFWrapper.EnumConversion.convertConstToTextureFilter(bufferFilter.getInt(0)); + } + + /** + * Sets the tile styles of the selector. + * + * @param tileStyleU tile style in U + * @param tileStyleV tile style in V + * @param tileStyleW tile style in W + * @throws Lib3MFException + */ + public void setTileStyles(Lib3MFWrapper.TextureTileStyle tileStyleU, Lib3MFWrapper.TextureTileStyle tileStyleV, Lib3MFWrapper.TextureTileStyle tileStyleW) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_functionfromimage3d_settilestyles.invokeInt(new java.lang.Object[]{mHandle, Lib3MFWrapper.EnumConversion.convertTextureTileStyleToConst(tileStyleU), Lib3MFWrapper.EnumConversion.convertTextureTileStyleToConst(tileStyleV), Lib3MFWrapper.EnumConversion.convertTextureTileStyleToConst(tileStyleW)})); + } + + /** + * Retrieves the tile styles of the selector. + * + * @return GetTileStyles Result Tuple + * @throws Lib3MFException + */ + public GetTileStylesResult getTileStyles() throws Lib3MFException { + Pointer bufferTileStyleU = new Memory(4); + Pointer bufferTileStyleV = new Memory(4); + Pointer bufferTileStyleW = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_functionfromimage3d_gettilestyles.invokeInt(new java.lang.Object[]{mHandle, bufferTileStyleU, bufferTileStyleV, bufferTileStyleW})); + GetTileStylesResult returnTuple = new GetTileStylesResult(); + returnTuple.TileStyleU = Lib3MFWrapper.EnumConversion.convertConstToTextureTileStyle(bufferTileStyleU.getInt(0)); + returnTuple.TileStyleV = Lib3MFWrapper.EnumConversion.convertConstToTextureTileStyle(bufferTileStyleV.getInt(0)); + returnTuple.TileStyleW = Lib3MFWrapper.EnumConversion.convertConstToTextureTileStyle(bufferTileStyleW.getInt(0)); + return returnTuple; + } + + public static class GetTileStylesResult { + /** + * tile style in U + */ + public Lib3MFWrapper.TextureTileStyle TileStyleU; + + /** + * tile style in V + */ + public Lib3MFWrapper.TextureTileStyle TileStyleV; + + /** + * tile style in W + */ + public Lib3MFWrapper.TextureTileStyle TileStyleW; + + } + /** + * returns the offset value for the pixel values in the Image3D + * + * @return the offset value for the pixel values in the Image3D + * @throws Lib3MFException + */ + public double getOffset() throws Lib3MFException { + Pointer bufferOffset = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_functionfromimage3d_getoffset.invokeInt(new java.lang.Object[]{mHandle, bufferOffset})); + return bufferOffset.getDouble(0); + } + + /** + * Sets the offset value for the pixel values in the Image3D + * + * @param offset the offset value for the pixel values in the Image3D + * @throws Lib3MFException + */ + public void setOffset(double offset) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_functionfromimage3d_setoffset.invokeInt(new java.lang.Object[]{mHandle, offset})); + } + + /** + * returns the scale value for the pixel values in the Image3D + * + * @return the scale value for the pixel values in the Image3D + * @throws Lib3MFException + */ + public double getScale() throws Lib3MFException { + Pointer bufferScale = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_functionfromimage3d_getscale.invokeInt(new java.lang.Object[]{mHandle, bufferScale})); + return bufferScale.getDouble(0); + } + + /** + * Sets the scale value for the pixel values in the Image3D + * + * @param scale the scale value for the pixel values in the Image3D + * @throws Lib3MFException + */ + public void setScale(double scale) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_functionfromimage3d_setscale.invokeInt(new java.lang.Object[]{mHandle, scale})); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/FunctionGradientNode.java b/Autogenerated/Bindings/Java8/lib3mf/FunctionGradientNode.java new file mode 100644 index 000000000..13b681e28 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/FunctionGradientNode.java @@ -0,0 +1,222 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class FunctionGradientNode extends ImplicitNode { + + public FunctionGradientNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the input for the function id + * + * @return the input port for the function + * @throws Lib3MFException + */ + public ImplicitPort getInputFunctionID() throws Lib3MFException { + Pointer bufferFunction = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_functiongradientnode_getinputfunctionid.invokeInt(new java.lang.Object[]{mHandle, bufferFunction})); + Pointer valueFunction = bufferFunction.getPointer(0); + ImplicitPort function = null; + if (valueFunction == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Function was a null pointer"); + } + function = mWrapper.PolymorphicFactory(valueFunction, ImplicitPort.class); + return function; + } + + /** + * Retrieves the input for the position + * + * @return the input port for the position + * @throws Lib3MFException + */ + public ImplicitPort getInputPos() throws Lib3MFException { + Pointer bufferPos = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_functiongradientnode_getinputpos.invokeInt(new java.lang.Object[]{mHandle, bufferPos})); + Pointer valuePos = bufferPos.getPointer(0); + ImplicitPort pos = null; + if (valuePos == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Pos was a null pointer"); + } + pos = mWrapper.PolymorphicFactory(valuePos, ImplicitPort.class); + return pos; + } + + /** + * Retrieves the input for the finite difference step + * + * @return the input port for the finite difference step + * @throws Lib3MFException + */ + public ImplicitPort getInputStep() throws Lib3MFException { + Pointer bufferStep = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_functiongradientnode_getinputstep.invokeInt(new java.lang.Object[]{mHandle, bufferStep})); + Pointer valueStep = bufferStep.getPointer(0); + ImplicitPort step = null; + if (valueStep == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Step was a null pointer"); + } + step = mWrapper.PolymorphicFactory(valueStep, ImplicitPort.class); + return step; + } + + /** + * Sets the name of the referenced scalar output + * + * @param scalarOutputName the name of the scalar output of the referenced function + * @throws Lib3MFException + */ + public void setScalarOutputName(String scalarOutputName) throws Lib3MFException { + byte[] bytesScalarOutputName = scalarOutputName.getBytes(StandardCharsets.UTF_8); + Memory bufferScalarOutputName = new Memory(bytesScalarOutputName.length + 1); + bufferScalarOutputName.write(0, bytesScalarOutputName, 0, bytesScalarOutputName.length); + bufferScalarOutputName.setByte(bytesScalarOutputName.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_functiongradientnode_setscalaroutputname.invokeInt(new java.lang.Object[]{mHandle, bufferScalarOutputName})); + } + + /** + * Retrieves the name of the referenced scalar output + * + * @return the name of the scalar output of the referenced function + * @throws Lib3MFException + */ + public String getScalarOutputName() throws Lib3MFException { + Pointer bytesNeededScalarOutputName = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_functiongradientnode_getscalaroutputname.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededScalarOutputName, null})); + int sizeScalarOutputName = bytesNeededScalarOutputName.getInt(0); + Pointer bufferScalarOutputName = new Memory(sizeScalarOutputName); + mWrapper.checkError(this, mWrapper.lib3mf_functiongradientnode_getscalaroutputname.invokeInt(new java.lang.Object[]{mHandle, sizeScalarOutputName, bytesNeededScalarOutputName, bufferScalarOutputName})); + return new String(bufferScalarOutputName.getByteArray(0, sizeScalarOutputName - 1), StandardCharsets.UTF_8); + } + + /** + * Sets the name of the referenced vector input + * + * @param vectorInputName the name of the vector input (float3) of the referenced function + * @throws Lib3MFException + */ + public void setVectorInputName(String vectorInputName) throws Lib3MFException { + byte[] bytesVectorInputName = vectorInputName.getBytes(StandardCharsets.UTF_8); + Memory bufferVectorInputName = new Memory(bytesVectorInputName.length + 1); + bufferVectorInputName.write(0, bytesVectorInputName, 0, bytesVectorInputName.length); + bufferVectorInputName.setByte(bytesVectorInputName.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_functiongradientnode_setvectorinputname.invokeInt(new java.lang.Object[]{mHandle, bufferVectorInputName})); + } + + /** + * Retrieves the name of the referenced vector input + * + * @return the name of the vector input (float3) of the referenced function + * @throws Lib3MFException + */ + public String getVectorInputName() throws Lib3MFException { + Pointer bytesNeededVectorInputName = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_functiongradientnode_getvectorinputname.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededVectorInputName, null})); + int sizeVectorInputName = bytesNeededVectorInputName.getInt(0); + Pointer bufferVectorInputName = new Memory(sizeVectorInputName); + mWrapper.checkError(this, mWrapper.lib3mf_functiongradientnode_getvectorinputname.invokeInt(new java.lang.Object[]{mHandle, sizeVectorInputName, bytesNeededVectorInputName, bufferVectorInputName})); + return new String(bufferVectorInputName.getByteArray(0, sizeVectorInputName - 1), StandardCharsets.UTF_8); + } + + /** + * Retrieves the normalized gradient output + * + * @return the output port for the normalized gradient + * @throws Lib3MFException + */ + public ImplicitPort getOutputVector() throws Lib3MFException { + Pointer bufferVector = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_functiongradientnode_getoutputvector.invokeInt(new java.lang.Object[]{mHandle, bufferVector})); + Pointer valueVector = bufferVector.getPointer(0); + ImplicitPort vector = null; + if (valueVector == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Vector was a null pointer"); + } + vector = mWrapper.PolymorphicFactory(valueVector, ImplicitPort.class); + return vector; + } + + /** + * Retrieves the raw gradient output + * + * @return the output port for the raw gradient + * @throws Lib3MFException + */ + public ImplicitPort getOutputGradient() throws Lib3MFException { + Pointer bufferGradient = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_functiongradientnode_getoutputgradient.invokeInt(new java.lang.Object[]{mHandle, bufferGradient})); + Pointer valueGradient = bufferGradient.getPointer(0); + ImplicitPort gradient = null; + if (valueGradient == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Gradient was a null pointer"); + } + gradient = mWrapper.PolymorphicFactory(valueGradient, ImplicitPort.class); + return gradient; + } + + /** + * Retrieves the gradient magnitude output + * + * @return the output port for the gradient magnitude + * @throws Lib3MFException + */ + public ImplicitPort getOutputMagnitude() throws Lib3MFException { + Pointer bufferMagnitude = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_functiongradientnode_getoutputmagnitude.invokeInt(new java.lang.Object[]{mHandle, bufferMagnitude})); + Pointer valueMagnitude = bufferMagnitude.getPointer(0); + ImplicitPort magnitude = null; + if (valueMagnitude == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Magnitude was a null pointer"); + } + magnitude = mWrapper.PolymorphicFactory(valueMagnitude, ImplicitPort.class); + return magnitude; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/FunctionIterator.java b/Autogenerated/Bindings/Java8/lib3mf/FunctionIterator.java new file mode 100644 index 000000000..6d6849fa3 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/FunctionIterator.java @@ -0,0 +1,74 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class FunctionIterator extends ResourceIterator { + + public FunctionIterator(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the Function the iterator points at. + * + * @return returns the Function instance. + * @throws Lib3MFException + */ + public Function getCurrentFunction() throws Lib3MFException { + Pointer bufferResource = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_functioniterator_getcurrentfunction.invokeInt(new java.lang.Object[]{mHandle, bufferResource})); + Pointer valueResource = bufferResource.getPointer(0); + Function resource = null; + if (valueResource == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Resource was a null pointer"); + } + resource = mWrapper.PolymorphicFactory(valueResource, Function.class); + return resource; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/FunctionReference.java b/Autogenerated/Bindings/Java8/lib3mf/FunctionReference.java new file mode 100644 index 000000000..89ed264b9 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/FunctionReference.java @@ -0,0 +1,177 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class FunctionReference extends Base { + + public FunctionReference(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the UniqueResourceID of the Function. Only functions with a 'pos'-input are allowed. + * + * @return returns the UniqueResourceID. + * @throws Lib3MFException + */ + public int getFunctionResourceID() throws Lib3MFException { + Pointer bufferUniqueResourceID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_functionreference_getfunctionresourceid.invokeInt(new java.lang.Object[]{mHandle, bufferUniqueResourceID})); + return bufferUniqueResourceID.getInt(0); + } + + /** + * Sets the UniqueResourceID to refer to. + * + * @param uniqueResourceID UniqueResourceID of the function + * @throws Lib3MFException + */ + public void setFunctionResourceID(int uniqueResourceID) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_functionreference_setfunctionresourceid.invokeInt(new java.lang.Object[]{mHandle, uniqueResourceID})); + } + + /** + * Returns the transformation matrix into the coordinate system of the referenced Function. + * + * @return the transformation matrix + * @throws Lib3MFException + */ + public Transform getTransform() throws Lib3MFException { + Pointer bufferTransform = new Memory(Transform.SIZE); + mWrapper.checkError(this, mWrapper.lib3mf_functionreference_gettransform.invokeInt(new java.lang.Object[]{mHandle, bufferTransform})); + Transform transform = new Transform(); + transform.readFromPointer(bufferTransform, 0); + return transform; + } + + /** + * Sets the transformation matrix into the coordinate system of the referenced Function. + * + * @param transform new transformation matrix + * @throws Lib3MFException + */ + public void setTransform(Transform transform) throws Lib3MFException { + Pointer bufferTransform = new Memory(Transform.SIZE); + transform.writeToPointer(bufferTransform, 0); + mWrapper.checkError(this, mWrapper.lib3mf_functionreference_settransform.invokeInt(new java.lang.Object[]{mHandle, bufferTransform})); + } + + /** + * Returns the name of the function output channel to use. + * + * @return the name of the function output channel + * @throws Lib3MFException + */ + public String getChannelName() throws Lib3MFException { + Pointer bytesNeededChannelName = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_functionreference_getchannelname.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededChannelName, null})); + int sizeChannelName = bytesNeededChannelName.getInt(0); + Pointer bufferChannelName = new Memory(sizeChannelName); + mWrapper.checkError(this, mWrapper.lib3mf_functionreference_getchannelname.invokeInt(new java.lang.Object[]{mHandle, sizeChannelName, bytesNeededChannelName, bufferChannelName})); + return new String(bufferChannelName.getByteArray(0, sizeChannelName - 1), StandardCharsets.UTF_8); + } + + /** + * Sets the name of the function output channel to use. + * + * @param channelName new name of the function output channel + * @throws Lib3MFException + */ + public void setChannelName(String channelName) throws Lib3MFException { + byte[] bytesChannelName = channelName.getBytes(StandardCharsets.UTF_8); + Memory bufferChannelName = new Memory(bytesChannelName.length + 1); + bufferChannelName.write(0, bytesChannelName, 0, bytesChannelName.length); + bufferChannelName.setByte(bytesChannelName.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_functionreference_setchannelname.invokeInt(new java.lang.Object[]{mHandle, bufferChannelName})); + } + + /** + * Sets the minimal feature size as a hint for the function evaluator + * + * @param minFeatureSize minimal feature size + * @throws Lib3MFException + */ + public void setMinFeatureSize(double minFeatureSize) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_functionreference_setminfeaturesize.invokeInt(new java.lang.Object[]{mHandle, minFeatureSize})); + } + + /** + * Returns the minimal feature size as a hint for the function evaluator + * + * @return minimal feature size + * @throws Lib3MFException + */ + public double getMinFeatureSize() throws Lib3MFException { + Pointer bufferMinFeatureSize = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_functionreference_getminfeaturesize.invokeInt(new java.lang.Object[]{mHandle, bufferMinFeatureSize})); + return bufferMinFeatureSize.getDouble(0); + } + + /** + * Sets the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). + * + * @param fallBackValue fallback value + * @throws Lib3MFException + */ + public void setFallBackValue(double fallBackValue) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_functionreference_setfallbackvalue.invokeInt(new java.lang.Object[]{mHandle, fallBackValue})); + } + + /** + * Returns the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). + * + * @return fallback value + * @throws Lib3MFException + */ + public double getFallBackValue() throws Lib3MFException { + Pointer bufferFallBackValue = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_functionreference_getfallbackvalue.invokeInt(new java.lang.Object[]{mHandle, bufferFallBackValue})); + return bufferFallBackValue.getDouble(0); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/Image3D.java b/Autogenerated/Bindings/Java8/lib3mf/Image3D.java new file mode 100644 index 000000000..90afdecd2 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/Image3D.java @@ -0,0 +1,97 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Image3D extends Resource { + + public Image3D(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * returns the name of this Image3D + * + * @return the name of this Image3D + * @throws Lib3MFException + */ + public String getName() throws Lib3MFException { + Pointer bytesNeededName = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_image3d_getname.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededName, null})); + int sizeName = bytesNeededName.getInt(0); + Pointer bufferName = new Memory(sizeName); + mWrapper.checkError(this, mWrapper.lib3mf_image3d_getname.invokeInt(new java.lang.Object[]{mHandle, sizeName, bytesNeededName, bufferName})); + return new String(bufferName.getByteArray(0, sizeName - 1), StandardCharsets.UTF_8); + } + + /** + * sets a new name of this Image3D + * + * @param name the new name of this Image3D + * @throws Lib3MFException + */ + public void setName(String name) throws Lib3MFException { + byte[] bytesName = name.getBytes(StandardCharsets.UTF_8); + Memory bufferName = new Memory(bytesName.length + 1); + bufferName.write(0, bytesName, 0, bytesName.length); + bufferName.setByte(bytesName.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_image3d_setname.invokeInt(new java.lang.Object[]{mHandle, bufferName})); + } + + /** + * Retrieves, if this Image3D is a ImageStack + * + * @return returns, whether the Image3D is an ImageStack + * @throws Lib3MFException + */ + public boolean isImageStack() throws Lib3MFException { + Pointer bufferIsImageStack = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_image3d_isimagestack.invokeInt(new java.lang.Object[]{mHandle, bufferIsImageStack})); + return bufferIsImageStack.getByte(0) != 0; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/Image3DIterator.java b/Autogenerated/Bindings/Java8/lib3mf/Image3DIterator.java new file mode 100644 index 000000000..f9d567464 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/Image3DIterator.java @@ -0,0 +1,74 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Image3DIterator extends ResourceIterator { + + public Image3DIterator(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the Image3D the iterator points at. + * + * @return returns the Image3D instance. + * @throws Lib3MFException + */ + public Image3D getCurrentImage3D() throws Lib3MFException { + Pointer bufferResource = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_image3diterator_getcurrentimage3d.invokeInt(new java.lang.Object[]{mHandle, bufferResource})); + Pointer valueResource = bufferResource.getPointer(0); + Image3D resource = null; + if (valueResource == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Resource was a null pointer"); + } + resource = mWrapper.PolymorphicFactory(valueResource, Image3D.class); + return resource; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/ImageStack.java b/Autogenerated/Bindings/Java8/lib3mf/ImageStack.java new file mode 100644 index 000000000..1c6b101f7 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/ImageStack.java @@ -0,0 +1,230 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ImageStack extends Image3D { + + public ImageStack(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the number of rows in each image of this image3d + * + * @return number of rows + * @throws Lib3MFException + */ + public int getRowCount() throws Lib3MFException { + Pointer bufferRowCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_imagestack_getrowcount.invokeInt(new java.lang.Object[]{mHandle, bufferRowCount})); + return bufferRowCount.getInt(0); + } + + /** + * Sets the number of rows in each image of this image3d + * + * @param rowCount number of rows + * @throws Lib3MFException + */ + public void setRowCount(int rowCount) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_imagestack_setrowcount.invokeInt(new java.lang.Object[]{mHandle, rowCount})); + } + + /** + * Retrieves the number of columns in each image of this image3d + * + * @return number of columns + * @throws Lib3MFException + */ + public int getColumnCount() throws Lib3MFException { + Pointer bufferColumnCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_imagestack_getcolumncount.invokeInt(new java.lang.Object[]{mHandle, bufferColumnCount})); + return bufferColumnCount.getInt(0); + } + + /** + * Sets the number of columns in each image of this image3d + * + * @param columnCount number of columns + * @throws Lib3MFException + */ + public void setColumnCount(int columnCount) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_imagestack_setcolumncount.invokeInt(new java.lang.Object[]{mHandle, columnCount})); + } + + /** + * Retrieves the number of images in the stack. + * + * @return number of images + * @throws Lib3MFException + */ + public int getSheetCount() throws Lib3MFException { + Pointer bufferSheetCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_imagestack_getsheetcount.invokeInt(new java.lang.Object[]{mHandle, bufferSheetCount})); + return bufferSheetCount.getInt(0); + } + + /** + * Retrieves a sheet of the stack. Raises an error if sheet is not set. + * + * @param index index of the image (0-based) + * @return attachment containing the image + * @throws Lib3MFException + */ + public Attachment getSheet(int index) throws Lib3MFException { + Pointer bufferSheet = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_imagestack_getsheet.invokeInt(new java.lang.Object[]{mHandle, index, bufferSheet})); + Pointer valueSheet = bufferSheet.getPointer(0); + Attachment sheet = null; + if (valueSheet == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Sheet was a null pointer"); + } + sheet = mWrapper.PolymorphicFactory(valueSheet, Attachment.class); + return sheet; + } + + /** + * Sets a sheet to an existing attachment. + * + * @param index index of the image (0-based) + * @param sheet attachment containing the image + * @throws Lib3MFException + */ + public void setSheet(int index, Attachment sheet) throws Lib3MFException { + Pointer sheetHandle = null; + if (sheet != null) { + sheetHandle = sheet.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Sheet is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_imagestack_setsheet.invokeInt(new java.lang.Object[]{mHandle, index, sheetHandle})); + } + + /** + * Creates a new sheet attachment with empty data. + * + * @param index index of the image (0-based) + * @param path path of part in the package + * @return attachment containing the image + * @throws Lib3MFException + */ + public Attachment createEmptySheet(int index, String path) throws Lib3MFException { + byte[] bytesPath = path.getBytes(StandardCharsets.UTF_8); + Memory bufferPath = new Memory(bytesPath.length + 1); + bufferPath.write(0, bytesPath, 0, bytesPath.length); + bufferPath.setByte(bytesPath.length, (byte)0); + Pointer bufferSheet = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_imagestack_createemptysheet.invokeInt(new java.lang.Object[]{mHandle, index, bufferPath, bufferSheet})); + Pointer valueSheet = bufferSheet.getPointer(0); + Attachment sheet = null; + if (valueSheet == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Sheet was a null pointer"); + } + sheet = mWrapper.PolymorphicFactory(valueSheet, Attachment.class); + return sheet; + } + + /** + * Creates a new sheet attachment from a memory buffer. + * + * @param index index of the image (0-based) + * @param path path of part in the package + * @param data binary image data + * @return attachment containing the image + * @throws Lib3MFException + */ + public Attachment createSheetFromBuffer(int index, String path, byte[] data) throws Lib3MFException { + byte[] bytesPath = path.getBytes(StandardCharsets.UTF_8); + Memory bufferPath = new Memory(bytesPath.length + 1); + bufferPath.write(0, bytesPath, 0, bytesPath.length); + bufferPath.setByte(bytesPath.length, (byte)0); + Pointer bufferData = new Memory(Math.max(1, 1 * data.length)); + for (int i = 0; i < data.length; i++) { + bufferData.setByte(1 * i, data[i]); + } + Pointer bufferSheet = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_imagestack_createsheetfrombuffer.invokeInt(new java.lang.Object[]{mHandle, index, bufferPath, (long) data.length, bufferData, bufferSheet})); + Pointer valueSheet = bufferSheet.getPointer(0); + Attachment sheet = null; + if (valueSheet == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Sheet was a null pointer"); + } + sheet = mWrapper.PolymorphicFactory(valueSheet, Attachment.class); + return sheet; + } + + /** + * Creates a new sheet attachment from a file on disk. + * + * @param index index of the image (0-based) + * @param path path of part in the package + * @param fileName file name to read from + * @return attachment containing the image + * @throws Lib3MFException + */ + public Attachment createSheetFromFile(int index, String path, String fileName) throws Lib3MFException { + byte[] bytesPath = path.getBytes(StandardCharsets.UTF_8); + Memory bufferPath = new Memory(bytesPath.length + 1); + bufferPath.write(0, bytesPath, 0, bytesPath.length); + bufferPath.setByte(bytesPath.length, (byte)0); + byte[] bytesFileName = fileName.getBytes(StandardCharsets.UTF_8); + Memory bufferFileName = new Memory(bytesFileName.length + 1); + bufferFileName.write(0, bytesFileName, 0, bytesFileName.length); + bufferFileName.setByte(bytesFileName.length, (byte)0); + Pointer bufferSheet = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_imagestack_createsheetfromfile.invokeInt(new java.lang.Object[]{mHandle, index, bufferPath, bufferFileName, bufferSheet})); + Pointer valueSheet = bufferSheet.getPointer(0); + Attachment sheet = null; + if (valueSheet == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Sheet was a null pointer"); + } + sheet = mWrapper.PolymorphicFactory(valueSheet, Attachment.class); + return sheet; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/ImplicitFunction.java b/Autogenerated/Bindings/Java8/lib3mf/ImplicitFunction.java new file mode 100644 index 000000000..bb328cc78 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/ImplicitFunction.java @@ -0,0 +1,1961 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ImplicitFunction extends Function { + + public ImplicitFunction(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the identifier of the function + * + * @return the identifier + * @throws Lib3MFException + */ + public String getIdentifier() throws Lib3MFException { + Pointer bytesNeededIdentifier = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_getidentifier.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededIdentifier, null})); + int sizeIdentifier = bytesNeededIdentifier.getInt(0); + Pointer bufferIdentifier = new Memory(sizeIdentifier); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_getidentifier.invokeInt(new java.lang.Object[]{mHandle, sizeIdentifier, bytesNeededIdentifier, bufferIdentifier})); + return new String(bufferIdentifier.getByteArray(0, sizeIdentifier - 1), StandardCharsets.UTF_8); + } + + /** + * Sets the identifier of the function + * + * @param identifier the identifier + * @throws Lib3MFException + */ + public void setIdentifier(String identifier) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_setidentifier.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier})); + } + + /** + * Add a node + * + * @param nodeType the type of the node + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public ImplicitNode addNode(Lib3MFWrapper.ImplicitNodeType nodeType, String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addnode.invokeInt(new java.lang.Object[]{mHandle, Lib3MFWrapper.EnumConversion.convertImplicitNodeTypeToConst(nodeType), bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + ImplicitNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, ImplicitNode.class); + return node; + } + + /** + * Add a SinNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public SinNode addSinNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addsinnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + SinNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, SinNode.class); + return node; + } + + /** + * Add a CosNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public CosNode addCosNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addcosnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + CosNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, CosNode.class); + return node; + } + + /** + * Add a TanNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public TanNode addTanNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addtannode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + TanNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, TanNode.class); + return node; + } + + /** + * Add a ArcSinNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public ArcSinNode addArcSinNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addarcsinnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + ArcSinNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, ArcSinNode.class); + return node; + } + + /** + * Add a ArcCosNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public ArcCosNode addArcCosNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addarccosnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + ArcCosNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, ArcCosNode.class); + return node; + } + + /** + * Add a ArcTan2Node + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public ArcTan2Node addArcTan2Node(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addarctan2node.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + ArcTan2Node node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, ArcTan2Node.class); + return node; + } + + /** + * Add a SinhNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public SinhNode addSinhNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addsinhnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + SinhNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, SinhNode.class); + return node; + } + + /** + * Add a CoshNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public CoshNode addCoshNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addcoshnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + CoshNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, CoshNode.class); + return node; + } + + /** + * Add a TanhNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public TanhNode addTanhNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addtanhnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + TanhNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, TanhNode.class); + return node; + } + + /** + * Add a RoundNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public RoundNode addRoundNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addroundnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + RoundNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, RoundNode.class); + return node; + } + + /** + * Add a CeilNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public CeilNode addCeilNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addceilnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + CeilNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, CeilNode.class); + return node; + } + + /** + * Add a FloorNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public FloorNode addFloorNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addfloornode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + FloorNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, FloorNode.class); + return node; + } + + /** + * Add a SignNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public SignNode addSignNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addsignnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + SignNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, SignNode.class); + return node; + } + + /** + * Add a FractNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public FractNode addFractNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addfractnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + FractNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, FractNode.class); + return node; + } + + /** + * Add a AbsNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public AbsNode addAbsNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addabsnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + AbsNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, AbsNode.class); + return node; + } + + /** + * Add a ExpNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public ExpNode addExpNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addexpnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + ExpNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, ExpNode.class); + return node; + } + + /** + * Add a LogNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public LogNode addLogNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addlognode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + LogNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, LogNode.class); + return node; + } + + /** + * Add a Log2Node + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public Log2Node addLog2Node(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addlog2node.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + Log2Node node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, Log2Node.class); + return node; + } + + /** + * Add a Log10Node + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public Log10Node addLog10Node(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addlog10node.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + Log10Node node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, Log10Node.class); + return node; + } + + /** + * Add a LengthNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public LengthNode addLengthNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addlengthnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + LengthNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, LengthNode.class); + return node; + } + + /** + * Add a TransposeNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public TransposeNode addTransposeNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addtransposenode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + TransposeNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, TransposeNode.class); + return node; + } + + /** + * Add a InverseNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public InverseNode addInverseNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addinversenode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + InverseNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, InverseNode.class); + return node; + } + + /** + * Add a SqrtNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public SqrtNode addSqrtNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addsqrtnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + SqrtNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, SqrtNode.class); + return node; + } + + /** + * Add a ResourceIdNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public ResourceIdNode addResourceIdNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addresourceidnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + ResourceIdNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, ResourceIdNode.class); + return node; + } + + /** + * Add an AdditionNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public AdditionNode addAdditionNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addadditionnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + AdditionNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, AdditionNode.class); + return node; + } + + /** + * Add a SubtractionNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public SubtractionNode addSubtractionNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addsubtractionnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + SubtractionNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, SubtractionNode.class); + return node; + } + + /** + * Add a MultiplicationNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public MultiplicationNode addMultiplicationNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addmultiplicationnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + MultiplicationNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, MultiplicationNode.class); + return node; + } + + /** + * Add a DivisionNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public DivisionNode addDivisionNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_adddivisionnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + DivisionNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, DivisionNode.class); + return node; + } + + /** + * Add a DotNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public DotNode addDotNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_adddotnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + DotNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, DotNode.class); + return node; + } + + /** + * Add a CrossNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public CrossNode addCrossNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addcrossnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + CrossNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, CrossNode.class); + return node; + } + + /** + * Add a MatVecMultiplicationNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public MatVecMultiplicationNode addMatVecMultiplicationNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addmatvecmultiplicationnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + MatVecMultiplicationNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, MatVecMultiplicationNode.class); + return node; + } + + /** + * Add a MinNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public MinNode addMinNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addminnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + MinNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, MinNode.class); + return node; + } + + /** + * Add a MaxNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public MaxNode addMaxNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addmaxnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + MaxNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, MaxNode.class); + return node; + } + + /** + * Add a FmodNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public FmodNode addFmodNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addfmodnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + FmodNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, FmodNode.class); + return node; + } + + /** + * Add a PowNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public PowNode addPowNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addpownode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + PowNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, PowNode.class); + return node; + } + + /** + * Add a SelectNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public SelectNode addSelectNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addselectnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + SelectNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, SelectNode.class); + return node; + } + + /** + * Add a ClampNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public ClampNode addClampNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addclampnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + ClampNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, ClampNode.class); + return node; + } + + /** + * Add a ComposeVectorNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public ComposeVectorNode addComposeVectorNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addcomposevectornode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + ComposeVectorNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, ComposeVectorNode.class); + return node; + } + + /** + * Add a VectorFromScalar + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public VectorFromScalarNode addVectorFromScalarNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addvectorfromscalarnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + VectorFromScalarNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, VectorFromScalarNode.class); + return node; + } + + /** + * Add a DecomposeVectorNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public DecomposeVectorNode addDecomposeVectorNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_adddecomposevectornode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + DecomposeVectorNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, DecomposeVectorNode.class); + return node; + } + + /** + * Add a ComposeMatrixNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public ComposeMatrixNode addComposeMatrixNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addcomposematrixnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + ComposeMatrixNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, ComposeMatrixNode.class); + return node; + } + + /** + * Add a MatrixFromRowsNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public MatrixFromRowsNode addMatrixFromRowsNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addmatrixfromrowsnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + MatrixFromRowsNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, MatrixFromRowsNode.class); + return node; + } + + /** + * Add a MatrixFromColumnsNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public MatrixFromColumnsNode addMatrixFromColumnsNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addmatrixfromcolumnsnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + MatrixFromColumnsNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, MatrixFromColumnsNode.class); + return node; + } + + /** + * Add a ConstantNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public ConstantNode addConstantNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addconstantnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + ConstantNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, ConstantNode.class); + return node; + } + + /** + * Add a ConstVecNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public ConstVecNode addConstVecNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addconstvecnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + ConstVecNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, ConstVecNode.class); + return node; + } + + /** + * Add a ConstMatNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public ConstMatNode addConstMatNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addconstmatnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + ConstMatNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, ConstMatNode.class); + return node; + } + + /** + * Add a MeshNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public MeshNode addMeshNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addmeshnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + MeshNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, MeshNode.class); + return node; + } + + /** + * Add a UnsignedMeshNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public UnsignedMeshNode addUnsignedMeshNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addunsignedmeshnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + UnsignedMeshNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, UnsignedMeshNode.class); + return node; + } + + /** + * Add a BeamLatticeNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public BeamLatticeNode addBeamLatticeNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addbeamlatticenode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + BeamLatticeNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, BeamLatticeNode.class); + return node; + } + + /** + * Add a FunctionGradientNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public FunctionGradientNode addFunctionGradientNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addfunctiongradientnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + FunctionGradientNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, FunctionGradientNode.class); + return node; + } + + /** + * Add a NormalizeDistanceNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public NormalizeDistanceNode addNormalizeDistanceNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addnormalizedistancenode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + NormalizeDistanceNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, NormalizeDistanceNode.class); + return node; + } + + /** + * Add a FunctionCallNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public FunctionCallNode addFunctionCallNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addfunctioncallnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + FunctionCallNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, FunctionCallNode.class); + return node; + } + + /** + * Retrieves the nodes + * + * @return iterator for the list of nodes + * @throws Lib3MFException + */ + public NodeIterator getNodes() throws Lib3MFException { + Pointer bufferIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_getnodes.invokeInt(new java.lang.Object[]{mHandle, bufferIterator})); + Pointer valueIterator = bufferIterator.getPointer(0); + NodeIterator iterator = null; + if (valueIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Iterator was a null pointer"); + } + iterator = mWrapper.PolymorphicFactory(valueIterator, NodeIterator.class); + return iterator; + } + + /** + * Removes a node + * + * @param node The node to be removed + * @throws Lib3MFException + */ + public void removeNode(ImplicitNode node) throws Lib3MFException { + Pointer nodeHandle = null; + if (node != null) { + nodeHandle = node.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_removenode.invokeInt(new java.lang.Object[]{mHandle, nodeHandle})); + } + + /** + * Add a link + * + * @param source the source port + * @param target the target port + * @throws Lib3MFException + */ + public void addLink(ImplicitPort source, ImplicitPort target) throws Lib3MFException { + Pointer sourceHandle = null; + if (source != null) { + sourceHandle = source.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Source is a null value."); + } + Pointer targetHandle = null; + if (target != null) { + targetHandle = target.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Target is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addlink.invokeInt(new java.lang.Object[]{mHandle, sourceHandle, targetHandle})); + } + + /** + * Add a link + * + * @param source name of the source port in the format nodename.portname + * @param target name of the target port in the format nodename.portname + * @throws Lib3MFException + */ + public void addLinkByNames(String source, String target) throws Lib3MFException { + byte[] bytesSource = source.getBytes(StandardCharsets.UTF_8); + Memory bufferSource = new Memory(bytesSource.length + 1); + bufferSource.write(0, bytesSource, 0, bytesSource.length); + bufferSource.setByte(bytesSource.length, (byte)0); + byte[] bytesTarget = target.getBytes(StandardCharsets.UTF_8); + Memory bufferTarget = new Memory(bytesTarget.length + 1); + bufferTarget.write(0, bytesTarget, 0, bytesTarget.length); + bufferTarget.setByte(bytesTarget.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addlinkbynames.invokeInt(new java.lang.Object[]{mHandle, bufferSource, bufferTarget})); + } + + /** + * Clears the function + * + * @throws Lib3MFException + */ + public void clear() throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_clear.invokeInt(new java.lang.Object[]{mHandle})); + } + + /** + * Sorts the nodes topologically + * + * @throws Lib3MFException + */ + public void sortNodesTopologically() throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_sortnodestopologically.invokeInt(new java.lang.Object[]{mHandle})); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/ImplicitNode.java b/Autogenerated/Bindings/Java8/lib3mf/ImplicitNode.java new file mode 100644 index 000000000..6776b5634 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/ImplicitNode.java @@ -0,0 +1,303 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ImplicitNode extends Base { + + public ImplicitNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the identifier of the node + * + * @return the identifier + * @throws Lib3MFException + */ + public String getIdentifier() throws Lib3MFException { + Pointer bytesNeededIdentifier = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_implicitnode_getidentifier.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededIdentifier, null})); + int sizeIdentifier = bytesNeededIdentifier.getInt(0); + Pointer bufferIdentifier = new Memory(sizeIdentifier); + mWrapper.checkError(this, mWrapper.lib3mf_implicitnode_getidentifier.invokeInt(new java.lang.Object[]{mHandle, sizeIdentifier, bytesNeededIdentifier, bufferIdentifier})); + return new String(bufferIdentifier.getByteArray(0, sizeIdentifier - 1), StandardCharsets.UTF_8); + } + + /** + * Sets the identifier of the node + * + * @param identifier the identifier + * @throws Lib3MFException + */ + public void setIdentifier(String identifier) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_implicitnode_setidentifier.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier})); + } + + /** + * Retrieves the display name of the node + * + * @return the display name + * @throws Lib3MFException + */ + public String getDisplayName() throws Lib3MFException { + Pointer bytesNeededDisplayName = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_implicitnode_getdisplayname.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededDisplayName, null})); + int sizeDisplayName = bytesNeededDisplayName.getInt(0); + Pointer bufferDisplayName = new Memory(sizeDisplayName); + mWrapper.checkError(this, mWrapper.lib3mf_implicitnode_getdisplayname.invokeInt(new java.lang.Object[]{mHandle, sizeDisplayName, bytesNeededDisplayName, bufferDisplayName})); + return new String(bufferDisplayName.getByteArray(0, sizeDisplayName - 1), StandardCharsets.UTF_8); + } + + /** + * Sets the display name of the node + * + * @param displayName the display name + * @throws Lib3MFException + */ + public void setDisplayName(String displayName) throws Lib3MFException { + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_implicitnode_setdisplayname.invokeInt(new java.lang.Object[]{mHandle, bufferDisplayName})); + } + + /** + * Retrieves the tag of the node + * + * @return the tag + * @throws Lib3MFException + */ + public String getTag() throws Lib3MFException { + Pointer bytesNeededTag = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_implicitnode_gettag.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededTag, null})); + int sizeTag = bytesNeededTag.getInt(0); + Pointer bufferTag = new Memory(sizeTag); + mWrapper.checkError(this, mWrapper.lib3mf_implicitnode_gettag.invokeInt(new java.lang.Object[]{mHandle, sizeTag, bytesNeededTag, bufferTag})); + return new String(bufferTag.getByteArray(0, sizeTag - 1), StandardCharsets.UTF_8); + } + + /** + * Sets the tag of the node + * + * @param tag the tag + * @throws Lib3MFException + */ + public void setTag(String tag) throws Lib3MFException { + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_implicitnode_settag.invokeInt(new java.lang.Object[]{mHandle, bufferTag})); + } + + /** + * Retrieves the type of the node + * + * @return the type of the node + * @throws Lib3MFException + */ + public Lib3MFWrapper.ImplicitNodeType getNodeType() throws Lib3MFException { + Pointer bufferType = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_implicitnode_getnodetype.invokeInt(new java.lang.Object[]{mHandle, bufferType})); + return Lib3MFWrapper.EnumConversion.convertConstToImplicitNodeType(bufferType.getInt(0)); + } + + /** + * Add an input + * + * @param identifier the identifier of the input + * @param displayName the display name of the input + * @return + * @throws Lib3MFException + */ + public ImplicitPort addInput(String identifier, String displayName) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + Pointer bufferPort = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitnode_addinput.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferPort})); + Pointer valuePort = bufferPort.getPointer(0); + ImplicitPort port = null; + if (valuePort == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Port was a null pointer"); + } + port = mWrapper.PolymorphicFactory(valuePort, ImplicitPort.class); + return port; + } + + /** + * Retrieves the inputs + * + * @return the iterator for the inputs + * @throws Lib3MFException + */ + public ImplicitPortIterator getInputs() throws Lib3MFException { + Pointer bufferIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitnode_getinputs.invokeInt(new java.lang.Object[]{mHandle, bufferIterator})); + Pointer valueIterator = bufferIterator.getPointer(0); + ImplicitPortIterator iterator = null; + if (valueIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Iterator was a null pointer"); + } + iterator = mWrapper.PolymorphicFactory(valueIterator, ImplicitPortIterator.class); + return iterator; + } + + /** + * Add an output + * + * @param identifier the identifier of the output + * @param displayName the display name of the output + * @return + * @throws Lib3MFException + */ + public ImplicitPort addOutput(String identifier, String displayName) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + Pointer bufferPort = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitnode_addoutput.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferPort})); + Pointer valuePort = bufferPort.getPointer(0); + ImplicitPort port = null; + if (valuePort == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Port was a null pointer"); + } + port = mWrapper.PolymorphicFactory(valuePort, ImplicitPort.class); + return port; + } + + /** + * Retrieves the outputs + * + * @return the iterator the outputs + * @throws Lib3MFException + */ + public ImplicitPortIterator getOutputs() throws Lib3MFException { + Pointer bufferIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitnode_getoutputs.invokeInt(new java.lang.Object[]{mHandle, bufferIterator})); + Pointer valueIterator = bufferIterator.getPointer(0); + ImplicitPortIterator iterator = null; + if (valueIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Iterator was a null pointer"); + } + iterator = mWrapper.PolymorphicFactory(valueIterator, ImplicitPortIterator.class); + return iterator; + } + + /** + * Retrieves an input + * + * @param identifier the identifier of the input + * @return the input port + * @throws Lib3MFException + */ + public ImplicitPort findInput(String identifier) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + Pointer bufferInput = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitnode_findinput.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferInput})); + Pointer valueInput = bufferInput.getPointer(0); + ImplicitPort input = null; + if (valueInput != Pointer.NULL) { + input = mWrapper.PolymorphicFactory(valueInput, ImplicitPort.class); + } + return input; + } + + /** + * Retrieves an output + * + * @param identifier the identifier of the output + * @return the output port + * @throws Lib3MFException + */ + public ImplicitPort findOutput(String identifier) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + Pointer bufferOutput = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitnode_findoutput.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferOutput})); + Pointer valueOutput = bufferOutput.getPointer(0); + ImplicitPort output = null; + if (valueOutput != Pointer.NULL) { + output = mWrapper.PolymorphicFactory(valueOutput, ImplicitPort.class); + } + return output; + } + + /** + * Checks if the types of the input and output ports are valid for the node type + * + * @return true, if the types are valid + * @throws Lib3MFException + */ + public boolean areTypesValid() throws Lib3MFException { + Pointer bufferValid = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_implicitnode_aretypesvalid.invokeInt(new java.lang.Object[]{mHandle, bufferValid})); + return bufferValid.getByte(0) != 0; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/ImplicitPort.java b/Autogenerated/Bindings/Java8/lib3mf/ImplicitPort.java new file mode 100644 index 000000000..7aba9cf61 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/ImplicitPort.java @@ -0,0 +1,165 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ImplicitPort extends Base { + + public ImplicitPort(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the identifier of the port + * + * @return the identifier + * @throws Lib3MFException + */ + public String getIdentifier() throws Lib3MFException { + Pointer bytesNeededIdentifier = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_implicitport_getidentifier.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededIdentifier, null})); + int sizeIdentifier = bytesNeededIdentifier.getInt(0); + Pointer bufferIdentifier = new Memory(sizeIdentifier); + mWrapper.checkError(this, mWrapper.lib3mf_implicitport_getidentifier.invokeInt(new java.lang.Object[]{mHandle, sizeIdentifier, bytesNeededIdentifier, bufferIdentifier})); + return new String(bufferIdentifier.getByteArray(0, sizeIdentifier - 1), StandardCharsets.UTF_8); + } + + /** + * Sets the identifier of the port + * + * @param identifier the identifier + * @throws Lib3MFException + */ + public void setIdentifier(String identifier) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_implicitport_setidentifier.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier})); + } + + /** + * Retrieves the display name of the port + * + * @return the display name + * @throws Lib3MFException + */ + public String getDisplayName() throws Lib3MFException { + Pointer bytesNeededDisplayName = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_implicitport_getdisplayname.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededDisplayName, null})); + int sizeDisplayName = bytesNeededDisplayName.getInt(0); + Pointer bufferDisplayName = new Memory(sizeDisplayName); + mWrapper.checkError(this, mWrapper.lib3mf_implicitport_getdisplayname.invokeInt(new java.lang.Object[]{mHandle, sizeDisplayName, bytesNeededDisplayName, bufferDisplayName})); + return new String(bufferDisplayName.getByteArray(0, sizeDisplayName - 1), StandardCharsets.UTF_8); + } + + /** + * Sets the display name of the port + * + * @param displayName the display name + * @throws Lib3MFException + */ + public void setDisplayName(String displayName) throws Lib3MFException { + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_implicitport_setdisplayname.invokeInt(new java.lang.Object[]{mHandle, bufferDisplayName})); + } + + /** + * Sets the type of the port + * + * @param implicitPortType the type + * @throws Lib3MFException + */ + public void setType(Lib3MFWrapper.ImplicitPortType implicitPortType) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_implicitport_settype.invokeInt(new java.lang.Object[]{mHandle, Lib3MFWrapper.EnumConversion.convertImplicitPortTypeToConst(implicitPortType)})); + } + + /** + * Retrieves the type of the port + * + * @return the type + * @throws Lib3MFException + */ + public Lib3MFWrapper.ImplicitPortType getType() throws Lib3MFException { + Pointer bufferImplicitPortType = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_implicitport_gettype.invokeInt(new java.lang.Object[]{mHandle, bufferImplicitPortType})); + return Lib3MFWrapper.EnumConversion.convertConstToImplicitPortType(bufferImplicitPortType.getInt(0)); + } + + /** + * Retrieves the reference of the port, only used for input ports + * + * @return the reference + * @throws Lib3MFException + */ + public String getReference() throws Lib3MFException { + Pointer bytesNeededReference = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_implicitport_getreference.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededReference, null})); + int sizeReference = bytesNeededReference.getInt(0); + Pointer bufferReference = new Memory(sizeReference); + mWrapper.checkError(this, mWrapper.lib3mf_implicitport_getreference.invokeInt(new java.lang.Object[]{mHandle, sizeReference, bytesNeededReference, bufferReference})); + return new String(bufferReference.getByteArray(0, sizeReference - 1), StandardCharsets.UTF_8); + } + + /** + * Sets the reference of the port, only used for input ports + * + * @param reference the reference + * @throws Lib3MFException + */ + public void setReference(String reference) throws Lib3MFException { + byte[] bytesReference = reference.getBytes(StandardCharsets.UTF_8); + Memory bufferReference = new Memory(bytesReference.length + 1); + bufferReference.write(0, bytesReference, 0, bytesReference.length); + bufferReference.setByte(bytesReference.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_implicitport_setreference.invokeInt(new java.lang.Object[]{mHandle, bufferReference})); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/ImplicitPortIterator.java b/Autogenerated/Bindings/Java8/lib3mf/ImplicitPortIterator.java new file mode 100644 index 000000000..f116ff59f --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/ImplicitPortIterator.java @@ -0,0 +1,74 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ImplicitPortIterator extends Iterator { + + public ImplicitPortIterator(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the current element + * + * @return The current element + * @throws Lib3MFException + */ + public ImplicitPort getCurrent() throws Lib3MFException { + Pointer bufferPort = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitportiterator_getcurrent.invokeInt(new java.lang.Object[]{mHandle, bufferPort})); + Pointer valuePort = bufferPort.getPointer(0); + ImplicitPort port = null; + if (valuePort == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Port was a null pointer"); + } + port = mWrapper.PolymorphicFactory(valuePort, ImplicitPort.class); + return port; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/InverseNode.java b/Autogenerated/Bindings/Java8/lib3mf/InverseNode.java new file mode 100644 index 000000000..336e71174 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/InverseNode.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class InverseNode extends OneInputNode { + + public InverseNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/Iterator.java b/Autogenerated/Bindings/Java8/lib3mf/Iterator.java new file mode 100644 index 000000000..e6197ae5a --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/Iterator.java @@ -0,0 +1,92 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Iterator extends Base { + + public Iterator(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Iterates to the next item in the list. + * + * @return Iterates to the next item in the list. + * @throws Lib3MFException + */ + public boolean moveNext() throws Lib3MFException { + Pointer bufferHasNext = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_iterator_movenext.invokeInt(new java.lang.Object[]{mHandle, bufferHasNext})); + return bufferHasNext.getByte(0) != 0; + } + + /** + * Iterates to the previous item in the list. + * + * @return Iterates to the previous item in the list. + * @throws Lib3MFException + */ + public boolean movePrevious() throws Lib3MFException { + Pointer bufferHasPrevious = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_iterator_moveprevious.invokeInt(new java.lang.Object[]{mHandle, bufferHasPrevious})); + return bufferHasPrevious.getByte(0) != 0; + } + + /** + * Returns the number of items the iterator captures. + * + * @return returns the number of items the iterator captures. + * @throws Lib3MFException + */ + public long count() throws Lib3MFException { + Pointer bufferCount = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_iterator_count.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getLong(0); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/KeyStore.java b/Autogenerated/Bindings/Java8/lib3mf/KeyStore.java new file mode 100644 index 000000000..5143f5390 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/KeyStore.java @@ -0,0 +1,402 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class KeyStore extends Base { + + public KeyStore(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Adds a consumer to the keystore + * + * @param consumerID A unique identifier for the consumer + * @param keyID The id of the key of the consumer + * @param keyValue The public key for this consumer in PEM format + * @return The consumer instance + * @throws Lib3MFException + */ + public Consumer addConsumer(String consumerID, String keyID, String keyValue) throws Lib3MFException { + byte[] bytesConsumerID = consumerID.getBytes(StandardCharsets.UTF_8); + Memory bufferConsumerID = new Memory(bytesConsumerID.length + 1); + bufferConsumerID.write(0, bytesConsumerID, 0, bytesConsumerID.length); + bufferConsumerID.setByte(bytesConsumerID.length, (byte)0); + byte[] bytesKeyID = keyID.getBytes(StandardCharsets.UTF_8); + Memory bufferKeyID = new Memory(bytesKeyID.length + 1); + bufferKeyID.write(0, bytesKeyID, 0, bytesKeyID.length); + bufferKeyID.setByte(bytesKeyID.length, (byte)0); + byte[] bytesKeyValue = keyValue.getBytes(StandardCharsets.UTF_8); + Memory bufferKeyValue = new Memory(bytesKeyValue.length + 1); + bufferKeyValue.write(0, bytesKeyValue, 0, bytesKeyValue.length); + bufferKeyValue.setByte(bytesKeyValue.length, (byte)0); + Pointer bufferConsumer = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_keystore_addconsumer.invokeInt(new java.lang.Object[]{mHandle, bufferConsumerID, bufferKeyID, bufferKeyValue, bufferConsumer})); + Pointer valueConsumer = bufferConsumer.getPointer(0); + Consumer consumer = null; + if (valueConsumer == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Consumer was a null pointer"); + } + consumer = mWrapper.PolymorphicFactory(valueConsumer, Consumer.class); + return consumer; + } + + /** + * Gets the number of consumers in the keystore + * + * @return The consumer count + * @throws Lib3MFException + */ + public long getConsumerCount() throws Lib3MFException { + Pointer bufferCount = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_keystore_getconsumercount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getLong(0); + } + + /** + * Get a consumer from the keystore + * + * @param consumerIndex The index of the consumer + * @return The consumer instance + * @throws Lib3MFException + */ + public Consumer getConsumer(long consumerIndex) throws Lib3MFException { + Pointer bufferConsumer = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_keystore_getconsumer.invokeInt(new java.lang.Object[]{mHandle, consumerIndex, bufferConsumer})); + Pointer valueConsumer = bufferConsumer.getPointer(0); + Consumer consumer = null; + if (valueConsumer == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Consumer was a null pointer"); + } + consumer = mWrapper.PolymorphicFactory(valueConsumer, Consumer.class); + return consumer; + } + + /** + * Removes a consumer from the keystore + * + * @param consumer The consumer instance to remove + * @throws Lib3MFException + */ + public void removeConsumer(Consumer consumer) throws Lib3MFException { + Pointer consumerHandle = null; + if (consumer != null) { + consumerHandle = consumer.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Consumer is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_keystore_removeconsumer.invokeInt(new java.lang.Object[]{mHandle, consumerHandle})); + } + + /** + * Finds a consumer by ID + * + * @param consumerID The ID of the consumer + * @return The consumer instance + * @throws Lib3MFException + */ + public Consumer findConsumer(String consumerID) throws Lib3MFException { + byte[] bytesConsumerID = consumerID.getBytes(StandardCharsets.UTF_8); + Memory bufferConsumerID = new Memory(bytesConsumerID.length + 1); + bufferConsumerID.write(0, bytesConsumerID, 0, bytesConsumerID.length); + bufferConsumerID.setByte(bytesConsumerID.length, (byte)0); + Pointer bufferConsumer = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_keystore_findconsumer.invokeInt(new java.lang.Object[]{mHandle, bufferConsumerID, bufferConsumer})); + Pointer valueConsumer = bufferConsumer.getPointer(0); + Consumer consumer = null; + if (valueConsumer != Pointer.NULL) { + consumer = mWrapper.PolymorphicFactory(valueConsumer, Consumer.class); + } + return consumer; + } + + /** + * Gets the number of resource data group in the keysore + * + * @return The number of resource data available + * @throws Lib3MFException + */ + public long getResourceDataGroupCount() throws Lib3MFException { + Pointer bufferCount = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_keystore_getresourcedatagroupcount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getLong(0); + } + + /** + * Adds a resource data group into the keystore. + * + * @return The resource data group instance + * @throws Lib3MFException + */ + public ResourceDataGroup addResourceDataGroup() throws Lib3MFException { + Pointer bufferResourceDataGroup = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_keystore_addresourcedatagroup.invokeInt(new java.lang.Object[]{mHandle, bufferResourceDataGroup})); + Pointer valueResourceDataGroup = bufferResourceDataGroup.getPointer(0); + ResourceDataGroup resourceDataGroup = null; + if (valueResourceDataGroup == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceDataGroup was a null pointer"); + } + resourceDataGroup = mWrapper.PolymorphicFactory(valueResourceDataGroup, ResourceDataGroup.class); + return resourceDataGroup; + } + + /** + * Gets a resource data group + * + * @param resourceDataIndex The index of the resource data + * @return The resource data group instance + * @throws Lib3MFException + */ + public ResourceDataGroup getResourceDataGroup(long resourceDataIndex) throws Lib3MFException { + Pointer bufferResourceDataGroup = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_keystore_getresourcedatagroup.invokeInt(new java.lang.Object[]{mHandle, resourceDataIndex, bufferResourceDataGroup})); + Pointer valueResourceDataGroup = bufferResourceDataGroup.getPointer(0); + ResourceDataGroup resourceDataGroup = null; + if (valueResourceDataGroup == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceDataGroup was a null pointer"); + } + resourceDataGroup = mWrapper.PolymorphicFactory(valueResourceDataGroup, ResourceDataGroup.class); + return resourceDataGroup; + } + + /** + * Removes a resource data group + * + * @param resourceDataGroup The resource data group instance + * @throws Lib3MFException + */ + public void removeResourceDataGroup(ResourceDataGroup resourceDataGroup) throws Lib3MFException { + Pointer resourceDataGroupHandle = null; + if (resourceDataGroup != null) { + resourceDataGroupHandle = resourceDataGroup.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceDataGroup is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_keystore_removeresourcedatagroup.invokeInt(new java.lang.Object[]{mHandle, resourceDataGroupHandle})); + } + + /** + * Finds a resource data group that contains a particular resourcedata + * + * @param partPath The target path for the resourcedata hold by the resource data group + * @return The data resource instance + * @throws Lib3MFException + */ + public ResourceDataGroup findResourceDataGroup(PackagePart partPath) throws Lib3MFException { + Pointer partPathHandle = null; + if (partPath != null) { + partPathHandle = partPath.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "PartPath is a null value."); + } + Pointer bufferResourceDataGroup = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_keystore_findresourcedatagroup.invokeInt(new java.lang.Object[]{mHandle, partPathHandle, bufferResourceDataGroup})); + Pointer valueResourceDataGroup = bufferResourceDataGroup.getPointer(0); + ResourceDataGroup resourceDataGroup = null; + if (valueResourceDataGroup != Pointer.NULL) { + resourceDataGroup = mWrapper.PolymorphicFactory(valueResourceDataGroup, ResourceDataGroup.class); + } + return resourceDataGroup; + } + + /** + * Add resourcedata to resourcedatagroup element + * + * @param resourceDataGroup The resource data group where to add this resource data + * @param partPath The path of the part to be encrypted + * @param algorithm The encryption algorithm to be used to encrypt this resource + * @param compression Whether compression should be used prior to encryption + * @param additionalAuthenticationData Additional data to be encrypted along the contents for better security + * @return The data resource instance + * @throws Lib3MFException + */ + public ResourceData addResourceData(ResourceDataGroup resourceDataGroup, PackagePart partPath, Lib3MFWrapper.EncryptionAlgorithm algorithm, Lib3MFWrapper.Compression compression, byte[] additionalAuthenticationData) throws Lib3MFException { + Pointer resourceDataGroupHandle = null; + if (resourceDataGroup != null) { + resourceDataGroupHandle = resourceDataGroup.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceDataGroup is a null value."); + } + Pointer partPathHandle = null; + if (partPath != null) { + partPathHandle = partPath.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "PartPath is a null value."); + } + Pointer bufferAdditionalAuthenticationData = new Memory(Math.max(1, 1 * additionalAuthenticationData.length)); + for (int i = 0; i < additionalAuthenticationData.length; i++) { + bufferAdditionalAuthenticationData.setByte(1 * i, additionalAuthenticationData[i]); + } + Pointer bufferResourceData = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_keystore_addresourcedata.invokeInt(new java.lang.Object[]{mHandle, resourceDataGroupHandle, partPathHandle, Lib3MFWrapper.EnumConversion.convertEncryptionAlgorithmToConst(algorithm), Lib3MFWrapper.EnumConversion.convertCompressionToConst(compression), (long) additionalAuthenticationData.length, bufferAdditionalAuthenticationData, bufferResourceData})); + Pointer valueResourceData = bufferResourceData.getPointer(0); + ResourceData resourceData = null; + if (valueResourceData == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceData was a null pointer"); + } + resourceData = mWrapper.PolymorphicFactory(valueResourceData, ResourceData.class); + return resourceData; + } + + /** + * Removes a resource data + * + * @param resourceData The resource data to be removed + * @throws Lib3MFException + */ + public void removeResourceData(ResourceData resourceData) throws Lib3MFException { + Pointer resourceDataHandle = null; + if (resourceData != null) { + resourceDataHandle = resourceData.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceData is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_keystore_removeresourcedata.invokeInt(new java.lang.Object[]{mHandle, resourceDataHandle})); + } + + /** + * Finds a resource data on this resource group + * + * @param resourcePath The target path for the resourcedata + * @return The resource data instance + * @throws Lib3MFException + */ + public ResourceData findResourceData(PackagePart resourcePath) throws Lib3MFException { + Pointer resourcePathHandle = null; + if (resourcePath != null) { + resourcePathHandle = resourcePath.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourcePath is a null value."); + } + Pointer bufferResourceData = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_keystore_findresourcedata.invokeInt(new java.lang.Object[]{mHandle, resourcePathHandle, bufferResourceData})); + Pointer valueResourceData = bufferResourceData.getPointer(0); + ResourceData resourceData = null; + if (valueResourceData != Pointer.NULL) { + resourceData = mWrapper.PolymorphicFactory(valueResourceData, ResourceData.class); + } + return resourceData; + } + + /** + * Gets the number of resource data in the keysore + * + * @return The number of resource data available + * @throws Lib3MFException + */ + public long getResourceDataCount() throws Lib3MFException { + Pointer bufferCount = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_keystore_getresourcedatacount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getLong(0); + } + + /** + * Gets a resource data + * + * @param resourceDataIndex The index of the resource data + * @return The data resource instance + * @throws Lib3MFException + */ + public ResourceData getResourceData(long resourceDataIndex) throws Lib3MFException { + Pointer bufferResourceData = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_keystore_getresourcedata.invokeInt(new java.lang.Object[]{mHandle, resourceDataIndex, bufferResourceData})); + Pointer valueResourceData = bufferResourceData.getPointer(0); + ResourceData resourceData = null; + if (valueResourceData == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceData was a null pointer"); + } + resourceData = mWrapper.PolymorphicFactory(valueResourceData, ResourceData.class); + return resourceData; + } + + /** + * Gets the keystore UUID + * + * @return GetUUID Result Tuple + * @throws Lib3MFException + */ + public GetUUIDResult getUUID() throws Lib3MFException { + Pointer bufferHasUUID = new Memory(1); + Pointer bytesNeededUUID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_keystore_getuuid.invokeInt(new java.lang.Object[]{mHandle, bufferHasUUID, 0, bytesNeededUUID, null})); + int sizeUUID = bytesNeededUUID.getInt(0); + Pointer bufferUUID = new Memory(sizeUUID); + mWrapper.checkError(this, mWrapper.lib3mf_keystore_getuuid.invokeInt(new java.lang.Object[]{mHandle, bufferHasUUID, sizeUUID, bytesNeededUUID, bufferUUID})); + GetUUIDResult returnTuple = new GetUUIDResult(); + returnTuple.HasUUID = bufferHasUUID.getByte(0) != 0; + returnTuple.UUID = new String(bufferUUID.getByteArray(0, sizeUUID - 1), StandardCharsets.UTF_8); + return returnTuple; + } + + public static class GetUUIDResult { + /** + * flag whether the keystore has a UUID + */ + public boolean HasUUID; + + /** + * returns the keystore uuid. + */ + public String UUID; + + } + /** + * Sets the keystore UUID + * + * @param uUID The new keystore uuid. + * @throws Lib3MFException + */ + public void setUUID(String uUID) throws Lib3MFException { + byte[] bytesUUID = uUID.getBytes(StandardCharsets.UTF_8); + Memory bufferUUID = new Memory(bytesUUID.length + 1); + bufferUUID.write(0, bytesUUID, 0, bytesUUID.length); + bufferUUID.setByte(bytesUUID.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_keystore_setuuid.invokeInt(new java.lang.Object[]{mHandle, bufferUUID})); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/LengthNode.java b/Autogenerated/Bindings/Java8/lib3mf/LengthNode.java new file mode 100644 index 000000000..5eb7b7455 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/LengthNode.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class LengthNode extends OneInputNode { + + public LengthNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/LevelSet.java b/Autogenerated/Bindings/Java8/lib3mf/LevelSet.java new file mode 100644 index 000000000..fa7149c1e --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/LevelSet.java @@ -0,0 +1,276 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class LevelSet extends Object { + + public LevelSet(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the function that is used as boundary shape. + * + * @return the function to use as boundary shape + * @throws Lib3MFException + */ + public Function getFunction() throws Lib3MFException { + Pointer bufferTheFunction = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_levelset_getfunction.invokeInt(new java.lang.Object[]{mHandle, bufferTheFunction})); + Pointer valueTheFunction = bufferTheFunction.getPointer(0); + Function theFunction = null; + if (valueTheFunction != Pointer.NULL) { + theFunction = mWrapper.PolymorphicFactory(valueTheFunction, Function.class); + } + return theFunction; + } + + /** + * Sets the function to use as boundary shape. + * + * @param theFunction the function to use as boundary shape + * @throws Lib3MFException + */ + public void setFunction(Function theFunction) throws Lib3MFException { + Pointer theFunctionHandle = null; + if (theFunction != null) { + theFunctionHandle = theFunction.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheFunction is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_levelset_setfunction.invokeInt(new java.lang.Object[]{mHandle, theFunctionHandle})); + } + + /** + * Returns the transformation matrix into the coordinate system of the referenced Function. + * + * @return the transformation matrix + * @throws Lib3MFException + */ + public Transform getTransform() throws Lib3MFException { + Pointer bufferTransform = new Memory(Transform.SIZE); + mWrapper.checkError(this, mWrapper.lib3mf_levelset_gettransform.invokeInt(new java.lang.Object[]{mHandle, bufferTransform})); + Transform transform = new Transform(); + transform.readFromPointer(bufferTransform, 0); + return transform; + } + + /** + * Sets the transformation matrix into the coordinate system of the referenced Function. + * + * @param transform new transformation matrix + * @throws Lib3MFException + */ + public void setTransform(Transform transform) throws Lib3MFException { + Pointer bufferTransform = new Memory(Transform.SIZE); + transform.writeToPointer(bufferTransform, 0); + mWrapper.checkError(this, mWrapper.lib3mf_levelset_settransform.invokeInt(new java.lang.Object[]{mHandle, bufferTransform})); + } + + /** + * Returns the name of the function output channel to use. + * + * @return the name of the function output channel + * @throws Lib3MFException + */ + public String getChannelName() throws Lib3MFException { + Pointer bytesNeededChannelName = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_levelset_getchannelname.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededChannelName, null})); + int sizeChannelName = bytesNeededChannelName.getInt(0); + Pointer bufferChannelName = new Memory(sizeChannelName); + mWrapper.checkError(this, mWrapper.lib3mf_levelset_getchannelname.invokeInt(new java.lang.Object[]{mHandle, sizeChannelName, bytesNeededChannelName, bufferChannelName})); + return new String(bufferChannelName.getByteArray(0, sizeChannelName - 1), StandardCharsets.UTF_8); + } + + /** + * Sets the name of the function output channel to use. + * + * @param channelName new name of the function output channel + * @throws Lib3MFException + */ + public void setChannelName(String channelName) throws Lib3MFException { + byte[] bytesChannelName = channelName.getBytes(StandardCharsets.UTF_8); + Memory bufferChannelName = new Memory(bytesChannelName.length + 1); + bufferChannelName.write(0, bytesChannelName, 0, bytesChannelName.length); + bufferChannelName.setByte(bytesChannelName.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_levelset_setchannelname.invokeInt(new java.lang.Object[]{mHandle, bufferChannelName})); + } + + /** + * Sets the minimal feature size as a hint for the function evaluator + * + * @param minFeatureSize minimal feature size + * @throws Lib3MFException + */ + public void setMinFeatureSize(double minFeatureSize) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_levelset_setminfeaturesize.invokeInt(new java.lang.Object[]{mHandle, minFeatureSize})); + } + + /** + * Returns the minimal feature size as a hint for the function evaluator + * + * @return minimal feature size + * @throws Lib3MFException + */ + public double getMinFeatureSize() throws Lib3MFException { + Pointer bufferMinFeatureSize = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_levelset_getminfeaturesize.invokeInt(new java.lang.Object[]{mHandle, bufferMinFeatureSize})); + return bufferMinFeatureSize.getDouble(0); + } + + /** + * Sets the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). + * + * @param fallBackValue fallback value + * @throws Lib3MFException + */ + public void setFallBackValue(double fallBackValue) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_levelset_setfallbackvalue.invokeInt(new java.lang.Object[]{mHandle, fallBackValue})); + } + + /** + * Returns the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). + * + * @return fallback value + * @throws Lib3MFException + */ + public double getFallBackValue() throws Lib3MFException { + Pointer bufferFallBackValue = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_levelset_getfallbackvalue.invokeInt(new java.lang.Object[]{mHandle, bufferFallBackValue})); + return bufferFallBackValue.getDouble(0); + } + + /** + * If set only the bounding box of the mesh is intersected with the boundary + * + * @param meshBBoxOnly If set only the bounding box of the mesh is intersected with the boundary + * @throws Lib3MFException + */ + public void setMeshBBoxOnly(boolean meshBBoxOnly) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_levelset_setmeshbboxonly.invokeInt(new java.lang.Object[]{mHandle, meshBBoxOnly})); + } + + /** + * If set only the bounding box of the mesh is intersected with the boundary + * + * @return If set only the bounding box of the mesh is intersected with the boundary + * @throws Lib3MFException + */ + public boolean getMeshBBoxOnly() throws Lib3MFException { + Pointer bufferMeshBBoxOnly = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_levelset_getmeshbboxonly.invokeInt(new java.lang.Object[]{mHandle, bufferMeshBBoxOnly})); + return bufferMeshBBoxOnly.getByte(0) != 0; + } + + /** + * Sets the mesh to use as evaluation domain + * + * @param theMesh The mesh + * @throws Lib3MFException + */ + public void setMesh(MeshObject theMesh) throws Lib3MFException { + Pointer theMeshHandle = null; + if (theMesh != null) { + theMeshHandle = theMesh.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheMesh is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_levelset_setmesh.invokeInt(new java.lang.Object[]{mHandle, theMeshHandle})); + } + + /** + * Returns the mesh that is used as evaluation domain + * + * @return The mesh + * @throws Lib3MFException + */ + public MeshObject getMesh() throws Lib3MFException { + Pointer bufferTheMesh = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_levelset_getmesh.invokeInt(new java.lang.Object[]{mHandle, bufferTheMesh})); + Pointer valueTheMesh = bufferTheMesh.getPointer(0); + MeshObject theMesh = null; + if (valueTheMesh != Pointer.NULL) { + theMesh = mWrapper.PolymorphicFactory(valueTheMesh, MeshObject.class); + } + return theMesh; + } + + /** + * Retrieves the VolumeData this Object. + * + * @return the VolumeData of this Object + * @throws Lib3MFException + */ + public VolumeData getVolumeData() throws Lib3MFException { + Pointer bufferTheVolumeData = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_levelset_getvolumedata.invokeInt(new java.lang.Object[]{mHandle, bufferTheVolumeData})); + Pointer valueTheVolumeData = bufferTheVolumeData.getPointer(0); + VolumeData theVolumeData = null; + if (valueTheVolumeData != Pointer.NULL) { + theVolumeData = mWrapper.PolymorphicFactory(valueTheVolumeData, VolumeData.class); + } + return theVolumeData; + } + + /** + * Sets the VolumeData of this LevelSet. + * + * @param theVolumeData the VolumeData of this MeshObject + * @throws Lib3MFException + */ + public void setVolumeData(VolumeData theVolumeData) throws Lib3MFException { + Pointer theVolumeDataHandle = null; + if (theVolumeData != null) { + theVolumeDataHandle = theVolumeData.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheVolumeData is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_levelset_setvolumedata.invokeInt(new java.lang.Object[]{mHandle, theVolumeDataHandle})); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/LevelSetIterator.java b/Autogenerated/Bindings/Java8/lib3mf/LevelSetIterator.java new file mode 100644 index 000000000..2e58d27d4 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/LevelSetIterator.java @@ -0,0 +1,74 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class LevelSetIterator extends ResourceIterator { + + public LevelSetIterator(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the LevelSet the iterator points at. + * + * @return returns the MeshObject instance. + * @throws Lib3MFException + */ + public LevelSet getCurrentLevelSet() throws Lib3MFException { + Pointer bufferResource = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_levelsetiterator_getcurrentlevelset.invokeInt(new java.lang.Object[]{mHandle, bufferResource})); + Pointer valueResource = bufferResource.getPointer(0); + LevelSet resource = null; + if (valueResource == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Resource was a null pointer"); + } + resource = mWrapper.PolymorphicFactory(valueResource, LevelSet.class); + return resource; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/Lib3MFException.java b/Autogenerated/Bindings/Java8/lib3mf/Lib3MFException.java new file mode 100644 index 000000000..c6f0fffb0 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/Lib3MFException.java @@ -0,0 +1,222 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import java.util.HashMap; +import java.util.Map; + +public class Lib3MFException extends Exception { + + // Error Constants for Lib3MF + public static final int LIB3MF_SUCCESS = 0; + public static final int LIB3MF_ERROR_NOTIMPLEMENTED = 1; + public static final int LIB3MF_ERROR_INVALIDPARAM = 2; + public static final int LIB3MF_ERROR_INVALIDCAST = 3; + public static final int LIB3MF_ERROR_BUFFERTOOSMALL = 4; + public static final int LIB3MF_ERROR_GENERICEXCEPTION = 5; + public static final int LIB3MF_ERROR_COULDNOTLOADLIBRARY = 6; + public static final int LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT = 7; + public static final int LIB3MF_ERROR_INCOMPATIBLEBINARYVERSION = 8; + public static final int LIB3MF_ERROR_CALCULATIONABORTED = 10; + public static final int LIB3MF_ERROR_SHOULDNOTBECALLED = 11; + public static final int LIB3MF_ERROR_READERCLASSUNKNOWN = 100; + public static final int LIB3MF_ERROR_WRITERCLASSUNKNOWN = 101; + public static final int LIB3MF_ERROR_ITERATORINVALIDINDEX = 102; + public static final int LIB3MF_ERROR_INVALIDMODELRESOURCE = 103; + public static final int LIB3MF_ERROR_RESOURCENOTFOUND = 104; + public static final int LIB3MF_ERROR_INVALIDMODEL = 105; + public static final int LIB3MF_ERROR_INVALIDOBJECT = 106; + public static final int LIB3MF_ERROR_INVALIDMESHOBJECT = 107; + public static final int LIB3MF_ERROR_INVALIDCOMPONENTSOBJECT = 108; + public static final int LIB3MF_ERROR_INVALIDCOMPONENT = 109; + public static final int LIB3MF_ERROR_INVALIDBUILDITEM = 110; + public static final int LIB3MF_ERROR_INVALIDBASEMATERIALGROUP = 111; + public static final int LIB3MF_ERROR_INVALIDSLICESTACKRESOURCE = 112; + public static final int LIB3MF_ERROR_INVALIDTEXTURERESOURCE = 113; + public static final int LIB3MF_ERROR_INVALIDCOLORGROUP = 114; + public static final int LIB3MF_ERROR_INVALIDTEXTURE2DGROUP = 115; + public static final int LIB3MF_ERROR_INVALIDCOMPOSITEMATERIALS = 116; + public static final int LIB3MF_ERROR_INVALIDMULTIPROPERTYGROUP = 117; + public static final int LIB3MF_ERROR_INVALIDRESOURCEINDEX = 120; + public static final int LIB3MF_ERROR_ATTACHMENTNOTFOUND = 121; + public static final int LIB3MF_ERROR_FORBIDDENCYCLICREFERENCE = 130; + public static final int LIB3MF_ERROR_INVALIDATTACHMENTSTREAM = 131; + public static final int LIB3MF_ERROR_INVALIDPROPERTYCOUNT = 132; + public static final int LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER = 140; + public static final int LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT = 141; + public static final int LIB3MF_ERROR_INVALIDRESOURCE = 142; + public static final int LIB3MF_ERROR_INVALIDLEVELSET = 143; + public static final int LIB3MF_ERROR_COULDNOTFINDTRIANGLESET = 144; + public static final int LIB3MF_ERROR_INVALIDTRIANGLESETINDEX = 145; + public static final int LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE = 2000; + public static final int LIB3MF_ERROR_INVALIDKEYSTORE = 3000; + public static final int LIB3MF_ERROR_INVALIDKEYSTORECONSUMER = 3001; + public static final int LIB3MF_ERROR_KEYSTORECONSUMERNOTFOUND = 3002; + public static final int LIB3MF_ERROR_KEYSTORERESOURCEDATANOTFOUND = 3003; + public static final int LIB3MF_ERROR_SECURECONTEXTNOTREGISTERED = 3004; + public static final int LIB3MF_ERROR_INVALIDKEYSIZE = 3005; + public static final int LIB3MF_ERROR_INCOMPATIBLEPORTTYPES = 4000; + public static final int LIB3MF_ERROR_GRAPHISCYCLIC = 4001; + public static final int LIB3MF_ERROR_INPUTNOTSET = 4002; + public static final int LIB3MF_ERROR_INVALIDNODECONFIGURATION = 4003; + + public static final Map ErrorCodeMap = new HashMap(); + public static final Map ErrorDescriptionMap = new HashMap(); + + static { + ErrorCodeMap.put(LIB3MF_ERROR_NOTIMPLEMENTED, "LIB3MF_ERROR_NOTIMPLEMENTED"); + ErrorDescriptionMap.put(LIB3MF_ERROR_NOTIMPLEMENTED, "functionality not implemented"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDPARAM, "LIB3MF_ERROR_INVALIDPARAM"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDPARAM, "an invalid parameter was passed"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDCAST, "LIB3MF_ERROR_INVALIDCAST"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDCAST, "a type cast failed"); + ErrorCodeMap.put(LIB3MF_ERROR_BUFFERTOOSMALL, "LIB3MF_ERROR_BUFFERTOOSMALL"); + ErrorDescriptionMap.put(LIB3MF_ERROR_BUFFERTOOSMALL, "a provided buffer is too small"); + ErrorCodeMap.put(LIB3MF_ERROR_GENERICEXCEPTION, "LIB3MF_ERROR_GENERICEXCEPTION"); + ErrorDescriptionMap.put(LIB3MF_ERROR_GENERICEXCEPTION, "a generic exception occurred"); + ErrorCodeMap.put(LIB3MF_ERROR_COULDNOTLOADLIBRARY, "LIB3MF_ERROR_COULDNOTLOADLIBRARY"); + ErrorDescriptionMap.put(LIB3MF_ERROR_COULDNOTLOADLIBRARY, "the library could not be loaded"); + ErrorCodeMap.put(LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT, "LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT"); + ErrorDescriptionMap.put(LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT, "a required exported symbol could not be found in the library"); + ErrorCodeMap.put(LIB3MF_ERROR_INCOMPATIBLEBINARYVERSION, "LIB3MF_ERROR_INCOMPATIBLEBINARYVERSION"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INCOMPATIBLEBINARYVERSION, "the version of the binary interface does not match the bindings interface"); + ErrorCodeMap.put(LIB3MF_ERROR_CALCULATIONABORTED, "LIB3MF_ERROR_CALCULATIONABORTED"); + ErrorDescriptionMap.put(LIB3MF_ERROR_CALCULATIONABORTED, "a calculation has been aborted"); + ErrorCodeMap.put(LIB3MF_ERROR_SHOULDNOTBECALLED, "LIB3MF_ERROR_SHOULDNOTBECALLED"); + ErrorDescriptionMap.put(LIB3MF_ERROR_SHOULDNOTBECALLED, "functionality should not be called"); + ErrorCodeMap.put(LIB3MF_ERROR_READERCLASSUNKNOWN, "LIB3MF_ERROR_READERCLASSUNKNOWN"); + ErrorDescriptionMap.put(LIB3MF_ERROR_READERCLASSUNKNOWN, "the queried reader class is unknown"); + ErrorCodeMap.put(LIB3MF_ERROR_WRITERCLASSUNKNOWN, "LIB3MF_ERROR_WRITERCLASSUNKNOWN"); + ErrorDescriptionMap.put(LIB3MF_ERROR_WRITERCLASSUNKNOWN, "the queried writer class is unknown"); + ErrorCodeMap.put(LIB3MF_ERROR_ITERATORINVALIDINDEX, "LIB3MF_ERROR_ITERATORINVALIDINDEX"); + ErrorDescriptionMap.put(LIB3MF_ERROR_ITERATORINVALIDINDEX, "the current index of an iterator is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDMODELRESOURCE, "LIB3MF_ERROR_INVALIDMODELRESOURCE"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDMODELRESOURCE, "no Model Resource has been given"); + ErrorCodeMap.put(LIB3MF_ERROR_RESOURCENOTFOUND, "LIB3MF_ERROR_RESOURCENOTFOUND"); + ErrorDescriptionMap.put(LIB3MF_ERROR_RESOURCENOTFOUND, "Resource not found"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDMODEL, "LIB3MF_ERROR_INVALIDMODEL"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDMODEL, "A model is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDOBJECT, "LIB3MF_ERROR_INVALIDOBJECT"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDOBJECT, "An object is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDMESHOBJECT, "LIB3MF_ERROR_INVALIDMESHOBJECT"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDMESHOBJECT, "A mesh object is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDCOMPONENTSOBJECT, "LIB3MF_ERROR_INVALIDCOMPONENTSOBJECT"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDCOMPONENTSOBJECT, "A components object is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDCOMPONENT, "LIB3MF_ERROR_INVALIDCOMPONENT"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDCOMPONENT, "A component is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDBUILDITEM, "LIB3MF_ERROR_INVALIDBUILDITEM"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDBUILDITEM, "A build item is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDBASEMATERIALGROUP, "LIB3MF_ERROR_INVALIDBASEMATERIALGROUP"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDBASEMATERIALGROUP, "A basematerialgroup is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDSLICESTACKRESOURCE, "LIB3MF_ERROR_INVALIDSLICESTACKRESOURCE"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDSLICESTACKRESOURCE, "A slicestack resource is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDTEXTURERESOURCE, "LIB3MF_ERROR_INVALIDTEXTURERESOURCE"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDTEXTURERESOURCE, "A texture resource is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDCOLORGROUP, "LIB3MF_ERROR_INVALIDCOLORGROUP"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDCOLORGROUP, "A color group resource is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDTEXTURE2DGROUP, "LIB3MF_ERROR_INVALIDTEXTURE2DGROUP"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDTEXTURE2DGROUP, "A texture2d group resource is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDCOMPOSITEMATERIALS, "LIB3MF_ERROR_INVALIDCOMPOSITEMATERIALS"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDCOMPOSITEMATERIALS, "A composite materials resource is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDMULTIPROPERTYGROUP, "LIB3MF_ERROR_INVALIDMULTIPROPERTYGROUP"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDMULTIPROPERTYGROUP, "A MultiPropertyGroup resource is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDRESOURCEINDEX, "LIB3MF_ERROR_INVALIDRESOURCEINDEX"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDRESOURCEINDEX, "A resource index is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_ATTACHMENTNOTFOUND, "LIB3MF_ERROR_ATTACHMENTNOTFOUND"); + ErrorDescriptionMap.put(LIB3MF_ERROR_ATTACHMENTNOTFOUND, "Attachment not found"); + ErrorCodeMap.put(LIB3MF_ERROR_FORBIDDENCYCLICREFERENCE, "LIB3MF_ERROR_FORBIDDENCYCLICREFERENCE"); + ErrorDescriptionMap.put(LIB3MF_ERROR_FORBIDDENCYCLICREFERENCE, "A component references one of its ancestors"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDATTACHMENTSTREAM, "LIB3MF_ERROR_INVALIDATTACHMENTSTREAM"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDATTACHMENTSTREAM, "An attachment stream is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDPROPERTYCOUNT, "LIB3MF_ERROR_INVALIDPROPERTYCOUNT"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDPROPERTYCOUNT, "Invalid property count."); + ErrorCodeMap.put(LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER, "LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER"); + ErrorDescriptionMap.put(LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER, "A progress identifier is unknown"); + ErrorCodeMap.put(LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT, "LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT"); + ErrorDescriptionMap.put(LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT, "An element buffer exceeds its spec limit"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDRESOURCE, "LIB3MF_ERROR_INVALIDRESOURCE"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDRESOURCE, "A resource is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDLEVELSET, "LIB3MF_ERROR_INVALIDLEVELSET"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDLEVELSET, "A level set is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_COULDNOTFINDTRIANGLESET, "LIB3MF_ERROR_COULDNOTFINDTRIANGLESET"); + ErrorDescriptionMap.put(LIB3MF_ERROR_COULDNOTFINDTRIANGLESET, "Could not find triangle set"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDTRIANGLESETINDEX, "LIB3MF_ERROR_INVALIDTRIANGLESETINDEX"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDTRIANGLESETINDEX, "Invalid triangle set index"); + ErrorCodeMap.put(LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE, "LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE"); + ErrorDescriptionMap.put(LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE, "This object type is not valid for beamlattices"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDKEYSTORE, "LIB3MF_ERROR_INVALIDKEYSTORE"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDKEYSTORE, "The keystore object is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDKEYSTORECONSUMER, "LIB3MF_ERROR_INVALIDKEYSTORECONSUMER"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDKEYSTORECONSUMER, "The consumer keystore object is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_KEYSTORECONSUMERNOTFOUND, "LIB3MF_ERROR_KEYSTORECONSUMERNOTFOUND"); + ErrorDescriptionMap.put(LIB3MF_ERROR_KEYSTORECONSUMERNOTFOUND, "A consumer has not been found"); + ErrorCodeMap.put(LIB3MF_ERROR_KEYSTORERESOURCEDATANOTFOUND, "LIB3MF_ERROR_KEYSTORERESOURCEDATANOTFOUND"); + ErrorDescriptionMap.put(LIB3MF_ERROR_KEYSTORERESOURCEDATANOTFOUND, "A resource data has not been found"); + ErrorCodeMap.put(LIB3MF_ERROR_SECURECONTEXTNOTREGISTERED, "LIB3MF_ERROR_SECURECONTEXTNOTREGISTERED"); + ErrorDescriptionMap.put(LIB3MF_ERROR_SECURECONTEXTNOTREGISTERED, "A Key or Conentent encryption callback has not been registered"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDKEYSIZE, "LIB3MF_ERROR_INVALIDKEYSIZE"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDKEYSIZE, "The key size is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_INCOMPATIBLEPORTTYPES, "LIB3MF_ERROR_INCOMPATIBLEPORTTYPES"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INCOMPATIBLEPORTTYPES, "Link could not be added, the port types are incompatible"); + ErrorCodeMap.put(LIB3MF_ERROR_GRAPHISCYCLIC, "LIB3MF_ERROR_GRAPHISCYCLIC"); + ErrorDescriptionMap.put(LIB3MF_ERROR_GRAPHISCYCLIC, "The functin graph is cyclic. Only dircected graphs are valid and can be topological sorted."); + ErrorCodeMap.put(LIB3MF_ERROR_INPUTNOTSET, "LIB3MF_ERROR_INPUTNOTSET"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INPUTNOTSET, "The input of a node is not set."); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDNODECONFIGURATION, "LIB3MF_ERROR_INVALIDNODECONFIGURATION"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDNODECONFIGURATION, "The selected node configuration is not supported"); + } + + protected int mErrorCode; + + protected String mErrorString; + + protected String mErrorDescription; + + public Lib3MFException(int errorCode, String message){ + super(message); + mErrorCode = errorCode; + mErrorString = ErrorCodeMap.get(errorCode); + mErrorString = (mErrorString != null) ? mErrorString : "Unknown error code"; + mErrorDescription = ErrorDescriptionMap.get(errorCode); + mErrorDescription = (mErrorDescription != null) ? mErrorDescription : ""; + } + + @Override + public String toString() { + return mErrorCode + ": " + mErrorString + " (" + mErrorDescription + " - " + getMessage() + ")"; + } +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/Lib3MFWrapper.java b/Autogenerated/Bindings/Java8/lib3mf/Lib3MFWrapper.java new file mode 100644 index 000000000..9fe35e40b --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/Lib3MFWrapper.java @@ -0,0 +1,4118 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.*; + +import java.nio.charset.StandardCharsets; + + +public class Lib3MFWrapper { + + public static final int PROPERTYTYPE_NOPROPERTYTYPE = 0; + public static final int PROPERTYTYPE_BASEMATERIAL = 1; + public static final int PROPERTYTYPE_TEXCOORD = 2; + public static final int PROPERTYTYPE_COLORS = 3; + public static final int PROPERTYTYPE_COMPOSITE = 4; + public static final int PROPERTYTYPE_MULTI = 5; + + public enum PropertyType { + eNoPropertyType, + eBaseMaterial, + eTexCoord, + eColors, + eComposite, + eMulti + } + + public static final int SLICESMESHRESOLUTION_FULLRES = 0; + public static final int SLICESMESHRESOLUTION_LOWRES = 1; + + public enum SlicesMeshResolution { + eFullres, + eLowres + } + + public static final int MODELUNIT_MICROMETER = 0; + public static final int MODELUNIT_MILLIMETER = 1; + public static final int MODELUNIT_CENTIMETER = 2; + public static final int MODELUNIT_INCH = 3; + public static final int MODELUNIT_FOOT = 4; + public static final int MODELUNIT_METER = 5; + + public enum ModelUnit { + eMicroMeter, + eMilliMeter, + eCentiMeter, + eInch, + eFoot, + eMeter + } + + public static final int OBJECTTYPE_OTHER = 0; + public static final int OBJECTTYPE_MODEL = 1; + public static final int OBJECTTYPE_SUPPORT = 2; + public static final int OBJECTTYPE_SOLIDSUPPORT = 3; + public static final int OBJECTTYPE_SURFACE = 4; + + public enum ObjectType { + eOther, + eModel, + eSupport, + eSolidSupport, + eSurface + } + + public static final int TEXTURETYPE_UNKNOWN = 0; + public static final int TEXTURETYPE_PNG = 1; + public static final int TEXTURETYPE_JPEG = 2; + + public enum TextureType { + eUnknown, + ePNG, + eJPEG + } + + public static final int TEXTURETILESTYLE_WRAP = 0; + public static final int TEXTURETILESTYLE_MIRROR = 1; + public static final int TEXTURETILESTYLE_CLAMP = 2; + public static final int TEXTURETILESTYLE_NOTILESTYLE = 3; + + public enum TextureTileStyle { + eWrap, + eMirror, + eClamp, + eNoTileStyle + } + + public static final int TEXTUREFILTER_AUTO = 0; + public static final int TEXTUREFILTER_LINEAR = 1; + public static final int TEXTUREFILTER_NEAREST = 2; + + public enum TextureFilter { + eAuto, + eLinear, + eNearest + } + + public static final int BEAMLATTICECAPMODE_SPHERE = 0; + public static final int BEAMLATTICECAPMODE_HEMISPHERE = 1; + public static final int BEAMLATTICECAPMODE_BUTT = 2; + + public enum BeamLatticeCapMode { + eSphere, + eHemiSphere, + eButt + } + + public static final int BEAMLATTICECLIPMODE_NOCLIPMODE = 0; + public static final int BEAMLATTICECLIPMODE_INSIDE = 1; + public static final int BEAMLATTICECLIPMODE_OUTSIDE = 2; + + public enum BeamLatticeClipMode { + eNoClipMode, + eInside, + eOutside + } + + public static final int BEAMLATTICEBALLMODE_BEAMLATTICEBALLMODENONE = 0; + public static final int BEAMLATTICEBALLMODE_MIXED = 1; + public static final int BEAMLATTICEBALLMODE_ALL = 2; + + public enum BeamLatticeBallMode { + eBeamLatticeBallModeNone, + eMixed, + eAll + } + + public static final int PROGRESSIDENTIFIER_QUERYCANCELED = 0; + public static final int PROGRESSIDENTIFIER_DONE = 1; + public static final int PROGRESSIDENTIFIER_CLEANUP = 2; + public static final int PROGRESSIDENTIFIER_READSTREAM = 3; + public static final int PROGRESSIDENTIFIER_EXTRACTOPCPACKAGE = 4; + public static final int PROGRESSIDENTIFIER_READNONROOTMODELS = 5; + public static final int PROGRESSIDENTIFIER_READROOTMODEL = 6; + public static final int PROGRESSIDENTIFIER_READRESOURCES = 7; + public static final int PROGRESSIDENTIFIER_READMESH = 8; + public static final int PROGRESSIDENTIFIER_READSLICES = 9; + public static final int PROGRESSIDENTIFIER_READBUILD = 10; + public static final int PROGRESSIDENTIFIER_READCUSTOMATTACHMENT = 11; + public static final int PROGRESSIDENTIFIER_READTEXTURETACHMENTS = 12; + public static final int PROGRESSIDENTIFIER_CREATEOPCPACKAGE = 13; + public static final int PROGRESSIDENTIFIER_WRITEMODELSTOSTREAM = 14; + public static final int PROGRESSIDENTIFIER_WRITEROOTMODEL = 15; + public static final int PROGRESSIDENTIFIER_WRITENONROOTMODELS = 16; + public static final int PROGRESSIDENTIFIER_WRITEATTACHMENTS = 17; + public static final int PROGRESSIDENTIFIER_WRITECONTENTTYPES = 18; + public static final int PROGRESSIDENTIFIER_WRITENOBJECTS = 19; + public static final int PROGRESSIDENTIFIER_WRITENODES = 20; + public static final int PROGRESSIDENTIFIER_WRITETRIANGLES = 21; + public static final int PROGRESSIDENTIFIER_WRITESLICES = 22; + public static final int PROGRESSIDENTIFIER_WRITEKEYSTORE = 23; + + public enum ProgressIdentifier { + eQUERYCANCELED, + eDONE, + eCLEANUP, + eREADSTREAM, + eEXTRACTOPCPACKAGE, + eREADNONROOTMODELS, + eREADROOTMODEL, + eREADRESOURCES, + eREADMESH, + eREADSLICES, + eREADBUILD, + eREADCUSTOMATTACHMENT, + eREADTEXTURETACHMENTS, + eCREATEOPCPACKAGE, + eWRITEMODELSTOSTREAM, + eWRITEROOTMODEL, + eWRITENONROOTMODELS, + eWRITEATTACHMENTS, + eWRITECONTENTTYPES, + eWRITENOBJECTS, + eWRITENODES, + eWRITETRIANGLES, + eWRITESLICES, + eWRITEKEYSTORE + } + + public static final int BLENDMETHOD_NOBLENDMETHOD = 0; + public static final int BLENDMETHOD_MIX = 1; + public static final int BLENDMETHOD_MULTIPLY = 2; + + public enum BlendMethod { + eNoBlendMethod, + eMix, + eMultiply + } + + public static final int CHANNELNAME_RED = 0; + public static final int CHANNELNAME_GREEN = 1; + public static final int CHANNELNAME_BLUE = 2; + public static final int CHANNELNAME_ALPHA = 3; + + public enum ChannelName { + eRed, + eGreen, + eBlue, + eAlpha + } + + public static final int COMPOSITIONMETHOD_WEIGHTEDSUM = 0; + public static final int COMPOSITIONMETHOD_MULTIPLY = 1; + public static final int COMPOSITIONMETHOD_MIN = 2; + public static final int COMPOSITIONMETHOD_MAX = 3; + public static final int COMPOSITIONMETHOD_MASK = 4; + + public enum CompositionMethod { + eWeightedSum, + eMultiply, + eMin, + eMax, + eMask + } + + public static final int COMPOSITIONSPACE_RAW = 0; + public static final int COMPOSITIONSPACE_LINEARCOLOR = 1; + + public enum CompositionSpace { + eRaw, + eLinearColor + } + + public static final int IMPLICITNODETYPE_ADDITION = 0; + public static final int IMPLICITNODETYPE_SUBTRACTION = 1; + public static final int IMPLICITNODETYPE_MULTIPLICATION = 2; + public static final int IMPLICITNODETYPE_DIVISION = 3; + public static final int IMPLICITNODETYPE_CONSTANT = 4; + public static final int IMPLICITNODETYPE_CONSTVEC = 5; + public static final int IMPLICITNODETYPE_CONSTMAT = 6; + public static final int IMPLICITNODETYPE_COMPOSEVECTOR = 7; + public static final int IMPLICITNODETYPE_DECOMPOSEVECTOR = 8; + public static final int IMPLICITNODETYPE_COMPOSEMATRIX = 9; + public static final int IMPLICITNODETYPE_MATRIXFROMCOLUMNS = 10; + public static final int IMPLICITNODETYPE_MATRIXFROMROWS = 11; + public static final int IMPLICITNODETYPE_DOT = 12; + public static final int IMPLICITNODETYPE_CROSS = 13; + public static final int IMPLICITNODETYPE_MATVECMULTIPLICATION = 14; + public static final int IMPLICITNODETYPE_TRANSPOSE = 15; + public static final int IMPLICITNODETYPE_INVERSE = 16; + public static final int IMPLICITNODETYPE_SINUS = 17; + public static final int IMPLICITNODETYPE_COSINUS = 18; + public static final int IMPLICITNODETYPE_TAN = 19; + public static final int IMPLICITNODETYPE_ARCSIN = 20; + public static final int IMPLICITNODETYPE_ARCCOS = 21; + public static final int IMPLICITNODETYPE_ARCTAN = 22; + public static final int IMPLICITNODETYPE_ARCTAN2 = 23; + public static final int IMPLICITNODETYPE_MIN = 24; + public static final int IMPLICITNODETYPE_MAX = 25; + public static final int IMPLICITNODETYPE_ABS = 26; + public static final int IMPLICITNODETYPE_FMOD = 27; + public static final int IMPLICITNODETYPE_POW = 28; + public static final int IMPLICITNODETYPE_SQRT = 29; + public static final int IMPLICITNODETYPE_EXP = 30; + public static final int IMPLICITNODETYPE_LOG = 31; + public static final int IMPLICITNODETYPE_LOG2 = 32; + public static final int IMPLICITNODETYPE_LOG10 = 33; + public static final int IMPLICITNODETYPE_SELECT = 34; + public static final int IMPLICITNODETYPE_CLAMP = 35; + public static final int IMPLICITNODETYPE_SINH = 36; + public static final int IMPLICITNODETYPE_COSH = 37; + public static final int IMPLICITNODETYPE_TANH = 38; + public static final int IMPLICITNODETYPE_ROUND = 39; + public static final int IMPLICITNODETYPE_CEIL = 40; + public static final int IMPLICITNODETYPE_FLOOR = 41; + public static final int IMPLICITNODETYPE_SIGN = 42; + public static final int IMPLICITNODETYPE_FRACT = 43; + public static final int IMPLICITNODETYPE_FUNCTIONCALL = 44; + public static final int IMPLICITNODETYPE_MESH = 45; + public static final int IMPLICITNODETYPE_LENGTH = 46; + public static final int IMPLICITNODETYPE_CONSTRESOURCEID = 47; + public static final int IMPLICITNODETYPE_VECTORFROMSCALAR = 48; + public static final int IMPLICITNODETYPE_UNSIGNEDMESH = 49; + public static final int IMPLICITNODETYPE_MOD = 50; + public static final int IMPLICITNODETYPE_BEAMLATTICE = 51; + public static final int IMPLICITNODETYPE_FUNCTIONGRADIENT = 52; + public static final int IMPLICITNODETYPE_NORMALIZEDISTANCE = 53; + + public enum ImplicitNodeType { + eAddition, + eSubtraction, + eMultiplication, + eDivision, + eConstant, + eConstVec, + eConstMat, + eComposeVector, + eDecomposeVector, + eComposeMatrix, + eMatrixFromColumns, + eMatrixFromRows, + eDot, + eCross, + eMatVecMultiplication, + eTranspose, + eInverse, + eSinus, + eCosinus, + eTan, + eArcSin, + eArcCos, + eArcTan, + eArcTan2, + eMin, + eMax, + eAbs, + eFmod, + ePow, + eSqrt, + eExp, + eLog, + eLog2, + eLog10, + eSelect, + eClamp, + eSinh, + eCosh, + eTanh, + eRound, + eCeil, + eFloor, + eSign, + eFract, + eFunctionCall, + eMesh, + eLength, + eConstResourceID, + eVectorFromScalar, + eUnsignedMesh, + eMod, + eBeamLattice, + eFunctionGradient, + eNormalizeDistance + } + + public static final int IMPLICITPORTTYPE_SCALAR = 0; + public static final int IMPLICITPORTTYPE_VECTOR = 1; + public static final int IMPLICITPORTTYPE_MATRIX = 2; + public static final int IMPLICITPORTTYPE_RESOURCEID = 3; + + public enum ImplicitPortType { + eScalar, + eVector, + eMatrix, + eResourceID + } + + public static final int IMPLICITNODECONFIGURATION_DEFAULT = 0; + public static final int IMPLICITNODECONFIGURATION_SCALARTOSCALAR = 1; + public static final int IMPLICITNODECONFIGURATION_VECTORTOVECTOR = 2; + public static final int IMPLICITNODECONFIGURATION_MATRIXTOMATRIX = 3; + + public enum ImplicitNodeConfiguration { + eDefault, + eScalarToScalar, + eVectorToVector, + eMatrixToMatrix + } + + public static final int ENCRYPTIONALGORITHM_AES256_GCM = 1; + + public enum EncryptionAlgorithm { + eAES256_GCM + } + + public static final int WRAPPINGALGORITHM_RSA_OAEP = 0; + + public enum WrappingAlgorithm { + eRSA_OAEP + } + + public static final int MGFALGORITHM_MGF1_SHA1 = 160; + public static final int MGFALGORITHM_MGF1_SHA224 = 224; + public static final int MGFALGORITHM_MGF1_SHA256 = 256; + public static final int MGFALGORITHM_MGF1_SHA384 = 384; + public static final int MGFALGORITHM_MGF1_SHA512 = 512; + + public enum MgfAlgorithm { + eMGF1_SHA1, + eMGF1_SHA224, + eMGF1_SHA256, + eMGF1_SHA384, + eMGF1_SHA512 + } + + public static final int DIGESTMETHOD_SHA1 = 160; + public static final int DIGESTMETHOD_SHA256 = 256; + + public enum DigestMethod { + eSHA1, + eSHA256 + } + + public static final int COMPRESSION_NOCOMPRESSION = 0; + public static final int COMPRESSION_DEFLATE = 1; + + public enum Compression { + eNoCompression, + eDeflate + } + + public static class EnumConversion { + public static int convertPropertyTypeToConst (PropertyType value) throws Lib3MFException { + switch (value) { + case eNoPropertyType: return PROPERTYTYPE_NOPROPERTYTYPE; + case eBaseMaterial: return PROPERTYTYPE_BASEMATERIAL; + case eTexCoord: return PROPERTYTYPE_TEXCOORD; + case eColors: return PROPERTYTYPE_COLORS; + case eComposite: return PROPERTYTYPE_COMPOSITE; + case eMulti: return PROPERTYTYPE_MULTI; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static PropertyType convertConstToPropertyType (int value) throws Lib3MFException { + switch (value) { + case PROPERTYTYPE_NOPROPERTYTYPE: return PropertyType.eNoPropertyType; + case PROPERTYTYPE_BASEMATERIAL: return PropertyType.eBaseMaterial; + case PROPERTYTYPE_TEXCOORD: return PropertyType.eTexCoord; + case PROPERTYTYPE_COLORS: return PropertyType.eColors; + case PROPERTYTYPE_COMPOSITE: return PropertyType.eComposite; + case PROPERTYTYPE_MULTI: return PropertyType.eMulti; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertSlicesMeshResolutionToConst (SlicesMeshResolution value) throws Lib3MFException { + switch (value) { + case eFullres: return SLICESMESHRESOLUTION_FULLRES; + case eLowres: return SLICESMESHRESOLUTION_LOWRES; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static SlicesMeshResolution convertConstToSlicesMeshResolution (int value) throws Lib3MFException { + switch (value) { + case SLICESMESHRESOLUTION_FULLRES: return SlicesMeshResolution.eFullres; + case SLICESMESHRESOLUTION_LOWRES: return SlicesMeshResolution.eLowres; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertModelUnitToConst (ModelUnit value) throws Lib3MFException { + switch (value) { + case eMicroMeter: return MODELUNIT_MICROMETER; + case eMilliMeter: return MODELUNIT_MILLIMETER; + case eCentiMeter: return MODELUNIT_CENTIMETER; + case eInch: return MODELUNIT_INCH; + case eFoot: return MODELUNIT_FOOT; + case eMeter: return MODELUNIT_METER; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static ModelUnit convertConstToModelUnit (int value) throws Lib3MFException { + switch (value) { + case MODELUNIT_MICROMETER: return ModelUnit.eMicroMeter; + case MODELUNIT_MILLIMETER: return ModelUnit.eMilliMeter; + case MODELUNIT_CENTIMETER: return ModelUnit.eCentiMeter; + case MODELUNIT_INCH: return ModelUnit.eInch; + case MODELUNIT_FOOT: return ModelUnit.eFoot; + case MODELUNIT_METER: return ModelUnit.eMeter; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertObjectTypeToConst (ObjectType value) throws Lib3MFException { + switch (value) { + case eOther: return OBJECTTYPE_OTHER; + case eModel: return OBJECTTYPE_MODEL; + case eSupport: return OBJECTTYPE_SUPPORT; + case eSolidSupport: return OBJECTTYPE_SOLIDSUPPORT; + case eSurface: return OBJECTTYPE_SURFACE; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static ObjectType convertConstToObjectType (int value) throws Lib3MFException { + switch (value) { + case OBJECTTYPE_OTHER: return ObjectType.eOther; + case OBJECTTYPE_MODEL: return ObjectType.eModel; + case OBJECTTYPE_SUPPORT: return ObjectType.eSupport; + case OBJECTTYPE_SOLIDSUPPORT: return ObjectType.eSolidSupport; + case OBJECTTYPE_SURFACE: return ObjectType.eSurface; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertTextureTypeToConst (TextureType value) throws Lib3MFException { + switch (value) { + case eUnknown: return TEXTURETYPE_UNKNOWN; + case ePNG: return TEXTURETYPE_PNG; + case eJPEG: return TEXTURETYPE_JPEG; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static TextureType convertConstToTextureType (int value) throws Lib3MFException { + switch (value) { + case TEXTURETYPE_UNKNOWN: return TextureType.eUnknown; + case TEXTURETYPE_PNG: return TextureType.ePNG; + case TEXTURETYPE_JPEG: return TextureType.eJPEG; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertTextureTileStyleToConst (TextureTileStyle value) throws Lib3MFException { + switch (value) { + case eWrap: return TEXTURETILESTYLE_WRAP; + case eMirror: return TEXTURETILESTYLE_MIRROR; + case eClamp: return TEXTURETILESTYLE_CLAMP; + case eNoTileStyle: return TEXTURETILESTYLE_NOTILESTYLE; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static TextureTileStyle convertConstToTextureTileStyle (int value) throws Lib3MFException { + switch (value) { + case TEXTURETILESTYLE_WRAP: return TextureTileStyle.eWrap; + case TEXTURETILESTYLE_MIRROR: return TextureTileStyle.eMirror; + case TEXTURETILESTYLE_CLAMP: return TextureTileStyle.eClamp; + case TEXTURETILESTYLE_NOTILESTYLE: return TextureTileStyle.eNoTileStyle; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertTextureFilterToConst (TextureFilter value) throws Lib3MFException { + switch (value) { + case eAuto: return TEXTUREFILTER_AUTO; + case eLinear: return TEXTUREFILTER_LINEAR; + case eNearest: return TEXTUREFILTER_NEAREST; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static TextureFilter convertConstToTextureFilter (int value) throws Lib3MFException { + switch (value) { + case TEXTUREFILTER_AUTO: return TextureFilter.eAuto; + case TEXTUREFILTER_LINEAR: return TextureFilter.eLinear; + case TEXTUREFILTER_NEAREST: return TextureFilter.eNearest; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertBeamLatticeCapModeToConst (BeamLatticeCapMode value) throws Lib3MFException { + switch (value) { + case eSphere: return BEAMLATTICECAPMODE_SPHERE; + case eHemiSphere: return BEAMLATTICECAPMODE_HEMISPHERE; + case eButt: return BEAMLATTICECAPMODE_BUTT; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static BeamLatticeCapMode convertConstToBeamLatticeCapMode (int value) throws Lib3MFException { + switch (value) { + case BEAMLATTICECAPMODE_SPHERE: return BeamLatticeCapMode.eSphere; + case BEAMLATTICECAPMODE_HEMISPHERE: return BeamLatticeCapMode.eHemiSphere; + case BEAMLATTICECAPMODE_BUTT: return BeamLatticeCapMode.eButt; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertBeamLatticeClipModeToConst (BeamLatticeClipMode value) throws Lib3MFException { + switch (value) { + case eNoClipMode: return BEAMLATTICECLIPMODE_NOCLIPMODE; + case eInside: return BEAMLATTICECLIPMODE_INSIDE; + case eOutside: return BEAMLATTICECLIPMODE_OUTSIDE; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static BeamLatticeClipMode convertConstToBeamLatticeClipMode (int value) throws Lib3MFException { + switch (value) { + case BEAMLATTICECLIPMODE_NOCLIPMODE: return BeamLatticeClipMode.eNoClipMode; + case BEAMLATTICECLIPMODE_INSIDE: return BeamLatticeClipMode.eInside; + case BEAMLATTICECLIPMODE_OUTSIDE: return BeamLatticeClipMode.eOutside; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertBeamLatticeBallModeToConst (BeamLatticeBallMode value) throws Lib3MFException { + switch (value) { + case eBeamLatticeBallModeNone: return BEAMLATTICEBALLMODE_BEAMLATTICEBALLMODENONE; + case eMixed: return BEAMLATTICEBALLMODE_MIXED; + case eAll: return BEAMLATTICEBALLMODE_ALL; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static BeamLatticeBallMode convertConstToBeamLatticeBallMode (int value) throws Lib3MFException { + switch (value) { + case BEAMLATTICEBALLMODE_BEAMLATTICEBALLMODENONE: return BeamLatticeBallMode.eBeamLatticeBallModeNone; + case BEAMLATTICEBALLMODE_MIXED: return BeamLatticeBallMode.eMixed; + case BEAMLATTICEBALLMODE_ALL: return BeamLatticeBallMode.eAll; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertProgressIdentifierToConst (ProgressIdentifier value) throws Lib3MFException { + switch (value) { + case eQUERYCANCELED: return PROGRESSIDENTIFIER_QUERYCANCELED; + case eDONE: return PROGRESSIDENTIFIER_DONE; + case eCLEANUP: return PROGRESSIDENTIFIER_CLEANUP; + case eREADSTREAM: return PROGRESSIDENTIFIER_READSTREAM; + case eEXTRACTOPCPACKAGE: return PROGRESSIDENTIFIER_EXTRACTOPCPACKAGE; + case eREADNONROOTMODELS: return PROGRESSIDENTIFIER_READNONROOTMODELS; + case eREADROOTMODEL: return PROGRESSIDENTIFIER_READROOTMODEL; + case eREADRESOURCES: return PROGRESSIDENTIFIER_READRESOURCES; + case eREADMESH: return PROGRESSIDENTIFIER_READMESH; + case eREADSLICES: return PROGRESSIDENTIFIER_READSLICES; + case eREADBUILD: return PROGRESSIDENTIFIER_READBUILD; + case eREADCUSTOMATTACHMENT: return PROGRESSIDENTIFIER_READCUSTOMATTACHMENT; + case eREADTEXTURETACHMENTS: return PROGRESSIDENTIFIER_READTEXTURETACHMENTS; + case eCREATEOPCPACKAGE: return PROGRESSIDENTIFIER_CREATEOPCPACKAGE; + case eWRITEMODELSTOSTREAM: return PROGRESSIDENTIFIER_WRITEMODELSTOSTREAM; + case eWRITEROOTMODEL: return PROGRESSIDENTIFIER_WRITEROOTMODEL; + case eWRITENONROOTMODELS: return PROGRESSIDENTIFIER_WRITENONROOTMODELS; + case eWRITEATTACHMENTS: return PROGRESSIDENTIFIER_WRITEATTACHMENTS; + case eWRITECONTENTTYPES: return PROGRESSIDENTIFIER_WRITECONTENTTYPES; + case eWRITENOBJECTS: return PROGRESSIDENTIFIER_WRITENOBJECTS; + case eWRITENODES: return PROGRESSIDENTIFIER_WRITENODES; + case eWRITETRIANGLES: return PROGRESSIDENTIFIER_WRITETRIANGLES; + case eWRITESLICES: return PROGRESSIDENTIFIER_WRITESLICES; + case eWRITEKEYSTORE: return PROGRESSIDENTIFIER_WRITEKEYSTORE; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static ProgressIdentifier convertConstToProgressIdentifier (int value) throws Lib3MFException { + switch (value) { + case PROGRESSIDENTIFIER_QUERYCANCELED: return ProgressIdentifier.eQUERYCANCELED; + case PROGRESSIDENTIFIER_DONE: return ProgressIdentifier.eDONE; + case PROGRESSIDENTIFIER_CLEANUP: return ProgressIdentifier.eCLEANUP; + case PROGRESSIDENTIFIER_READSTREAM: return ProgressIdentifier.eREADSTREAM; + case PROGRESSIDENTIFIER_EXTRACTOPCPACKAGE: return ProgressIdentifier.eEXTRACTOPCPACKAGE; + case PROGRESSIDENTIFIER_READNONROOTMODELS: return ProgressIdentifier.eREADNONROOTMODELS; + case PROGRESSIDENTIFIER_READROOTMODEL: return ProgressIdentifier.eREADROOTMODEL; + case PROGRESSIDENTIFIER_READRESOURCES: return ProgressIdentifier.eREADRESOURCES; + case PROGRESSIDENTIFIER_READMESH: return ProgressIdentifier.eREADMESH; + case PROGRESSIDENTIFIER_READSLICES: return ProgressIdentifier.eREADSLICES; + case PROGRESSIDENTIFIER_READBUILD: return ProgressIdentifier.eREADBUILD; + case PROGRESSIDENTIFIER_READCUSTOMATTACHMENT: return ProgressIdentifier.eREADCUSTOMATTACHMENT; + case PROGRESSIDENTIFIER_READTEXTURETACHMENTS: return ProgressIdentifier.eREADTEXTURETACHMENTS; + case PROGRESSIDENTIFIER_CREATEOPCPACKAGE: return ProgressIdentifier.eCREATEOPCPACKAGE; + case PROGRESSIDENTIFIER_WRITEMODELSTOSTREAM: return ProgressIdentifier.eWRITEMODELSTOSTREAM; + case PROGRESSIDENTIFIER_WRITEROOTMODEL: return ProgressIdentifier.eWRITEROOTMODEL; + case PROGRESSIDENTIFIER_WRITENONROOTMODELS: return ProgressIdentifier.eWRITENONROOTMODELS; + case PROGRESSIDENTIFIER_WRITEATTACHMENTS: return ProgressIdentifier.eWRITEATTACHMENTS; + case PROGRESSIDENTIFIER_WRITECONTENTTYPES: return ProgressIdentifier.eWRITECONTENTTYPES; + case PROGRESSIDENTIFIER_WRITENOBJECTS: return ProgressIdentifier.eWRITENOBJECTS; + case PROGRESSIDENTIFIER_WRITENODES: return ProgressIdentifier.eWRITENODES; + case PROGRESSIDENTIFIER_WRITETRIANGLES: return ProgressIdentifier.eWRITETRIANGLES; + case PROGRESSIDENTIFIER_WRITESLICES: return ProgressIdentifier.eWRITESLICES; + case PROGRESSIDENTIFIER_WRITEKEYSTORE: return ProgressIdentifier.eWRITEKEYSTORE; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertBlendMethodToConst (BlendMethod value) throws Lib3MFException { + switch (value) { + case eNoBlendMethod: return BLENDMETHOD_NOBLENDMETHOD; + case eMix: return BLENDMETHOD_MIX; + case eMultiply: return BLENDMETHOD_MULTIPLY; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static BlendMethod convertConstToBlendMethod (int value) throws Lib3MFException { + switch (value) { + case BLENDMETHOD_NOBLENDMETHOD: return BlendMethod.eNoBlendMethod; + case BLENDMETHOD_MIX: return BlendMethod.eMix; + case BLENDMETHOD_MULTIPLY: return BlendMethod.eMultiply; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertChannelNameToConst (ChannelName value) throws Lib3MFException { + switch (value) { + case eRed: return CHANNELNAME_RED; + case eGreen: return CHANNELNAME_GREEN; + case eBlue: return CHANNELNAME_BLUE; + case eAlpha: return CHANNELNAME_ALPHA; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static ChannelName convertConstToChannelName (int value) throws Lib3MFException { + switch (value) { + case CHANNELNAME_RED: return ChannelName.eRed; + case CHANNELNAME_GREEN: return ChannelName.eGreen; + case CHANNELNAME_BLUE: return ChannelName.eBlue; + case CHANNELNAME_ALPHA: return ChannelName.eAlpha; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertCompositionMethodToConst (CompositionMethod value) throws Lib3MFException { + switch (value) { + case eWeightedSum: return COMPOSITIONMETHOD_WEIGHTEDSUM; + case eMultiply: return COMPOSITIONMETHOD_MULTIPLY; + case eMin: return COMPOSITIONMETHOD_MIN; + case eMax: return COMPOSITIONMETHOD_MAX; + case eMask: return COMPOSITIONMETHOD_MASK; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static CompositionMethod convertConstToCompositionMethod (int value) throws Lib3MFException { + switch (value) { + case COMPOSITIONMETHOD_WEIGHTEDSUM: return CompositionMethod.eWeightedSum; + case COMPOSITIONMETHOD_MULTIPLY: return CompositionMethod.eMultiply; + case COMPOSITIONMETHOD_MIN: return CompositionMethod.eMin; + case COMPOSITIONMETHOD_MAX: return CompositionMethod.eMax; + case COMPOSITIONMETHOD_MASK: return CompositionMethod.eMask; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertCompositionSpaceToConst (CompositionSpace value) throws Lib3MFException { + switch (value) { + case eRaw: return COMPOSITIONSPACE_RAW; + case eLinearColor: return COMPOSITIONSPACE_LINEARCOLOR; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static CompositionSpace convertConstToCompositionSpace (int value) throws Lib3MFException { + switch (value) { + case COMPOSITIONSPACE_RAW: return CompositionSpace.eRaw; + case COMPOSITIONSPACE_LINEARCOLOR: return CompositionSpace.eLinearColor; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertImplicitNodeTypeToConst (ImplicitNodeType value) throws Lib3MFException { + switch (value) { + case eAddition: return IMPLICITNODETYPE_ADDITION; + case eSubtraction: return IMPLICITNODETYPE_SUBTRACTION; + case eMultiplication: return IMPLICITNODETYPE_MULTIPLICATION; + case eDivision: return IMPLICITNODETYPE_DIVISION; + case eConstant: return IMPLICITNODETYPE_CONSTANT; + case eConstVec: return IMPLICITNODETYPE_CONSTVEC; + case eConstMat: return IMPLICITNODETYPE_CONSTMAT; + case eComposeVector: return IMPLICITNODETYPE_COMPOSEVECTOR; + case eDecomposeVector: return IMPLICITNODETYPE_DECOMPOSEVECTOR; + case eComposeMatrix: return IMPLICITNODETYPE_COMPOSEMATRIX; + case eMatrixFromColumns: return IMPLICITNODETYPE_MATRIXFROMCOLUMNS; + case eMatrixFromRows: return IMPLICITNODETYPE_MATRIXFROMROWS; + case eDot: return IMPLICITNODETYPE_DOT; + case eCross: return IMPLICITNODETYPE_CROSS; + case eMatVecMultiplication: return IMPLICITNODETYPE_MATVECMULTIPLICATION; + case eTranspose: return IMPLICITNODETYPE_TRANSPOSE; + case eInverse: return IMPLICITNODETYPE_INVERSE; + case eSinus: return IMPLICITNODETYPE_SINUS; + case eCosinus: return IMPLICITNODETYPE_COSINUS; + case eTan: return IMPLICITNODETYPE_TAN; + case eArcSin: return IMPLICITNODETYPE_ARCSIN; + case eArcCos: return IMPLICITNODETYPE_ARCCOS; + case eArcTan: return IMPLICITNODETYPE_ARCTAN; + case eArcTan2: return IMPLICITNODETYPE_ARCTAN2; + case eMin: return IMPLICITNODETYPE_MIN; + case eMax: return IMPLICITNODETYPE_MAX; + case eAbs: return IMPLICITNODETYPE_ABS; + case eFmod: return IMPLICITNODETYPE_FMOD; + case ePow: return IMPLICITNODETYPE_POW; + case eSqrt: return IMPLICITNODETYPE_SQRT; + case eExp: return IMPLICITNODETYPE_EXP; + case eLog: return IMPLICITNODETYPE_LOG; + case eLog2: return IMPLICITNODETYPE_LOG2; + case eLog10: return IMPLICITNODETYPE_LOG10; + case eSelect: return IMPLICITNODETYPE_SELECT; + case eClamp: return IMPLICITNODETYPE_CLAMP; + case eSinh: return IMPLICITNODETYPE_SINH; + case eCosh: return IMPLICITNODETYPE_COSH; + case eTanh: return IMPLICITNODETYPE_TANH; + case eRound: return IMPLICITNODETYPE_ROUND; + case eCeil: return IMPLICITNODETYPE_CEIL; + case eFloor: return IMPLICITNODETYPE_FLOOR; + case eSign: return IMPLICITNODETYPE_SIGN; + case eFract: return IMPLICITNODETYPE_FRACT; + case eFunctionCall: return IMPLICITNODETYPE_FUNCTIONCALL; + case eMesh: return IMPLICITNODETYPE_MESH; + case eLength: return IMPLICITNODETYPE_LENGTH; + case eConstResourceID: return IMPLICITNODETYPE_CONSTRESOURCEID; + case eVectorFromScalar: return IMPLICITNODETYPE_VECTORFROMSCALAR; + case eUnsignedMesh: return IMPLICITNODETYPE_UNSIGNEDMESH; + case eMod: return IMPLICITNODETYPE_MOD; + case eBeamLattice: return IMPLICITNODETYPE_BEAMLATTICE; + case eFunctionGradient: return IMPLICITNODETYPE_FUNCTIONGRADIENT; + case eNormalizeDistance: return IMPLICITNODETYPE_NORMALIZEDISTANCE; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static ImplicitNodeType convertConstToImplicitNodeType (int value) throws Lib3MFException { + switch (value) { + case IMPLICITNODETYPE_ADDITION: return ImplicitNodeType.eAddition; + case IMPLICITNODETYPE_SUBTRACTION: return ImplicitNodeType.eSubtraction; + case IMPLICITNODETYPE_MULTIPLICATION: return ImplicitNodeType.eMultiplication; + case IMPLICITNODETYPE_DIVISION: return ImplicitNodeType.eDivision; + case IMPLICITNODETYPE_CONSTANT: return ImplicitNodeType.eConstant; + case IMPLICITNODETYPE_CONSTVEC: return ImplicitNodeType.eConstVec; + case IMPLICITNODETYPE_CONSTMAT: return ImplicitNodeType.eConstMat; + case IMPLICITNODETYPE_COMPOSEVECTOR: return ImplicitNodeType.eComposeVector; + case IMPLICITNODETYPE_DECOMPOSEVECTOR: return ImplicitNodeType.eDecomposeVector; + case IMPLICITNODETYPE_COMPOSEMATRIX: return ImplicitNodeType.eComposeMatrix; + case IMPLICITNODETYPE_MATRIXFROMCOLUMNS: return ImplicitNodeType.eMatrixFromColumns; + case IMPLICITNODETYPE_MATRIXFROMROWS: return ImplicitNodeType.eMatrixFromRows; + case IMPLICITNODETYPE_DOT: return ImplicitNodeType.eDot; + case IMPLICITNODETYPE_CROSS: return ImplicitNodeType.eCross; + case IMPLICITNODETYPE_MATVECMULTIPLICATION: return ImplicitNodeType.eMatVecMultiplication; + case IMPLICITNODETYPE_TRANSPOSE: return ImplicitNodeType.eTranspose; + case IMPLICITNODETYPE_INVERSE: return ImplicitNodeType.eInverse; + case IMPLICITNODETYPE_SINUS: return ImplicitNodeType.eSinus; + case IMPLICITNODETYPE_COSINUS: return ImplicitNodeType.eCosinus; + case IMPLICITNODETYPE_TAN: return ImplicitNodeType.eTan; + case IMPLICITNODETYPE_ARCSIN: return ImplicitNodeType.eArcSin; + case IMPLICITNODETYPE_ARCCOS: return ImplicitNodeType.eArcCos; + case IMPLICITNODETYPE_ARCTAN: return ImplicitNodeType.eArcTan; + case IMPLICITNODETYPE_ARCTAN2: return ImplicitNodeType.eArcTan2; + case IMPLICITNODETYPE_MIN: return ImplicitNodeType.eMin; + case IMPLICITNODETYPE_MAX: return ImplicitNodeType.eMax; + case IMPLICITNODETYPE_ABS: return ImplicitNodeType.eAbs; + case IMPLICITNODETYPE_FMOD: return ImplicitNodeType.eFmod; + case IMPLICITNODETYPE_POW: return ImplicitNodeType.ePow; + case IMPLICITNODETYPE_SQRT: return ImplicitNodeType.eSqrt; + case IMPLICITNODETYPE_EXP: return ImplicitNodeType.eExp; + case IMPLICITNODETYPE_LOG: return ImplicitNodeType.eLog; + case IMPLICITNODETYPE_LOG2: return ImplicitNodeType.eLog2; + case IMPLICITNODETYPE_LOG10: return ImplicitNodeType.eLog10; + case IMPLICITNODETYPE_SELECT: return ImplicitNodeType.eSelect; + case IMPLICITNODETYPE_CLAMP: return ImplicitNodeType.eClamp; + case IMPLICITNODETYPE_SINH: return ImplicitNodeType.eSinh; + case IMPLICITNODETYPE_COSH: return ImplicitNodeType.eCosh; + case IMPLICITNODETYPE_TANH: return ImplicitNodeType.eTanh; + case IMPLICITNODETYPE_ROUND: return ImplicitNodeType.eRound; + case IMPLICITNODETYPE_CEIL: return ImplicitNodeType.eCeil; + case IMPLICITNODETYPE_FLOOR: return ImplicitNodeType.eFloor; + case IMPLICITNODETYPE_SIGN: return ImplicitNodeType.eSign; + case IMPLICITNODETYPE_FRACT: return ImplicitNodeType.eFract; + case IMPLICITNODETYPE_FUNCTIONCALL: return ImplicitNodeType.eFunctionCall; + case IMPLICITNODETYPE_MESH: return ImplicitNodeType.eMesh; + case IMPLICITNODETYPE_LENGTH: return ImplicitNodeType.eLength; + case IMPLICITNODETYPE_CONSTRESOURCEID: return ImplicitNodeType.eConstResourceID; + case IMPLICITNODETYPE_VECTORFROMSCALAR: return ImplicitNodeType.eVectorFromScalar; + case IMPLICITNODETYPE_UNSIGNEDMESH: return ImplicitNodeType.eUnsignedMesh; + case IMPLICITNODETYPE_MOD: return ImplicitNodeType.eMod; + case IMPLICITNODETYPE_BEAMLATTICE: return ImplicitNodeType.eBeamLattice; + case IMPLICITNODETYPE_FUNCTIONGRADIENT: return ImplicitNodeType.eFunctionGradient; + case IMPLICITNODETYPE_NORMALIZEDISTANCE: return ImplicitNodeType.eNormalizeDistance; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertImplicitPortTypeToConst (ImplicitPortType value) throws Lib3MFException { + switch (value) { + case eScalar: return IMPLICITPORTTYPE_SCALAR; + case eVector: return IMPLICITPORTTYPE_VECTOR; + case eMatrix: return IMPLICITPORTTYPE_MATRIX; + case eResourceID: return IMPLICITPORTTYPE_RESOURCEID; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static ImplicitPortType convertConstToImplicitPortType (int value) throws Lib3MFException { + switch (value) { + case IMPLICITPORTTYPE_SCALAR: return ImplicitPortType.eScalar; + case IMPLICITPORTTYPE_VECTOR: return ImplicitPortType.eVector; + case IMPLICITPORTTYPE_MATRIX: return ImplicitPortType.eMatrix; + case IMPLICITPORTTYPE_RESOURCEID: return ImplicitPortType.eResourceID; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertImplicitNodeConfigurationToConst (ImplicitNodeConfiguration value) throws Lib3MFException { + switch (value) { + case eDefault: return IMPLICITNODECONFIGURATION_DEFAULT; + case eScalarToScalar: return IMPLICITNODECONFIGURATION_SCALARTOSCALAR; + case eVectorToVector: return IMPLICITNODECONFIGURATION_VECTORTOVECTOR; + case eMatrixToMatrix: return IMPLICITNODECONFIGURATION_MATRIXTOMATRIX; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static ImplicitNodeConfiguration convertConstToImplicitNodeConfiguration (int value) throws Lib3MFException { + switch (value) { + case IMPLICITNODECONFIGURATION_DEFAULT: return ImplicitNodeConfiguration.eDefault; + case IMPLICITNODECONFIGURATION_SCALARTOSCALAR: return ImplicitNodeConfiguration.eScalarToScalar; + case IMPLICITNODECONFIGURATION_VECTORTOVECTOR: return ImplicitNodeConfiguration.eVectorToVector; + case IMPLICITNODECONFIGURATION_MATRIXTOMATRIX: return ImplicitNodeConfiguration.eMatrixToMatrix; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertEncryptionAlgorithmToConst (EncryptionAlgorithm value) throws Lib3MFException { + switch (value) { + case eAES256_GCM: return ENCRYPTIONALGORITHM_AES256_GCM; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static EncryptionAlgorithm convertConstToEncryptionAlgorithm (int value) throws Lib3MFException { + switch (value) { + case ENCRYPTIONALGORITHM_AES256_GCM: return EncryptionAlgorithm.eAES256_GCM; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertWrappingAlgorithmToConst (WrappingAlgorithm value) throws Lib3MFException { + switch (value) { + case eRSA_OAEP: return WRAPPINGALGORITHM_RSA_OAEP; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static WrappingAlgorithm convertConstToWrappingAlgorithm (int value) throws Lib3MFException { + switch (value) { + case WRAPPINGALGORITHM_RSA_OAEP: return WrappingAlgorithm.eRSA_OAEP; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertMgfAlgorithmToConst (MgfAlgorithm value) throws Lib3MFException { + switch (value) { + case eMGF1_SHA1: return MGFALGORITHM_MGF1_SHA1; + case eMGF1_SHA224: return MGFALGORITHM_MGF1_SHA224; + case eMGF1_SHA256: return MGFALGORITHM_MGF1_SHA256; + case eMGF1_SHA384: return MGFALGORITHM_MGF1_SHA384; + case eMGF1_SHA512: return MGFALGORITHM_MGF1_SHA512; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static MgfAlgorithm convertConstToMgfAlgorithm (int value) throws Lib3MFException { + switch (value) { + case MGFALGORITHM_MGF1_SHA1: return MgfAlgorithm.eMGF1_SHA1; + case MGFALGORITHM_MGF1_SHA224: return MgfAlgorithm.eMGF1_SHA224; + case MGFALGORITHM_MGF1_SHA256: return MgfAlgorithm.eMGF1_SHA256; + case MGFALGORITHM_MGF1_SHA384: return MgfAlgorithm.eMGF1_SHA384; + case MGFALGORITHM_MGF1_SHA512: return MgfAlgorithm.eMGF1_SHA512; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertDigestMethodToConst (DigestMethod value) throws Lib3MFException { + switch (value) { + case eSHA1: return DIGESTMETHOD_SHA1; + case eSHA256: return DIGESTMETHOD_SHA256; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static DigestMethod convertConstToDigestMethod (int value) throws Lib3MFException { + switch (value) { + case DIGESTMETHOD_SHA1: return DigestMethod.eSHA1; + case DIGESTMETHOD_SHA256: return DigestMethod.eSHA256; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertCompressionToConst (Compression value) throws Lib3MFException { + switch (value) { + case eNoCompression: return COMPRESSION_NOCOMPRESSION; + case eDeflate: return COMPRESSION_DEFLATE; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static Compression convertConstToCompression (int value) throws Lib3MFException { + switch (value) { + case COMPRESSION_NOCOMPRESSION: return Compression.eNoCompression; + case COMPRESSION_DEFLATE: return Compression.eDeflate; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + } + + public interface ProgressCallback extends Callback { + + void progressCallback (Pointer abort, double progressValue, int progressIdentifier, Pointer userData); + + } + + public interface WriteCallback extends Callback { + + void writeCallback (long byteData, long numBytes, Pointer userData); + + } + + public interface ReadCallback extends Callback { + + void readCallback (long byteData, long numBytes, Pointer userData); + + } + + public interface SeekCallback extends Callback { + + void seekCallback (long position, Pointer userData); + + } + + public interface RandomNumberCallback extends Callback { + + void randomNumberCallback (long byteData, long numBytes, Pointer userData, Pointer bytesWritten); + + } + + public interface KeyWrappingCallback extends Callback { + + void keyWrappingCallback (Pointer kEKParams, int inBufferSize, Pointer inBufferBuffer, int outBufferSize, Pointer outBufferNeededSize, Pointer outBufferBuffer, Pointer userData, Pointer status); + + } + + public interface ContentEncryptionCallback extends Callback { + + void contentEncryptionCallback (Pointer cEKParams, int inputSize, Pointer inputBuffer, int outputSize, Pointer outputNeededSize, Pointer outputBuffer, Pointer userData, Pointer status); + + } + + protected com.sun.jna.Function lib3mf_getlibraryversion; + protected com.sun.jna.Function lib3mf_getprereleaseinformation; + protected com.sun.jna.Function lib3mf_getbuildinformation; + protected com.sun.jna.Function lib3mf_getspecificationversion; + protected com.sun.jna.Function lib3mf_createmodel; + protected com.sun.jna.Function lib3mf_release; + protected com.sun.jna.Function lib3mf_acquire; + protected com.sun.jna.Function lib3mf_setjournal; + protected com.sun.jna.Function lib3mf_getlasterror; + protected com.sun.jna.Function lib3mf_getsymbollookupmethod; + protected com.sun.jna.Function lib3mf_retrieveprogressmessage; + protected com.sun.jna.Function lib3mf_rgbatocolor; + protected com.sun.jna.Function lib3mf_floatrgbatocolor; + protected com.sun.jna.Function lib3mf_colortorgba; + protected com.sun.jna.Function lib3mf_colortofloatrgba; + protected com.sun.jna.Function lib3mf_getidentitytransform; + protected com.sun.jna.Function lib3mf_getuniformscaletransform; + protected com.sun.jna.Function lib3mf_getscaletransform; + protected com.sun.jna.Function lib3mf_gettranslationtransform; + protected com.sun.jna.Function lib3mf_base_classtypeid; + protected com.sun.jna.Function lib3mf_writer_writetofile; + protected com.sun.jna.Function lib3mf_writer_getstreamsize; + protected com.sun.jna.Function lib3mf_writer_writetobuffer; + protected com.sun.jna.Function lib3mf_writer_writetocallback; + protected com.sun.jna.Function lib3mf_writer_setprogresscallback; + protected com.sun.jna.Function lib3mf_writer_getdecimalprecision; + protected com.sun.jna.Function lib3mf_writer_setdecimalprecision; + protected com.sun.jna.Function lib3mf_writer_setstrictmodeactive; + protected com.sun.jna.Function lib3mf_writer_getstrictmodeactive; + protected com.sun.jna.Function lib3mf_writer_getwarning; + protected com.sun.jna.Function lib3mf_writer_getwarningcount; + protected com.sun.jna.Function lib3mf_writer_addkeywrappingcallback; + protected com.sun.jna.Function lib3mf_writer_setcontentencryptioncallback; + protected com.sun.jna.Function lib3mf_reader_readfromfile; + protected com.sun.jna.Function lib3mf_reader_readfrombuffer; + protected com.sun.jna.Function lib3mf_reader_readfromcallback; + protected com.sun.jna.Function lib3mf_reader_setprogresscallback; + protected com.sun.jna.Function lib3mf_reader_addrelationtoread; + protected com.sun.jna.Function lib3mf_reader_removerelationtoread; + protected com.sun.jna.Function lib3mf_reader_setstrictmodeactive; + protected com.sun.jna.Function lib3mf_reader_getstrictmodeactive; + protected com.sun.jna.Function lib3mf_reader_getwarning; + protected com.sun.jna.Function lib3mf_reader_getwarningcount; + protected com.sun.jna.Function lib3mf_reader_addkeywrappingcallback; + protected com.sun.jna.Function lib3mf_reader_setcontentencryptioncallback; + protected com.sun.jna.Function lib3mf_packagepart_getpath; + protected com.sun.jna.Function lib3mf_packagepart_setpath; + protected com.sun.jna.Function lib3mf_resource_getresourceid; + protected com.sun.jna.Function lib3mf_resource_getuniqueresourceid; + protected com.sun.jna.Function lib3mf_resource_packagepart; + protected com.sun.jna.Function lib3mf_resource_setpackagepart; + protected com.sun.jna.Function lib3mf_resource_getmodelresourceid; + protected com.sun.jna.Function lib3mf_resourceiterator_movenext; + protected com.sun.jna.Function lib3mf_resourceiterator_moveprevious; + protected com.sun.jna.Function lib3mf_resourceiterator_getcurrent; + protected com.sun.jna.Function lib3mf_resourceiterator_clone; + protected com.sun.jna.Function lib3mf_resourceiterator_count; + protected com.sun.jna.Function lib3mf_slicestackiterator_getcurrentslicestack; + protected com.sun.jna.Function lib3mf_objectiterator_getcurrentobject; + protected com.sun.jna.Function lib3mf_meshobjectiterator_getcurrentmeshobject; + protected com.sun.jna.Function lib3mf_componentsobjectiterator_getcurrentcomponentsobject; + protected com.sun.jna.Function lib3mf_texture2diterator_getcurrenttexture2d; + protected com.sun.jna.Function lib3mf_basematerialgroupiterator_getcurrentbasematerialgroup; + protected com.sun.jna.Function lib3mf_colorgroupiterator_getcurrentcolorgroup; + protected com.sun.jna.Function lib3mf_texture2dgroupiterator_getcurrenttexture2dgroup; + protected com.sun.jna.Function lib3mf_compositematerialsiterator_getcurrentcompositematerials; + protected com.sun.jna.Function lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup; + protected com.sun.jna.Function lib3mf_image3diterator_getcurrentimage3d; + protected com.sun.jna.Function lib3mf_functioniterator_getcurrentfunction; + protected com.sun.jna.Function lib3mf_levelsetiterator_getcurrentlevelset; + protected com.sun.jna.Function lib3mf_metadata_getnamespace; + protected com.sun.jna.Function lib3mf_metadata_setnamespace; + protected com.sun.jna.Function lib3mf_metadata_getname; + protected com.sun.jna.Function lib3mf_metadata_setname; + protected com.sun.jna.Function lib3mf_metadata_getkey; + protected com.sun.jna.Function lib3mf_metadata_getmustpreserve; + protected com.sun.jna.Function lib3mf_metadata_setmustpreserve; + protected com.sun.jna.Function lib3mf_metadata_gettype; + protected com.sun.jna.Function lib3mf_metadata_settype; + protected com.sun.jna.Function lib3mf_metadata_getvalue; + protected com.sun.jna.Function lib3mf_metadata_setvalue; + protected com.sun.jna.Function lib3mf_metadatagroup_getmetadatacount; + protected com.sun.jna.Function lib3mf_metadatagroup_getmetadata; + protected com.sun.jna.Function lib3mf_metadatagroup_getmetadatabykey; + protected com.sun.jna.Function lib3mf_metadatagroup_removemetadatabyindex; + protected com.sun.jna.Function lib3mf_metadatagroup_removemetadata; + protected com.sun.jna.Function lib3mf_metadatagroup_addmetadata; + protected com.sun.jna.Function lib3mf_triangleset_setname; + protected com.sun.jna.Function lib3mf_triangleset_getname; + protected com.sun.jna.Function lib3mf_triangleset_setidentifier; + protected com.sun.jna.Function lib3mf_triangleset_getidentifier; + protected com.sun.jna.Function lib3mf_triangleset_addtriangle; + protected com.sun.jna.Function lib3mf_triangleset_removetriangle; + protected com.sun.jna.Function lib3mf_triangleset_clear; + protected com.sun.jna.Function lib3mf_triangleset_settrianglelist; + protected com.sun.jna.Function lib3mf_triangleset_gettrianglelist; + protected com.sun.jna.Function lib3mf_triangleset_addtrianglelist; + protected com.sun.jna.Function lib3mf_triangleset_merge; + protected com.sun.jna.Function lib3mf_triangleset_deleteset; + protected com.sun.jna.Function lib3mf_triangleset_duplicate; + protected com.sun.jna.Function lib3mf_object_gettype; + protected com.sun.jna.Function lib3mf_object_settype; + protected com.sun.jna.Function lib3mf_object_getname; + protected com.sun.jna.Function lib3mf_object_setname; + protected com.sun.jna.Function lib3mf_object_getpartnumber; + protected com.sun.jna.Function lib3mf_object_setpartnumber; + protected com.sun.jna.Function lib3mf_object_ismeshobject; + protected com.sun.jna.Function lib3mf_object_iscomponentsobject; + protected com.sun.jna.Function lib3mf_object_islevelsetobject; + protected com.sun.jna.Function lib3mf_object_isvalid; + protected com.sun.jna.Function lib3mf_object_setattachmentasthumbnail; + protected com.sun.jna.Function lib3mf_object_getthumbnailattachment; + protected com.sun.jna.Function lib3mf_object_clearthumbnailattachment; + protected com.sun.jna.Function lib3mf_object_getoutbox; + protected com.sun.jna.Function lib3mf_object_getuuid; + protected com.sun.jna.Function lib3mf_object_setuuid; + protected com.sun.jna.Function lib3mf_object_getmetadatagroup; + protected com.sun.jna.Function lib3mf_object_setslicesmeshresolution; + protected com.sun.jna.Function lib3mf_object_getslicesmeshresolution; + protected com.sun.jna.Function lib3mf_object_hasslices; + protected com.sun.jna.Function lib3mf_object_clearslicestack; + protected com.sun.jna.Function lib3mf_object_getslicestack; + protected com.sun.jna.Function lib3mf_object_assignslicestack; + protected com.sun.jna.Function lib3mf_meshobject_getvertexcount; + protected com.sun.jna.Function lib3mf_meshobject_gettrianglecount; + protected com.sun.jna.Function lib3mf_meshobject_getvertex; + protected com.sun.jna.Function lib3mf_meshobject_setvertex; + protected com.sun.jna.Function lib3mf_meshobject_addvertex; + protected com.sun.jna.Function lib3mf_meshobject_getvertices; + protected com.sun.jna.Function lib3mf_meshobject_gettriangle; + protected com.sun.jna.Function lib3mf_meshobject_settriangle; + protected com.sun.jna.Function lib3mf_meshobject_addtriangle; + protected com.sun.jna.Function lib3mf_meshobject_gettriangleindices; + protected com.sun.jna.Function lib3mf_meshobject_setobjectlevelproperty; + protected com.sun.jna.Function lib3mf_meshobject_getobjectlevelproperty; + protected com.sun.jna.Function lib3mf_meshobject_settriangleproperties; + protected com.sun.jna.Function lib3mf_meshobject_gettriangleproperties; + protected com.sun.jna.Function lib3mf_meshobject_setalltriangleproperties; + protected com.sun.jna.Function lib3mf_meshobject_getalltriangleproperties; + protected com.sun.jna.Function lib3mf_meshobject_clearallproperties; + protected com.sun.jna.Function lib3mf_meshobject_setgeometry; + protected com.sun.jna.Function lib3mf_meshobject_ismanifoldandoriented; + protected com.sun.jna.Function lib3mf_meshobject_beamlattice; + protected com.sun.jna.Function lib3mf_meshobject_getvolumedata; + protected com.sun.jna.Function lib3mf_meshobject_setvolumedata; + protected com.sun.jna.Function lib3mf_meshobject_addtriangleset; + protected com.sun.jna.Function lib3mf_meshobject_hastriangleset; + protected com.sun.jna.Function lib3mf_meshobject_findtriangleset; + protected com.sun.jna.Function lib3mf_meshobject_gettrianglesetcount; + protected com.sun.jna.Function lib3mf_meshobject_gettriangleset; + protected com.sun.jna.Function lib3mf_levelset_getfunction; + protected com.sun.jna.Function lib3mf_levelset_setfunction; + protected com.sun.jna.Function lib3mf_levelset_gettransform; + protected com.sun.jna.Function lib3mf_levelset_settransform; + protected com.sun.jna.Function lib3mf_levelset_getchannelname; + protected com.sun.jna.Function lib3mf_levelset_setchannelname; + protected com.sun.jna.Function lib3mf_levelset_setminfeaturesize; + protected com.sun.jna.Function lib3mf_levelset_getminfeaturesize; + protected com.sun.jna.Function lib3mf_levelset_setfallbackvalue; + protected com.sun.jna.Function lib3mf_levelset_getfallbackvalue; + protected com.sun.jna.Function lib3mf_levelset_setmeshbboxonly; + protected com.sun.jna.Function lib3mf_levelset_getmeshbboxonly; + protected com.sun.jna.Function lib3mf_levelset_setmesh; + protected com.sun.jna.Function lib3mf_levelset_getmesh; + protected com.sun.jna.Function lib3mf_levelset_getvolumedata; + protected com.sun.jna.Function lib3mf_levelset_setvolumedata; + protected com.sun.jna.Function lib3mf_beamlattice_getminlength; + protected com.sun.jna.Function lib3mf_beamlattice_setminlength; + protected com.sun.jna.Function lib3mf_beamlattice_getclipping; + protected com.sun.jna.Function lib3mf_beamlattice_setclipping; + protected com.sun.jna.Function lib3mf_beamlattice_getrepresentation; + protected com.sun.jna.Function lib3mf_beamlattice_setrepresentation; + protected com.sun.jna.Function lib3mf_beamlattice_getballoptions; + protected com.sun.jna.Function lib3mf_beamlattice_setballoptions; + protected com.sun.jna.Function lib3mf_beamlattice_getbeamcount; + protected com.sun.jna.Function lib3mf_beamlattice_getbeam; + protected com.sun.jna.Function lib3mf_beamlattice_addbeam; + protected com.sun.jna.Function lib3mf_beamlattice_setbeam; + protected com.sun.jna.Function lib3mf_beamlattice_setbeams; + protected com.sun.jna.Function lib3mf_beamlattice_getbeams; + protected com.sun.jna.Function lib3mf_beamlattice_getballcount; + protected com.sun.jna.Function lib3mf_beamlattice_getball; + protected com.sun.jna.Function lib3mf_beamlattice_addball; + protected com.sun.jna.Function lib3mf_beamlattice_setball; + protected com.sun.jna.Function lib3mf_beamlattice_setballs; + protected com.sun.jna.Function lib3mf_beamlattice_getballs; + protected com.sun.jna.Function lib3mf_beamlattice_getbeamsetcount; + protected com.sun.jna.Function lib3mf_beamlattice_addbeamset; + protected com.sun.jna.Function lib3mf_beamlattice_getbeamset; + protected com.sun.jna.Function lib3mf_functionreference_getfunctionresourceid; + protected com.sun.jna.Function lib3mf_functionreference_setfunctionresourceid; + protected com.sun.jna.Function lib3mf_functionreference_gettransform; + protected com.sun.jna.Function lib3mf_functionreference_settransform; + protected com.sun.jna.Function lib3mf_functionreference_getchannelname; + protected com.sun.jna.Function lib3mf_functionreference_setchannelname; + protected com.sun.jna.Function lib3mf_functionreference_setminfeaturesize; + protected com.sun.jna.Function lib3mf_functionreference_getminfeaturesize; + protected com.sun.jna.Function lib3mf_functionreference_setfallbackvalue; + protected com.sun.jna.Function lib3mf_functionreference_getfallbackvalue; + protected com.sun.jna.Function lib3mf_volumedatacomposite_getbasematerialgroup; + protected com.sun.jna.Function lib3mf_volumedatacomposite_setbasematerialgroup; + protected com.sun.jna.Function lib3mf_volumedatacomposite_getmaterialmappingcount; + protected com.sun.jna.Function lib3mf_volumedatacomposite_getmaterialmapping; + protected com.sun.jna.Function lib3mf_volumedatacomposite_addmaterialmapping; + protected com.sun.jna.Function lib3mf_volumedatacomposite_removematerialmapping; + protected com.sun.jna.Function lib3mf_volumedataproperty_getname; + protected com.sun.jna.Function lib3mf_volumedataproperty_setisrequired; + protected com.sun.jna.Function lib3mf_volumedataproperty_isrequired; + protected com.sun.jna.Function lib3mf_volumedata_getcomposite; + protected com.sun.jna.Function lib3mf_volumedata_createnewcomposite; + protected com.sun.jna.Function lib3mf_volumedata_removecomposite; + protected com.sun.jna.Function lib3mf_volumedata_getcolor; + protected com.sun.jna.Function lib3mf_volumedata_createnewcolor; + protected com.sun.jna.Function lib3mf_volumedata_removecolor; + protected com.sun.jna.Function lib3mf_volumedata_getpropertycount; + protected com.sun.jna.Function lib3mf_volumedata_getproperty; + protected com.sun.jna.Function lib3mf_volumedata_addpropertyfromfunction; + protected com.sun.jna.Function lib3mf_volumedata_removeproperty; + protected com.sun.jna.Function lib3mf_component_getobjectresource; + protected com.sun.jna.Function lib3mf_component_getobjectresourceid; + protected com.sun.jna.Function lib3mf_component_getuuid; + protected com.sun.jna.Function lib3mf_component_setuuid; + protected com.sun.jna.Function lib3mf_component_hastransform; + protected com.sun.jna.Function lib3mf_component_gettransform; + protected com.sun.jna.Function lib3mf_component_settransform; + protected com.sun.jna.Function lib3mf_componentsobject_addcomponent; + protected com.sun.jna.Function lib3mf_componentsobject_getcomponent; + protected com.sun.jna.Function lib3mf_componentsobject_getcomponentcount; + protected com.sun.jna.Function lib3mf_beamset_setname; + protected com.sun.jna.Function lib3mf_beamset_getname; + protected com.sun.jna.Function lib3mf_beamset_setidentifier; + protected com.sun.jna.Function lib3mf_beamset_getidentifier; + protected com.sun.jna.Function lib3mf_beamset_getreferencecount; + protected com.sun.jna.Function lib3mf_beamset_setreferences; + protected com.sun.jna.Function lib3mf_beamset_getreferences; + protected com.sun.jna.Function lib3mf_beamset_getballreferencecount; + protected com.sun.jna.Function lib3mf_beamset_setballreferences; + protected com.sun.jna.Function lib3mf_beamset_getballreferences; + protected com.sun.jna.Function lib3mf_basematerialgroup_getcount; + protected com.sun.jna.Function lib3mf_basematerialgroup_getallpropertyids; + protected com.sun.jna.Function lib3mf_basematerialgroup_addmaterial; + protected com.sun.jna.Function lib3mf_basematerialgroup_removematerial; + protected com.sun.jna.Function lib3mf_basematerialgroup_getname; + protected com.sun.jna.Function lib3mf_basematerialgroup_setname; + protected com.sun.jna.Function lib3mf_basematerialgroup_setdisplaycolor; + protected com.sun.jna.Function lib3mf_basematerialgroup_getdisplaycolor; + protected com.sun.jna.Function lib3mf_colorgroup_getcount; + protected com.sun.jna.Function lib3mf_colorgroup_getallpropertyids; + protected com.sun.jna.Function lib3mf_colorgroup_addcolor; + protected com.sun.jna.Function lib3mf_colorgroup_removecolor; + protected com.sun.jna.Function lib3mf_colorgroup_setcolor; + protected com.sun.jna.Function lib3mf_colorgroup_getcolor; + protected com.sun.jna.Function lib3mf_texture2dgroup_getcount; + protected com.sun.jna.Function lib3mf_texture2dgroup_getallpropertyids; + protected com.sun.jna.Function lib3mf_texture2dgroup_addtex2coord; + protected com.sun.jna.Function lib3mf_texture2dgroup_gettex2coord; + protected com.sun.jna.Function lib3mf_texture2dgroup_removetex2coord; + protected com.sun.jna.Function lib3mf_texture2dgroup_gettexture2d; + protected com.sun.jna.Function lib3mf_compositematerials_getcount; + protected com.sun.jna.Function lib3mf_compositematerials_getallpropertyids; + protected com.sun.jna.Function lib3mf_compositematerials_getbasematerialgroup; + protected com.sun.jna.Function lib3mf_compositematerials_addcomposite; + protected com.sun.jna.Function lib3mf_compositematerials_removecomposite; + protected com.sun.jna.Function lib3mf_compositematerials_getcomposite; + protected com.sun.jna.Function lib3mf_multipropertygroup_getcount; + protected com.sun.jna.Function lib3mf_multipropertygroup_getallpropertyids; + protected com.sun.jna.Function lib3mf_multipropertygroup_addmultiproperty; + protected com.sun.jna.Function lib3mf_multipropertygroup_setmultiproperty; + protected com.sun.jna.Function lib3mf_multipropertygroup_getmultiproperty; + protected com.sun.jna.Function lib3mf_multipropertygroup_removemultiproperty; + protected com.sun.jna.Function lib3mf_multipropertygroup_getlayercount; + protected com.sun.jna.Function lib3mf_multipropertygroup_addlayer; + protected com.sun.jna.Function lib3mf_multipropertygroup_getlayer; + protected com.sun.jna.Function lib3mf_multipropertygroup_removelayer; + protected com.sun.jna.Function lib3mf_image3d_getname; + protected com.sun.jna.Function lib3mf_image3d_setname; + protected com.sun.jna.Function lib3mf_image3d_isimagestack; + protected com.sun.jna.Function lib3mf_imagestack_getrowcount; + protected com.sun.jna.Function lib3mf_imagestack_setrowcount; + protected com.sun.jna.Function lib3mf_imagestack_getcolumncount; + protected com.sun.jna.Function lib3mf_imagestack_setcolumncount; + protected com.sun.jna.Function lib3mf_imagestack_getsheetcount; + protected com.sun.jna.Function lib3mf_imagestack_getsheet; + protected com.sun.jna.Function lib3mf_imagestack_setsheet; + protected com.sun.jna.Function lib3mf_imagestack_createemptysheet; + protected com.sun.jna.Function lib3mf_imagestack_createsheetfrombuffer; + protected com.sun.jna.Function lib3mf_imagestack_createsheetfromfile; + protected com.sun.jna.Function lib3mf_attachment_getpath; + protected com.sun.jna.Function lib3mf_attachment_setpath; + protected com.sun.jna.Function lib3mf_attachment_packagepart; + protected com.sun.jna.Function lib3mf_attachment_getrelationshiptype; + protected com.sun.jna.Function lib3mf_attachment_setrelationshiptype; + protected com.sun.jna.Function lib3mf_attachment_writetofile; + protected com.sun.jna.Function lib3mf_attachment_readfromfile; + protected com.sun.jna.Function lib3mf_attachment_readfromcallback; + protected com.sun.jna.Function lib3mf_attachment_getstreamsize; + protected com.sun.jna.Function lib3mf_attachment_writetobuffer; + protected com.sun.jna.Function lib3mf_attachment_readfrombuffer; + protected com.sun.jna.Function lib3mf_texture2d_getattachment; + protected com.sun.jna.Function lib3mf_texture2d_setattachment; + protected com.sun.jna.Function lib3mf_texture2d_getcontenttype; + protected com.sun.jna.Function lib3mf_texture2d_setcontenttype; + protected com.sun.jna.Function lib3mf_texture2d_gettilestyleuv; + protected com.sun.jna.Function lib3mf_texture2d_settilestyleuv; + protected com.sun.jna.Function lib3mf_texture2d_getfilter; + protected com.sun.jna.Function lib3mf_texture2d_setfilter; + protected com.sun.jna.Function lib3mf_implicitport_getidentifier; + protected com.sun.jna.Function lib3mf_implicitport_setidentifier; + protected com.sun.jna.Function lib3mf_implicitport_getdisplayname; + protected com.sun.jna.Function lib3mf_implicitport_setdisplayname; + protected com.sun.jna.Function lib3mf_implicitport_settype; + protected com.sun.jna.Function lib3mf_implicitport_gettype; + protected com.sun.jna.Function lib3mf_implicitport_getreference; + protected com.sun.jna.Function lib3mf_implicitport_setreference; + protected com.sun.jna.Function lib3mf_iterator_movenext; + protected com.sun.jna.Function lib3mf_iterator_moveprevious; + protected com.sun.jna.Function lib3mf_iterator_count; + protected com.sun.jna.Function lib3mf_implicitportiterator_getcurrent; + protected com.sun.jna.Function lib3mf_implicitnode_getidentifier; + protected com.sun.jna.Function lib3mf_implicitnode_setidentifier; + protected com.sun.jna.Function lib3mf_implicitnode_getdisplayname; + protected com.sun.jna.Function lib3mf_implicitnode_setdisplayname; + protected com.sun.jna.Function lib3mf_implicitnode_gettag; + protected com.sun.jna.Function lib3mf_implicitnode_settag; + protected com.sun.jna.Function lib3mf_implicitnode_getnodetype; + protected com.sun.jna.Function lib3mf_implicitnode_addinput; + protected com.sun.jna.Function lib3mf_implicitnode_getinputs; + protected com.sun.jna.Function lib3mf_implicitnode_addoutput; + protected com.sun.jna.Function lib3mf_implicitnode_getoutputs; + protected com.sun.jna.Function lib3mf_implicitnode_findinput; + protected com.sun.jna.Function lib3mf_implicitnode_findoutput; + protected com.sun.jna.Function lib3mf_implicitnode_aretypesvalid; + protected com.sun.jna.Function lib3mf_oneinputnode_getinputa; + protected com.sun.jna.Function lib3mf_oneinputnode_getoutputresult; + protected com.sun.jna.Function lib3mf_resourceidnode_setresource; + protected com.sun.jna.Function lib3mf_resourceidnode_getresource; + protected com.sun.jna.Function lib3mf_resourceidnode_getoutputvalue; + protected com.sun.jna.Function lib3mf_twoinputnode_getinputb; + protected com.sun.jna.Function lib3mf_selectnode_getinputb; + protected com.sun.jna.Function lib3mf_selectnode_getinputc; + protected com.sun.jna.Function lib3mf_selectnode_getinputd; + protected com.sun.jna.Function lib3mf_clampnode_getinputmin; + protected com.sun.jna.Function lib3mf_clampnode_getinputmax; + protected com.sun.jna.Function lib3mf_composevectornode_getinputx; + protected com.sun.jna.Function lib3mf_composevectornode_getinputy; + protected com.sun.jna.Function lib3mf_composevectornode_getinputz; + protected com.sun.jna.Function lib3mf_composevectornode_getoutputresult; + protected com.sun.jna.Function lib3mf_decomposevectornode_getinputa; + protected com.sun.jna.Function lib3mf_decomposevectornode_getoutputx; + protected com.sun.jna.Function lib3mf_decomposevectornode_getoutputy; + protected com.sun.jna.Function lib3mf_decomposevectornode_getoutputz; + protected com.sun.jna.Function lib3mf_composematrixnode_getinputm00; + protected com.sun.jna.Function lib3mf_composematrixnode_getinputm01; + protected com.sun.jna.Function lib3mf_composematrixnode_getinputm02; + protected com.sun.jna.Function lib3mf_composematrixnode_getinputm03; + protected com.sun.jna.Function lib3mf_composematrixnode_getinputm10; + protected com.sun.jna.Function lib3mf_composematrixnode_getinputm11; + protected com.sun.jna.Function lib3mf_composematrixnode_getinputm12; + protected com.sun.jna.Function lib3mf_composematrixnode_getinputm13; + protected com.sun.jna.Function lib3mf_composematrixnode_getinputm20; + protected com.sun.jna.Function lib3mf_composematrixnode_getinputm21; + protected com.sun.jna.Function lib3mf_composematrixnode_getinputm22; + protected com.sun.jna.Function lib3mf_composematrixnode_getinputm23; + protected com.sun.jna.Function lib3mf_composematrixnode_getinputm30; + protected com.sun.jna.Function lib3mf_composematrixnode_getinputm31; + protected com.sun.jna.Function lib3mf_composematrixnode_getinputm32; + protected com.sun.jna.Function lib3mf_composematrixnode_getinputm33; + protected com.sun.jna.Function lib3mf_composematrixnode_getoutputresult; + protected com.sun.jna.Function lib3mf_matrixfromrowsnode_getinputa; + protected com.sun.jna.Function lib3mf_matrixfromrowsnode_getinputb; + protected com.sun.jna.Function lib3mf_matrixfromrowsnode_getinputc; + protected com.sun.jna.Function lib3mf_matrixfromrowsnode_getinputd; + protected com.sun.jna.Function lib3mf_matrixfromrowsnode_getoutputresult; + protected com.sun.jna.Function lib3mf_matrixfromcolumnsnode_getinputa; + protected com.sun.jna.Function lib3mf_matrixfromcolumnsnode_getinputb; + protected com.sun.jna.Function lib3mf_matrixfromcolumnsnode_getinputc; + protected com.sun.jna.Function lib3mf_matrixfromcolumnsnode_getinputd; + protected com.sun.jna.Function lib3mf_matrixfromcolumnsnode_getoutputresult; + protected com.sun.jna.Function lib3mf_constantnode_setconstant; + protected com.sun.jna.Function lib3mf_constantnode_getconstant; + protected com.sun.jna.Function lib3mf_constantnode_getoutputvalue; + protected com.sun.jna.Function lib3mf_constvecnode_setvector; + protected com.sun.jna.Function lib3mf_constvecnode_getvector; + protected com.sun.jna.Function lib3mf_constvecnode_getoutputvector; + protected com.sun.jna.Function lib3mf_constmatnode_setmatrix; + protected com.sun.jna.Function lib3mf_constmatnode_getmatrix; + protected com.sun.jna.Function lib3mf_constmatnode_getoutputmatrix; + protected com.sun.jna.Function lib3mf_meshnode_getinputmesh; + protected com.sun.jna.Function lib3mf_meshnode_getinputpos; + protected com.sun.jna.Function lib3mf_meshnode_getoutputdistance; + protected com.sun.jna.Function lib3mf_unsignedmeshnode_getinputmesh; + protected com.sun.jna.Function lib3mf_unsignedmeshnode_getinputpos; + protected com.sun.jna.Function lib3mf_unsignedmeshnode_getoutputdistance; + protected com.sun.jna.Function lib3mf_beamlatticenode_getinputbeamlattice; + protected com.sun.jna.Function lib3mf_beamlatticenode_getinputpos; + protected com.sun.jna.Function lib3mf_beamlatticenode_getoutputdistance; + protected com.sun.jna.Function lib3mf_beamlatticenode_setaccuraterange; + protected com.sun.jna.Function lib3mf_beamlatticenode_getaccuraterange; + protected com.sun.jna.Function lib3mf_functiongradientnode_getinputfunctionid; + protected com.sun.jna.Function lib3mf_functiongradientnode_getinputpos; + protected com.sun.jna.Function lib3mf_functiongradientnode_getinputstep; + protected com.sun.jna.Function lib3mf_functiongradientnode_setscalaroutputname; + protected com.sun.jna.Function lib3mf_functiongradientnode_getscalaroutputname; + protected com.sun.jna.Function lib3mf_functiongradientnode_setvectorinputname; + protected com.sun.jna.Function lib3mf_functiongradientnode_getvectorinputname; + protected com.sun.jna.Function lib3mf_functiongradientnode_getoutputvector; + protected com.sun.jna.Function lib3mf_functiongradientnode_getoutputgradient; + protected com.sun.jna.Function lib3mf_functiongradientnode_getoutputmagnitude; + protected com.sun.jna.Function lib3mf_normalizedistancenode_getinputfunctionid; + protected com.sun.jna.Function lib3mf_normalizedistancenode_getinputpos; + protected com.sun.jna.Function lib3mf_normalizedistancenode_getinputstep; + protected com.sun.jna.Function lib3mf_normalizedistancenode_setscalaroutputname; + protected com.sun.jna.Function lib3mf_normalizedistancenode_getscalaroutputname; + protected com.sun.jna.Function lib3mf_normalizedistancenode_setvectorinputname; + protected com.sun.jna.Function lib3mf_normalizedistancenode_getvectorinputname; + protected com.sun.jna.Function lib3mf_normalizedistancenode_getoutputresult; + protected com.sun.jna.Function lib3mf_functioncallnode_getinputfunctionid; + protected com.sun.jna.Function lib3mf_nodeiterator_getcurrent; + protected com.sun.jna.Function lib3mf_function_getdisplayname; + protected com.sun.jna.Function lib3mf_function_setdisplayname; + protected com.sun.jna.Function lib3mf_function_addinput; + protected com.sun.jna.Function lib3mf_function_getinputs; + protected com.sun.jna.Function lib3mf_function_removeinput; + protected com.sun.jna.Function lib3mf_function_addoutput; + protected com.sun.jna.Function lib3mf_function_getoutputs; + protected com.sun.jna.Function lib3mf_function_removeoutput; + protected com.sun.jna.Function lib3mf_function_findinput; + protected com.sun.jna.Function lib3mf_function_findoutput; + protected com.sun.jna.Function lib3mf_implicitfunction_getidentifier; + protected com.sun.jna.Function lib3mf_implicitfunction_setidentifier; + protected com.sun.jna.Function lib3mf_implicitfunction_addnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addsinnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addcosnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addtannode; + protected com.sun.jna.Function lib3mf_implicitfunction_addarcsinnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addarccosnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addarctan2node; + protected com.sun.jna.Function lib3mf_implicitfunction_addsinhnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addcoshnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addtanhnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addroundnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addceilnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addfloornode; + protected com.sun.jna.Function lib3mf_implicitfunction_addsignnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addfractnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addabsnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addexpnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addlognode; + protected com.sun.jna.Function lib3mf_implicitfunction_addlog2node; + protected com.sun.jna.Function lib3mf_implicitfunction_addlog10node; + protected com.sun.jna.Function lib3mf_implicitfunction_addlengthnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addtransposenode; + protected com.sun.jna.Function lib3mf_implicitfunction_addinversenode; + protected com.sun.jna.Function lib3mf_implicitfunction_addsqrtnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addresourceidnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addadditionnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addsubtractionnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addmultiplicationnode; + protected com.sun.jna.Function lib3mf_implicitfunction_adddivisionnode; + protected com.sun.jna.Function lib3mf_implicitfunction_adddotnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addcrossnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addmatvecmultiplicationnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addminnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addmaxnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addfmodnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addpownode; + protected com.sun.jna.Function lib3mf_implicitfunction_addselectnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addclampnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addcomposevectornode; + protected com.sun.jna.Function lib3mf_implicitfunction_addvectorfromscalarnode; + protected com.sun.jna.Function lib3mf_implicitfunction_adddecomposevectornode; + protected com.sun.jna.Function lib3mf_implicitfunction_addcomposematrixnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addmatrixfromrowsnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addmatrixfromcolumnsnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addconstantnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addconstvecnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addconstmatnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addmeshnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addunsignedmeshnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addbeamlatticenode; + protected com.sun.jna.Function lib3mf_implicitfunction_addfunctiongradientnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addnormalizedistancenode; + protected com.sun.jna.Function lib3mf_implicitfunction_addfunctioncallnode; + protected com.sun.jna.Function lib3mf_implicitfunction_getnodes; + protected com.sun.jna.Function lib3mf_implicitfunction_removenode; + protected com.sun.jna.Function lib3mf_implicitfunction_addlink; + protected com.sun.jna.Function lib3mf_implicitfunction_addlinkbynames; + protected com.sun.jna.Function lib3mf_implicitfunction_clear; + protected com.sun.jna.Function lib3mf_implicitfunction_sortnodestopologically; + protected com.sun.jna.Function lib3mf_functionfromimage3d_getimage3d; + protected com.sun.jna.Function lib3mf_functionfromimage3d_setimage3d; + protected com.sun.jna.Function lib3mf_functionfromimage3d_setfilter; + protected com.sun.jna.Function lib3mf_functionfromimage3d_getfilter; + protected com.sun.jna.Function lib3mf_functionfromimage3d_settilestyles; + protected com.sun.jna.Function lib3mf_functionfromimage3d_gettilestyles; + protected com.sun.jna.Function lib3mf_functionfromimage3d_getoffset; + protected com.sun.jna.Function lib3mf_functionfromimage3d_setoffset; + protected com.sun.jna.Function lib3mf_functionfromimage3d_getscale; + protected com.sun.jna.Function lib3mf_functionfromimage3d_setscale; + protected com.sun.jna.Function lib3mf_builditem_getobjectresource; + protected com.sun.jna.Function lib3mf_builditem_getuuid; + protected com.sun.jna.Function lib3mf_builditem_setuuid; + protected com.sun.jna.Function lib3mf_builditem_getobjectresourceid; + protected com.sun.jna.Function lib3mf_builditem_hasobjecttransform; + protected com.sun.jna.Function lib3mf_builditem_getobjecttransform; + protected com.sun.jna.Function lib3mf_builditem_setobjecttransform; + protected com.sun.jna.Function lib3mf_builditem_getpartnumber; + protected com.sun.jna.Function lib3mf_builditem_setpartnumber; + protected com.sun.jna.Function lib3mf_builditem_getmetadatagroup; + protected com.sun.jna.Function lib3mf_builditem_getoutbox; + protected com.sun.jna.Function lib3mf_builditemiterator_movenext; + protected com.sun.jna.Function lib3mf_builditemiterator_moveprevious; + protected com.sun.jna.Function lib3mf_builditemiterator_getcurrent; + protected com.sun.jna.Function lib3mf_builditemiterator_clone; + protected com.sun.jna.Function lib3mf_builditemiterator_count; + protected com.sun.jna.Function lib3mf_slice_setvertices; + protected com.sun.jna.Function lib3mf_slice_getvertices; + protected com.sun.jna.Function lib3mf_slice_getvertexcount; + protected com.sun.jna.Function lib3mf_slice_addpolygon; + protected com.sun.jna.Function lib3mf_slice_getpolygoncount; + protected com.sun.jna.Function lib3mf_slice_setpolygonindices; + protected com.sun.jna.Function lib3mf_slice_getpolygonindices; + protected com.sun.jna.Function lib3mf_slice_getpolygonindexcount; + protected com.sun.jna.Function lib3mf_slice_getztop; + protected com.sun.jna.Function lib3mf_slicestack_getbottomz; + protected com.sun.jna.Function lib3mf_slicestack_getslicecount; + protected com.sun.jna.Function lib3mf_slicestack_getslice; + protected com.sun.jna.Function lib3mf_slicestack_addslice; + protected com.sun.jna.Function lib3mf_slicestack_getslicerefcount; + protected com.sun.jna.Function lib3mf_slicestack_addslicestackreference; + protected com.sun.jna.Function lib3mf_slicestack_getslicestackreference; + protected com.sun.jna.Function lib3mf_slicestack_collapseslicereferences; + protected com.sun.jna.Function lib3mf_slicestack_setownpath; + protected com.sun.jna.Function lib3mf_slicestack_getownpath; + protected com.sun.jna.Function lib3mf_consumer_getconsumerid; + protected com.sun.jna.Function lib3mf_consumer_getkeyid; + protected com.sun.jna.Function lib3mf_consumer_getkeyvalue; + protected com.sun.jna.Function lib3mf_accessright_getconsumer; + protected com.sun.jna.Function lib3mf_accessright_getwrappingalgorithm; + protected com.sun.jna.Function lib3mf_accessright_getmgfalgorithm; + protected com.sun.jna.Function lib3mf_accessright_getdigestmethod; + protected com.sun.jna.Function lib3mf_contentencryptionparams_getencryptionalgorithm; + protected com.sun.jna.Function lib3mf_contentencryptionparams_getkey; + protected com.sun.jna.Function lib3mf_contentencryptionparams_getinitializationvector; + protected com.sun.jna.Function lib3mf_contentencryptionparams_getauthenticationtag; + protected com.sun.jna.Function lib3mf_contentencryptionparams_setauthenticationtag; + protected com.sun.jna.Function lib3mf_contentencryptionparams_getadditionalauthenticationdata; + protected com.sun.jna.Function lib3mf_contentencryptionparams_getdescriptor; + protected com.sun.jna.Function lib3mf_contentencryptionparams_getkeyuuid; + protected com.sun.jna.Function lib3mf_resourcedata_getpath; + protected com.sun.jna.Function lib3mf_resourcedata_getencryptionalgorithm; + protected com.sun.jna.Function lib3mf_resourcedata_getcompression; + protected com.sun.jna.Function lib3mf_resourcedata_getadditionalauthenticationdata; + protected com.sun.jna.Function lib3mf_resourcedatagroup_getkeyuuid; + protected com.sun.jna.Function lib3mf_resourcedatagroup_addaccessright; + protected com.sun.jna.Function lib3mf_resourcedatagroup_findaccessrightbyconsumer; + protected com.sun.jna.Function lib3mf_resourcedatagroup_removeaccessright; + protected com.sun.jna.Function lib3mf_keystore_addconsumer; + protected com.sun.jna.Function lib3mf_keystore_getconsumercount; + protected com.sun.jna.Function lib3mf_keystore_getconsumer; + protected com.sun.jna.Function lib3mf_keystore_removeconsumer; + protected com.sun.jna.Function lib3mf_keystore_findconsumer; + protected com.sun.jna.Function lib3mf_keystore_getresourcedatagroupcount; + protected com.sun.jna.Function lib3mf_keystore_addresourcedatagroup; + protected com.sun.jna.Function lib3mf_keystore_getresourcedatagroup; + protected com.sun.jna.Function lib3mf_keystore_removeresourcedatagroup; + protected com.sun.jna.Function lib3mf_keystore_findresourcedatagroup; + protected com.sun.jna.Function lib3mf_keystore_addresourcedata; + protected com.sun.jna.Function lib3mf_keystore_removeresourcedata; + protected com.sun.jna.Function lib3mf_keystore_findresourcedata; + protected com.sun.jna.Function lib3mf_keystore_getresourcedatacount; + protected com.sun.jna.Function lib3mf_keystore_getresourcedata; + protected com.sun.jna.Function lib3mf_keystore_getuuid; + protected com.sun.jna.Function lib3mf_keystore_setuuid; + protected com.sun.jna.Function lib3mf_model_rootmodelpart; + protected com.sun.jna.Function lib3mf_model_findorcreatepackagepart; + protected com.sun.jna.Function lib3mf_model_setunit; + protected com.sun.jna.Function lib3mf_model_getunit; + protected com.sun.jna.Function lib3mf_model_getlanguage; + protected com.sun.jna.Function lib3mf_model_setlanguage; + protected com.sun.jna.Function lib3mf_model_querywriter; + protected com.sun.jna.Function lib3mf_model_queryreader; + protected com.sun.jna.Function lib3mf_model_getresourcebyid; + protected com.sun.jna.Function lib3mf_model_gettexture2dbyid; + protected com.sun.jna.Function lib3mf_model_getpropertytypebyid; + protected com.sun.jna.Function lib3mf_model_getbasematerialgroupbyid; + protected com.sun.jna.Function lib3mf_model_gettexture2dgroupbyid; + protected com.sun.jna.Function lib3mf_model_getcompositematerialsbyid; + protected com.sun.jna.Function lib3mf_model_getmultipropertygroupbyid; + protected com.sun.jna.Function lib3mf_model_getmeshobjectbyid; + protected com.sun.jna.Function lib3mf_model_getcomponentsobjectbyid; + protected com.sun.jna.Function lib3mf_model_getcolorgroupbyid; + protected com.sun.jna.Function lib3mf_model_getslicestackbyid; + protected com.sun.jna.Function lib3mf_model_getlevelsetbyid; + protected com.sun.jna.Function lib3mf_model_getbuilduuid; + protected com.sun.jna.Function lib3mf_model_setbuilduuid; + protected com.sun.jna.Function lib3mf_model_getbuilditems; + protected com.sun.jna.Function lib3mf_model_getoutbox; + protected com.sun.jna.Function lib3mf_model_getresources; + protected com.sun.jna.Function lib3mf_model_getobjects; + protected com.sun.jna.Function lib3mf_model_getmeshobjects; + protected com.sun.jna.Function lib3mf_model_getcomponentsobjects; + protected com.sun.jna.Function lib3mf_model_gettexture2ds; + protected com.sun.jna.Function lib3mf_model_getbasematerialgroups; + protected com.sun.jna.Function lib3mf_model_getcolorgroups; + protected com.sun.jna.Function lib3mf_model_gettexture2dgroups; + protected com.sun.jna.Function lib3mf_model_getcompositematerials; + protected com.sun.jna.Function lib3mf_model_getmultipropertygroups; + protected com.sun.jna.Function lib3mf_model_getslicestacks; + protected com.sun.jna.Function lib3mf_model_getimage3ds; + protected com.sun.jna.Function lib3mf_model_mergetomodel; + protected com.sun.jna.Function lib3mf_model_mergefrommodel; + protected com.sun.jna.Function lib3mf_model_addmeshobject; + protected com.sun.jna.Function lib3mf_model_addcomponentsobject; + protected com.sun.jna.Function lib3mf_model_addslicestack; + protected com.sun.jna.Function lib3mf_model_addtexture2dfromattachment; + protected com.sun.jna.Function lib3mf_model_addbasematerialgroup; + protected com.sun.jna.Function lib3mf_model_addcolorgroup; + protected com.sun.jna.Function lib3mf_model_addtexture2dgroup; + protected com.sun.jna.Function lib3mf_model_addcompositematerials; + protected com.sun.jna.Function lib3mf_model_addmultipropertygroup; + protected com.sun.jna.Function lib3mf_model_addimagestack; + protected com.sun.jna.Function lib3mf_model_getimagestackbyid; + protected com.sun.jna.Function lib3mf_model_addbuilditem; + protected com.sun.jna.Function lib3mf_model_removebuilditem; + protected com.sun.jna.Function lib3mf_model_getmetadatagroup; + protected com.sun.jna.Function lib3mf_model_addattachment; + protected com.sun.jna.Function lib3mf_model_removeattachment; + protected com.sun.jna.Function lib3mf_model_getattachment; + protected com.sun.jna.Function lib3mf_model_findattachment; + protected com.sun.jna.Function lib3mf_model_getattachmentcount; + protected com.sun.jna.Function lib3mf_model_haspackagethumbnailattachment; + protected com.sun.jna.Function lib3mf_model_createpackagethumbnailattachment; + protected com.sun.jna.Function lib3mf_model_getpackagethumbnailattachment; + protected com.sun.jna.Function lib3mf_model_removepackagethumbnailattachment; + protected com.sun.jna.Function lib3mf_model_addcustomcontenttype; + protected com.sun.jna.Function lib3mf_model_removecustomcontenttype; + protected com.sun.jna.Function lib3mf_model_setrandomnumbercallback; + protected com.sun.jna.Function lib3mf_model_getkeystore; + protected com.sun.jna.Function lib3mf_model_getfunctions; + protected com.sun.jna.Function lib3mf_model_addimplicitfunction; + protected com.sun.jna.Function lib3mf_model_addfunctionfromimage3d; + protected com.sun.jna.Function lib3mf_model_addvolumedata; + protected com.sun.jna.Function lib3mf_model_addlevelset; + protected com.sun.jna.Function lib3mf_model_getlevelsets; + protected com.sun.jna.Function lib3mf_model_removeresource; + + protected NativeLibrary mLibrary; + + public Lib3MFWrapper(String libraryPath) { + mLibrary = NativeLibrary.getInstance(libraryPath); + lib3mf_getlibraryversion = mLibrary.getFunction("lib3mf_getlibraryversion"); + lib3mf_getprereleaseinformation = mLibrary.getFunction("lib3mf_getprereleaseinformation"); + lib3mf_getbuildinformation = mLibrary.getFunction("lib3mf_getbuildinformation"); + lib3mf_getspecificationversion = mLibrary.getFunction("lib3mf_getspecificationversion"); + lib3mf_createmodel = mLibrary.getFunction("lib3mf_createmodel"); + lib3mf_release = mLibrary.getFunction("lib3mf_release"); + lib3mf_acquire = mLibrary.getFunction("lib3mf_acquire"); + lib3mf_setjournal = mLibrary.getFunction("lib3mf_setjournal"); + lib3mf_getlasterror = mLibrary.getFunction("lib3mf_getlasterror"); + lib3mf_getsymbollookupmethod = mLibrary.getFunction("lib3mf_getsymbollookupmethod"); + lib3mf_retrieveprogressmessage = mLibrary.getFunction("lib3mf_retrieveprogressmessage"); + lib3mf_rgbatocolor = mLibrary.getFunction("lib3mf_rgbatocolor"); + lib3mf_floatrgbatocolor = mLibrary.getFunction("lib3mf_floatrgbatocolor"); + lib3mf_colortorgba = mLibrary.getFunction("lib3mf_colortorgba"); + lib3mf_colortofloatrgba = mLibrary.getFunction("lib3mf_colortofloatrgba"); + lib3mf_getidentitytransform = mLibrary.getFunction("lib3mf_getidentitytransform"); + lib3mf_getuniformscaletransform = mLibrary.getFunction("lib3mf_getuniformscaletransform"); + lib3mf_getscaletransform = mLibrary.getFunction("lib3mf_getscaletransform"); + lib3mf_gettranslationtransform = mLibrary.getFunction("lib3mf_gettranslationtransform"); + lib3mf_base_classtypeid = mLibrary.getFunction("lib3mf_base_classtypeid"); + lib3mf_writer_writetofile = mLibrary.getFunction("lib3mf_writer_writetofile"); + lib3mf_writer_getstreamsize = mLibrary.getFunction("lib3mf_writer_getstreamsize"); + lib3mf_writer_writetobuffer = mLibrary.getFunction("lib3mf_writer_writetobuffer"); + lib3mf_writer_writetocallback = mLibrary.getFunction("lib3mf_writer_writetocallback"); + lib3mf_writer_setprogresscallback = mLibrary.getFunction("lib3mf_writer_setprogresscallback"); + lib3mf_writer_getdecimalprecision = mLibrary.getFunction("lib3mf_writer_getdecimalprecision"); + lib3mf_writer_setdecimalprecision = mLibrary.getFunction("lib3mf_writer_setdecimalprecision"); + lib3mf_writer_setstrictmodeactive = mLibrary.getFunction("lib3mf_writer_setstrictmodeactive"); + lib3mf_writer_getstrictmodeactive = mLibrary.getFunction("lib3mf_writer_getstrictmodeactive"); + lib3mf_writer_getwarning = mLibrary.getFunction("lib3mf_writer_getwarning"); + lib3mf_writer_getwarningcount = mLibrary.getFunction("lib3mf_writer_getwarningcount"); + lib3mf_writer_addkeywrappingcallback = mLibrary.getFunction("lib3mf_writer_addkeywrappingcallback"); + lib3mf_writer_setcontentencryptioncallback = mLibrary.getFunction("lib3mf_writer_setcontentencryptioncallback"); + lib3mf_reader_readfromfile = mLibrary.getFunction("lib3mf_reader_readfromfile"); + lib3mf_reader_readfrombuffer = mLibrary.getFunction("lib3mf_reader_readfrombuffer"); + lib3mf_reader_readfromcallback = mLibrary.getFunction("lib3mf_reader_readfromcallback"); + lib3mf_reader_setprogresscallback = mLibrary.getFunction("lib3mf_reader_setprogresscallback"); + lib3mf_reader_addrelationtoread = mLibrary.getFunction("lib3mf_reader_addrelationtoread"); + lib3mf_reader_removerelationtoread = mLibrary.getFunction("lib3mf_reader_removerelationtoread"); + lib3mf_reader_setstrictmodeactive = mLibrary.getFunction("lib3mf_reader_setstrictmodeactive"); + lib3mf_reader_getstrictmodeactive = mLibrary.getFunction("lib3mf_reader_getstrictmodeactive"); + lib3mf_reader_getwarning = mLibrary.getFunction("lib3mf_reader_getwarning"); + lib3mf_reader_getwarningcount = mLibrary.getFunction("lib3mf_reader_getwarningcount"); + lib3mf_reader_addkeywrappingcallback = mLibrary.getFunction("lib3mf_reader_addkeywrappingcallback"); + lib3mf_reader_setcontentencryptioncallback = mLibrary.getFunction("lib3mf_reader_setcontentencryptioncallback"); + lib3mf_packagepart_getpath = mLibrary.getFunction("lib3mf_packagepart_getpath"); + lib3mf_packagepart_setpath = mLibrary.getFunction("lib3mf_packagepart_setpath"); + lib3mf_resource_getresourceid = mLibrary.getFunction("lib3mf_resource_getresourceid"); + lib3mf_resource_getuniqueresourceid = mLibrary.getFunction("lib3mf_resource_getuniqueresourceid"); + lib3mf_resource_packagepart = mLibrary.getFunction("lib3mf_resource_packagepart"); + lib3mf_resource_setpackagepart = mLibrary.getFunction("lib3mf_resource_setpackagepart"); + lib3mf_resource_getmodelresourceid = mLibrary.getFunction("lib3mf_resource_getmodelresourceid"); + lib3mf_resourceiterator_movenext = mLibrary.getFunction("lib3mf_resourceiterator_movenext"); + lib3mf_resourceiterator_moveprevious = mLibrary.getFunction("lib3mf_resourceiterator_moveprevious"); + lib3mf_resourceiterator_getcurrent = mLibrary.getFunction("lib3mf_resourceiterator_getcurrent"); + lib3mf_resourceiterator_clone = mLibrary.getFunction("lib3mf_resourceiterator_clone"); + lib3mf_resourceiterator_count = mLibrary.getFunction("lib3mf_resourceiterator_count"); + lib3mf_slicestackiterator_getcurrentslicestack = mLibrary.getFunction("lib3mf_slicestackiterator_getcurrentslicestack"); + lib3mf_objectiterator_getcurrentobject = mLibrary.getFunction("lib3mf_objectiterator_getcurrentobject"); + lib3mf_meshobjectiterator_getcurrentmeshobject = mLibrary.getFunction("lib3mf_meshobjectiterator_getcurrentmeshobject"); + lib3mf_componentsobjectiterator_getcurrentcomponentsobject = mLibrary.getFunction("lib3mf_componentsobjectiterator_getcurrentcomponentsobject"); + lib3mf_texture2diterator_getcurrenttexture2d = mLibrary.getFunction("lib3mf_texture2diterator_getcurrenttexture2d"); + lib3mf_basematerialgroupiterator_getcurrentbasematerialgroup = mLibrary.getFunction("lib3mf_basematerialgroupiterator_getcurrentbasematerialgroup"); + lib3mf_colorgroupiterator_getcurrentcolorgroup = mLibrary.getFunction("lib3mf_colorgroupiterator_getcurrentcolorgroup"); + lib3mf_texture2dgroupiterator_getcurrenttexture2dgroup = mLibrary.getFunction("lib3mf_texture2dgroupiterator_getcurrenttexture2dgroup"); + lib3mf_compositematerialsiterator_getcurrentcompositematerials = mLibrary.getFunction("lib3mf_compositematerialsiterator_getcurrentcompositematerials"); + lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup = mLibrary.getFunction("lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup"); + lib3mf_image3diterator_getcurrentimage3d = mLibrary.getFunction("lib3mf_image3diterator_getcurrentimage3d"); + lib3mf_functioniterator_getcurrentfunction = mLibrary.getFunction("lib3mf_functioniterator_getcurrentfunction"); + lib3mf_levelsetiterator_getcurrentlevelset = mLibrary.getFunction("lib3mf_levelsetiterator_getcurrentlevelset"); + lib3mf_metadata_getnamespace = mLibrary.getFunction("lib3mf_metadata_getnamespace"); + lib3mf_metadata_setnamespace = mLibrary.getFunction("lib3mf_metadata_setnamespace"); + lib3mf_metadata_getname = mLibrary.getFunction("lib3mf_metadata_getname"); + lib3mf_metadata_setname = mLibrary.getFunction("lib3mf_metadata_setname"); + lib3mf_metadata_getkey = mLibrary.getFunction("lib3mf_metadata_getkey"); + lib3mf_metadata_getmustpreserve = mLibrary.getFunction("lib3mf_metadata_getmustpreserve"); + lib3mf_metadata_setmustpreserve = mLibrary.getFunction("lib3mf_metadata_setmustpreserve"); + lib3mf_metadata_gettype = mLibrary.getFunction("lib3mf_metadata_gettype"); + lib3mf_metadata_settype = mLibrary.getFunction("lib3mf_metadata_settype"); + lib3mf_metadata_getvalue = mLibrary.getFunction("lib3mf_metadata_getvalue"); + lib3mf_metadata_setvalue = mLibrary.getFunction("lib3mf_metadata_setvalue"); + lib3mf_metadatagroup_getmetadatacount = mLibrary.getFunction("lib3mf_metadatagroup_getmetadatacount"); + lib3mf_metadatagroup_getmetadata = mLibrary.getFunction("lib3mf_metadatagroup_getmetadata"); + lib3mf_metadatagroup_getmetadatabykey = mLibrary.getFunction("lib3mf_metadatagroup_getmetadatabykey"); + lib3mf_metadatagroup_removemetadatabyindex = mLibrary.getFunction("lib3mf_metadatagroup_removemetadatabyindex"); + lib3mf_metadatagroup_removemetadata = mLibrary.getFunction("lib3mf_metadatagroup_removemetadata"); + lib3mf_metadatagroup_addmetadata = mLibrary.getFunction("lib3mf_metadatagroup_addmetadata"); + lib3mf_triangleset_setname = mLibrary.getFunction("lib3mf_triangleset_setname"); + lib3mf_triangleset_getname = mLibrary.getFunction("lib3mf_triangleset_getname"); + lib3mf_triangleset_setidentifier = mLibrary.getFunction("lib3mf_triangleset_setidentifier"); + lib3mf_triangleset_getidentifier = mLibrary.getFunction("lib3mf_triangleset_getidentifier"); + lib3mf_triangleset_addtriangle = mLibrary.getFunction("lib3mf_triangleset_addtriangle"); + lib3mf_triangleset_removetriangle = mLibrary.getFunction("lib3mf_triangleset_removetriangle"); + lib3mf_triangleset_clear = mLibrary.getFunction("lib3mf_triangleset_clear"); + lib3mf_triangleset_settrianglelist = mLibrary.getFunction("lib3mf_triangleset_settrianglelist"); + lib3mf_triangleset_gettrianglelist = mLibrary.getFunction("lib3mf_triangleset_gettrianglelist"); + lib3mf_triangleset_addtrianglelist = mLibrary.getFunction("lib3mf_triangleset_addtrianglelist"); + lib3mf_triangleset_merge = mLibrary.getFunction("lib3mf_triangleset_merge"); + lib3mf_triangleset_deleteset = mLibrary.getFunction("lib3mf_triangleset_deleteset"); + lib3mf_triangleset_duplicate = mLibrary.getFunction("lib3mf_triangleset_duplicate"); + lib3mf_object_gettype = mLibrary.getFunction("lib3mf_object_gettype"); + lib3mf_object_settype = mLibrary.getFunction("lib3mf_object_settype"); + lib3mf_object_getname = mLibrary.getFunction("lib3mf_object_getname"); + lib3mf_object_setname = mLibrary.getFunction("lib3mf_object_setname"); + lib3mf_object_getpartnumber = mLibrary.getFunction("lib3mf_object_getpartnumber"); + lib3mf_object_setpartnumber = mLibrary.getFunction("lib3mf_object_setpartnumber"); + lib3mf_object_ismeshobject = mLibrary.getFunction("lib3mf_object_ismeshobject"); + lib3mf_object_iscomponentsobject = mLibrary.getFunction("lib3mf_object_iscomponentsobject"); + lib3mf_object_islevelsetobject = mLibrary.getFunction("lib3mf_object_islevelsetobject"); + lib3mf_object_isvalid = mLibrary.getFunction("lib3mf_object_isvalid"); + lib3mf_object_setattachmentasthumbnail = mLibrary.getFunction("lib3mf_object_setattachmentasthumbnail"); + lib3mf_object_getthumbnailattachment = mLibrary.getFunction("lib3mf_object_getthumbnailattachment"); + lib3mf_object_clearthumbnailattachment = mLibrary.getFunction("lib3mf_object_clearthumbnailattachment"); + lib3mf_object_getoutbox = mLibrary.getFunction("lib3mf_object_getoutbox"); + lib3mf_object_getuuid = mLibrary.getFunction("lib3mf_object_getuuid"); + lib3mf_object_setuuid = mLibrary.getFunction("lib3mf_object_setuuid"); + lib3mf_object_getmetadatagroup = mLibrary.getFunction("lib3mf_object_getmetadatagroup"); + lib3mf_object_setslicesmeshresolution = mLibrary.getFunction("lib3mf_object_setslicesmeshresolution"); + lib3mf_object_getslicesmeshresolution = mLibrary.getFunction("lib3mf_object_getslicesmeshresolution"); + lib3mf_object_hasslices = mLibrary.getFunction("lib3mf_object_hasslices"); + lib3mf_object_clearslicestack = mLibrary.getFunction("lib3mf_object_clearslicestack"); + lib3mf_object_getslicestack = mLibrary.getFunction("lib3mf_object_getslicestack"); + lib3mf_object_assignslicestack = mLibrary.getFunction("lib3mf_object_assignslicestack"); + lib3mf_meshobject_getvertexcount = mLibrary.getFunction("lib3mf_meshobject_getvertexcount"); + lib3mf_meshobject_gettrianglecount = mLibrary.getFunction("lib3mf_meshobject_gettrianglecount"); + lib3mf_meshobject_getvertex = mLibrary.getFunction("lib3mf_meshobject_getvertex"); + lib3mf_meshobject_setvertex = mLibrary.getFunction("lib3mf_meshobject_setvertex"); + lib3mf_meshobject_addvertex = mLibrary.getFunction("lib3mf_meshobject_addvertex"); + lib3mf_meshobject_getvertices = mLibrary.getFunction("lib3mf_meshobject_getvertices"); + lib3mf_meshobject_gettriangle = mLibrary.getFunction("lib3mf_meshobject_gettriangle"); + lib3mf_meshobject_settriangle = mLibrary.getFunction("lib3mf_meshobject_settriangle"); + lib3mf_meshobject_addtriangle = mLibrary.getFunction("lib3mf_meshobject_addtriangle"); + lib3mf_meshobject_gettriangleindices = mLibrary.getFunction("lib3mf_meshobject_gettriangleindices"); + lib3mf_meshobject_setobjectlevelproperty = mLibrary.getFunction("lib3mf_meshobject_setobjectlevelproperty"); + lib3mf_meshobject_getobjectlevelproperty = mLibrary.getFunction("lib3mf_meshobject_getobjectlevelproperty"); + lib3mf_meshobject_settriangleproperties = mLibrary.getFunction("lib3mf_meshobject_settriangleproperties"); + lib3mf_meshobject_gettriangleproperties = mLibrary.getFunction("lib3mf_meshobject_gettriangleproperties"); + lib3mf_meshobject_setalltriangleproperties = mLibrary.getFunction("lib3mf_meshobject_setalltriangleproperties"); + lib3mf_meshobject_getalltriangleproperties = mLibrary.getFunction("lib3mf_meshobject_getalltriangleproperties"); + lib3mf_meshobject_clearallproperties = mLibrary.getFunction("lib3mf_meshobject_clearallproperties"); + lib3mf_meshobject_setgeometry = mLibrary.getFunction("lib3mf_meshobject_setgeometry"); + lib3mf_meshobject_ismanifoldandoriented = mLibrary.getFunction("lib3mf_meshobject_ismanifoldandoriented"); + lib3mf_meshobject_beamlattice = mLibrary.getFunction("lib3mf_meshobject_beamlattice"); + lib3mf_meshobject_getvolumedata = mLibrary.getFunction("lib3mf_meshobject_getvolumedata"); + lib3mf_meshobject_setvolumedata = mLibrary.getFunction("lib3mf_meshobject_setvolumedata"); + lib3mf_meshobject_addtriangleset = mLibrary.getFunction("lib3mf_meshobject_addtriangleset"); + lib3mf_meshobject_hastriangleset = mLibrary.getFunction("lib3mf_meshobject_hastriangleset"); + lib3mf_meshobject_findtriangleset = mLibrary.getFunction("lib3mf_meshobject_findtriangleset"); + lib3mf_meshobject_gettrianglesetcount = mLibrary.getFunction("lib3mf_meshobject_gettrianglesetcount"); + lib3mf_meshobject_gettriangleset = mLibrary.getFunction("lib3mf_meshobject_gettriangleset"); + lib3mf_levelset_getfunction = mLibrary.getFunction("lib3mf_levelset_getfunction"); + lib3mf_levelset_setfunction = mLibrary.getFunction("lib3mf_levelset_setfunction"); + lib3mf_levelset_gettransform = mLibrary.getFunction("lib3mf_levelset_gettransform"); + lib3mf_levelset_settransform = mLibrary.getFunction("lib3mf_levelset_settransform"); + lib3mf_levelset_getchannelname = mLibrary.getFunction("lib3mf_levelset_getchannelname"); + lib3mf_levelset_setchannelname = mLibrary.getFunction("lib3mf_levelset_setchannelname"); + lib3mf_levelset_setminfeaturesize = mLibrary.getFunction("lib3mf_levelset_setminfeaturesize"); + lib3mf_levelset_getminfeaturesize = mLibrary.getFunction("lib3mf_levelset_getminfeaturesize"); + lib3mf_levelset_setfallbackvalue = mLibrary.getFunction("lib3mf_levelset_setfallbackvalue"); + lib3mf_levelset_getfallbackvalue = mLibrary.getFunction("lib3mf_levelset_getfallbackvalue"); + lib3mf_levelset_setmeshbboxonly = mLibrary.getFunction("lib3mf_levelset_setmeshbboxonly"); + lib3mf_levelset_getmeshbboxonly = mLibrary.getFunction("lib3mf_levelset_getmeshbboxonly"); + lib3mf_levelset_setmesh = mLibrary.getFunction("lib3mf_levelset_setmesh"); + lib3mf_levelset_getmesh = mLibrary.getFunction("lib3mf_levelset_getmesh"); + lib3mf_levelset_getvolumedata = mLibrary.getFunction("lib3mf_levelset_getvolumedata"); + lib3mf_levelset_setvolumedata = mLibrary.getFunction("lib3mf_levelset_setvolumedata"); + lib3mf_beamlattice_getminlength = mLibrary.getFunction("lib3mf_beamlattice_getminlength"); + lib3mf_beamlattice_setminlength = mLibrary.getFunction("lib3mf_beamlattice_setminlength"); + lib3mf_beamlattice_getclipping = mLibrary.getFunction("lib3mf_beamlattice_getclipping"); + lib3mf_beamlattice_setclipping = mLibrary.getFunction("lib3mf_beamlattice_setclipping"); + lib3mf_beamlattice_getrepresentation = mLibrary.getFunction("lib3mf_beamlattice_getrepresentation"); + lib3mf_beamlattice_setrepresentation = mLibrary.getFunction("lib3mf_beamlattice_setrepresentation"); + lib3mf_beamlattice_getballoptions = mLibrary.getFunction("lib3mf_beamlattice_getballoptions"); + lib3mf_beamlattice_setballoptions = mLibrary.getFunction("lib3mf_beamlattice_setballoptions"); + lib3mf_beamlattice_getbeamcount = mLibrary.getFunction("lib3mf_beamlattice_getbeamcount"); + lib3mf_beamlattice_getbeam = mLibrary.getFunction("lib3mf_beamlattice_getbeam"); + lib3mf_beamlattice_addbeam = mLibrary.getFunction("lib3mf_beamlattice_addbeam"); + lib3mf_beamlattice_setbeam = mLibrary.getFunction("lib3mf_beamlattice_setbeam"); + lib3mf_beamlattice_setbeams = mLibrary.getFunction("lib3mf_beamlattice_setbeams"); + lib3mf_beamlattice_getbeams = mLibrary.getFunction("lib3mf_beamlattice_getbeams"); + lib3mf_beamlattice_getballcount = mLibrary.getFunction("lib3mf_beamlattice_getballcount"); + lib3mf_beamlattice_getball = mLibrary.getFunction("lib3mf_beamlattice_getball"); + lib3mf_beamlattice_addball = mLibrary.getFunction("lib3mf_beamlattice_addball"); + lib3mf_beamlattice_setball = mLibrary.getFunction("lib3mf_beamlattice_setball"); + lib3mf_beamlattice_setballs = mLibrary.getFunction("lib3mf_beamlattice_setballs"); + lib3mf_beamlattice_getballs = mLibrary.getFunction("lib3mf_beamlattice_getballs"); + lib3mf_beamlattice_getbeamsetcount = mLibrary.getFunction("lib3mf_beamlattice_getbeamsetcount"); + lib3mf_beamlattice_addbeamset = mLibrary.getFunction("lib3mf_beamlattice_addbeamset"); + lib3mf_beamlattice_getbeamset = mLibrary.getFunction("lib3mf_beamlattice_getbeamset"); + lib3mf_functionreference_getfunctionresourceid = mLibrary.getFunction("lib3mf_functionreference_getfunctionresourceid"); + lib3mf_functionreference_setfunctionresourceid = mLibrary.getFunction("lib3mf_functionreference_setfunctionresourceid"); + lib3mf_functionreference_gettransform = mLibrary.getFunction("lib3mf_functionreference_gettransform"); + lib3mf_functionreference_settransform = mLibrary.getFunction("lib3mf_functionreference_settransform"); + lib3mf_functionreference_getchannelname = mLibrary.getFunction("lib3mf_functionreference_getchannelname"); + lib3mf_functionreference_setchannelname = mLibrary.getFunction("lib3mf_functionreference_setchannelname"); + lib3mf_functionreference_setminfeaturesize = mLibrary.getFunction("lib3mf_functionreference_setminfeaturesize"); + lib3mf_functionreference_getminfeaturesize = mLibrary.getFunction("lib3mf_functionreference_getminfeaturesize"); + lib3mf_functionreference_setfallbackvalue = mLibrary.getFunction("lib3mf_functionreference_setfallbackvalue"); + lib3mf_functionreference_getfallbackvalue = mLibrary.getFunction("lib3mf_functionreference_getfallbackvalue"); + lib3mf_volumedatacomposite_getbasematerialgroup = mLibrary.getFunction("lib3mf_volumedatacomposite_getbasematerialgroup"); + lib3mf_volumedatacomposite_setbasematerialgroup = mLibrary.getFunction("lib3mf_volumedatacomposite_setbasematerialgroup"); + lib3mf_volumedatacomposite_getmaterialmappingcount = mLibrary.getFunction("lib3mf_volumedatacomposite_getmaterialmappingcount"); + lib3mf_volumedatacomposite_getmaterialmapping = mLibrary.getFunction("lib3mf_volumedatacomposite_getmaterialmapping"); + lib3mf_volumedatacomposite_addmaterialmapping = mLibrary.getFunction("lib3mf_volumedatacomposite_addmaterialmapping"); + lib3mf_volumedatacomposite_removematerialmapping = mLibrary.getFunction("lib3mf_volumedatacomposite_removematerialmapping"); + lib3mf_volumedataproperty_getname = mLibrary.getFunction("lib3mf_volumedataproperty_getname"); + lib3mf_volumedataproperty_setisrequired = mLibrary.getFunction("lib3mf_volumedataproperty_setisrequired"); + lib3mf_volumedataproperty_isrequired = mLibrary.getFunction("lib3mf_volumedataproperty_isrequired"); + lib3mf_volumedata_getcomposite = mLibrary.getFunction("lib3mf_volumedata_getcomposite"); + lib3mf_volumedata_createnewcomposite = mLibrary.getFunction("lib3mf_volumedata_createnewcomposite"); + lib3mf_volumedata_removecomposite = mLibrary.getFunction("lib3mf_volumedata_removecomposite"); + lib3mf_volumedata_getcolor = mLibrary.getFunction("lib3mf_volumedata_getcolor"); + lib3mf_volumedata_createnewcolor = mLibrary.getFunction("lib3mf_volumedata_createnewcolor"); + lib3mf_volumedata_removecolor = mLibrary.getFunction("lib3mf_volumedata_removecolor"); + lib3mf_volumedata_getpropertycount = mLibrary.getFunction("lib3mf_volumedata_getpropertycount"); + lib3mf_volumedata_getproperty = mLibrary.getFunction("lib3mf_volumedata_getproperty"); + lib3mf_volumedata_addpropertyfromfunction = mLibrary.getFunction("lib3mf_volumedata_addpropertyfromfunction"); + lib3mf_volumedata_removeproperty = mLibrary.getFunction("lib3mf_volumedata_removeproperty"); + lib3mf_component_getobjectresource = mLibrary.getFunction("lib3mf_component_getobjectresource"); + lib3mf_component_getobjectresourceid = mLibrary.getFunction("lib3mf_component_getobjectresourceid"); + lib3mf_component_getuuid = mLibrary.getFunction("lib3mf_component_getuuid"); + lib3mf_component_setuuid = mLibrary.getFunction("lib3mf_component_setuuid"); + lib3mf_component_hastransform = mLibrary.getFunction("lib3mf_component_hastransform"); + lib3mf_component_gettransform = mLibrary.getFunction("lib3mf_component_gettransform"); + lib3mf_component_settransform = mLibrary.getFunction("lib3mf_component_settransform"); + lib3mf_componentsobject_addcomponent = mLibrary.getFunction("lib3mf_componentsobject_addcomponent"); + lib3mf_componentsobject_getcomponent = mLibrary.getFunction("lib3mf_componentsobject_getcomponent"); + lib3mf_componentsobject_getcomponentcount = mLibrary.getFunction("lib3mf_componentsobject_getcomponentcount"); + lib3mf_beamset_setname = mLibrary.getFunction("lib3mf_beamset_setname"); + lib3mf_beamset_getname = mLibrary.getFunction("lib3mf_beamset_getname"); + lib3mf_beamset_setidentifier = mLibrary.getFunction("lib3mf_beamset_setidentifier"); + lib3mf_beamset_getidentifier = mLibrary.getFunction("lib3mf_beamset_getidentifier"); + lib3mf_beamset_getreferencecount = mLibrary.getFunction("lib3mf_beamset_getreferencecount"); + lib3mf_beamset_setreferences = mLibrary.getFunction("lib3mf_beamset_setreferences"); + lib3mf_beamset_getreferences = mLibrary.getFunction("lib3mf_beamset_getreferences"); + lib3mf_beamset_getballreferencecount = mLibrary.getFunction("lib3mf_beamset_getballreferencecount"); + lib3mf_beamset_setballreferences = mLibrary.getFunction("lib3mf_beamset_setballreferences"); + lib3mf_beamset_getballreferences = mLibrary.getFunction("lib3mf_beamset_getballreferences"); + lib3mf_basematerialgroup_getcount = mLibrary.getFunction("lib3mf_basematerialgroup_getcount"); + lib3mf_basematerialgroup_getallpropertyids = mLibrary.getFunction("lib3mf_basematerialgroup_getallpropertyids"); + lib3mf_basematerialgroup_addmaterial = mLibrary.getFunction("lib3mf_basematerialgroup_addmaterial"); + lib3mf_basematerialgroup_removematerial = mLibrary.getFunction("lib3mf_basematerialgroup_removematerial"); + lib3mf_basematerialgroup_getname = mLibrary.getFunction("lib3mf_basematerialgroup_getname"); + lib3mf_basematerialgroup_setname = mLibrary.getFunction("lib3mf_basematerialgroup_setname"); + lib3mf_basematerialgroup_setdisplaycolor = mLibrary.getFunction("lib3mf_basematerialgroup_setdisplaycolor"); + lib3mf_basematerialgroup_getdisplaycolor = mLibrary.getFunction("lib3mf_basematerialgroup_getdisplaycolor"); + lib3mf_colorgroup_getcount = mLibrary.getFunction("lib3mf_colorgroup_getcount"); + lib3mf_colorgroup_getallpropertyids = mLibrary.getFunction("lib3mf_colorgroup_getallpropertyids"); + lib3mf_colorgroup_addcolor = mLibrary.getFunction("lib3mf_colorgroup_addcolor"); + lib3mf_colorgroup_removecolor = mLibrary.getFunction("lib3mf_colorgroup_removecolor"); + lib3mf_colorgroup_setcolor = mLibrary.getFunction("lib3mf_colorgroup_setcolor"); + lib3mf_colorgroup_getcolor = mLibrary.getFunction("lib3mf_colorgroup_getcolor"); + lib3mf_texture2dgroup_getcount = mLibrary.getFunction("lib3mf_texture2dgroup_getcount"); + lib3mf_texture2dgroup_getallpropertyids = mLibrary.getFunction("lib3mf_texture2dgroup_getallpropertyids"); + lib3mf_texture2dgroup_addtex2coord = mLibrary.getFunction("lib3mf_texture2dgroup_addtex2coord"); + lib3mf_texture2dgroup_gettex2coord = mLibrary.getFunction("lib3mf_texture2dgroup_gettex2coord"); + lib3mf_texture2dgroup_removetex2coord = mLibrary.getFunction("lib3mf_texture2dgroup_removetex2coord"); + lib3mf_texture2dgroup_gettexture2d = mLibrary.getFunction("lib3mf_texture2dgroup_gettexture2d"); + lib3mf_compositematerials_getcount = mLibrary.getFunction("lib3mf_compositematerials_getcount"); + lib3mf_compositematerials_getallpropertyids = mLibrary.getFunction("lib3mf_compositematerials_getallpropertyids"); + lib3mf_compositematerials_getbasematerialgroup = mLibrary.getFunction("lib3mf_compositematerials_getbasematerialgroup"); + lib3mf_compositematerials_addcomposite = mLibrary.getFunction("lib3mf_compositematerials_addcomposite"); + lib3mf_compositematerials_removecomposite = mLibrary.getFunction("lib3mf_compositematerials_removecomposite"); + lib3mf_compositematerials_getcomposite = mLibrary.getFunction("lib3mf_compositematerials_getcomposite"); + lib3mf_multipropertygroup_getcount = mLibrary.getFunction("lib3mf_multipropertygroup_getcount"); + lib3mf_multipropertygroup_getallpropertyids = mLibrary.getFunction("lib3mf_multipropertygroup_getallpropertyids"); + lib3mf_multipropertygroup_addmultiproperty = mLibrary.getFunction("lib3mf_multipropertygroup_addmultiproperty"); + lib3mf_multipropertygroup_setmultiproperty = mLibrary.getFunction("lib3mf_multipropertygroup_setmultiproperty"); + lib3mf_multipropertygroup_getmultiproperty = mLibrary.getFunction("lib3mf_multipropertygroup_getmultiproperty"); + lib3mf_multipropertygroup_removemultiproperty = mLibrary.getFunction("lib3mf_multipropertygroup_removemultiproperty"); + lib3mf_multipropertygroup_getlayercount = mLibrary.getFunction("lib3mf_multipropertygroup_getlayercount"); + lib3mf_multipropertygroup_addlayer = mLibrary.getFunction("lib3mf_multipropertygroup_addlayer"); + lib3mf_multipropertygroup_getlayer = mLibrary.getFunction("lib3mf_multipropertygroup_getlayer"); + lib3mf_multipropertygroup_removelayer = mLibrary.getFunction("lib3mf_multipropertygroup_removelayer"); + lib3mf_image3d_getname = mLibrary.getFunction("lib3mf_image3d_getname"); + lib3mf_image3d_setname = mLibrary.getFunction("lib3mf_image3d_setname"); + lib3mf_image3d_isimagestack = mLibrary.getFunction("lib3mf_image3d_isimagestack"); + lib3mf_imagestack_getrowcount = mLibrary.getFunction("lib3mf_imagestack_getrowcount"); + lib3mf_imagestack_setrowcount = mLibrary.getFunction("lib3mf_imagestack_setrowcount"); + lib3mf_imagestack_getcolumncount = mLibrary.getFunction("lib3mf_imagestack_getcolumncount"); + lib3mf_imagestack_setcolumncount = mLibrary.getFunction("lib3mf_imagestack_setcolumncount"); + lib3mf_imagestack_getsheetcount = mLibrary.getFunction("lib3mf_imagestack_getsheetcount"); + lib3mf_imagestack_getsheet = mLibrary.getFunction("lib3mf_imagestack_getsheet"); + lib3mf_imagestack_setsheet = mLibrary.getFunction("lib3mf_imagestack_setsheet"); + lib3mf_imagestack_createemptysheet = mLibrary.getFunction("lib3mf_imagestack_createemptysheet"); + lib3mf_imagestack_createsheetfrombuffer = mLibrary.getFunction("lib3mf_imagestack_createsheetfrombuffer"); + lib3mf_imagestack_createsheetfromfile = mLibrary.getFunction("lib3mf_imagestack_createsheetfromfile"); + lib3mf_attachment_getpath = mLibrary.getFunction("lib3mf_attachment_getpath"); + lib3mf_attachment_setpath = mLibrary.getFunction("lib3mf_attachment_setpath"); + lib3mf_attachment_packagepart = mLibrary.getFunction("lib3mf_attachment_packagepart"); + lib3mf_attachment_getrelationshiptype = mLibrary.getFunction("lib3mf_attachment_getrelationshiptype"); + lib3mf_attachment_setrelationshiptype = mLibrary.getFunction("lib3mf_attachment_setrelationshiptype"); + lib3mf_attachment_writetofile = mLibrary.getFunction("lib3mf_attachment_writetofile"); + lib3mf_attachment_readfromfile = mLibrary.getFunction("lib3mf_attachment_readfromfile"); + lib3mf_attachment_readfromcallback = mLibrary.getFunction("lib3mf_attachment_readfromcallback"); + lib3mf_attachment_getstreamsize = mLibrary.getFunction("lib3mf_attachment_getstreamsize"); + lib3mf_attachment_writetobuffer = mLibrary.getFunction("lib3mf_attachment_writetobuffer"); + lib3mf_attachment_readfrombuffer = mLibrary.getFunction("lib3mf_attachment_readfrombuffer"); + lib3mf_texture2d_getattachment = mLibrary.getFunction("lib3mf_texture2d_getattachment"); + lib3mf_texture2d_setattachment = mLibrary.getFunction("lib3mf_texture2d_setattachment"); + lib3mf_texture2d_getcontenttype = mLibrary.getFunction("lib3mf_texture2d_getcontenttype"); + lib3mf_texture2d_setcontenttype = mLibrary.getFunction("lib3mf_texture2d_setcontenttype"); + lib3mf_texture2d_gettilestyleuv = mLibrary.getFunction("lib3mf_texture2d_gettilestyleuv"); + lib3mf_texture2d_settilestyleuv = mLibrary.getFunction("lib3mf_texture2d_settilestyleuv"); + lib3mf_texture2d_getfilter = mLibrary.getFunction("lib3mf_texture2d_getfilter"); + lib3mf_texture2d_setfilter = mLibrary.getFunction("lib3mf_texture2d_setfilter"); + lib3mf_implicitport_getidentifier = mLibrary.getFunction("lib3mf_implicitport_getidentifier"); + lib3mf_implicitport_setidentifier = mLibrary.getFunction("lib3mf_implicitport_setidentifier"); + lib3mf_implicitport_getdisplayname = mLibrary.getFunction("lib3mf_implicitport_getdisplayname"); + lib3mf_implicitport_setdisplayname = mLibrary.getFunction("lib3mf_implicitport_setdisplayname"); + lib3mf_implicitport_settype = mLibrary.getFunction("lib3mf_implicitport_settype"); + lib3mf_implicitport_gettype = mLibrary.getFunction("lib3mf_implicitport_gettype"); + lib3mf_implicitport_getreference = mLibrary.getFunction("lib3mf_implicitport_getreference"); + lib3mf_implicitport_setreference = mLibrary.getFunction("lib3mf_implicitport_setreference"); + lib3mf_iterator_movenext = mLibrary.getFunction("lib3mf_iterator_movenext"); + lib3mf_iterator_moveprevious = mLibrary.getFunction("lib3mf_iterator_moveprevious"); + lib3mf_iterator_count = mLibrary.getFunction("lib3mf_iterator_count"); + lib3mf_implicitportiterator_getcurrent = mLibrary.getFunction("lib3mf_implicitportiterator_getcurrent"); + lib3mf_implicitnode_getidentifier = mLibrary.getFunction("lib3mf_implicitnode_getidentifier"); + lib3mf_implicitnode_setidentifier = mLibrary.getFunction("lib3mf_implicitnode_setidentifier"); + lib3mf_implicitnode_getdisplayname = mLibrary.getFunction("lib3mf_implicitnode_getdisplayname"); + lib3mf_implicitnode_setdisplayname = mLibrary.getFunction("lib3mf_implicitnode_setdisplayname"); + lib3mf_implicitnode_gettag = mLibrary.getFunction("lib3mf_implicitnode_gettag"); + lib3mf_implicitnode_settag = mLibrary.getFunction("lib3mf_implicitnode_settag"); + lib3mf_implicitnode_getnodetype = mLibrary.getFunction("lib3mf_implicitnode_getnodetype"); + lib3mf_implicitnode_addinput = mLibrary.getFunction("lib3mf_implicitnode_addinput"); + lib3mf_implicitnode_getinputs = mLibrary.getFunction("lib3mf_implicitnode_getinputs"); + lib3mf_implicitnode_addoutput = mLibrary.getFunction("lib3mf_implicitnode_addoutput"); + lib3mf_implicitnode_getoutputs = mLibrary.getFunction("lib3mf_implicitnode_getoutputs"); + lib3mf_implicitnode_findinput = mLibrary.getFunction("lib3mf_implicitnode_findinput"); + lib3mf_implicitnode_findoutput = mLibrary.getFunction("lib3mf_implicitnode_findoutput"); + lib3mf_implicitnode_aretypesvalid = mLibrary.getFunction("lib3mf_implicitnode_aretypesvalid"); + lib3mf_oneinputnode_getinputa = mLibrary.getFunction("lib3mf_oneinputnode_getinputa"); + lib3mf_oneinputnode_getoutputresult = mLibrary.getFunction("lib3mf_oneinputnode_getoutputresult"); + lib3mf_resourceidnode_setresource = mLibrary.getFunction("lib3mf_resourceidnode_setresource"); + lib3mf_resourceidnode_getresource = mLibrary.getFunction("lib3mf_resourceidnode_getresource"); + lib3mf_resourceidnode_getoutputvalue = mLibrary.getFunction("lib3mf_resourceidnode_getoutputvalue"); + lib3mf_twoinputnode_getinputb = mLibrary.getFunction("lib3mf_twoinputnode_getinputb"); + lib3mf_selectnode_getinputb = mLibrary.getFunction("lib3mf_selectnode_getinputb"); + lib3mf_selectnode_getinputc = mLibrary.getFunction("lib3mf_selectnode_getinputc"); + lib3mf_selectnode_getinputd = mLibrary.getFunction("lib3mf_selectnode_getinputd"); + lib3mf_clampnode_getinputmin = mLibrary.getFunction("lib3mf_clampnode_getinputmin"); + lib3mf_clampnode_getinputmax = mLibrary.getFunction("lib3mf_clampnode_getinputmax"); + lib3mf_composevectornode_getinputx = mLibrary.getFunction("lib3mf_composevectornode_getinputx"); + lib3mf_composevectornode_getinputy = mLibrary.getFunction("lib3mf_composevectornode_getinputy"); + lib3mf_composevectornode_getinputz = mLibrary.getFunction("lib3mf_composevectornode_getinputz"); + lib3mf_composevectornode_getoutputresult = mLibrary.getFunction("lib3mf_composevectornode_getoutputresult"); + lib3mf_decomposevectornode_getinputa = mLibrary.getFunction("lib3mf_decomposevectornode_getinputa"); + lib3mf_decomposevectornode_getoutputx = mLibrary.getFunction("lib3mf_decomposevectornode_getoutputx"); + lib3mf_decomposevectornode_getoutputy = mLibrary.getFunction("lib3mf_decomposevectornode_getoutputy"); + lib3mf_decomposevectornode_getoutputz = mLibrary.getFunction("lib3mf_decomposevectornode_getoutputz"); + lib3mf_composematrixnode_getinputm00 = mLibrary.getFunction("lib3mf_composematrixnode_getinputm00"); + lib3mf_composematrixnode_getinputm01 = mLibrary.getFunction("lib3mf_composematrixnode_getinputm01"); + lib3mf_composematrixnode_getinputm02 = mLibrary.getFunction("lib3mf_composematrixnode_getinputm02"); + lib3mf_composematrixnode_getinputm03 = mLibrary.getFunction("lib3mf_composematrixnode_getinputm03"); + lib3mf_composematrixnode_getinputm10 = mLibrary.getFunction("lib3mf_composematrixnode_getinputm10"); + lib3mf_composematrixnode_getinputm11 = mLibrary.getFunction("lib3mf_composematrixnode_getinputm11"); + lib3mf_composematrixnode_getinputm12 = mLibrary.getFunction("lib3mf_composematrixnode_getinputm12"); + lib3mf_composematrixnode_getinputm13 = mLibrary.getFunction("lib3mf_composematrixnode_getinputm13"); + lib3mf_composematrixnode_getinputm20 = mLibrary.getFunction("lib3mf_composematrixnode_getinputm20"); + lib3mf_composematrixnode_getinputm21 = mLibrary.getFunction("lib3mf_composematrixnode_getinputm21"); + lib3mf_composematrixnode_getinputm22 = mLibrary.getFunction("lib3mf_composematrixnode_getinputm22"); + lib3mf_composematrixnode_getinputm23 = mLibrary.getFunction("lib3mf_composematrixnode_getinputm23"); + lib3mf_composematrixnode_getinputm30 = mLibrary.getFunction("lib3mf_composematrixnode_getinputm30"); + lib3mf_composematrixnode_getinputm31 = mLibrary.getFunction("lib3mf_composematrixnode_getinputm31"); + lib3mf_composematrixnode_getinputm32 = mLibrary.getFunction("lib3mf_composematrixnode_getinputm32"); + lib3mf_composematrixnode_getinputm33 = mLibrary.getFunction("lib3mf_composematrixnode_getinputm33"); + lib3mf_composematrixnode_getoutputresult = mLibrary.getFunction("lib3mf_composematrixnode_getoutputresult"); + lib3mf_matrixfromrowsnode_getinputa = mLibrary.getFunction("lib3mf_matrixfromrowsnode_getinputa"); + lib3mf_matrixfromrowsnode_getinputb = mLibrary.getFunction("lib3mf_matrixfromrowsnode_getinputb"); + lib3mf_matrixfromrowsnode_getinputc = mLibrary.getFunction("lib3mf_matrixfromrowsnode_getinputc"); + lib3mf_matrixfromrowsnode_getinputd = mLibrary.getFunction("lib3mf_matrixfromrowsnode_getinputd"); + lib3mf_matrixfromrowsnode_getoutputresult = mLibrary.getFunction("lib3mf_matrixfromrowsnode_getoutputresult"); + lib3mf_matrixfromcolumnsnode_getinputa = mLibrary.getFunction("lib3mf_matrixfromcolumnsnode_getinputa"); + lib3mf_matrixfromcolumnsnode_getinputb = mLibrary.getFunction("lib3mf_matrixfromcolumnsnode_getinputb"); + lib3mf_matrixfromcolumnsnode_getinputc = mLibrary.getFunction("lib3mf_matrixfromcolumnsnode_getinputc"); + lib3mf_matrixfromcolumnsnode_getinputd = mLibrary.getFunction("lib3mf_matrixfromcolumnsnode_getinputd"); + lib3mf_matrixfromcolumnsnode_getoutputresult = mLibrary.getFunction("lib3mf_matrixfromcolumnsnode_getoutputresult"); + lib3mf_constantnode_setconstant = mLibrary.getFunction("lib3mf_constantnode_setconstant"); + lib3mf_constantnode_getconstant = mLibrary.getFunction("lib3mf_constantnode_getconstant"); + lib3mf_constantnode_getoutputvalue = mLibrary.getFunction("lib3mf_constantnode_getoutputvalue"); + lib3mf_constvecnode_setvector = mLibrary.getFunction("lib3mf_constvecnode_setvector"); + lib3mf_constvecnode_getvector = mLibrary.getFunction("lib3mf_constvecnode_getvector"); + lib3mf_constvecnode_getoutputvector = mLibrary.getFunction("lib3mf_constvecnode_getoutputvector"); + lib3mf_constmatnode_setmatrix = mLibrary.getFunction("lib3mf_constmatnode_setmatrix"); + lib3mf_constmatnode_getmatrix = mLibrary.getFunction("lib3mf_constmatnode_getmatrix"); + lib3mf_constmatnode_getoutputmatrix = mLibrary.getFunction("lib3mf_constmatnode_getoutputmatrix"); + lib3mf_meshnode_getinputmesh = mLibrary.getFunction("lib3mf_meshnode_getinputmesh"); + lib3mf_meshnode_getinputpos = mLibrary.getFunction("lib3mf_meshnode_getinputpos"); + lib3mf_meshnode_getoutputdistance = mLibrary.getFunction("lib3mf_meshnode_getoutputdistance"); + lib3mf_unsignedmeshnode_getinputmesh = mLibrary.getFunction("lib3mf_unsignedmeshnode_getinputmesh"); + lib3mf_unsignedmeshnode_getinputpos = mLibrary.getFunction("lib3mf_unsignedmeshnode_getinputpos"); + lib3mf_unsignedmeshnode_getoutputdistance = mLibrary.getFunction("lib3mf_unsignedmeshnode_getoutputdistance"); + lib3mf_beamlatticenode_getinputbeamlattice = mLibrary.getFunction("lib3mf_beamlatticenode_getinputbeamlattice"); + lib3mf_beamlatticenode_getinputpos = mLibrary.getFunction("lib3mf_beamlatticenode_getinputpos"); + lib3mf_beamlatticenode_getoutputdistance = mLibrary.getFunction("lib3mf_beamlatticenode_getoutputdistance"); + lib3mf_beamlatticenode_setaccuraterange = mLibrary.getFunction("lib3mf_beamlatticenode_setaccuraterange"); + lib3mf_beamlatticenode_getaccuraterange = mLibrary.getFunction("lib3mf_beamlatticenode_getaccuraterange"); + lib3mf_functiongradientnode_getinputfunctionid = mLibrary.getFunction("lib3mf_functiongradientnode_getinputfunctionid"); + lib3mf_functiongradientnode_getinputpos = mLibrary.getFunction("lib3mf_functiongradientnode_getinputpos"); + lib3mf_functiongradientnode_getinputstep = mLibrary.getFunction("lib3mf_functiongradientnode_getinputstep"); + lib3mf_functiongradientnode_setscalaroutputname = mLibrary.getFunction("lib3mf_functiongradientnode_setscalaroutputname"); + lib3mf_functiongradientnode_getscalaroutputname = mLibrary.getFunction("lib3mf_functiongradientnode_getscalaroutputname"); + lib3mf_functiongradientnode_setvectorinputname = mLibrary.getFunction("lib3mf_functiongradientnode_setvectorinputname"); + lib3mf_functiongradientnode_getvectorinputname = mLibrary.getFunction("lib3mf_functiongradientnode_getvectorinputname"); + lib3mf_functiongradientnode_getoutputvector = mLibrary.getFunction("lib3mf_functiongradientnode_getoutputvector"); + lib3mf_functiongradientnode_getoutputgradient = mLibrary.getFunction("lib3mf_functiongradientnode_getoutputgradient"); + lib3mf_functiongradientnode_getoutputmagnitude = mLibrary.getFunction("lib3mf_functiongradientnode_getoutputmagnitude"); + lib3mf_normalizedistancenode_getinputfunctionid = mLibrary.getFunction("lib3mf_normalizedistancenode_getinputfunctionid"); + lib3mf_normalizedistancenode_getinputpos = mLibrary.getFunction("lib3mf_normalizedistancenode_getinputpos"); + lib3mf_normalizedistancenode_getinputstep = mLibrary.getFunction("lib3mf_normalizedistancenode_getinputstep"); + lib3mf_normalizedistancenode_setscalaroutputname = mLibrary.getFunction("lib3mf_normalizedistancenode_setscalaroutputname"); + lib3mf_normalizedistancenode_getscalaroutputname = mLibrary.getFunction("lib3mf_normalizedistancenode_getscalaroutputname"); + lib3mf_normalizedistancenode_setvectorinputname = mLibrary.getFunction("lib3mf_normalizedistancenode_setvectorinputname"); + lib3mf_normalizedistancenode_getvectorinputname = mLibrary.getFunction("lib3mf_normalizedistancenode_getvectorinputname"); + lib3mf_normalizedistancenode_getoutputresult = mLibrary.getFunction("lib3mf_normalizedistancenode_getoutputresult"); + lib3mf_functioncallnode_getinputfunctionid = mLibrary.getFunction("lib3mf_functioncallnode_getinputfunctionid"); + lib3mf_nodeiterator_getcurrent = mLibrary.getFunction("lib3mf_nodeiterator_getcurrent"); + lib3mf_function_getdisplayname = mLibrary.getFunction("lib3mf_function_getdisplayname"); + lib3mf_function_setdisplayname = mLibrary.getFunction("lib3mf_function_setdisplayname"); + lib3mf_function_addinput = mLibrary.getFunction("lib3mf_function_addinput"); + lib3mf_function_getinputs = mLibrary.getFunction("lib3mf_function_getinputs"); + lib3mf_function_removeinput = mLibrary.getFunction("lib3mf_function_removeinput"); + lib3mf_function_addoutput = mLibrary.getFunction("lib3mf_function_addoutput"); + lib3mf_function_getoutputs = mLibrary.getFunction("lib3mf_function_getoutputs"); + lib3mf_function_removeoutput = mLibrary.getFunction("lib3mf_function_removeoutput"); + lib3mf_function_findinput = mLibrary.getFunction("lib3mf_function_findinput"); + lib3mf_function_findoutput = mLibrary.getFunction("lib3mf_function_findoutput"); + lib3mf_implicitfunction_getidentifier = mLibrary.getFunction("lib3mf_implicitfunction_getidentifier"); + lib3mf_implicitfunction_setidentifier = mLibrary.getFunction("lib3mf_implicitfunction_setidentifier"); + lib3mf_implicitfunction_addnode = mLibrary.getFunction("lib3mf_implicitfunction_addnode"); + lib3mf_implicitfunction_addsinnode = mLibrary.getFunction("lib3mf_implicitfunction_addsinnode"); + lib3mf_implicitfunction_addcosnode = mLibrary.getFunction("lib3mf_implicitfunction_addcosnode"); + lib3mf_implicitfunction_addtannode = mLibrary.getFunction("lib3mf_implicitfunction_addtannode"); + lib3mf_implicitfunction_addarcsinnode = mLibrary.getFunction("lib3mf_implicitfunction_addarcsinnode"); + lib3mf_implicitfunction_addarccosnode = mLibrary.getFunction("lib3mf_implicitfunction_addarccosnode"); + lib3mf_implicitfunction_addarctan2node = mLibrary.getFunction("lib3mf_implicitfunction_addarctan2node"); + lib3mf_implicitfunction_addsinhnode = mLibrary.getFunction("lib3mf_implicitfunction_addsinhnode"); + lib3mf_implicitfunction_addcoshnode = mLibrary.getFunction("lib3mf_implicitfunction_addcoshnode"); + lib3mf_implicitfunction_addtanhnode = mLibrary.getFunction("lib3mf_implicitfunction_addtanhnode"); + lib3mf_implicitfunction_addroundnode = mLibrary.getFunction("lib3mf_implicitfunction_addroundnode"); + lib3mf_implicitfunction_addceilnode = mLibrary.getFunction("lib3mf_implicitfunction_addceilnode"); + lib3mf_implicitfunction_addfloornode = mLibrary.getFunction("lib3mf_implicitfunction_addfloornode"); + lib3mf_implicitfunction_addsignnode = mLibrary.getFunction("lib3mf_implicitfunction_addsignnode"); + lib3mf_implicitfunction_addfractnode = mLibrary.getFunction("lib3mf_implicitfunction_addfractnode"); + lib3mf_implicitfunction_addabsnode = mLibrary.getFunction("lib3mf_implicitfunction_addabsnode"); + lib3mf_implicitfunction_addexpnode = mLibrary.getFunction("lib3mf_implicitfunction_addexpnode"); + lib3mf_implicitfunction_addlognode = mLibrary.getFunction("lib3mf_implicitfunction_addlognode"); + lib3mf_implicitfunction_addlog2node = mLibrary.getFunction("lib3mf_implicitfunction_addlog2node"); + lib3mf_implicitfunction_addlog10node = mLibrary.getFunction("lib3mf_implicitfunction_addlog10node"); + lib3mf_implicitfunction_addlengthnode = mLibrary.getFunction("lib3mf_implicitfunction_addlengthnode"); + lib3mf_implicitfunction_addtransposenode = mLibrary.getFunction("lib3mf_implicitfunction_addtransposenode"); + lib3mf_implicitfunction_addinversenode = mLibrary.getFunction("lib3mf_implicitfunction_addinversenode"); + lib3mf_implicitfunction_addsqrtnode = mLibrary.getFunction("lib3mf_implicitfunction_addsqrtnode"); + lib3mf_implicitfunction_addresourceidnode = mLibrary.getFunction("lib3mf_implicitfunction_addresourceidnode"); + lib3mf_implicitfunction_addadditionnode = mLibrary.getFunction("lib3mf_implicitfunction_addadditionnode"); + lib3mf_implicitfunction_addsubtractionnode = mLibrary.getFunction("lib3mf_implicitfunction_addsubtractionnode"); + lib3mf_implicitfunction_addmultiplicationnode = mLibrary.getFunction("lib3mf_implicitfunction_addmultiplicationnode"); + lib3mf_implicitfunction_adddivisionnode = mLibrary.getFunction("lib3mf_implicitfunction_adddivisionnode"); + lib3mf_implicitfunction_adddotnode = mLibrary.getFunction("lib3mf_implicitfunction_adddotnode"); + lib3mf_implicitfunction_addcrossnode = mLibrary.getFunction("lib3mf_implicitfunction_addcrossnode"); + lib3mf_implicitfunction_addmatvecmultiplicationnode = mLibrary.getFunction("lib3mf_implicitfunction_addmatvecmultiplicationnode"); + lib3mf_implicitfunction_addminnode = mLibrary.getFunction("lib3mf_implicitfunction_addminnode"); + lib3mf_implicitfunction_addmaxnode = mLibrary.getFunction("lib3mf_implicitfunction_addmaxnode"); + lib3mf_implicitfunction_addfmodnode = mLibrary.getFunction("lib3mf_implicitfunction_addfmodnode"); + lib3mf_implicitfunction_addpownode = mLibrary.getFunction("lib3mf_implicitfunction_addpownode"); + lib3mf_implicitfunction_addselectnode = mLibrary.getFunction("lib3mf_implicitfunction_addselectnode"); + lib3mf_implicitfunction_addclampnode = mLibrary.getFunction("lib3mf_implicitfunction_addclampnode"); + lib3mf_implicitfunction_addcomposevectornode = mLibrary.getFunction("lib3mf_implicitfunction_addcomposevectornode"); + lib3mf_implicitfunction_addvectorfromscalarnode = mLibrary.getFunction("lib3mf_implicitfunction_addvectorfromscalarnode"); + lib3mf_implicitfunction_adddecomposevectornode = mLibrary.getFunction("lib3mf_implicitfunction_adddecomposevectornode"); + lib3mf_implicitfunction_addcomposematrixnode = mLibrary.getFunction("lib3mf_implicitfunction_addcomposematrixnode"); + lib3mf_implicitfunction_addmatrixfromrowsnode = mLibrary.getFunction("lib3mf_implicitfunction_addmatrixfromrowsnode"); + lib3mf_implicitfunction_addmatrixfromcolumnsnode = mLibrary.getFunction("lib3mf_implicitfunction_addmatrixfromcolumnsnode"); + lib3mf_implicitfunction_addconstantnode = mLibrary.getFunction("lib3mf_implicitfunction_addconstantnode"); + lib3mf_implicitfunction_addconstvecnode = mLibrary.getFunction("lib3mf_implicitfunction_addconstvecnode"); + lib3mf_implicitfunction_addconstmatnode = mLibrary.getFunction("lib3mf_implicitfunction_addconstmatnode"); + lib3mf_implicitfunction_addmeshnode = mLibrary.getFunction("lib3mf_implicitfunction_addmeshnode"); + lib3mf_implicitfunction_addunsignedmeshnode = mLibrary.getFunction("lib3mf_implicitfunction_addunsignedmeshnode"); + lib3mf_implicitfunction_addbeamlatticenode = mLibrary.getFunction("lib3mf_implicitfunction_addbeamlatticenode"); + lib3mf_implicitfunction_addfunctiongradientnode = mLibrary.getFunction("lib3mf_implicitfunction_addfunctiongradientnode"); + lib3mf_implicitfunction_addnormalizedistancenode = mLibrary.getFunction("lib3mf_implicitfunction_addnormalizedistancenode"); + lib3mf_implicitfunction_addfunctioncallnode = mLibrary.getFunction("lib3mf_implicitfunction_addfunctioncallnode"); + lib3mf_implicitfunction_getnodes = mLibrary.getFunction("lib3mf_implicitfunction_getnodes"); + lib3mf_implicitfunction_removenode = mLibrary.getFunction("lib3mf_implicitfunction_removenode"); + lib3mf_implicitfunction_addlink = mLibrary.getFunction("lib3mf_implicitfunction_addlink"); + lib3mf_implicitfunction_addlinkbynames = mLibrary.getFunction("lib3mf_implicitfunction_addlinkbynames"); + lib3mf_implicitfunction_clear = mLibrary.getFunction("lib3mf_implicitfunction_clear"); + lib3mf_implicitfunction_sortnodestopologically = mLibrary.getFunction("lib3mf_implicitfunction_sortnodestopologically"); + lib3mf_functionfromimage3d_getimage3d = mLibrary.getFunction("lib3mf_functionfromimage3d_getimage3d"); + lib3mf_functionfromimage3d_setimage3d = mLibrary.getFunction("lib3mf_functionfromimage3d_setimage3d"); + lib3mf_functionfromimage3d_setfilter = mLibrary.getFunction("lib3mf_functionfromimage3d_setfilter"); + lib3mf_functionfromimage3d_getfilter = mLibrary.getFunction("lib3mf_functionfromimage3d_getfilter"); + lib3mf_functionfromimage3d_settilestyles = mLibrary.getFunction("lib3mf_functionfromimage3d_settilestyles"); + lib3mf_functionfromimage3d_gettilestyles = mLibrary.getFunction("lib3mf_functionfromimage3d_gettilestyles"); + lib3mf_functionfromimage3d_getoffset = mLibrary.getFunction("lib3mf_functionfromimage3d_getoffset"); + lib3mf_functionfromimage3d_setoffset = mLibrary.getFunction("lib3mf_functionfromimage3d_setoffset"); + lib3mf_functionfromimage3d_getscale = mLibrary.getFunction("lib3mf_functionfromimage3d_getscale"); + lib3mf_functionfromimage3d_setscale = mLibrary.getFunction("lib3mf_functionfromimage3d_setscale"); + lib3mf_builditem_getobjectresource = mLibrary.getFunction("lib3mf_builditem_getobjectresource"); + lib3mf_builditem_getuuid = mLibrary.getFunction("lib3mf_builditem_getuuid"); + lib3mf_builditem_setuuid = mLibrary.getFunction("lib3mf_builditem_setuuid"); + lib3mf_builditem_getobjectresourceid = mLibrary.getFunction("lib3mf_builditem_getobjectresourceid"); + lib3mf_builditem_hasobjecttransform = mLibrary.getFunction("lib3mf_builditem_hasobjecttransform"); + lib3mf_builditem_getobjecttransform = mLibrary.getFunction("lib3mf_builditem_getobjecttransform"); + lib3mf_builditem_setobjecttransform = mLibrary.getFunction("lib3mf_builditem_setobjecttransform"); + lib3mf_builditem_getpartnumber = mLibrary.getFunction("lib3mf_builditem_getpartnumber"); + lib3mf_builditem_setpartnumber = mLibrary.getFunction("lib3mf_builditem_setpartnumber"); + lib3mf_builditem_getmetadatagroup = mLibrary.getFunction("lib3mf_builditem_getmetadatagroup"); + lib3mf_builditem_getoutbox = mLibrary.getFunction("lib3mf_builditem_getoutbox"); + lib3mf_builditemiterator_movenext = mLibrary.getFunction("lib3mf_builditemiterator_movenext"); + lib3mf_builditemiterator_moveprevious = mLibrary.getFunction("lib3mf_builditemiterator_moveprevious"); + lib3mf_builditemiterator_getcurrent = mLibrary.getFunction("lib3mf_builditemiterator_getcurrent"); + lib3mf_builditemiterator_clone = mLibrary.getFunction("lib3mf_builditemiterator_clone"); + lib3mf_builditemiterator_count = mLibrary.getFunction("lib3mf_builditemiterator_count"); + lib3mf_slice_setvertices = mLibrary.getFunction("lib3mf_slice_setvertices"); + lib3mf_slice_getvertices = mLibrary.getFunction("lib3mf_slice_getvertices"); + lib3mf_slice_getvertexcount = mLibrary.getFunction("lib3mf_slice_getvertexcount"); + lib3mf_slice_addpolygon = mLibrary.getFunction("lib3mf_slice_addpolygon"); + lib3mf_slice_getpolygoncount = mLibrary.getFunction("lib3mf_slice_getpolygoncount"); + lib3mf_slice_setpolygonindices = mLibrary.getFunction("lib3mf_slice_setpolygonindices"); + lib3mf_slice_getpolygonindices = mLibrary.getFunction("lib3mf_slice_getpolygonindices"); + lib3mf_slice_getpolygonindexcount = mLibrary.getFunction("lib3mf_slice_getpolygonindexcount"); + lib3mf_slice_getztop = mLibrary.getFunction("lib3mf_slice_getztop"); + lib3mf_slicestack_getbottomz = mLibrary.getFunction("lib3mf_slicestack_getbottomz"); + lib3mf_slicestack_getslicecount = mLibrary.getFunction("lib3mf_slicestack_getslicecount"); + lib3mf_slicestack_getslice = mLibrary.getFunction("lib3mf_slicestack_getslice"); + lib3mf_slicestack_addslice = mLibrary.getFunction("lib3mf_slicestack_addslice"); + lib3mf_slicestack_getslicerefcount = mLibrary.getFunction("lib3mf_slicestack_getslicerefcount"); + lib3mf_slicestack_addslicestackreference = mLibrary.getFunction("lib3mf_slicestack_addslicestackreference"); + lib3mf_slicestack_getslicestackreference = mLibrary.getFunction("lib3mf_slicestack_getslicestackreference"); + lib3mf_slicestack_collapseslicereferences = mLibrary.getFunction("lib3mf_slicestack_collapseslicereferences"); + lib3mf_slicestack_setownpath = mLibrary.getFunction("lib3mf_slicestack_setownpath"); + lib3mf_slicestack_getownpath = mLibrary.getFunction("lib3mf_slicestack_getownpath"); + lib3mf_consumer_getconsumerid = mLibrary.getFunction("lib3mf_consumer_getconsumerid"); + lib3mf_consumer_getkeyid = mLibrary.getFunction("lib3mf_consumer_getkeyid"); + lib3mf_consumer_getkeyvalue = mLibrary.getFunction("lib3mf_consumer_getkeyvalue"); + lib3mf_accessright_getconsumer = mLibrary.getFunction("lib3mf_accessright_getconsumer"); + lib3mf_accessright_getwrappingalgorithm = mLibrary.getFunction("lib3mf_accessright_getwrappingalgorithm"); + lib3mf_accessright_getmgfalgorithm = mLibrary.getFunction("lib3mf_accessright_getmgfalgorithm"); + lib3mf_accessright_getdigestmethod = mLibrary.getFunction("lib3mf_accessright_getdigestmethod"); + lib3mf_contentencryptionparams_getencryptionalgorithm = mLibrary.getFunction("lib3mf_contentencryptionparams_getencryptionalgorithm"); + lib3mf_contentencryptionparams_getkey = mLibrary.getFunction("lib3mf_contentencryptionparams_getkey"); + lib3mf_contentencryptionparams_getinitializationvector = mLibrary.getFunction("lib3mf_contentencryptionparams_getinitializationvector"); + lib3mf_contentencryptionparams_getauthenticationtag = mLibrary.getFunction("lib3mf_contentencryptionparams_getauthenticationtag"); + lib3mf_contentencryptionparams_setauthenticationtag = mLibrary.getFunction("lib3mf_contentencryptionparams_setauthenticationtag"); + lib3mf_contentencryptionparams_getadditionalauthenticationdata = mLibrary.getFunction("lib3mf_contentencryptionparams_getadditionalauthenticationdata"); + lib3mf_contentencryptionparams_getdescriptor = mLibrary.getFunction("lib3mf_contentencryptionparams_getdescriptor"); + lib3mf_contentencryptionparams_getkeyuuid = mLibrary.getFunction("lib3mf_contentencryptionparams_getkeyuuid"); + lib3mf_resourcedata_getpath = mLibrary.getFunction("lib3mf_resourcedata_getpath"); + lib3mf_resourcedata_getencryptionalgorithm = mLibrary.getFunction("lib3mf_resourcedata_getencryptionalgorithm"); + lib3mf_resourcedata_getcompression = mLibrary.getFunction("lib3mf_resourcedata_getcompression"); + lib3mf_resourcedata_getadditionalauthenticationdata = mLibrary.getFunction("lib3mf_resourcedata_getadditionalauthenticationdata"); + lib3mf_resourcedatagroup_getkeyuuid = mLibrary.getFunction("lib3mf_resourcedatagroup_getkeyuuid"); + lib3mf_resourcedatagroup_addaccessright = mLibrary.getFunction("lib3mf_resourcedatagroup_addaccessright"); + lib3mf_resourcedatagroup_findaccessrightbyconsumer = mLibrary.getFunction("lib3mf_resourcedatagroup_findaccessrightbyconsumer"); + lib3mf_resourcedatagroup_removeaccessright = mLibrary.getFunction("lib3mf_resourcedatagroup_removeaccessright"); + lib3mf_keystore_addconsumer = mLibrary.getFunction("lib3mf_keystore_addconsumer"); + lib3mf_keystore_getconsumercount = mLibrary.getFunction("lib3mf_keystore_getconsumercount"); + lib3mf_keystore_getconsumer = mLibrary.getFunction("lib3mf_keystore_getconsumer"); + lib3mf_keystore_removeconsumer = mLibrary.getFunction("lib3mf_keystore_removeconsumer"); + lib3mf_keystore_findconsumer = mLibrary.getFunction("lib3mf_keystore_findconsumer"); + lib3mf_keystore_getresourcedatagroupcount = mLibrary.getFunction("lib3mf_keystore_getresourcedatagroupcount"); + lib3mf_keystore_addresourcedatagroup = mLibrary.getFunction("lib3mf_keystore_addresourcedatagroup"); + lib3mf_keystore_getresourcedatagroup = mLibrary.getFunction("lib3mf_keystore_getresourcedatagroup"); + lib3mf_keystore_removeresourcedatagroup = mLibrary.getFunction("lib3mf_keystore_removeresourcedatagroup"); + lib3mf_keystore_findresourcedatagroup = mLibrary.getFunction("lib3mf_keystore_findresourcedatagroup"); + lib3mf_keystore_addresourcedata = mLibrary.getFunction("lib3mf_keystore_addresourcedata"); + lib3mf_keystore_removeresourcedata = mLibrary.getFunction("lib3mf_keystore_removeresourcedata"); + lib3mf_keystore_findresourcedata = mLibrary.getFunction("lib3mf_keystore_findresourcedata"); + lib3mf_keystore_getresourcedatacount = mLibrary.getFunction("lib3mf_keystore_getresourcedatacount"); + lib3mf_keystore_getresourcedata = mLibrary.getFunction("lib3mf_keystore_getresourcedata"); + lib3mf_keystore_getuuid = mLibrary.getFunction("lib3mf_keystore_getuuid"); + lib3mf_keystore_setuuid = mLibrary.getFunction("lib3mf_keystore_setuuid"); + lib3mf_model_rootmodelpart = mLibrary.getFunction("lib3mf_model_rootmodelpart"); + lib3mf_model_findorcreatepackagepart = mLibrary.getFunction("lib3mf_model_findorcreatepackagepart"); + lib3mf_model_setunit = mLibrary.getFunction("lib3mf_model_setunit"); + lib3mf_model_getunit = mLibrary.getFunction("lib3mf_model_getunit"); + lib3mf_model_getlanguage = mLibrary.getFunction("lib3mf_model_getlanguage"); + lib3mf_model_setlanguage = mLibrary.getFunction("lib3mf_model_setlanguage"); + lib3mf_model_querywriter = mLibrary.getFunction("lib3mf_model_querywriter"); + lib3mf_model_queryreader = mLibrary.getFunction("lib3mf_model_queryreader"); + lib3mf_model_getresourcebyid = mLibrary.getFunction("lib3mf_model_getresourcebyid"); + lib3mf_model_gettexture2dbyid = mLibrary.getFunction("lib3mf_model_gettexture2dbyid"); + lib3mf_model_getpropertytypebyid = mLibrary.getFunction("lib3mf_model_getpropertytypebyid"); + lib3mf_model_getbasematerialgroupbyid = mLibrary.getFunction("lib3mf_model_getbasematerialgroupbyid"); + lib3mf_model_gettexture2dgroupbyid = mLibrary.getFunction("lib3mf_model_gettexture2dgroupbyid"); + lib3mf_model_getcompositematerialsbyid = mLibrary.getFunction("lib3mf_model_getcompositematerialsbyid"); + lib3mf_model_getmultipropertygroupbyid = mLibrary.getFunction("lib3mf_model_getmultipropertygroupbyid"); + lib3mf_model_getmeshobjectbyid = mLibrary.getFunction("lib3mf_model_getmeshobjectbyid"); + lib3mf_model_getcomponentsobjectbyid = mLibrary.getFunction("lib3mf_model_getcomponentsobjectbyid"); + lib3mf_model_getcolorgroupbyid = mLibrary.getFunction("lib3mf_model_getcolorgroupbyid"); + lib3mf_model_getslicestackbyid = mLibrary.getFunction("lib3mf_model_getslicestackbyid"); + lib3mf_model_getlevelsetbyid = mLibrary.getFunction("lib3mf_model_getlevelsetbyid"); + lib3mf_model_getbuilduuid = mLibrary.getFunction("lib3mf_model_getbuilduuid"); + lib3mf_model_setbuilduuid = mLibrary.getFunction("lib3mf_model_setbuilduuid"); + lib3mf_model_getbuilditems = mLibrary.getFunction("lib3mf_model_getbuilditems"); + lib3mf_model_getoutbox = mLibrary.getFunction("lib3mf_model_getoutbox"); + lib3mf_model_getresources = mLibrary.getFunction("lib3mf_model_getresources"); + lib3mf_model_getobjects = mLibrary.getFunction("lib3mf_model_getobjects"); + lib3mf_model_getmeshobjects = mLibrary.getFunction("lib3mf_model_getmeshobjects"); + lib3mf_model_getcomponentsobjects = mLibrary.getFunction("lib3mf_model_getcomponentsobjects"); + lib3mf_model_gettexture2ds = mLibrary.getFunction("lib3mf_model_gettexture2ds"); + lib3mf_model_getbasematerialgroups = mLibrary.getFunction("lib3mf_model_getbasematerialgroups"); + lib3mf_model_getcolorgroups = mLibrary.getFunction("lib3mf_model_getcolorgroups"); + lib3mf_model_gettexture2dgroups = mLibrary.getFunction("lib3mf_model_gettexture2dgroups"); + lib3mf_model_getcompositematerials = mLibrary.getFunction("lib3mf_model_getcompositematerials"); + lib3mf_model_getmultipropertygroups = mLibrary.getFunction("lib3mf_model_getmultipropertygroups"); + lib3mf_model_getslicestacks = mLibrary.getFunction("lib3mf_model_getslicestacks"); + lib3mf_model_getimage3ds = mLibrary.getFunction("lib3mf_model_getimage3ds"); + lib3mf_model_mergetomodel = mLibrary.getFunction("lib3mf_model_mergetomodel"); + lib3mf_model_mergefrommodel = mLibrary.getFunction("lib3mf_model_mergefrommodel"); + lib3mf_model_addmeshobject = mLibrary.getFunction("lib3mf_model_addmeshobject"); + lib3mf_model_addcomponentsobject = mLibrary.getFunction("lib3mf_model_addcomponentsobject"); + lib3mf_model_addslicestack = mLibrary.getFunction("lib3mf_model_addslicestack"); + lib3mf_model_addtexture2dfromattachment = mLibrary.getFunction("lib3mf_model_addtexture2dfromattachment"); + lib3mf_model_addbasematerialgroup = mLibrary.getFunction("lib3mf_model_addbasematerialgroup"); + lib3mf_model_addcolorgroup = mLibrary.getFunction("lib3mf_model_addcolorgroup"); + lib3mf_model_addtexture2dgroup = mLibrary.getFunction("lib3mf_model_addtexture2dgroup"); + lib3mf_model_addcompositematerials = mLibrary.getFunction("lib3mf_model_addcompositematerials"); + lib3mf_model_addmultipropertygroup = mLibrary.getFunction("lib3mf_model_addmultipropertygroup"); + lib3mf_model_addimagestack = mLibrary.getFunction("lib3mf_model_addimagestack"); + lib3mf_model_getimagestackbyid = mLibrary.getFunction("lib3mf_model_getimagestackbyid"); + lib3mf_model_addbuilditem = mLibrary.getFunction("lib3mf_model_addbuilditem"); + lib3mf_model_removebuilditem = mLibrary.getFunction("lib3mf_model_removebuilditem"); + lib3mf_model_getmetadatagroup = mLibrary.getFunction("lib3mf_model_getmetadatagroup"); + lib3mf_model_addattachment = mLibrary.getFunction("lib3mf_model_addattachment"); + lib3mf_model_removeattachment = mLibrary.getFunction("lib3mf_model_removeattachment"); + lib3mf_model_getattachment = mLibrary.getFunction("lib3mf_model_getattachment"); + lib3mf_model_findattachment = mLibrary.getFunction("lib3mf_model_findattachment"); + lib3mf_model_getattachmentcount = mLibrary.getFunction("lib3mf_model_getattachmentcount"); + lib3mf_model_haspackagethumbnailattachment = mLibrary.getFunction("lib3mf_model_haspackagethumbnailattachment"); + lib3mf_model_createpackagethumbnailattachment = mLibrary.getFunction("lib3mf_model_createpackagethumbnailattachment"); + lib3mf_model_getpackagethumbnailattachment = mLibrary.getFunction("lib3mf_model_getpackagethumbnailattachment"); + lib3mf_model_removepackagethumbnailattachment = mLibrary.getFunction("lib3mf_model_removepackagethumbnailattachment"); + lib3mf_model_addcustomcontenttype = mLibrary.getFunction("lib3mf_model_addcustomcontenttype"); + lib3mf_model_removecustomcontenttype = mLibrary.getFunction("lib3mf_model_removecustomcontenttype"); + lib3mf_model_setrandomnumbercallback = mLibrary.getFunction("lib3mf_model_setrandomnumbercallback"); + lib3mf_model_getkeystore = mLibrary.getFunction("lib3mf_model_getkeystore"); + lib3mf_model_getfunctions = mLibrary.getFunction("lib3mf_model_getfunctions"); + lib3mf_model_addimplicitfunction = mLibrary.getFunction("lib3mf_model_addimplicitfunction"); + lib3mf_model_addfunctionfromimage3d = mLibrary.getFunction("lib3mf_model_addfunctionfromimage3d"); + lib3mf_model_addvolumedata = mLibrary.getFunction("lib3mf_model_addvolumedata"); + lib3mf_model_addlevelset = mLibrary.getFunction("lib3mf_model_addlevelset"); + lib3mf_model_getlevelsets = mLibrary.getFunction("lib3mf_model_getlevelsets"); + lib3mf_model_removeresource = mLibrary.getFunction("lib3mf_model_removeresource"); + } + + public Lib3MFWrapper(Pointer lookupPointer) throws Lib3MFException { + com.sun.jna.Function lookupMethod = com.sun.jna.Function.getFunction(lookupPointer); + lib3mf_getlibraryversion = loadFunctionByLookup(lookupMethod, "lib3mf_getlibraryversion"); + lib3mf_getprereleaseinformation = loadFunctionByLookup(lookupMethod, "lib3mf_getprereleaseinformation"); + lib3mf_getbuildinformation = loadFunctionByLookup(lookupMethod, "lib3mf_getbuildinformation"); + lib3mf_getspecificationversion = loadFunctionByLookup(lookupMethod, "lib3mf_getspecificationversion"); + lib3mf_createmodel = loadFunctionByLookup(lookupMethod, "lib3mf_createmodel"); + lib3mf_release = loadFunctionByLookup(lookupMethod, "lib3mf_release"); + lib3mf_acquire = loadFunctionByLookup(lookupMethod, "lib3mf_acquire"); + lib3mf_setjournal = loadFunctionByLookup(lookupMethod, "lib3mf_setjournal"); + lib3mf_getlasterror = loadFunctionByLookup(lookupMethod, "lib3mf_getlasterror"); + lib3mf_getsymbollookupmethod = loadFunctionByLookup(lookupMethod, "lib3mf_getsymbollookupmethod"); + lib3mf_retrieveprogressmessage = loadFunctionByLookup(lookupMethod, "lib3mf_retrieveprogressmessage"); + lib3mf_rgbatocolor = loadFunctionByLookup(lookupMethod, "lib3mf_rgbatocolor"); + lib3mf_floatrgbatocolor = loadFunctionByLookup(lookupMethod, "lib3mf_floatrgbatocolor"); + lib3mf_colortorgba = loadFunctionByLookup(lookupMethod, "lib3mf_colortorgba"); + lib3mf_colortofloatrgba = loadFunctionByLookup(lookupMethod, "lib3mf_colortofloatrgba"); + lib3mf_getidentitytransform = loadFunctionByLookup(lookupMethod, "lib3mf_getidentitytransform"); + lib3mf_getuniformscaletransform = loadFunctionByLookup(lookupMethod, "lib3mf_getuniformscaletransform"); + lib3mf_getscaletransform = loadFunctionByLookup(lookupMethod, "lib3mf_getscaletransform"); + lib3mf_gettranslationtransform = loadFunctionByLookup(lookupMethod, "lib3mf_gettranslationtransform"); + lib3mf_base_classtypeid = loadFunctionByLookup(lookupMethod, "lib3mf_base_classtypeid"); + lib3mf_writer_writetofile = loadFunctionByLookup(lookupMethod, "lib3mf_writer_writetofile"); + lib3mf_writer_getstreamsize = loadFunctionByLookup(lookupMethod, "lib3mf_writer_getstreamsize"); + lib3mf_writer_writetobuffer = loadFunctionByLookup(lookupMethod, "lib3mf_writer_writetobuffer"); + lib3mf_writer_writetocallback = loadFunctionByLookup(lookupMethod, "lib3mf_writer_writetocallback"); + lib3mf_writer_setprogresscallback = loadFunctionByLookup(lookupMethod, "lib3mf_writer_setprogresscallback"); + lib3mf_writer_getdecimalprecision = loadFunctionByLookup(lookupMethod, "lib3mf_writer_getdecimalprecision"); + lib3mf_writer_setdecimalprecision = loadFunctionByLookup(lookupMethod, "lib3mf_writer_setdecimalprecision"); + lib3mf_writer_setstrictmodeactive = loadFunctionByLookup(lookupMethod, "lib3mf_writer_setstrictmodeactive"); + lib3mf_writer_getstrictmodeactive = loadFunctionByLookup(lookupMethod, "lib3mf_writer_getstrictmodeactive"); + lib3mf_writer_getwarning = loadFunctionByLookup(lookupMethod, "lib3mf_writer_getwarning"); + lib3mf_writer_getwarningcount = loadFunctionByLookup(lookupMethod, "lib3mf_writer_getwarningcount"); + lib3mf_writer_addkeywrappingcallback = loadFunctionByLookup(lookupMethod, "lib3mf_writer_addkeywrappingcallback"); + lib3mf_writer_setcontentencryptioncallback = loadFunctionByLookup(lookupMethod, "lib3mf_writer_setcontentencryptioncallback"); + lib3mf_reader_readfromfile = loadFunctionByLookup(lookupMethod, "lib3mf_reader_readfromfile"); + lib3mf_reader_readfrombuffer = loadFunctionByLookup(lookupMethod, "lib3mf_reader_readfrombuffer"); + lib3mf_reader_readfromcallback = loadFunctionByLookup(lookupMethod, "lib3mf_reader_readfromcallback"); + lib3mf_reader_setprogresscallback = loadFunctionByLookup(lookupMethod, "lib3mf_reader_setprogresscallback"); + lib3mf_reader_addrelationtoread = loadFunctionByLookup(lookupMethod, "lib3mf_reader_addrelationtoread"); + lib3mf_reader_removerelationtoread = loadFunctionByLookup(lookupMethod, "lib3mf_reader_removerelationtoread"); + lib3mf_reader_setstrictmodeactive = loadFunctionByLookup(lookupMethod, "lib3mf_reader_setstrictmodeactive"); + lib3mf_reader_getstrictmodeactive = loadFunctionByLookup(lookupMethod, "lib3mf_reader_getstrictmodeactive"); + lib3mf_reader_getwarning = loadFunctionByLookup(lookupMethod, "lib3mf_reader_getwarning"); + lib3mf_reader_getwarningcount = loadFunctionByLookup(lookupMethod, "lib3mf_reader_getwarningcount"); + lib3mf_reader_addkeywrappingcallback = loadFunctionByLookup(lookupMethod, "lib3mf_reader_addkeywrappingcallback"); + lib3mf_reader_setcontentencryptioncallback = loadFunctionByLookup(lookupMethod, "lib3mf_reader_setcontentencryptioncallback"); + lib3mf_packagepart_getpath = loadFunctionByLookup(lookupMethod, "lib3mf_packagepart_getpath"); + lib3mf_packagepart_setpath = loadFunctionByLookup(lookupMethod, "lib3mf_packagepart_setpath"); + lib3mf_resource_getresourceid = loadFunctionByLookup(lookupMethod, "lib3mf_resource_getresourceid"); + lib3mf_resource_getuniqueresourceid = loadFunctionByLookup(lookupMethod, "lib3mf_resource_getuniqueresourceid"); + lib3mf_resource_packagepart = loadFunctionByLookup(lookupMethod, "lib3mf_resource_packagepart"); + lib3mf_resource_setpackagepart = loadFunctionByLookup(lookupMethod, "lib3mf_resource_setpackagepart"); + lib3mf_resource_getmodelresourceid = loadFunctionByLookup(lookupMethod, "lib3mf_resource_getmodelresourceid"); + lib3mf_resourceiterator_movenext = loadFunctionByLookup(lookupMethod, "lib3mf_resourceiterator_movenext"); + lib3mf_resourceiterator_moveprevious = loadFunctionByLookup(lookupMethod, "lib3mf_resourceiterator_moveprevious"); + lib3mf_resourceiterator_getcurrent = loadFunctionByLookup(lookupMethod, "lib3mf_resourceiterator_getcurrent"); + lib3mf_resourceiterator_clone = loadFunctionByLookup(lookupMethod, "lib3mf_resourceiterator_clone"); + lib3mf_resourceiterator_count = loadFunctionByLookup(lookupMethod, "lib3mf_resourceiterator_count"); + lib3mf_slicestackiterator_getcurrentslicestack = loadFunctionByLookup(lookupMethod, "lib3mf_slicestackiterator_getcurrentslicestack"); + lib3mf_objectiterator_getcurrentobject = loadFunctionByLookup(lookupMethod, "lib3mf_objectiterator_getcurrentobject"); + lib3mf_meshobjectiterator_getcurrentmeshobject = loadFunctionByLookup(lookupMethod, "lib3mf_meshobjectiterator_getcurrentmeshobject"); + lib3mf_componentsobjectiterator_getcurrentcomponentsobject = loadFunctionByLookup(lookupMethod, "lib3mf_componentsobjectiterator_getcurrentcomponentsobject"); + lib3mf_texture2diterator_getcurrenttexture2d = loadFunctionByLookup(lookupMethod, "lib3mf_texture2diterator_getcurrenttexture2d"); + lib3mf_basematerialgroupiterator_getcurrentbasematerialgroup = loadFunctionByLookup(lookupMethod, "lib3mf_basematerialgroupiterator_getcurrentbasematerialgroup"); + lib3mf_colorgroupiterator_getcurrentcolorgroup = loadFunctionByLookup(lookupMethod, "lib3mf_colorgroupiterator_getcurrentcolorgroup"); + lib3mf_texture2dgroupiterator_getcurrenttexture2dgroup = loadFunctionByLookup(lookupMethod, "lib3mf_texture2dgroupiterator_getcurrenttexture2dgroup"); + lib3mf_compositematerialsiterator_getcurrentcompositematerials = loadFunctionByLookup(lookupMethod, "lib3mf_compositematerialsiterator_getcurrentcompositematerials"); + lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup = loadFunctionByLookup(lookupMethod, "lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup"); + lib3mf_image3diterator_getcurrentimage3d = loadFunctionByLookup(lookupMethod, "lib3mf_image3diterator_getcurrentimage3d"); + lib3mf_functioniterator_getcurrentfunction = loadFunctionByLookup(lookupMethod, "lib3mf_functioniterator_getcurrentfunction"); + lib3mf_levelsetiterator_getcurrentlevelset = loadFunctionByLookup(lookupMethod, "lib3mf_levelsetiterator_getcurrentlevelset"); + lib3mf_metadata_getnamespace = loadFunctionByLookup(lookupMethod, "lib3mf_metadata_getnamespace"); + lib3mf_metadata_setnamespace = loadFunctionByLookup(lookupMethod, "lib3mf_metadata_setnamespace"); + lib3mf_metadata_getname = loadFunctionByLookup(lookupMethod, "lib3mf_metadata_getname"); + lib3mf_metadata_setname = loadFunctionByLookup(lookupMethod, "lib3mf_metadata_setname"); + lib3mf_metadata_getkey = loadFunctionByLookup(lookupMethod, "lib3mf_metadata_getkey"); + lib3mf_metadata_getmustpreserve = loadFunctionByLookup(lookupMethod, "lib3mf_metadata_getmustpreserve"); + lib3mf_metadata_setmustpreserve = loadFunctionByLookup(lookupMethod, "lib3mf_metadata_setmustpreserve"); + lib3mf_metadata_gettype = loadFunctionByLookup(lookupMethod, "lib3mf_metadata_gettype"); + lib3mf_metadata_settype = loadFunctionByLookup(lookupMethod, "lib3mf_metadata_settype"); + lib3mf_metadata_getvalue = loadFunctionByLookup(lookupMethod, "lib3mf_metadata_getvalue"); + lib3mf_metadata_setvalue = loadFunctionByLookup(lookupMethod, "lib3mf_metadata_setvalue"); + lib3mf_metadatagroup_getmetadatacount = loadFunctionByLookup(lookupMethod, "lib3mf_metadatagroup_getmetadatacount"); + lib3mf_metadatagroup_getmetadata = loadFunctionByLookup(lookupMethod, "lib3mf_metadatagroup_getmetadata"); + lib3mf_metadatagroup_getmetadatabykey = loadFunctionByLookup(lookupMethod, "lib3mf_metadatagroup_getmetadatabykey"); + lib3mf_metadatagroup_removemetadatabyindex = loadFunctionByLookup(lookupMethod, "lib3mf_metadatagroup_removemetadatabyindex"); + lib3mf_metadatagroup_removemetadata = loadFunctionByLookup(lookupMethod, "lib3mf_metadatagroup_removemetadata"); + lib3mf_metadatagroup_addmetadata = loadFunctionByLookup(lookupMethod, "lib3mf_metadatagroup_addmetadata"); + lib3mf_triangleset_setname = loadFunctionByLookup(lookupMethod, "lib3mf_triangleset_setname"); + lib3mf_triangleset_getname = loadFunctionByLookup(lookupMethod, "lib3mf_triangleset_getname"); + lib3mf_triangleset_setidentifier = loadFunctionByLookup(lookupMethod, "lib3mf_triangleset_setidentifier"); + lib3mf_triangleset_getidentifier = loadFunctionByLookup(lookupMethod, "lib3mf_triangleset_getidentifier"); + lib3mf_triangleset_addtriangle = loadFunctionByLookup(lookupMethod, "lib3mf_triangleset_addtriangle"); + lib3mf_triangleset_removetriangle = loadFunctionByLookup(lookupMethod, "lib3mf_triangleset_removetriangle"); + lib3mf_triangleset_clear = loadFunctionByLookup(lookupMethod, "lib3mf_triangleset_clear"); + lib3mf_triangleset_settrianglelist = loadFunctionByLookup(lookupMethod, "lib3mf_triangleset_settrianglelist"); + lib3mf_triangleset_gettrianglelist = loadFunctionByLookup(lookupMethod, "lib3mf_triangleset_gettrianglelist"); + lib3mf_triangleset_addtrianglelist = loadFunctionByLookup(lookupMethod, "lib3mf_triangleset_addtrianglelist"); + lib3mf_triangleset_merge = loadFunctionByLookup(lookupMethod, "lib3mf_triangleset_merge"); + lib3mf_triangleset_deleteset = loadFunctionByLookup(lookupMethod, "lib3mf_triangleset_deleteset"); + lib3mf_triangleset_duplicate = loadFunctionByLookup(lookupMethod, "lib3mf_triangleset_duplicate"); + lib3mf_object_gettype = loadFunctionByLookup(lookupMethod, "lib3mf_object_gettype"); + lib3mf_object_settype = loadFunctionByLookup(lookupMethod, "lib3mf_object_settype"); + lib3mf_object_getname = loadFunctionByLookup(lookupMethod, "lib3mf_object_getname"); + lib3mf_object_setname = loadFunctionByLookup(lookupMethod, "lib3mf_object_setname"); + lib3mf_object_getpartnumber = loadFunctionByLookup(lookupMethod, "lib3mf_object_getpartnumber"); + lib3mf_object_setpartnumber = loadFunctionByLookup(lookupMethod, "lib3mf_object_setpartnumber"); + lib3mf_object_ismeshobject = loadFunctionByLookup(lookupMethod, "lib3mf_object_ismeshobject"); + lib3mf_object_iscomponentsobject = loadFunctionByLookup(lookupMethod, "lib3mf_object_iscomponentsobject"); + lib3mf_object_islevelsetobject = loadFunctionByLookup(lookupMethod, "lib3mf_object_islevelsetobject"); + lib3mf_object_isvalid = loadFunctionByLookup(lookupMethod, "lib3mf_object_isvalid"); + lib3mf_object_setattachmentasthumbnail = loadFunctionByLookup(lookupMethod, "lib3mf_object_setattachmentasthumbnail"); + lib3mf_object_getthumbnailattachment = loadFunctionByLookup(lookupMethod, "lib3mf_object_getthumbnailattachment"); + lib3mf_object_clearthumbnailattachment = loadFunctionByLookup(lookupMethod, "lib3mf_object_clearthumbnailattachment"); + lib3mf_object_getoutbox = loadFunctionByLookup(lookupMethod, "lib3mf_object_getoutbox"); + lib3mf_object_getuuid = loadFunctionByLookup(lookupMethod, "lib3mf_object_getuuid"); + lib3mf_object_setuuid = loadFunctionByLookup(lookupMethod, "lib3mf_object_setuuid"); + lib3mf_object_getmetadatagroup = loadFunctionByLookup(lookupMethod, "lib3mf_object_getmetadatagroup"); + lib3mf_object_setslicesmeshresolution = loadFunctionByLookup(lookupMethod, "lib3mf_object_setslicesmeshresolution"); + lib3mf_object_getslicesmeshresolution = loadFunctionByLookup(lookupMethod, "lib3mf_object_getslicesmeshresolution"); + lib3mf_object_hasslices = loadFunctionByLookup(lookupMethod, "lib3mf_object_hasslices"); + lib3mf_object_clearslicestack = loadFunctionByLookup(lookupMethod, "lib3mf_object_clearslicestack"); + lib3mf_object_getslicestack = loadFunctionByLookup(lookupMethod, "lib3mf_object_getslicestack"); + lib3mf_object_assignslicestack = loadFunctionByLookup(lookupMethod, "lib3mf_object_assignslicestack"); + lib3mf_meshobject_getvertexcount = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_getvertexcount"); + lib3mf_meshobject_gettrianglecount = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_gettrianglecount"); + lib3mf_meshobject_getvertex = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_getvertex"); + lib3mf_meshobject_setvertex = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_setvertex"); + lib3mf_meshobject_addvertex = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_addvertex"); + lib3mf_meshobject_getvertices = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_getvertices"); + lib3mf_meshobject_gettriangle = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_gettriangle"); + lib3mf_meshobject_settriangle = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_settriangle"); + lib3mf_meshobject_addtriangle = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_addtriangle"); + lib3mf_meshobject_gettriangleindices = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_gettriangleindices"); + lib3mf_meshobject_setobjectlevelproperty = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_setobjectlevelproperty"); + lib3mf_meshobject_getobjectlevelproperty = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_getobjectlevelproperty"); + lib3mf_meshobject_settriangleproperties = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_settriangleproperties"); + lib3mf_meshobject_gettriangleproperties = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_gettriangleproperties"); + lib3mf_meshobject_setalltriangleproperties = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_setalltriangleproperties"); + lib3mf_meshobject_getalltriangleproperties = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_getalltriangleproperties"); + lib3mf_meshobject_clearallproperties = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_clearallproperties"); + lib3mf_meshobject_setgeometry = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_setgeometry"); + lib3mf_meshobject_ismanifoldandoriented = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_ismanifoldandoriented"); + lib3mf_meshobject_beamlattice = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_beamlattice"); + lib3mf_meshobject_getvolumedata = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_getvolumedata"); + lib3mf_meshobject_setvolumedata = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_setvolumedata"); + lib3mf_meshobject_addtriangleset = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_addtriangleset"); + lib3mf_meshobject_hastriangleset = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_hastriangleset"); + lib3mf_meshobject_findtriangleset = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_findtriangleset"); + lib3mf_meshobject_gettrianglesetcount = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_gettrianglesetcount"); + lib3mf_meshobject_gettriangleset = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_gettriangleset"); + lib3mf_levelset_getfunction = loadFunctionByLookup(lookupMethod, "lib3mf_levelset_getfunction"); + lib3mf_levelset_setfunction = loadFunctionByLookup(lookupMethod, "lib3mf_levelset_setfunction"); + lib3mf_levelset_gettransform = loadFunctionByLookup(lookupMethod, "lib3mf_levelset_gettransform"); + lib3mf_levelset_settransform = loadFunctionByLookup(lookupMethod, "lib3mf_levelset_settransform"); + lib3mf_levelset_getchannelname = loadFunctionByLookup(lookupMethod, "lib3mf_levelset_getchannelname"); + lib3mf_levelset_setchannelname = loadFunctionByLookup(lookupMethod, "lib3mf_levelset_setchannelname"); + lib3mf_levelset_setminfeaturesize = loadFunctionByLookup(lookupMethod, "lib3mf_levelset_setminfeaturesize"); + lib3mf_levelset_getminfeaturesize = loadFunctionByLookup(lookupMethod, "lib3mf_levelset_getminfeaturesize"); + lib3mf_levelset_setfallbackvalue = loadFunctionByLookup(lookupMethod, "lib3mf_levelset_setfallbackvalue"); + lib3mf_levelset_getfallbackvalue = loadFunctionByLookup(lookupMethod, "lib3mf_levelset_getfallbackvalue"); + lib3mf_levelset_setmeshbboxonly = loadFunctionByLookup(lookupMethod, "lib3mf_levelset_setmeshbboxonly"); + lib3mf_levelset_getmeshbboxonly = loadFunctionByLookup(lookupMethod, "lib3mf_levelset_getmeshbboxonly"); + lib3mf_levelset_setmesh = loadFunctionByLookup(lookupMethod, "lib3mf_levelset_setmesh"); + lib3mf_levelset_getmesh = loadFunctionByLookup(lookupMethod, "lib3mf_levelset_getmesh"); + lib3mf_levelset_getvolumedata = loadFunctionByLookup(lookupMethod, "lib3mf_levelset_getvolumedata"); + lib3mf_levelset_setvolumedata = loadFunctionByLookup(lookupMethod, "lib3mf_levelset_setvolumedata"); + lib3mf_beamlattice_getminlength = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_getminlength"); + lib3mf_beamlattice_setminlength = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_setminlength"); + lib3mf_beamlattice_getclipping = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_getclipping"); + lib3mf_beamlattice_setclipping = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_setclipping"); + lib3mf_beamlattice_getrepresentation = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_getrepresentation"); + lib3mf_beamlattice_setrepresentation = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_setrepresentation"); + lib3mf_beamlattice_getballoptions = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_getballoptions"); + lib3mf_beamlattice_setballoptions = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_setballoptions"); + lib3mf_beamlattice_getbeamcount = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_getbeamcount"); + lib3mf_beamlattice_getbeam = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_getbeam"); + lib3mf_beamlattice_addbeam = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_addbeam"); + lib3mf_beamlattice_setbeam = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_setbeam"); + lib3mf_beamlattice_setbeams = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_setbeams"); + lib3mf_beamlattice_getbeams = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_getbeams"); + lib3mf_beamlattice_getballcount = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_getballcount"); + lib3mf_beamlattice_getball = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_getball"); + lib3mf_beamlattice_addball = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_addball"); + lib3mf_beamlattice_setball = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_setball"); + lib3mf_beamlattice_setballs = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_setballs"); + lib3mf_beamlattice_getballs = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_getballs"); + lib3mf_beamlattice_getbeamsetcount = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_getbeamsetcount"); + lib3mf_beamlattice_addbeamset = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_addbeamset"); + lib3mf_beamlattice_getbeamset = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_getbeamset"); + lib3mf_functionreference_getfunctionresourceid = loadFunctionByLookup(lookupMethod, "lib3mf_functionreference_getfunctionresourceid"); + lib3mf_functionreference_setfunctionresourceid = loadFunctionByLookup(lookupMethod, "lib3mf_functionreference_setfunctionresourceid"); + lib3mf_functionreference_gettransform = loadFunctionByLookup(lookupMethod, "lib3mf_functionreference_gettransform"); + lib3mf_functionreference_settransform = loadFunctionByLookup(lookupMethod, "lib3mf_functionreference_settransform"); + lib3mf_functionreference_getchannelname = loadFunctionByLookup(lookupMethod, "lib3mf_functionreference_getchannelname"); + lib3mf_functionreference_setchannelname = loadFunctionByLookup(lookupMethod, "lib3mf_functionreference_setchannelname"); + lib3mf_functionreference_setminfeaturesize = loadFunctionByLookup(lookupMethod, "lib3mf_functionreference_setminfeaturesize"); + lib3mf_functionreference_getminfeaturesize = loadFunctionByLookup(lookupMethod, "lib3mf_functionreference_getminfeaturesize"); + lib3mf_functionreference_setfallbackvalue = loadFunctionByLookup(lookupMethod, "lib3mf_functionreference_setfallbackvalue"); + lib3mf_functionreference_getfallbackvalue = loadFunctionByLookup(lookupMethod, "lib3mf_functionreference_getfallbackvalue"); + lib3mf_volumedatacomposite_getbasematerialgroup = loadFunctionByLookup(lookupMethod, "lib3mf_volumedatacomposite_getbasematerialgroup"); + lib3mf_volumedatacomposite_setbasematerialgroup = loadFunctionByLookup(lookupMethod, "lib3mf_volumedatacomposite_setbasematerialgroup"); + lib3mf_volumedatacomposite_getmaterialmappingcount = loadFunctionByLookup(lookupMethod, "lib3mf_volumedatacomposite_getmaterialmappingcount"); + lib3mf_volumedatacomposite_getmaterialmapping = loadFunctionByLookup(lookupMethod, "lib3mf_volumedatacomposite_getmaterialmapping"); + lib3mf_volumedatacomposite_addmaterialmapping = loadFunctionByLookup(lookupMethod, "lib3mf_volumedatacomposite_addmaterialmapping"); + lib3mf_volumedatacomposite_removematerialmapping = loadFunctionByLookup(lookupMethod, "lib3mf_volumedatacomposite_removematerialmapping"); + lib3mf_volumedataproperty_getname = loadFunctionByLookup(lookupMethod, "lib3mf_volumedataproperty_getname"); + lib3mf_volumedataproperty_setisrequired = loadFunctionByLookup(lookupMethod, "lib3mf_volumedataproperty_setisrequired"); + lib3mf_volumedataproperty_isrequired = loadFunctionByLookup(lookupMethod, "lib3mf_volumedataproperty_isrequired"); + lib3mf_volumedata_getcomposite = loadFunctionByLookup(lookupMethod, "lib3mf_volumedata_getcomposite"); + lib3mf_volumedata_createnewcomposite = loadFunctionByLookup(lookupMethod, "lib3mf_volumedata_createnewcomposite"); + lib3mf_volumedata_removecomposite = loadFunctionByLookup(lookupMethod, "lib3mf_volumedata_removecomposite"); + lib3mf_volumedata_getcolor = loadFunctionByLookup(lookupMethod, "lib3mf_volumedata_getcolor"); + lib3mf_volumedata_createnewcolor = loadFunctionByLookup(lookupMethod, "lib3mf_volumedata_createnewcolor"); + lib3mf_volumedata_removecolor = loadFunctionByLookup(lookupMethod, "lib3mf_volumedata_removecolor"); + lib3mf_volumedata_getpropertycount = loadFunctionByLookup(lookupMethod, "lib3mf_volumedata_getpropertycount"); + lib3mf_volumedata_getproperty = loadFunctionByLookup(lookupMethod, "lib3mf_volumedata_getproperty"); + lib3mf_volumedata_addpropertyfromfunction = loadFunctionByLookup(lookupMethod, "lib3mf_volumedata_addpropertyfromfunction"); + lib3mf_volumedata_removeproperty = loadFunctionByLookup(lookupMethod, "lib3mf_volumedata_removeproperty"); + lib3mf_component_getobjectresource = loadFunctionByLookup(lookupMethod, "lib3mf_component_getobjectresource"); + lib3mf_component_getobjectresourceid = loadFunctionByLookup(lookupMethod, "lib3mf_component_getobjectresourceid"); + lib3mf_component_getuuid = loadFunctionByLookup(lookupMethod, "lib3mf_component_getuuid"); + lib3mf_component_setuuid = loadFunctionByLookup(lookupMethod, "lib3mf_component_setuuid"); + lib3mf_component_hastransform = loadFunctionByLookup(lookupMethod, "lib3mf_component_hastransform"); + lib3mf_component_gettransform = loadFunctionByLookup(lookupMethod, "lib3mf_component_gettransform"); + lib3mf_component_settransform = loadFunctionByLookup(lookupMethod, "lib3mf_component_settransform"); + lib3mf_componentsobject_addcomponent = loadFunctionByLookup(lookupMethod, "lib3mf_componentsobject_addcomponent"); + lib3mf_componentsobject_getcomponent = loadFunctionByLookup(lookupMethod, "lib3mf_componentsobject_getcomponent"); + lib3mf_componentsobject_getcomponentcount = loadFunctionByLookup(lookupMethod, "lib3mf_componentsobject_getcomponentcount"); + lib3mf_beamset_setname = loadFunctionByLookup(lookupMethod, "lib3mf_beamset_setname"); + lib3mf_beamset_getname = loadFunctionByLookup(lookupMethod, "lib3mf_beamset_getname"); + lib3mf_beamset_setidentifier = loadFunctionByLookup(lookupMethod, "lib3mf_beamset_setidentifier"); + lib3mf_beamset_getidentifier = loadFunctionByLookup(lookupMethod, "lib3mf_beamset_getidentifier"); + lib3mf_beamset_getreferencecount = loadFunctionByLookup(lookupMethod, "lib3mf_beamset_getreferencecount"); + lib3mf_beamset_setreferences = loadFunctionByLookup(lookupMethod, "lib3mf_beamset_setreferences"); + lib3mf_beamset_getreferences = loadFunctionByLookup(lookupMethod, "lib3mf_beamset_getreferences"); + lib3mf_beamset_getballreferencecount = loadFunctionByLookup(lookupMethod, "lib3mf_beamset_getballreferencecount"); + lib3mf_beamset_setballreferences = loadFunctionByLookup(lookupMethod, "lib3mf_beamset_setballreferences"); + lib3mf_beamset_getballreferences = loadFunctionByLookup(lookupMethod, "lib3mf_beamset_getballreferences"); + lib3mf_basematerialgroup_getcount = loadFunctionByLookup(lookupMethod, "lib3mf_basematerialgroup_getcount"); + lib3mf_basematerialgroup_getallpropertyids = loadFunctionByLookup(lookupMethod, "lib3mf_basematerialgroup_getallpropertyids"); + lib3mf_basematerialgroup_addmaterial = loadFunctionByLookup(lookupMethod, "lib3mf_basematerialgroup_addmaterial"); + lib3mf_basematerialgroup_removematerial = loadFunctionByLookup(lookupMethod, "lib3mf_basematerialgroup_removematerial"); + lib3mf_basematerialgroup_getname = loadFunctionByLookup(lookupMethod, "lib3mf_basematerialgroup_getname"); + lib3mf_basematerialgroup_setname = loadFunctionByLookup(lookupMethod, "lib3mf_basematerialgroup_setname"); + lib3mf_basematerialgroup_setdisplaycolor = loadFunctionByLookup(lookupMethod, "lib3mf_basematerialgroup_setdisplaycolor"); + lib3mf_basematerialgroup_getdisplaycolor = loadFunctionByLookup(lookupMethod, "lib3mf_basematerialgroup_getdisplaycolor"); + lib3mf_colorgroup_getcount = loadFunctionByLookup(lookupMethod, "lib3mf_colorgroup_getcount"); + lib3mf_colorgroup_getallpropertyids = loadFunctionByLookup(lookupMethod, "lib3mf_colorgroup_getallpropertyids"); + lib3mf_colorgroup_addcolor = loadFunctionByLookup(lookupMethod, "lib3mf_colorgroup_addcolor"); + lib3mf_colorgroup_removecolor = loadFunctionByLookup(lookupMethod, "lib3mf_colorgroup_removecolor"); + lib3mf_colorgroup_setcolor = loadFunctionByLookup(lookupMethod, "lib3mf_colorgroup_setcolor"); + lib3mf_colorgroup_getcolor = loadFunctionByLookup(lookupMethod, "lib3mf_colorgroup_getcolor"); + lib3mf_texture2dgroup_getcount = loadFunctionByLookup(lookupMethod, "lib3mf_texture2dgroup_getcount"); + lib3mf_texture2dgroup_getallpropertyids = loadFunctionByLookup(lookupMethod, "lib3mf_texture2dgroup_getallpropertyids"); + lib3mf_texture2dgroup_addtex2coord = loadFunctionByLookup(lookupMethod, "lib3mf_texture2dgroup_addtex2coord"); + lib3mf_texture2dgroup_gettex2coord = loadFunctionByLookup(lookupMethod, "lib3mf_texture2dgroup_gettex2coord"); + lib3mf_texture2dgroup_removetex2coord = loadFunctionByLookup(lookupMethod, "lib3mf_texture2dgroup_removetex2coord"); + lib3mf_texture2dgroup_gettexture2d = loadFunctionByLookup(lookupMethod, "lib3mf_texture2dgroup_gettexture2d"); + lib3mf_compositematerials_getcount = loadFunctionByLookup(lookupMethod, "lib3mf_compositematerials_getcount"); + lib3mf_compositematerials_getallpropertyids = loadFunctionByLookup(lookupMethod, "lib3mf_compositematerials_getallpropertyids"); + lib3mf_compositematerials_getbasematerialgroup = loadFunctionByLookup(lookupMethod, "lib3mf_compositematerials_getbasematerialgroup"); + lib3mf_compositematerials_addcomposite = loadFunctionByLookup(lookupMethod, "lib3mf_compositematerials_addcomposite"); + lib3mf_compositematerials_removecomposite = loadFunctionByLookup(lookupMethod, "lib3mf_compositematerials_removecomposite"); + lib3mf_compositematerials_getcomposite = loadFunctionByLookup(lookupMethod, "lib3mf_compositematerials_getcomposite"); + lib3mf_multipropertygroup_getcount = loadFunctionByLookup(lookupMethod, "lib3mf_multipropertygroup_getcount"); + lib3mf_multipropertygroup_getallpropertyids = loadFunctionByLookup(lookupMethod, "lib3mf_multipropertygroup_getallpropertyids"); + lib3mf_multipropertygroup_addmultiproperty = loadFunctionByLookup(lookupMethod, "lib3mf_multipropertygroup_addmultiproperty"); + lib3mf_multipropertygroup_setmultiproperty = loadFunctionByLookup(lookupMethod, "lib3mf_multipropertygroup_setmultiproperty"); + lib3mf_multipropertygroup_getmultiproperty = loadFunctionByLookup(lookupMethod, "lib3mf_multipropertygroup_getmultiproperty"); + lib3mf_multipropertygroup_removemultiproperty = loadFunctionByLookup(lookupMethod, "lib3mf_multipropertygroup_removemultiproperty"); + lib3mf_multipropertygroup_getlayercount = loadFunctionByLookup(lookupMethod, "lib3mf_multipropertygroup_getlayercount"); + lib3mf_multipropertygroup_addlayer = loadFunctionByLookup(lookupMethod, "lib3mf_multipropertygroup_addlayer"); + lib3mf_multipropertygroup_getlayer = loadFunctionByLookup(lookupMethod, "lib3mf_multipropertygroup_getlayer"); + lib3mf_multipropertygroup_removelayer = loadFunctionByLookup(lookupMethod, "lib3mf_multipropertygroup_removelayer"); + lib3mf_image3d_getname = loadFunctionByLookup(lookupMethod, "lib3mf_image3d_getname"); + lib3mf_image3d_setname = loadFunctionByLookup(lookupMethod, "lib3mf_image3d_setname"); + lib3mf_image3d_isimagestack = loadFunctionByLookup(lookupMethod, "lib3mf_image3d_isimagestack"); + lib3mf_imagestack_getrowcount = loadFunctionByLookup(lookupMethod, "lib3mf_imagestack_getrowcount"); + lib3mf_imagestack_setrowcount = loadFunctionByLookup(lookupMethod, "lib3mf_imagestack_setrowcount"); + lib3mf_imagestack_getcolumncount = loadFunctionByLookup(lookupMethod, "lib3mf_imagestack_getcolumncount"); + lib3mf_imagestack_setcolumncount = loadFunctionByLookup(lookupMethod, "lib3mf_imagestack_setcolumncount"); + lib3mf_imagestack_getsheetcount = loadFunctionByLookup(lookupMethod, "lib3mf_imagestack_getsheetcount"); + lib3mf_imagestack_getsheet = loadFunctionByLookup(lookupMethod, "lib3mf_imagestack_getsheet"); + lib3mf_imagestack_setsheet = loadFunctionByLookup(lookupMethod, "lib3mf_imagestack_setsheet"); + lib3mf_imagestack_createemptysheet = loadFunctionByLookup(lookupMethod, "lib3mf_imagestack_createemptysheet"); + lib3mf_imagestack_createsheetfrombuffer = loadFunctionByLookup(lookupMethod, "lib3mf_imagestack_createsheetfrombuffer"); + lib3mf_imagestack_createsheetfromfile = loadFunctionByLookup(lookupMethod, "lib3mf_imagestack_createsheetfromfile"); + lib3mf_attachment_getpath = loadFunctionByLookup(lookupMethod, "lib3mf_attachment_getpath"); + lib3mf_attachment_setpath = loadFunctionByLookup(lookupMethod, "lib3mf_attachment_setpath"); + lib3mf_attachment_packagepart = loadFunctionByLookup(lookupMethod, "lib3mf_attachment_packagepart"); + lib3mf_attachment_getrelationshiptype = loadFunctionByLookup(lookupMethod, "lib3mf_attachment_getrelationshiptype"); + lib3mf_attachment_setrelationshiptype = loadFunctionByLookup(lookupMethod, "lib3mf_attachment_setrelationshiptype"); + lib3mf_attachment_writetofile = loadFunctionByLookup(lookupMethod, "lib3mf_attachment_writetofile"); + lib3mf_attachment_readfromfile = loadFunctionByLookup(lookupMethod, "lib3mf_attachment_readfromfile"); + lib3mf_attachment_readfromcallback = loadFunctionByLookup(lookupMethod, "lib3mf_attachment_readfromcallback"); + lib3mf_attachment_getstreamsize = loadFunctionByLookup(lookupMethod, "lib3mf_attachment_getstreamsize"); + lib3mf_attachment_writetobuffer = loadFunctionByLookup(lookupMethod, "lib3mf_attachment_writetobuffer"); + lib3mf_attachment_readfrombuffer = loadFunctionByLookup(lookupMethod, "lib3mf_attachment_readfrombuffer"); + lib3mf_texture2d_getattachment = loadFunctionByLookup(lookupMethod, "lib3mf_texture2d_getattachment"); + lib3mf_texture2d_setattachment = loadFunctionByLookup(lookupMethod, "lib3mf_texture2d_setattachment"); + lib3mf_texture2d_getcontenttype = loadFunctionByLookup(lookupMethod, "lib3mf_texture2d_getcontenttype"); + lib3mf_texture2d_setcontenttype = loadFunctionByLookup(lookupMethod, "lib3mf_texture2d_setcontenttype"); + lib3mf_texture2d_gettilestyleuv = loadFunctionByLookup(lookupMethod, "lib3mf_texture2d_gettilestyleuv"); + lib3mf_texture2d_settilestyleuv = loadFunctionByLookup(lookupMethod, "lib3mf_texture2d_settilestyleuv"); + lib3mf_texture2d_getfilter = loadFunctionByLookup(lookupMethod, "lib3mf_texture2d_getfilter"); + lib3mf_texture2d_setfilter = loadFunctionByLookup(lookupMethod, "lib3mf_texture2d_setfilter"); + lib3mf_implicitport_getidentifier = loadFunctionByLookup(lookupMethod, "lib3mf_implicitport_getidentifier"); + lib3mf_implicitport_setidentifier = loadFunctionByLookup(lookupMethod, "lib3mf_implicitport_setidentifier"); + lib3mf_implicitport_getdisplayname = loadFunctionByLookup(lookupMethod, "lib3mf_implicitport_getdisplayname"); + lib3mf_implicitport_setdisplayname = loadFunctionByLookup(lookupMethod, "lib3mf_implicitport_setdisplayname"); + lib3mf_implicitport_settype = loadFunctionByLookup(lookupMethod, "lib3mf_implicitport_settype"); + lib3mf_implicitport_gettype = loadFunctionByLookup(lookupMethod, "lib3mf_implicitport_gettype"); + lib3mf_implicitport_getreference = loadFunctionByLookup(lookupMethod, "lib3mf_implicitport_getreference"); + lib3mf_implicitport_setreference = loadFunctionByLookup(lookupMethod, "lib3mf_implicitport_setreference"); + lib3mf_iterator_movenext = loadFunctionByLookup(lookupMethod, "lib3mf_iterator_movenext"); + lib3mf_iterator_moveprevious = loadFunctionByLookup(lookupMethod, "lib3mf_iterator_moveprevious"); + lib3mf_iterator_count = loadFunctionByLookup(lookupMethod, "lib3mf_iterator_count"); + lib3mf_implicitportiterator_getcurrent = loadFunctionByLookup(lookupMethod, "lib3mf_implicitportiterator_getcurrent"); + lib3mf_implicitnode_getidentifier = loadFunctionByLookup(lookupMethod, "lib3mf_implicitnode_getidentifier"); + lib3mf_implicitnode_setidentifier = loadFunctionByLookup(lookupMethod, "lib3mf_implicitnode_setidentifier"); + lib3mf_implicitnode_getdisplayname = loadFunctionByLookup(lookupMethod, "lib3mf_implicitnode_getdisplayname"); + lib3mf_implicitnode_setdisplayname = loadFunctionByLookup(lookupMethod, "lib3mf_implicitnode_setdisplayname"); + lib3mf_implicitnode_gettag = loadFunctionByLookup(lookupMethod, "lib3mf_implicitnode_gettag"); + lib3mf_implicitnode_settag = loadFunctionByLookup(lookupMethod, "lib3mf_implicitnode_settag"); + lib3mf_implicitnode_getnodetype = loadFunctionByLookup(lookupMethod, "lib3mf_implicitnode_getnodetype"); + lib3mf_implicitnode_addinput = loadFunctionByLookup(lookupMethod, "lib3mf_implicitnode_addinput"); + lib3mf_implicitnode_getinputs = loadFunctionByLookup(lookupMethod, "lib3mf_implicitnode_getinputs"); + lib3mf_implicitnode_addoutput = loadFunctionByLookup(lookupMethod, "lib3mf_implicitnode_addoutput"); + lib3mf_implicitnode_getoutputs = loadFunctionByLookup(lookupMethod, "lib3mf_implicitnode_getoutputs"); + lib3mf_implicitnode_findinput = loadFunctionByLookup(lookupMethod, "lib3mf_implicitnode_findinput"); + lib3mf_implicitnode_findoutput = loadFunctionByLookup(lookupMethod, "lib3mf_implicitnode_findoutput"); + lib3mf_implicitnode_aretypesvalid = loadFunctionByLookup(lookupMethod, "lib3mf_implicitnode_aretypesvalid"); + lib3mf_oneinputnode_getinputa = loadFunctionByLookup(lookupMethod, "lib3mf_oneinputnode_getinputa"); + lib3mf_oneinputnode_getoutputresult = loadFunctionByLookup(lookupMethod, "lib3mf_oneinputnode_getoutputresult"); + lib3mf_resourceidnode_setresource = loadFunctionByLookup(lookupMethod, "lib3mf_resourceidnode_setresource"); + lib3mf_resourceidnode_getresource = loadFunctionByLookup(lookupMethod, "lib3mf_resourceidnode_getresource"); + lib3mf_resourceidnode_getoutputvalue = loadFunctionByLookup(lookupMethod, "lib3mf_resourceidnode_getoutputvalue"); + lib3mf_twoinputnode_getinputb = loadFunctionByLookup(lookupMethod, "lib3mf_twoinputnode_getinputb"); + lib3mf_selectnode_getinputb = loadFunctionByLookup(lookupMethod, "lib3mf_selectnode_getinputb"); + lib3mf_selectnode_getinputc = loadFunctionByLookup(lookupMethod, "lib3mf_selectnode_getinputc"); + lib3mf_selectnode_getinputd = loadFunctionByLookup(lookupMethod, "lib3mf_selectnode_getinputd"); + lib3mf_clampnode_getinputmin = loadFunctionByLookup(lookupMethod, "lib3mf_clampnode_getinputmin"); + lib3mf_clampnode_getinputmax = loadFunctionByLookup(lookupMethod, "lib3mf_clampnode_getinputmax"); + lib3mf_composevectornode_getinputx = loadFunctionByLookup(lookupMethod, "lib3mf_composevectornode_getinputx"); + lib3mf_composevectornode_getinputy = loadFunctionByLookup(lookupMethod, "lib3mf_composevectornode_getinputy"); + lib3mf_composevectornode_getinputz = loadFunctionByLookup(lookupMethod, "lib3mf_composevectornode_getinputz"); + lib3mf_composevectornode_getoutputresult = loadFunctionByLookup(lookupMethod, "lib3mf_composevectornode_getoutputresult"); + lib3mf_decomposevectornode_getinputa = loadFunctionByLookup(lookupMethod, "lib3mf_decomposevectornode_getinputa"); + lib3mf_decomposevectornode_getoutputx = loadFunctionByLookup(lookupMethod, "lib3mf_decomposevectornode_getoutputx"); + lib3mf_decomposevectornode_getoutputy = loadFunctionByLookup(lookupMethod, "lib3mf_decomposevectornode_getoutputy"); + lib3mf_decomposevectornode_getoutputz = loadFunctionByLookup(lookupMethod, "lib3mf_decomposevectornode_getoutputz"); + lib3mf_composematrixnode_getinputm00 = loadFunctionByLookup(lookupMethod, "lib3mf_composematrixnode_getinputm00"); + lib3mf_composematrixnode_getinputm01 = loadFunctionByLookup(lookupMethod, "lib3mf_composematrixnode_getinputm01"); + lib3mf_composematrixnode_getinputm02 = loadFunctionByLookup(lookupMethod, "lib3mf_composematrixnode_getinputm02"); + lib3mf_composematrixnode_getinputm03 = loadFunctionByLookup(lookupMethod, "lib3mf_composematrixnode_getinputm03"); + lib3mf_composematrixnode_getinputm10 = loadFunctionByLookup(lookupMethod, "lib3mf_composematrixnode_getinputm10"); + lib3mf_composematrixnode_getinputm11 = loadFunctionByLookup(lookupMethod, "lib3mf_composematrixnode_getinputm11"); + lib3mf_composematrixnode_getinputm12 = loadFunctionByLookup(lookupMethod, "lib3mf_composematrixnode_getinputm12"); + lib3mf_composematrixnode_getinputm13 = loadFunctionByLookup(lookupMethod, "lib3mf_composematrixnode_getinputm13"); + lib3mf_composematrixnode_getinputm20 = loadFunctionByLookup(lookupMethod, "lib3mf_composematrixnode_getinputm20"); + lib3mf_composematrixnode_getinputm21 = loadFunctionByLookup(lookupMethod, "lib3mf_composematrixnode_getinputm21"); + lib3mf_composematrixnode_getinputm22 = loadFunctionByLookup(lookupMethod, "lib3mf_composematrixnode_getinputm22"); + lib3mf_composematrixnode_getinputm23 = loadFunctionByLookup(lookupMethod, "lib3mf_composematrixnode_getinputm23"); + lib3mf_composematrixnode_getinputm30 = loadFunctionByLookup(lookupMethod, "lib3mf_composematrixnode_getinputm30"); + lib3mf_composematrixnode_getinputm31 = loadFunctionByLookup(lookupMethod, "lib3mf_composematrixnode_getinputm31"); + lib3mf_composematrixnode_getinputm32 = loadFunctionByLookup(lookupMethod, "lib3mf_composematrixnode_getinputm32"); + lib3mf_composematrixnode_getinputm33 = loadFunctionByLookup(lookupMethod, "lib3mf_composematrixnode_getinputm33"); + lib3mf_composematrixnode_getoutputresult = loadFunctionByLookup(lookupMethod, "lib3mf_composematrixnode_getoutputresult"); + lib3mf_matrixfromrowsnode_getinputa = loadFunctionByLookup(lookupMethod, "lib3mf_matrixfromrowsnode_getinputa"); + lib3mf_matrixfromrowsnode_getinputb = loadFunctionByLookup(lookupMethod, "lib3mf_matrixfromrowsnode_getinputb"); + lib3mf_matrixfromrowsnode_getinputc = loadFunctionByLookup(lookupMethod, "lib3mf_matrixfromrowsnode_getinputc"); + lib3mf_matrixfromrowsnode_getinputd = loadFunctionByLookup(lookupMethod, "lib3mf_matrixfromrowsnode_getinputd"); + lib3mf_matrixfromrowsnode_getoutputresult = loadFunctionByLookup(lookupMethod, "lib3mf_matrixfromrowsnode_getoutputresult"); + lib3mf_matrixfromcolumnsnode_getinputa = loadFunctionByLookup(lookupMethod, "lib3mf_matrixfromcolumnsnode_getinputa"); + lib3mf_matrixfromcolumnsnode_getinputb = loadFunctionByLookup(lookupMethod, "lib3mf_matrixfromcolumnsnode_getinputb"); + lib3mf_matrixfromcolumnsnode_getinputc = loadFunctionByLookup(lookupMethod, "lib3mf_matrixfromcolumnsnode_getinputc"); + lib3mf_matrixfromcolumnsnode_getinputd = loadFunctionByLookup(lookupMethod, "lib3mf_matrixfromcolumnsnode_getinputd"); + lib3mf_matrixfromcolumnsnode_getoutputresult = loadFunctionByLookup(lookupMethod, "lib3mf_matrixfromcolumnsnode_getoutputresult"); + lib3mf_constantnode_setconstant = loadFunctionByLookup(lookupMethod, "lib3mf_constantnode_setconstant"); + lib3mf_constantnode_getconstant = loadFunctionByLookup(lookupMethod, "lib3mf_constantnode_getconstant"); + lib3mf_constantnode_getoutputvalue = loadFunctionByLookup(lookupMethod, "lib3mf_constantnode_getoutputvalue"); + lib3mf_constvecnode_setvector = loadFunctionByLookup(lookupMethod, "lib3mf_constvecnode_setvector"); + lib3mf_constvecnode_getvector = loadFunctionByLookup(lookupMethod, "lib3mf_constvecnode_getvector"); + lib3mf_constvecnode_getoutputvector = loadFunctionByLookup(lookupMethod, "lib3mf_constvecnode_getoutputvector"); + lib3mf_constmatnode_setmatrix = loadFunctionByLookup(lookupMethod, "lib3mf_constmatnode_setmatrix"); + lib3mf_constmatnode_getmatrix = loadFunctionByLookup(lookupMethod, "lib3mf_constmatnode_getmatrix"); + lib3mf_constmatnode_getoutputmatrix = loadFunctionByLookup(lookupMethod, "lib3mf_constmatnode_getoutputmatrix"); + lib3mf_meshnode_getinputmesh = loadFunctionByLookup(lookupMethod, "lib3mf_meshnode_getinputmesh"); + lib3mf_meshnode_getinputpos = loadFunctionByLookup(lookupMethod, "lib3mf_meshnode_getinputpos"); + lib3mf_meshnode_getoutputdistance = loadFunctionByLookup(lookupMethod, "lib3mf_meshnode_getoutputdistance"); + lib3mf_unsignedmeshnode_getinputmesh = loadFunctionByLookup(lookupMethod, "lib3mf_unsignedmeshnode_getinputmesh"); + lib3mf_unsignedmeshnode_getinputpos = loadFunctionByLookup(lookupMethod, "lib3mf_unsignedmeshnode_getinputpos"); + lib3mf_unsignedmeshnode_getoutputdistance = loadFunctionByLookup(lookupMethod, "lib3mf_unsignedmeshnode_getoutputdistance"); + lib3mf_beamlatticenode_getinputbeamlattice = loadFunctionByLookup(lookupMethod, "lib3mf_beamlatticenode_getinputbeamlattice"); + lib3mf_beamlatticenode_getinputpos = loadFunctionByLookup(lookupMethod, "lib3mf_beamlatticenode_getinputpos"); + lib3mf_beamlatticenode_getoutputdistance = loadFunctionByLookup(lookupMethod, "lib3mf_beamlatticenode_getoutputdistance"); + lib3mf_beamlatticenode_setaccuraterange = loadFunctionByLookup(lookupMethod, "lib3mf_beamlatticenode_setaccuraterange"); + lib3mf_beamlatticenode_getaccuraterange = loadFunctionByLookup(lookupMethod, "lib3mf_beamlatticenode_getaccuraterange"); + lib3mf_functiongradientnode_getinputfunctionid = loadFunctionByLookup(lookupMethod, "lib3mf_functiongradientnode_getinputfunctionid"); + lib3mf_functiongradientnode_getinputpos = loadFunctionByLookup(lookupMethod, "lib3mf_functiongradientnode_getinputpos"); + lib3mf_functiongradientnode_getinputstep = loadFunctionByLookup(lookupMethod, "lib3mf_functiongradientnode_getinputstep"); + lib3mf_functiongradientnode_setscalaroutputname = loadFunctionByLookup(lookupMethod, "lib3mf_functiongradientnode_setscalaroutputname"); + lib3mf_functiongradientnode_getscalaroutputname = loadFunctionByLookup(lookupMethod, "lib3mf_functiongradientnode_getscalaroutputname"); + lib3mf_functiongradientnode_setvectorinputname = loadFunctionByLookup(lookupMethod, "lib3mf_functiongradientnode_setvectorinputname"); + lib3mf_functiongradientnode_getvectorinputname = loadFunctionByLookup(lookupMethod, "lib3mf_functiongradientnode_getvectorinputname"); + lib3mf_functiongradientnode_getoutputvector = loadFunctionByLookup(lookupMethod, "lib3mf_functiongradientnode_getoutputvector"); + lib3mf_functiongradientnode_getoutputgradient = loadFunctionByLookup(lookupMethod, "lib3mf_functiongradientnode_getoutputgradient"); + lib3mf_functiongradientnode_getoutputmagnitude = loadFunctionByLookup(lookupMethod, "lib3mf_functiongradientnode_getoutputmagnitude"); + lib3mf_normalizedistancenode_getinputfunctionid = loadFunctionByLookup(lookupMethod, "lib3mf_normalizedistancenode_getinputfunctionid"); + lib3mf_normalizedistancenode_getinputpos = loadFunctionByLookup(lookupMethod, "lib3mf_normalizedistancenode_getinputpos"); + lib3mf_normalizedistancenode_getinputstep = loadFunctionByLookup(lookupMethod, "lib3mf_normalizedistancenode_getinputstep"); + lib3mf_normalizedistancenode_setscalaroutputname = loadFunctionByLookup(lookupMethod, "lib3mf_normalizedistancenode_setscalaroutputname"); + lib3mf_normalizedistancenode_getscalaroutputname = loadFunctionByLookup(lookupMethod, "lib3mf_normalizedistancenode_getscalaroutputname"); + lib3mf_normalizedistancenode_setvectorinputname = loadFunctionByLookup(lookupMethod, "lib3mf_normalizedistancenode_setvectorinputname"); + lib3mf_normalizedistancenode_getvectorinputname = loadFunctionByLookup(lookupMethod, "lib3mf_normalizedistancenode_getvectorinputname"); + lib3mf_normalizedistancenode_getoutputresult = loadFunctionByLookup(lookupMethod, "lib3mf_normalizedistancenode_getoutputresult"); + lib3mf_functioncallnode_getinputfunctionid = loadFunctionByLookup(lookupMethod, "lib3mf_functioncallnode_getinputfunctionid"); + lib3mf_nodeiterator_getcurrent = loadFunctionByLookup(lookupMethod, "lib3mf_nodeiterator_getcurrent"); + lib3mf_function_getdisplayname = loadFunctionByLookup(lookupMethod, "lib3mf_function_getdisplayname"); + lib3mf_function_setdisplayname = loadFunctionByLookup(lookupMethod, "lib3mf_function_setdisplayname"); + lib3mf_function_addinput = loadFunctionByLookup(lookupMethod, "lib3mf_function_addinput"); + lib3mf_function_getinputs = loadFunctionByLookup(lookupMethod, "lib3mf_function_getinputs"); + lib3mf_function_removeinput = loadFunctionByLookup(lookupMethod, "lib3mf_function_removeinput"); + lib3mf_function_addoutput = loadFunctionByLookup(lookupMethod, "lib3mf_function_addoutput"); + lib3mf_function_getoutputs = loadFunctionByLookup(lookupMethod, "lib3mf_function_getoutputs"); + lib3mf_function_removeoutput = loadFunctionByLookup(lookupMethod, "lib3mf_function_removeoutput"); + lib3mf_function_findinput = loadFunctionByLookup(lookupMethod, "lib3mf_function_findinput"); + lib3mf_function_findoutput = loadFunctionByLookup(lookupMethod, "lib3mf_function_findoutput"); + lib3mf_implicitfunction_getidentifier = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_getidentifier"); + lib3mf_implicitfunction_setidentifier = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_setidentifier"); + lib3mf_implicitfunction_addnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addnode"); + lib3mf_implicitfunction_addsinnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addsinnode"); + lib3mf_implicitfunction_addcosnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addcosnode"); + lib3mf_implicitfunction_addtannode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addtannode"); + lib3mf_implicitfunction_addarcsinnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addarcsinnode"); + lib3mf_implicitfunction_addarccosnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addarccosnode"); + lib3mf_implicitfunction_addarctan2node = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addarctan2node"); + lib3mf_implicitfunction_addsinhnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addsinhnode"); + lib3mf_implicitfunction_addcoshnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addcoshnode"); + lib3mf_implicitfunction_addtanhnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addtanhnode"); + lib3mf_implicitfunction_addroundnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addroundnode"); + lib3mf_implicitfunction_addceilnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addceilnode"); + lib3mf_implicitfunction_addfloornode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addfloornode"); + lib3mf_implicitfunction_addsignnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addsignnode"); + lib3mf_implicitfunction_addfractnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addfractnode"); + lib3mf_implicitfunction_addabsnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addabsnode"); + lib3mf_implicitfunction_addexpnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addexpnode"); + lib3mf_implicitfunction_addlognode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addlognode"); + lib3mf_implicitfunction_addlog2node = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addlog2node"); + lib3mf_implicitfunction_addlog10node = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addlog10node"); + lib3mf_implicitfunction_addlengthnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addlengthnode"); + lib3mf_implicitfunction_addtransposenode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addtransposenode"); + lib3mf_implicitfunction_addinversenode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addinversenode"); + lib3mf_implicitfunction_addsqrtnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addsqrtnode"); + lib3mf_implicitfunction_addresourceidnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addresourceidnode"); + lib3mf_implicitfunction_addadditionnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addadditionnode"); + lib3mf_implicitfunction_addsubtractionnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addsubtractionnode"); + lib3mf_implicitfunction_addmultiplicationnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addmultiplicationnode"); + lib3mf_implicitfunction_adddivisionnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_adddivisionnode"); + lib3mf_implicitfunction_adddotnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_adddotnode"); + lib3mf_implicitfunction_addcrossnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addcrossnode"); + lib3mf_implicitfunction_addmatvecmultiplicationnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addmatvecmultiplicationnode"); + lib3mf_implicitfunction_addminnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addminnode"); + lib3mf_implicitfunction_addmaxnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addmaxnode"); + lib3mf_implicitfunction_addfmodnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addfmodnode"); + lib3mf_implicitfunction_addpownode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addpownode"); + lib3mf_implicitfunction_addselectnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addselectnode"); + lib3mf_implicitfunction_addclampnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addclampnode"); + lib3mf_implicitfunction_addcomposevectornode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addcomposevectornode"); + lib3mf_implicitfunction_addvectorfromscalarnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addvectorfromscalarnode"); + lib3mf_implicitfunction_adddecomposevectornode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_adddecomposevectornode"); + lib3mf_implicitfunction_addcomposematrixnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addcomposematrixnode"); + lib3mf_implicitfunction_addmatrixfromrowsnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addmatrixfromrowsnode"); + lib3mf_implicitfunction_addmatrixfromcolumnsnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addmatrixfromcolumnsnode"); + lib3mf_implicitfunction_addconstantnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addconstantnode"); + lib3mf_implicitfunction_addconstvecnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addconstvecnode"); + lib3mf_implicitfunction_addconstmatnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addconstmatnode"); + lib3mf_implicitfunction_addmeshnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addmeshnode"); + lib3mf_implicitfunction_addunsignedmeshnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addunsignedmeshnode"); + lib3mf_implicitfunction_addbeamlatticenode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addbeamlatticenode"); + lib3mf_implicitfunction_addfunctiongradientnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addfunctiongradientnode"); + lib3mf_implicitfunction_addnormalizedistancenode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addnormalizedistancenode"); + lib3mf_implicitfunction_addfunctioncallnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addfunctioncallnode"); + lib3mf_implicitfunction_getnodes = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_getnodes"); + lib3mf_implicitfunction_removenode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_removenode"); + lib3mf_implicitfunction_addlink = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addlink"); + lib3mf_implicitfunction_addlinkbynames = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addlinkbynames"); + lib3mf_implicitfunction_clear = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_clear"); + lib3mf_implicitfunction_sortnodestopologically = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_sortnodestopologically"); + lib3mf_functionfromimage3d_getimage3d = loadFunctionByLookup(lookupMethod, "lib3mf_functionfromimage3d_getimage3d"); + lib3mf_functionfromimage3d_setimage3d = loadFunctionByLookup(lookupMethod, "lib3mf_functionfromimage3d_setimage3d"); + lib3mf_functionfromimage3d_setfilter = loadFunctionByLookup(lookupMethod, "lib3mf_functionfromimage3d_setfilter"); + lib3mf_functionfromimage3d_getfilter = loadFunctionByLookup(lookupMethod, "lib3mf_functionfromimage3d_getfilter"); + lib3mf_functionfromimage3d_settilestyles = loadFunctionByLookup(lookupMethod, "lib3mf_functionfromimage3d_settilestyles"); + lib3mf_functionfromimage3d_gettilestyles = loadFunctionByLookup(lookupMethod, "lib3mf_functionfromimage3d_gettilestyles"); + lib3mf_functionfromimage3d_getoffset = loadFunctionByLookup(lookupMethod, "lib3mf_functionfromimage3d_getoffset"); + lib3mf_functionfromimage3d_setoffset = loadFunctionByLookup(lookupMethod, "lib3mf_functionfromimage3d_setoffset"); + lib3mf_functionfromimage3d_getscale = loadFunctionByLookup(lookupMethod, "lib3mf_functionfromimage3d_getscale"); + lib3mf_functionfromimage3d_setscale = loadFunctionByLookup(lookupMethod, "lib3mf_functionfromimage3d_setscale"); + lib3mf_builditem_getobjectresource = loadFunctionByLookup(lookupMethod, "lib3mf_builditem_getobjectresource"); + lib3mf_builditem_getuuid = loadFunctionByLookup(lookupMethod, "lib3mf_builditem_getuuid"); + lib3mf_builditem_setuuid = loadFunctionByLookup(lookupMethod, "lib3mf_builditem_setuuid"); + lib3mf_builditem_getobjectresourceid = loadFunctionByLookup(lookupMethod, "lib3mf_builditem_getobjectresourceid"); + lib3mf_builditem_hasobjecttransform = loadFunctionByLookup(lookupMethod, "lib3mf_builditem_hasobjecttransform"); + lib3mf_builditem_getobjecttransform = loadFunctionByLookup(lookupMethod, "lib3mf_builditem_getobjecttransform"); + lib3mf_builditem_setobjecttransform = loadFunctionByLookup(lookupMethod, "lib3mf_builditem_setobjecttransform"); + lib3mf_builditem_getpartnumber = loadFunctionByLookup(lookupMethod, "lib3mf_builditem_getpartnumber"); + lib3mf_builditem_setpartnumber = loadFunctionByLookup(lookupMethod, "lib3mf_builditem_setpartnumber"); + lib3mf_builditem_getmetadatagroup = loadFunctionByLookup(lookupMethod, "lib3mf_builditem_getmetadatagroup"); + lib3mf_builditem_getoutbox = loadFunctionByLookup(lookupMethod, "lib3mf_builditem_getoutbox"); + lib3mf_builditemiterator_movenext = loadFunctionByLookup(lookupMethod, "lib3mf_builditemiterator_movenext"); + lib3mf_builditemiterator_moveprevious = loadFunctionByLookup(lookupMethod, "lib3mf_builditemiterator_moveprevious"); + lib3mf_builditemiterator_getcurrent = loadFunctionByLookup(lookupMethod, "lib3mf_builditemiterator_getcurrent"); + lib3mf_builditemiterator_clone = loadFunctionByLookup(lookupMethod, "lib3mf_builditemiterator_clone"); + lib3mf_builditemiterator_count = loadFunctionByLookup(lookupMethod, "lib3mf_builditemiterator_count"); + lib3mf_slice_setvertices = loadFunctionByLookup(lookupMethod, "lib3mf_slice_setvertices"); + lib3mf_slice_getvertices = loadFunctionByLookup(lookupMethod, "lib3mf_slice_getvertices"); + lib3mf_slice_getvertexcount = loadFunctionByLookup(lookupMethod, "lib3mf_slice_getvertexcount"); + lib3mf_slice_addpolygon = loadFunctionByLookup(lookupMethod, "lib3mf_slice_addpolygon"); + lib3mf_slice_getpolygoncount = loadFunctionByLookup(lookupMethod, "lib3mf_slice_getpolygoncount"); + lib3mf_slice_setpolygonindices = loadFunctionByLookup(lookupMethod, "lib3mf_slice_setpolygonindices"); + lib3mf_slice_getpolygonindices = loadFunctionByLookup(lookupMethod, "lib3mf_slice_getpolygonindices"); + lib3mf_slice_getpolygonindexcount = loadFunctionByLookup(lookupMethod, "lib3mf_slice_getpolygonindexcount"); + lib3mf_slice_getztop = loadFunctionByLookup(lookupMethod, "lib3mf_slice_getztop"); + lib3mf_slicestack_getbottomz = loadFunctionByLookup(lookupMethod, "lib3mf_slicestack_getbottomz"); + lib3mf_slicestack_getslicecount = loadFunctionByLookup(lookupMethod, "lib3mf_slicestack_getslicecount"); + lib3mf_slicestack_getslice = loadFunctionByLookup(lookupMethod, "lib3mf_slicestack_getslice"); + lib3mf_slicestack_addslice = loadFunctionByLookup(lookupMethod, "lib3mf_slicestack_addslice"); + lib3mf_slicestack_getslicerefcount = loadFunctionByLookup(lookupMethod, "lib3mf_slicestack_getslicerefcount"); + lib3mf_slicestack_addslicestackreference = loadFunctionByLookup(lookupMethod, "lib3mf_slicestack_addslicestackreference"); + lib3mf_slicestack_getslicestackreference = loadFunctionByLookup(lookupMethod, "lib3mf_slicestack_getslicestackreference"); + lib3mf_slicestack_collapseslicereferences = loadFunctionByLookup(lookupMethod, "lib3mf_slicestack_collapseslicereferences"); + lib3mf_slicestack_setownpath = loadFunctionByLookup(lookupMethod, "lib3mf_slicestack_setownpath"); + lib3mf_slicestack_getownpath = loadFunctionByLookup(lookupMethod, "lib3mf_slicestack_getownpath"); + lib3mf_consumer_getconsumerid = loadFunctionByLookup(lookupMethod, "lib3mf_consumer_getconsumerid"); + lib3mf_consumer_getkeyid = loadFunctionByLookup(lookupMethod, "lib3mf_consumer_getkeyid"); + lib3mf_consumer_getkeyvalue = loadFunctionByLookup(lookupMethod, "lib3mf_consumer_getkeyvalue"); + lib3mf_accessright_getconsumer = loadFunctionByLookup(lookupMethod, "lib3mf_accessright_getconsumer"); + lib3mf_accessright_getwrappingalgorithm = loadFunctionByLookup(lookupMethod, "lib3mf_accessright_getwrappingalgorithm"); + lib3mf_accessright_getmgfalgorithm = loadFunctionByLookup(lookupMethod, "lib3mf_accessright_getmgfalgorithm"); + lib3mf_accessright_getdigestmethod = loadFunctionByLookup(lookupMethod, "lib3mf_accessright_getdigestmethod"); + lib3mf_contentencryptionparams_getencryptionalgorithm = loadFunctionByLookup(lookupMethod, "lib3mf_contentencryptionparams_getencryptionalgorithm"); + lib3mf_contentencryptionparams_getkey = loadFunctionByLookup(lookupMethod, "lib3mf_contentencryptionparams_getkey"); + lib3mf_contentencryptionparams_getinitializationvector = loadFunctionByLookup(lookupMethod, "lib3mf_contentencryptionparams_getinitializationvector"); + lib3mf_contentencryptionparams_getauthenticationtag = loadFunctionByLookup(lookupMethod, "lib3mf_contentencryptionparams_getauthenticationtag"); + lib3mf_contentencryptionparams_setauthenticationtag = loadFunctionByLookup(lookupMethod, "lib3mf_contentencryptionparams_setauthenticationtag"); + lib3mf_contentencryptionparams_getadditionalauthenticationdata = loadFunctionByLookup(lookupMethod, "lib3mf_contentencryptionparams_getadditionalauthenticationdata"); + lib3mf_contentencryptionparams_getdescriptor = loadFunctionByLookup(lookupMethod, "lib3mf_contentencryptionparams_getdescriptor"); + lib3mf_contentencryptionparams_getkeyuuid = loadFunctionByLookup(lookupMethod, "lib3mf_contentencryptionparams_getkeyuuid"); + lib3mf_resourcedata_getpath = loadFunctionByLookup(lookupMethod, "lib3mf_resourcedata_getpath"); + lib3mf_resourcedata_getencryptionalgorithm = loadFunctionByLookup(lookupMethod, "lib3mf_resourcedata_getencryptionalgorithm"); + lib3mf_resourcedata_getcompression = loadFunctionByLookup(lookupMethod, "lib3mf_resourcedata_getcompression"); + lib3mf_resourcedata_getadditionalauthenticationdata = loadFunctionByLookup(lookupMethod, "lib3mf_resourcedata_getadditionalauthenticationdata"); + lib3mf_resourcedatagroup_getkeyuuid = loadFunctionByLookup(lookupMethod, "lib3mf_resourcedatagroup_getkeyuuid"); + lib3mf_resourcedatagroup_addaccessright = loadFunctionByLookup(lookupMethod, "lib3mf_resourcedatagroup_addaccessright"); + lib3mf_resourcedatagroup_findaccessrightbyconsumer = loadFunctionByLookup(lookupMethod, "lib3mf_resourcedatagroup_findaccessrightbyconsumer"); + lib3mf_resourcedatagroup_removeaccessright = loadFunctionByLookup(lookupMethod, "lib3mf_resourcedatagroup_removeaccessright"); + lib3mf_keystore_addconsumer = loadFunctionByLookup(lookupMethod, "lib3mf_keystore_addconsumer"); + lib3mf_keystore_getconsumercount = loadFunctionByLookup(lookupMethod, "lib3mf_keystore_getconsumercount"); + lib3mf_keystore_getconsumer = loadFunctionByLookup(lookupMethod, "lib3mf_keystore_getconsumer"); + lib3mf_keystore_removeconsumer = loadFunctionByLookup(lookupMethod, "lib3mf_keystore_removeconsumer"); + lib3mf_keystore_findconsumer = loadFunctionByLookup(lookupMethod, "lib3mf_keystore_findconsumer"); + lib3mf_keystore_getresourcedatagroupcount = loadFunctionByLookup(lookupMethod, "lib3mf_keystore_getresourcedatagroupcount"); + lib3mf_keystore_addresourcedatagroup = loadFunctionByLookup(lookupMethod, "lib3mf_keystore_addresourcedatagroup"); + lib3mf_keystore_getresourcedatagroup = loadFunctionByLookup(lookupMethod, "lib3mf_keystore_getresourcedatagroup"); + lib3mf_keystore_removeresourcedatagroup = loadFunctionByLookup(lookupMethod, "lib3mf_keystore_removeresourcedatagroup"); + lib3mf_keystore_findresourcedatagroup = loadFunctionByLookup(lookupMethod, "lib3mf_keystore_findresourcedatagroup"); + lib3mf_keystore_addresourcedata = loadFunctionByLookup(lookupMethod, "lib3mf_keystore_addresourcedata"); + lib3mf_keystore_removeresourcedata = loadFunctionByLookup(lookupMethod, "lib3mf_keystore_removeresourcedata"); + lib3mf_keystore_findresourcedata = loadFunctionByLookup(lookupMethod, "lib3mf_keystore_findresourcedata"); + lib3mf_keystore_getresourcedatacount = loadFunctionByLookup(lookupMethod, "lib3mf_keystore_getresourcedatacount"); + lib3mf_keystore_getresourcedata = loadFunctionByLookup(lookupMethod, "lib3mf_keystore_getresourcedata"); + lib3mf_keystore_getuuid = loadFunctionByLookup(lookupMethod, "lib3mf_keystore_getuuid"); + lib3mf_keystore_setuuid = loadFunctionByLookup(lookupMethod, "lib3mf_keystore_setuuid"); + lib3mf_model_rootmodelpart = loadFunctionByLookup(lookupMethod, "lib3mf_model_rootmodelpart"); + lib3mf_model_findorcreatepackagepart = loadFunctionByLookup(lookupMethod, "lib3mf_model_findorcreatepackagepart"); + lib3mf_model_setunit = loadFunctionByLookup(lookupMethod, "lib3mf_model_setunit"); + lib3mf_model_getunit = loadFunctionByLookup(lookupMethod, "lib3mf_model_getunit"); + lib3mf_model_getlanguage = loadFunctionByLookup(lookupMethod, "lib3mf_model_getlanguage"); + lib3mf_model_setlanguage = loadFunctionByLookup(lookupMethod, "lib3mf_model_setlanguage"); + lib3mf_model_querywriter = loadFunctionByLookup(lookupMethod, "lib3mf_model_querywriter"); + lib3mf_model_queryreader = loadFunctionByLookup(lookupMethod, "lib3mf_model_queryreader"); + lib3mf_model_getresourcebyid = loadFunctionByLookup(lookupMethod, "lib3mf_model_getresourcebyid"); + lib3mf_model_gettexture2dbyid = loadFunctionByLookup(lookupMethod, "lib3mf_model_gettexture2dbyid"); + lib3mf_model_getpropertytypebyid = loadFunctionByLookup(lookupMethod, "lib3mf_model_getpropertytypebyid"); + lib3mf_model_getbasematerialgroupbyid = loadFunctionByLookup(lookupMethod, "lib3mf_model_getbasematerialgroupbyid"); + lib3mf_model_gettexture2dgroupbyid = loadFunctionByLookup(lookupMethod, "lib3mf_model_gettexture2dgroupbyid"); + lib3mf_model_getcompositematerialsbyid = loadFunctionByLookup(lookupMethod, "lib3mf_model_getcompositematerialsbyid"); + lib3mf_model_getmultipropertygroupbyid = loadFunctionByLookup(lookupMethod, "lib3mf_model_getmultipropertygroupbyid"); + lib3mf_model_getmeshobjectbyid = loadFunctionByLookup(lookupMethod, "lib3mf_model_getmeshobjectbyid"); + lib3mf_model_getcomponentsobjectbyid = loadFunctionByLookup(lookupMethod, "lib3mf_model_getcomponentsobjectbyid"); + lib3mf_model_getcolorgroupbyid = loadFunctionByLookup(lookupMethod, "lib3mf_model_getcolorgroupbyid"); + lib3mf_model_getslicestackbyid = loadFunctionByLookup(lookupMethod, "lib3mf_model_getslicestackbyid"); + lib3mf_model_getlevelsetbyid = loadFunctionByLookup(lookupMethod, "lib3mf_model_getlevelsetbyid"); + lib3mf_model_getbuilduuid = loadFunctionByLookup(lookupMethod, "lib3mf_model_getbuilduuid"); + lib3mf_model_setbuilduuid = loadFunctionByLookup(lookupMethod, "lib3mf_model_setbuilduuid"); + lib3mf_model_getbuilditems = loadFunctionByLookup(lookupMethod, "lib3mf_model_getbuilditems"); + lib3mf_model_getoutbox = loadFunctionByLookup(lookupMethod, "lib3mf_model_getoutbox"); + lib3mf_model_getresources = loadFunctionByLookup(lookupMethod, "lib3mf_model_getresources"); + lib3mf_model_getobjects = loadFunctionByLookup(lookupMethod, "lib3mf_model_getobjects"); + lib3mf_model_getmeshobjects = loadFunctionByLookup(lookupMethod, "lib3mf_model_getmeshobjects"); + lib3mf_model_getcomponentsobjects = loadFunctionByLookup(lookupMethod, "lib3mf_model_getcomponentsobjects"); + lib3mf_model_gettexture2ds = loadFunctionByLookup(lookupMethod, "lib3mf_model_gettexture2ds"); + lib3mf_model_getbasematerialgroups = loadFunctionByLookup(lookupMethod, "lib3mf_model_getbasematerialgroups"); + lib3mf_model_getcolorgroups = loadFunctionByLookup(lookupMethod, "lib3mf_model_getcolorgroups"); + lib3mf_model_gettexture2dgroups = loadFunctionByLookup(lookupMethod, "lib3mf_model_gettexture2dgroups"); + lib3mf_model_getcompositematerials = loadFunctionByLookup(lookupMethod, "lib3mf_model_getcompositematerials"); + lib3mf_model_getmultipropertygroups = loadFunctionByLookup(lookupMethod, "lib3mf_model_getmultipropertygroups"); + lib3mf_model_getslicestacks = loadFunctionByLookup(lookupMethod, "lib3mf_model_getslicestacks"); + lib3mf_model_getimage3ds = loadFunctionByLookup(lookupMethod, "lib3mf_model_getimage3ds"); + lib3mf_model_mergetomodel = loadFunctionByLookup(lookupMethod, "lib3mf_model_mergetomodel"); + lib3mf_model_mergefrommodel = loadFunctionByLookup(lookupMethod, "lib3mf_model_mergefrommodel"); + lib3mf_model_addmeshobject = loadFunctionByLookup(lookupMethod, "lib3mf_model_addmeshobject"); + lib3mf_model_addcomponentsobject = loadFunctionByLookup(lookupMethod, "lib3mf_model_addcomponentsobject"); + lib3mf_model_addslicestack = loadFunctionByLookup(lookupMethod, "lib3mf_model_addslicestack"); + lib3mf_model_addtexture2dfromattachment = loadFunctionByLookup(lookupMethod, "lib3mf_model_addtexture2dfromattachment"); + lib3mf_model_addbasematerialgroup = loadFunctionByLookup(lookupMethod, "lib3mf_model_addbasematerialgroup"); + lib3mf_model_addcolorgroup = loadFunctionByLookup(lookupMethod, "lib3mf_model_addcolorgroup"); + lib3mf_model_addtexture2dgroup = loadFunctionByLookup(lookupMethod, "lib3mf_model_addtexture2dgroup"); + lib3mf_model_addcompositematerials = loadFunctionByLookup(lookupMethod, "lib3mf_model_addcompositematerials"); + lib3mf_model_addmultipropertygroup = loadFunctionByLookup(lookupMethod, "lib3mf_model_addmultipropertygroup"); + lib3mf_model_addimagestack = loadFunctionByLookup(lookupMethod, "lib3mf_model_addimagestack"); + lib3mf_model_getimagestackbyid = loadFunctionByLookup(lookupMethod, "lib3mf_model_getimagestackbyid"); + lib3mf_model_addbuilditem = loadFunctionByLookup(lookupMethod, "lib3mf_model_addbuilditem"); + lib3mf_model_removebuilditem = loadFunctionByLookup(lookupMethod, "lib3mf_model_removebuilditem"); + lib3mf_model_getmetadatagroup = loadFunctionByLookup(lookupMethod, "lib3mf_model_getmetadatagroup"); + lib3mf_model_addattachment = loadFunctionByLookup(lookupMethod, "lib3mf_model_addattachment"); + lib3mf_model_removeattachment = loadFunctionByLookup(lookupMethod, "lib3mf_model_removeattachment"); + lib3mf_model_getattachment = loadFunctionByLookup(lookupMethod, "lib3mf_model_getattachment"); + lib3mf_model_findattachment = loadFunctionByLookup(lookupMethod, "lib3mf_model_findattachment"); + lib3mf_model_getattachmentcount = loadFunctionByLookup(lookupMethod, "lib3mf_model_getattachmentcount"); + lib3mf_model_haspackagethumbnailattachment = loadFunctionByLookup(lookupMethod, "lib3mf_model_haspackagethumbnailattachment"); + lib3mf_model_createpackagethumbnailattachment = loadFunctionByLookup(lookupMethod, "lib3mf_model_createpackagethumbnailattachment"); + lib3mf_model_getpackagethumbnailattachment = loadFunctionByLookup(lookupMethod, "lib3mf_model_getpackagethumbnailattachment"); + lib3mf_model_removepackagethumbnailattachment = loadFunctionByLookup(lookupMethod, "lib3mf_model_removepackagethumbnailattachment"); + lib3mf_model_addcustomcontenttype = loadFunctionByLookup(lookupMethod, "lib3mf_model_addcustomcontenttype"); + lib3mf_model_removecustomcontenttype = loadFunctionByLookup(lookupMethod, "lib3mf_model_removecustomcontenttype"); + lib3mf_model_setrandomnumbercallback = loadFunctionByLookup(lookupMethod, "lib3mf_model_setrandomnumbercallback"); + lib3mf_model_getkeystore = loadFunctionByLookup(lookupMethod, "lib3mf_model_getkeystore"); + lib3mf_model_getfunctions = loadFunctionByLookup(lookupMethod, "lib3mf_model_getfunctions"); + lib3mf_model_addimplicitfunction = loadFunctionByLookup(lookupMethod, "lib3mf_model_addimplicitfunction"); + lib3mf_model_addfunctionfromimage3d = loadFunctionByLookup(lookupMethod, "lib3mf_model_addfunctionfromimage3d"); + lib3mf_model_addvolumedata = loadFunctionByLookup(lookupMethod, "lib3mf_model_addvolumedata"); + lib3mf_model_addlevelset = loadFunctionByLookup(lookupMethod, "lib3mf_model_addlevelset"); + lib3mf_model_getlevelsets = loadFunctionByLookup(lookupMethod, "lib3mf_model_getlevelsets"); + lib3mf_model_removeresource = loadFunctionByLookup(lookupMethod, "lib3mf_model_removeresource"); + } + + protected void checkError(Base instance, int errorCode) throws Lib3MFException { + if (instance != null && instance.mWrapper != this) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDCAST, "invalid wrapper call"); + } + if (errorCode != Lib3MFException.LIB3MF_SUCCESS) { + if (instance != null) { + GetLastErrorResult result = getLastError(instance); + throw new Lib3MFException(errorCode, result.LastErrorString); + } else { + throw new Lib3MFException(errorCode, ""); + } + } + } + + private com.sun.jna.Function loadFunctionByLookup(com.sun.jna.Function lookupMethod, String functionName) throws Lib3MFException { + byte[] bytes = functionName.getBytes(StandardCharsets.UTF_8); + Memory name = new Memory(bytes.length+1); + name.write(0, bytes, 0, bytes.length); + name.setByte(bytes.length, (byte)0); + Pointer address = new Memory(8); + java.lang.Object[] addressParam = new java.lang.Object[]{name, address}; + checkError(null, lookupMethod.invokeInt(addressParam)); + return com.sun.jna.Function.getFunction(address.getPointer(0)); + } + + /** + * retrieves the binary version of this library. + * + * @return GetLibraryVersion Result Tuple + * @throws Lib3MFException + */ + public GetLibraryVersionResult getLibraryVersion() throws Lib3MFException { + Pointer bufferMajor = new Memory(4); + Pointer bufferMinor = new Memory(4); + Pointer bufferMicro = new Memory(4); + checkError(null, lib3mf_getlibraryversion.invokeInt(new java.lang.Object[]{bufferMajor, bufferMinor, bufferMicro})); + GetLibraryVersionResult returnTuple = new GetLibraryVersionResult(); + returnTuple.Major = bufferMajor.getInt(0); + returnTuple.Minor = bufferMinor.getInt(0); + returnTuple.Micro = bufferMicro.getInt(0); + return returnTuple; + } + + public static class GetLibraryVersionResult { + /** + * returns the major version of this library + */ + public int Major; + + /** + * returns the minor version of this library + */ + public int Minor; + + /** + * returns the micro version of this library + */ + public int Micro; + + } + /** + * retrieves prerelease information of this library. + * + * @return GetPrereleaseInformation Result Tuple + * @throws Lib3MFException + */ + public GetPrereleaseInformationResult getPrereleaseInformation() throws Lib3MFException { + Pointer bufferHasPrereleaseInfo = new Memory(1); + Pointer bytesNeededPrereleaseInfo = new Memory(4); + checkError(null, lib3mf_getprereleaseinformation.invokeInt(new java.lang.Object[]{bufferHasPrereleaseInfo, 0, bytesNeededPrereleaseInfo, null})); + int sizePrereleaseInfo = bytesNeededPrereleaseInfo.getInt(0); + Pointer bufferPrereleaseInfo = new Memory(sizePrereleaseInfo); + checkError(null, lib3mf_getprereleaseinformation.invokeInt(new java.lang.Object[]{bufferHasPrereleaseInfo, sizePrereleaseInfo, bytesNeededPrereleaseInfo, bufferPrereleaseInfo})); + GetPrereleaseInformationResult returnTuple = new GetPrereleaseInformationResult(); + returnTuple.HasPrereleaseInfo = bufferHasPrereleaseInfo.getByte(0) != 0; + returnTuple.PrereleaseInfo = new String(bufferPrereleaseInfo.getByteArray(0, sizePrereleaseInfo - 1), StandardCharsets.UTF_8); + return returnTuple; + } + + public static class GetPrereleaseInformationResult { + /** + * Does the library provide prerelease version? + */ + public boolean HasPrereleaseInfo; + + /** + * retrieves prerelease information of this library. + */ + public String PrereleaseInfo; + + } + /** + * retrieves build information of this library. + * + * @return GetBuildInformation Result Tuple + * @throws Lib3MFException + */ + public GetBuildInformationResult getBuildInformation() throws Lib3MFException { + Pointer bufferHasBuildInfo = new Memory(1); + Pointer bytesNeededBuildInformation = new Memory(4); + checkError(null, lib3mf_getbuildinformation.invokeInt(new java.lang.Object[]{bufferHasBuildInfo, 0, bytesNeededBuildInformation, null})); + int sizeBuildInformation = bytesNeededBuildInformation.getInt(0); + Pointer bufferBuildInformation = new Memory(sizeBuildInformation); + checkError(null, lib3mf_getbuildinformation.invokeInt(new java.lang.Object[]{bufferHasBuildInfo, sizeBuildInformation, bytesNeededBuildInformation, bufferBuildInformation})); + GetBuildInformationResult returnTuple = new GetBuildInformationResult(); + returnTuple.HasBuildInfo = bufferHasBuildInfo.getByte(0) != 0; + returnTuple.BuildInformation = new String(bufferBuildInformation.getByteArray(0, sizeBuildInformation - 1), StandardCharsets.UTF_8); + return returnTuple; + } + + public static class GetBuildInformationResult { + /** + * Does the library provide build version? + */ + public boolean HasBuildInfo; + + /** + * retrieves build information of this library. + */ + public String BuildInformation; + + } + /** + * retrieves whether a specification is supported, and if so, which version. + * + * @param specificationURL URL of extension to check + * @return GetSpecificationVersion Result Tuple + * @throws Lib3MFException + */ + public GetSpecificationVersionResult getSpecificationVersion(String specificationURL) throws Lib3MFException { + byte[] bytesSpecificationURL = specificationURL.getBytes(StandardCharsets.UTF_8); + Memory bufferSpecificationURL = new Memory(bytesSpecificationURL.length + 1); + bufferSpecificationURL.write(0, bytesSpecificationURL, 0, bytesSpecificationURL.length); + bufferSpecificationURL.setByte(bytesSpecificationURL.length, (byte)0); + Pointer bufferIsSupported = new Memory(1); + Pointer bufferMajor = new Memory(4); + Pointer bufferMinor = new Memory(4); + Pointer bufferMicro = new Memory(4); + checkError(null, lib3mf_getspecificationversion.invokeInt(new java.lang.Object[]{bufferSpecificationURL, bufferIsSupported, bufferMajor, bufferMinor, bufferMicro})); + GetSpecificationVersionResult returnTuple = new GetSpecificationVersionResult(); + returnTuple.IsSupported = bufferIsSupported.getByte(0) != 0; + returnTuple.Major = bufferMajor.getInt(0); + returnTuple.Minor = bufferMinor.getInt(0); + returnTuple.Micro = bufferMicro.getInt(0); + return returnTuple; + } + + public static class GetSpecificationVersionResult { + /** + * returns whether this specification is supported + */ + public boolean IsSupported; + + /** + * returns the major version of the extension (if IsSupported) + */ + public int Major; + + /** + * returns the minor version of the extension (if IsSupported) + */ + public int Minor; + + /** + * returns the micro version of the extension (if IsSupported) + */ + public int Micro; + + } + /** + * creates an empty model instance. + * + * @return returns an empty model instance + * @throws Lib3MFException + */ + public Model createModel() throws Lib3MFException { + Pointer bufferModel = new Memory(8); + checkError(null, lib3mf_createmodel.invokeInt(new java.lang.Object[]{bufferModel})); + Pointer valueModel = bufferModel.getPointer(0); + Model model = null; + if (valueModel == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Model was a null pointer"); + } + model = this.PolymorphicFactory(valueModel, Model.class); + return model; + } + + /** + * releases shared ownership of an object instance + * + * @param instance the object instance to release + * @throws Lib3MFException + */ + public void release(Base instance) throws Lib3MFException { + Pointer instanceHandle = null; + if (instance != null) { + instanceHandle = instance.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Instance is a null value."); + } + checkError(null, lib3mf_release.invokeInt(new java.lang.Object[]{instanceHandle})); + } + + /** + * acquires shared ownership of an object instance + * + * @param instance the object instance to acquire + * @throws Lib3MFException + */ + public void acquire(Base instance) throws Lib3MFException { + Pointer instanceHandle = null; + if (instance != null) { + instanceHandle = instance.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Instance is a null value."); + } + checkError(null, lib3mf_acquire.invokeInt(new java.lang.Object[]{instanceHandle})); + } + + /** + * Sets the journal file path + * + * @param journalPath File name of the journal file + * @throws Lib3MFException + */ + public void setJournal(String journalPath) throws Lib3MFException { + byte[] bytesJournalPath = journalPath.getBytes(StandardCharsets.UTF_8); + Memory bufferJournalPath = new Memory(bytesJournalPath.length + 1); + bufferJournalPath.write(0, bytesJournalPath, 0, bytesJournalPath.length); + bufferJournalPath.setByte(bytesJournalPath.length, (byte)0); + checkError(null, lib3mf_setjournal.invokeInt(new java.lang.Object[]{bufferJournalPath})); + } + + /** + * Retrieves the last error string of an instance + * + * @param instance Object where the error occured. + * @return GetLastError Result Tuple + * @throws Lib3MFException + */ + public GetLastErrorResult getLastError(Base instance) throws Lib3MFException { + Pointer instanceHandle = null; + if (instance != null) { + instanceHandle = instance.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Instance is a null value."); + } + Pointer bytesNeededLastErrorString = new Memory(4); + Pointer bufferHasLastError = new Memory(1); + checkError(null, lib3mf_getlasterror.invokeInt(new java.lang.Object[]{instanceHandle, 0, bytesNeededLastErrorString, null, bufferHasLastError})); + int sizeLastErrorString = bytesNeededLastErrorString.getInt(0); + Pointer bufferLastErrorString = new Memory(sizeLastErrorString); + checkError(null, lib3mf_getlasterror.invokeInt(new java.lang.Object[]{instanceHandle, sizeLastErrorString, bytesNeededLastErrorString, bufferLastErrorString, bufferHasLastError})); + GetLastErrorResult returnTuple = new GetLastErrorResult(); + returnTuple.LastErrorString = new String(bufferLastErrorString.getByteArray(0, sizeLastErrorString - 1), StandardCharsets.UTF_8); + returnTuple.HasLastError = bufferHasLastError.getByte(0) != 0; + return returnTuple; + } + + public static class GetLastErrorResult { + /** + * Last Error String + */ + public String LastErrorString; + + /** + * Returns if the instance has a last error. + */ + public boolean HasLastError; + + } + /** + * Returns the address of the SymbolLookupMethod + * + * @return Address of the SymbolAddressMethod + * @throws Lib3MFException + */ + public Pointer getSymbolLookupMethod() throws Lib3MFException { + Pointer bufferSymbolLookupMethod = new Memory(8); + checkError(null, lib3mf_getsymbollookupmethod.invokeInt(new java.lang.Object[]{bufferSymbolLookupMethod})); + return bufferSymbolLookupMethod.getPointer(0); + } + + /** + * Return an English text for a progress identifier.|Note: this is the only function you can call from your callback function. + * + * @param theProgressIdentifier the progress identifier that is passed to the callback function + * @return English text for the progress identifier + * @throws Lib3MFException + */ + public String retrieveProgressMessage(Lib3MFWrapper.ProgressIdentifier theProgressIdentifier) throws Lib3MFException { + Pointer bytesNeededProgressMessage = new Memory(4); + checkError(null, lib3mf_retrieveprogressmessage.invokeInt(new java.lang.Object[]{Lib3MFWrapper.EnumConversion.convertProgressIdentifierToConst(theProgressIdentifier), 0, bytesNeededProgressMessage, null})); + int sizeProgressMessage = bytesNeededProgressMessage.getInt(0); + Pointer bufferProgressMessage = new Memory(sizeProgressMessage); + checkError(null, lib3mf_retrieveprogressmessage.invokeInt(new java.lang.Object[]{Lib3MFWrapper.EnumConversion.convertProgressIdentifierToConst(theProgressIdentifier), sizeProgressMessage, bytesNeededProgressMessage, bufferProgressMessage})); + return new String(bufferProgressMessage.getByteArray(0, sizeProgressMessage - 1), StandardCharsets.UTF_8); + } + + /** + * Creates a Color from uint8 RGBA values + * + * @param red Red value of color (0-255) + * @param green Green value of color (0-255) + * @param blue Blue value of color (0-255) + * @param alpha Alpha value of color (0-255) + * @return Assembled color + * @throws Lib3MFException + */ + public Color rGBAToColor(byte red, byte green, byte blue, byte alpha) throws Lib3MFException { + Pointer bufferTheColor = new Memory(Color.SIZE); + checkError(null, lib3mf_rgbatocolor.invokeInt(new java.lang.Object[]{red, green, blue, alpha, bufferTheColor})); + Color theColor = new Color(); + theColor.readFromPointer(bufferTheColor, 0); + return theColor; + } + + /** + * Creates a Color from uint8 RGBA values + * + * @param red Red value of color (0-1) + * @param green Green value of color (0-1) + * @param blue Blue value of color (0-1) + * @param alpha Alpha value of color (0-1) + * @return Assembled color + * @throws Lib3MFException + */ + public Color floatRGBAToColor(float red, float green, float blue, float alpha) throws Lib3MFException { + Pointer bufferTheColor = new Memory(Color.SIZE); + checkError(null, lib3mf_floatrgbatocolor.invokeInt(new java.lang.Object[]{red, green, blue, alpha, bufferTheColor})); + Color theColor = new Color(); + theColor.readFromPointer(bufferTheColor, 0); + return theColor; + } + + /** + * Calculates uint8-RGBA-values from a Color + * + * @param theColor Color to handle + * @return ColorToRGBA Result Tuple + * @throws Lib3MFException + */ + public ColorToRGBAResult colorToRGBA(Color theColor) throws Lib3MFException { + Pointer bufferTheColor = new Memory(Color.SIZE); + theColor.writeToPointer(bufferTheColor, 0); + Pointer bufferRed = new Memory(1); + Pointer bufferGreen = new Memory(1); + Pointer bufferBlue = new Memory(1); + Pointer bufferAlpha = new Memory(1); + checkError(null, lib3mf_colortorgba.invokeInt(new java.lang.Object[]{bufferTheColor, bufferRed, bufferGreen, bufferBlue, bufferAlpha})); + ColorToRGBAResult returnTuple = new ColorToRGBAResult(); + returnTuple.Red = bufferRed.getByte(0); + returnTuple.Green = bufferGreen.getByte(0); + returnTuple.Blue = bufferBlue.getByte(0); + returnTuple.Alpha = bufferAlpha.getByte(0); + return returnTuple; + } + + public static class ColorToRGBAResult { + /** + * Red value of color (0-255) + */ + public byte Red; + + /** + * Green value of color (0-255) + */ + public byte Green; + + /** + * Blue value of color (0-255) + */ + public byte Blue; + + /** + * Alpha value of color (0-255) + */ + public byte Alpha; + + } + /** + * Calculates float-RGBA-values from a Color + * + * @param theColor Color to handle + * @return ColorToFloatRGBA Result Tuple + * @throws Lib3MFException + */ + public ColorToFloatRGBAResult colorToFloatRGBA(Color theColor) throws Lib3MFException { + Pointer bufferTheColor = new Memory(Color.SIZE); + theColor.writeToPointer(bufferTheColor, 0); + Pointer bufferRed = new Memory(4); + Pointer bufferGreen = new Memory(4); + Pointer bufferBlue = new Memory(4); + Pointer bufferAlpha = new Memory(4); + checkError(null, lib3mf_colortofloatrgba.invokeInt(new java.lang.Object[]{bufferTheColor, bufferRed, bufferGreen, bufferBlue, bufferAlpha})); + ColorToFloatRGBAResult returnTuple = new ColorToFloatRGBAResult(); + returnTuple.Red = bufferRed.getFloat(0); + returnTuple.Green = bufferGreen.getFloat(0); + returnTuple.Blue = bufferBlue.getFloat(0); + returnTuple.Alpha = bufferAlpha.getFloat(0); + return returnTuple; + } + + public static class ColorToFloatRGBAResult { + /** + * Red value of color (0-1) + */ + public float Red; + + /** + * Green value of color (0-1) + */ + public float Green; + + /** + * Blue value of color (0-1) + */ + public float Blue; + + /** + * Alpha value of color (0-1) + */ + public float Alpha; + + } + /** + * Creates an identity transform + * + * @return Transformation matrix. + * @throws Lib3MFException + */ + public Transform getIdentityTransform() throws Lib3MFException { + Pointer bufferTransform = new Memory(Transform.SIZE); + checkError(null, lib3mf_getidentitytransform.invokeInt(new java.lang.Object[]{bufferTransform})); + Transform transform = new Transform(); + transform.readFromPointer(bufferTransform, 0); + return transform; + } + + /** + * Creates a uniform scale transform + * + * @param factor Factor in X, Y and Z + * @return Transformation matrix. + * @throws Lib3MFException + */ + public Transform getUniformScaleTransform(float factor) throws Lib3MFException { + Pointer bufferTransform = new Memory(Transform.SIZE); + checkError(null, lib3mf_getuniformscaletransform.invokeInt(new java.lang.Object[]{factor, bufferTransform})); + Transform transform = new Transform(); + transform.readFromPointer(bufferTransform, 0); + return transform; + } + + /** + * Creates a scale transform + * + * @param factorX Factor in X + * @param factorY Factor in Y + * @param factorZ Factor in Z + * @return Transformation matrix. + * @throws Lib3MFException + */ + public Transform getScaleTransform(float factorX, float factorY, float factorZ) throws Lib3MFException { + Pointer bufferTransform = new Memory(Transform.SIZE); + checkError(null, lib3mf_getscaletransform.invokeInt(new java.lang.Object[]{factorX, factorY, factorZ, bufferTransform})); + Transform transform = new Transform(); + transform.readFromPointer(bufferTransform, 0); + return transform; + } + + /** + * Creates an translation transform + * + * @param vectorX Translation in X + * @param vectorY Translation in Y + * @param vectorZ Translation in Z + * @return Transformation matrix. + * @throws Lib3MFException + */ + public Transform getTranslationTransform(float vectorX, float vectorY, float vectorZ) throws Lib3MFException { + Pointer bufferTransform = new Memory(Transform.SIZE); + checkError(null, lib3mf_gettranslationtransform.invokeInt(new java.lang.Object[]{vectorX, vectorY, vectorZ, bufferTransform})); + Transform transform = new Transform(); + transform.readFromPointer(bufferTransform, 0); + return transform; + } + + /** + * IMPORTANT: PolymorphicFactory method should not be used by application directly. + * It's designed to be used on Lib3MFHandle object only once. + * If it's used on any existing object as a form of dynamic cast then + * Lib3MFWrapper::acquireInstance(Base object) must be called after instantiating new object. + * This is important to keep reference count matching between application and library sides. + */ + public T PolymorphicFactory(Pointer handle, Class cls) { + if (handle == Pointer.NULL) + return null; + Class[] cArg = new Class[2]; + cArg[0] = Lib3MFWrapper.class; + cArg[1] = Pointer.class; + + try { + T obj = null; + Pointer bufferClassTypeId = new Memory(8); + checkError(null, lib3mf_base_classtypeid.invokeInt(new java.lang.Object[]{handle, bufferClassTypeId})); + long classTypeId = bufferClassTypeId.getLong(0); + + int msbId = (int)(classTypeId >> 32); + int lsbId = (int)classTypeId; + switch(msbId) { + case 0x0070021D: + switch(lsbId) { + case 0x73AA89FD: obj = (T)(new LogNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::LogNode" + } + break; + case 0x0437E27A: + switch(lsbId) { + case 0xEF740121: obj = (T)(new FunctionGradientNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionGradientNode" + } + break; + case 0x073F9103: + switch(lsbId) { + case 0x81BF250D: obj = (T)(new MaxNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::MaxNode" + } + break; + case 0x0765C17C: + switch(lsbId) { + case 0x952F24E3: obj = (T)(new FunctionCallNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionCallNode" + } + break; + case 0x0C3B8536: + switch(lsbId) { + case 0x9E9B25D3: obj = (T)(new MetaDataGroup(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::MetaDataGroup" + } + break; + case 0x0DCBEAFC: + switch(lsbId) { + case 0xF83F3AAC: obj = (T)(new MatrixFromColumnsNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::MatrixFromColumnsNode" + } + break; + case 0x0E55A826: + switch(lsbId) { + case 0xD377483E: obj = (T)(new PackagePart(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::PackagePart" + } + break; + case 0x0F3A4EE9: + switch(lsbId) { + case 0x8F7FEC0C: obj = (T)(new BeamLatticeNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::BeamLatticeNode" + } + break; + case 0x10274A17: + switch(lsbId) { + case 0x57C729C0: obj = (T)(new ColorGroupIterator(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ColorGroupIterator" + } + break; + case 0x106182D3: + switch(lsbId) { + case 0x8CA5CFE3: obj = (T)(new CrossNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::CrossNode" + } + break; + case 0x1127ED71: + switch(lsbId) { + case 0xE05A9BD4: obj = (T)(new SelectNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::SelectNode" + } + break; + case 0x13A2561F: + switch(lsbId) { + case 0x0CFB712A: obj = (T)(new ImageStack(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ImageStack" + } + break; + case 0x1A47A5E2: + switch(lsbId) { + case 0x58E22EF9: obj = (T)(new ResourceData(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ResourceData" + } + break; + case 0x1CC9E0CC: + switch(lsbId) { + case 0x082253C6: obj = (T)(new KeyStore(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::KeyStore" + } + break; + case 0x1EF703D2: + switch(lsbId) { + case 0x98223F2A: obj = (T)(new FmodNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::FmodNode" + } + break; + case 0x2198BCF4: + switch(lsbId) { + case 0xD8DF9C40: obj = (T)(new Slice(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Slice" + } + break; + case 0x241FE6B4: + switch(lsbId) { + case 0x817C3FE4: obj = (T)(new MaterialMapping(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::MaterialMapping" + } + break; + case 0x2614CC57: + switch(lsbId) { + case 0x2AF350B7: obj = (T)(new TanNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::TanNode" + } + break; + case 0x29985A62: + switch(lsbId) { + case 0x8251A9CD: obj = (T)(new UnsignedMeshNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::UnsignedMeshNode" + } + break; + case 0x2D86831D: + switch(lsbId) { + case 0xA59FBE72: obj = (T)(new Reader(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Reader" + } + break; + case 0x2DA2136F: + switch(lsbId) { + case 0x577A779C: obj = (T)(new Object(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Object" + } + break; + case 0x2E417B93: + switch(lsbId) { + case 0x351375E2: obj = (T)(new VectorFromScalarNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::VectorFromScalarNode" + } + break; + case 0x30CCDBE9: + switch(lsbId) { + case 0x0E00B55B: obj = (T)(new BeamSet(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::BeamSet" + } + break; + case 0x30D55F4D: + switch(lsbId) { + case 0xB88FE0CA: obj = (T)(new Texture2DGroupIterator(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2DGroupIterator" + } + break; + case 0x3390243A: + switch(lsbId) { + case 0x8E2410F3: obj = (T)(new ExpNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ExpNode" + } + break; + case 0x385C42FC: + switch(lsbId) { + case 0x5609498A: obj = (T)(new AccessRight(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::AccessRight" + } + break; + case 0x392A0F4C: + switch(lsbId) { + case 0x041D249C: obj = (T)(new FloorNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::FloorNode" + } + break; + case 0x3B3A6DC6: + switch(lsbId) { + case 0xEC610497: obj = (T)(new MeshObject(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::MeshObject" + } + break; + case 0x3C7756A4: + switch(lsbId) { + case 0x56F2D089: obj = (T)(new SinhNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::SinhNode" + } + break; + case 0x3F8E5D08: + switch(lsbId) { + case 0x2F966B1B: obj = (T)(new ConstantNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ConstantNode" + } + break; + case 0x40E90353: + switch(lsbId) { + case 0x63ACE65E: obj = (T)(new FunctionIterator(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionIterator" + } + break; + case 0x460F3515: + switch(lsbId) { + case 0xE2621DBE: obj = (T)(new ResourceIterator(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ResourceIterator" + } + break; + case 0x46F1DAC4: + switch(lsbId) { + case 0x0581B304: obj = (T)(new VolumeDataComposite(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::VolumeDataComposite" + } + break; + case 0x49C24B88: + switch(lsbId) { + case 0x40C01F7E: obj = (T)(new ComposeVectorNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ComposeVectorNode" + } + break; + case 0x4A993F91: + switch(lsbId) { + case 0xE1DE256D: obj = (T)(new CoshNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::CoshNode" + } + break; + case 0x4BD32B48: + switch(lsbId) { + case 0x70FFC03B: obj = (T)(new Texture2DIterator(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2DIterator" + } + break; + case 0x4DF17E76: + switch(lsbId) { + case 0x926221C2: obj = (T)(new FunctionReference(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionReference" + } + break; + case 0x4ECDB6A6: + switch(lsbId) { + case 0xF69F2BEB: obj = (T)(new Component(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Component" + } + break; + case 0x52F06268: + switch(lsbId) { + case 0xCD098EFE: obj = (T)(new Iterator(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Iterator" + } + break; + case 0x53601FD4: + switch(lsbId) { + case 0x32E3DEF4: obj = (T)(new MeshNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::MeshNode" + } + break; + case 0x53E62FD6: + switch(lsbId) { + case 0x7F4D9A65: obj = (T)(new FractNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::FractNode" + } + break; + case 0x564DE421: + switch(lsbId) { + case 0x7ED7614A: obj = (T)(new ComponentsObjectIterator(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ComponentsObjectIterator" + } + break; + case 0x57A22369: + switch(lsbId) { + case 0x98DF5248: obj = (T)(new AdditionNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::AdditionNode" + } + break; + case 0x5950BB3E: + switch(lsbId) { + case 0xE8A82090: obj = (T)(new TriangleSet(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::TriangleSet" + } + break; + case 0x59BC328F: + switch(lsbId) { + case 0x6FB5C5FF: obj = (T)(new CosNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::CosNode" + } + break; + case 0x5A8164EC: + switch(lsbId) { + case 0xEDB03F09: obj = (T)(new Model(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Model" + } + break; + case 0x6079B12F: + switch(lsbId) { + case 0xFF345D02: obj = (T)(new SubtractionNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::SubtractionNode" + } + break; + case 0x627E2116: + switch(lsbId) { + case 0x53E11D93: obj = (T)(new CeilNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::CeilNode" + } + break; + case 0x63B3B461: + switch(lsbId) { + case 0xB30B4BA5: obj = (T)(new BeamLattice(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::BeamLattice" + } + break; + case 0x6522CF04: + switch(lsbId) { + case 0xEB283FED: obj = (T)(new ComponentsObject(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ComponentsObject" + } + break; + case 0x6594B031: + switch(lsbId) { + case 0xB6096238: obj = (T)(new SliceStack(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::SliceStack" + } + break; + case 0x65E6EDD9: + switch(lsbId) { + case 0x362C79CB: obj = (T)(new BaseMaterialGroupIterator(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::BaseMaterialGroupIterator" + } + break; + case 0x68FB2D5F: + switch(lsbId) { + case 0xFC4BA12A: obj = (T)(new BuildItem(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::BuildItem" + } + break; + case 0x69684DB9: + switch(lsbId) { + case 0x9FA813F6: obj = (T)(new SliceStackIterator(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::SliceStackIterator" + } + break; + case 0x6B641C70: + switch(lsbId) { + case 0x60040BE3: obj = (T)(new AbsNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::AbsNode" + } + break; + case 0x6CE54469: + switch(lsbId) { + case 0xEEA83BC1: obj = (T)(new ImplicitFunction(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ImplicitFunction" + } + break; + case 0x7570C43B: + switch(lsbId) { + case 0x9721D0C0: obj = (T)(new MatVecMultiplicationNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::MatVecMultiplicationNode" + } + break; + case 0x7700AA17: + switch(lsbId) { + case 0xCA1AC0F8: obj = (T)(new PowNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::PowNode" + } + break; + case 0x77AF68C9: + switch(lsbId) { + case 0x71B1485F: obj = (T)(new ClampNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ClampNode" + } + break; + case 0x7DE3951B: + switch(lsbId) { + case 0xA4C1064C: obj = (T)(new TwoInputNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::TwoInputNode" + } + break; + case 0x7FB36B91: + switch(lsbId) { + case 0xD4CE4671: obj = (T)(new ContentEncryptionParams(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ContentEncryptionParams" + } + break; + case 0x817D2E56: + switch(lsbId) { + case 0x6E73AA8F: obj = (T)(new NormalizeDistanceNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::NormalizeDistanceNode" + } + break; + case 0x846AFDE9: + switch(lsbId) { + case 0xA091E997: obj = (T)(new MinNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::MinNode" + } + break; + case 0x856632D0: + switch(lsbId) { + case 0xBAF1D8B7: obj = (T)(new Base(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Base" + } + break; + case 0x87740AD5: + switch(lsbId) { + case 0x3454E0DF: obj = (T)(new Log10Node(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Log10Node" + } + break; + case 0x8A45165E: + switch(lsbId) { + case 0x6C9646D7: obj = (T)(new SignNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::SignNode" + } + break; + case 0x8CE7A119: + switch(lsbId) { + case 0x1A63A35D: obj = (T)(new Attachment(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Attachment" + } + break; + case 0x9200586F: + switch(lsbId) { + case 0xB91587A7: obj = (T)(new VolumeData(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::VolumeData" + } + break; + case 0x943AF6AE: + switch(lsbId) { + case 0x0EFD2B8A: obj = (T)(new ArcCosNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ArcCosNode" + } + break; + case 0x9BD7D3C2: + switch(lsbId) { + case 0x026B8CE8: obj = (T)(new FunctionFromImage3D(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionFromImage3D" + } + break; + case 0x9C9363B3: + switch(lsbId) { + case 0xF708D556: obj = (T)(new ConstVecNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ConstVecNode" + } + break; + case 0x9EF9EB54: + switch(lsbId) { + case 0xA53AA40D: obj = (T)(new ComposeMatrixNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ComposeMatrixNode" + } + break; + case 0x9EFB2757: + switch(lsbId) { + case 0xCA1A5231: obj = (T)(new Function(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Function" + } + break; + case 0x9F831944: + switch(lsbId) { + case 0xA3DE31DA: obj = (T)(new SqrtNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::SqrtNode" + } + break; + case 0xA0C005C0: + switch(lsbId) { + case 0x35D5371D: obj = (T)(new LevelSetIterator(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::LevelSetIterator" + } + break; + case 0xA3C27CF5: + switch(lsbId) { + case 0x4C2AA76C: obj = (T)(new MultiplicationNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::MultiplicationNode" + } + break; + case 0xA7D21BD3: + switch(lsbId) { + case 0x64910860: obj = (T)(new BuildItemIterator(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::BuildItemIterator" + } + break; + case 0xA808B759: + switch(lsbId) { + case 0x9C158CE6: obj = (T)(new TransposeNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::TransposeNode" + } + break; + case 0xA99CC6C3: + switch(lsbId) { + case 0xF70FB6F9: obj = (T)(new CompositeMaterialsIterator(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::CompositeMaterialsIterator" + } + break; + case 0xB19B9FDA: + switch(lsbId) { + case 0x94B0A5E7: obj = (T)(new OneInputNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::OneInputNode" + } + break; + case 0xB27D4656: + switch(lsbId) { + case 0xE16609FA: obj = (T)(new BaseMaterialGroup(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::BaseMaterialGroup" + } + break; + case 0xB6153EF5: + switch(lsbId) { + case 0xDE7E5E11: obj = (T)(new ArcTan2Node(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ArcTan2Node" + } + break; + case 0xB896B641: + switch(lsbId) { + case 0x3C08CF39: obj = (T)(new DivisionNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::DivisionNode" + } + break; + case 0xB989E02E: + switch(lsbId) { + case 0x43158FE6: obj = (T)(new MultiPropertyGroup(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::MultiPropertyGroup" + } + break; + case 0xBC120839: + switch(lsbId) { + case 0x7E37055D: obj = (T)(new Texture2DGroup(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2DGroup" + } + break; + case 0xBD938FF2: + switch(lsbId) { + case 0xD2663D61: obj = (T)(new Image3D(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Image3D" + } + break; + case 0xC2BDF5D8: + switch(lsbId) { + case 0xCBBDB1F0: obj = (T)(new MultiPropertyGroupIterator(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::MultiPropertyGroupIterator" + } + break; + case 0xC4B8EC00: + switch(lsbId) { + case 0xA82BF336: obj = (T)(new Image3DIterator(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Image3DIterator" + } + break; + case 0xC62268F2: + switch(lsbId) { + case 0xD7C7012C: obj = (T)(new ImplicitPortIterator(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ImplicitPortIterator" + } + break; + case 0xCA86A77C: + switch(lsbId) { + case 0x71CD3FAE: obj = (T)(new ResourceIdNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ResourceIdNode" + } + break; + case 0xCC4F8D56: + switch(lsbId) { + case 0x1CCE35D4: obj = (T)(new DecomposeVectorNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::DecomposeVectorNode" + } + break; + case 0xCE16224D: + switch(lsbId) { + case 0x688B86F2: obj = (T)(new CompositeMaterials(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::CompositeMaterials" + } + break; + case 0xCF077B19: + switch(lsbId) { + case 0xB0B78E9D: obj = (T)(new TanhNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::TanhNode" + } + break; + case 0xD085FB2E: + switch(lsbId) { + case 0x49CDB5B1: obj = (T)(new ColorGroup(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ColorGroup" + } + break; + case 0xD17716D0: + switch(lsbId) { + case 0x63DE2C22: obj = (T)(new MetaData(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::MetaData" + } + break; + case 0xD5906722: + switch(lsbId) { + case 0x7E428AA4: obj = (T)(new ResourceDataGroup(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ResourceDataGroup" + } + break; + case 0xD5AEA50A: + switch(lsbId) { + case 0x56306722: obj = (T)(new SinNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::SinNode" + } + break; + case 0xD5C49B04: + switch(lsbId) { + case 0xAF1963CD: obj = (T)(new ImplicitPort(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ImplicitPort" + } + break; + case 0xD6DFD0A7: + switch(lsbId) { + case 0xEB64AC33: obj = (T)(new MatrixFromRowsNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::MatrixFromRowsNode" + } + break; + case 0xD85889E2: + switch(lsbId) { + case 0x739A74B1: obj = (T)(new LengthNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::LengthNode" + } + break; + case 0xD85B5B61: + switch(lsbId) { + case 0x43E787E3: obj = (T)(new VolumeDataColor(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::VolumeDataColor" + } + break; + case 0xD9E46D5E: + switch(lsbId) { + case 0x6D8118EE: obj = (T)(new Consumer(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Consumer" + } + break; + case 0xD9F5A53C: + switch(lsbId) { + case 0x657765AE: obj = (T)(new RoundNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::RoundNode" + } + break; + case 0xDE92510B: + switch(lsbId) { + case 0xD2112288: obj = (T)(new ObjectIterator(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ObjectIterator" + } + break; + case 0xDFE3889D: + switch(lsbId) { + case 0x1B269CBB: obj = (T)(new Resource(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Resource" + } + break; + case 0xE0441CF9: + switch(lsbId) { + case 0x76B36319: obj = (T)(new Texture2D(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2D" + } + break; + case 0xE47D5476: + switch(lsbId) { + case 0x15816BAD: obj = (T)(new ArcTanNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ArcTanNode" + } + break; + case 0xE554C8A7: + switch(lsbId) { + case 0xE72AAF4D: obj = (T)(new ArcSinNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ArcSinNode" + } + break; + case 0xE72592A7: + switch(lsbId) { + case 0x725AB29B: obj = (T)(new ImplicitNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ImplicitNode" + } + break; + case 0xE76F642F: + switch(lsbId) { + case 0x363FD7E9: obj = (T)(new Writer(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Writer" + } + break; + case 0xE8601F66: + switch(lsbId) { + case 0xA23A0540: obj = (T)(new InverseNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::InverseNode" + } + break; + case 0xE8A7D9C1: + switch(lsbId) { + case 0x92EFD0E2: obj = (T)(new LevelSet(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::LevelSet" + } + break; + case 0xE8C0ABF7: + switch(lsbId) { + case 0xC5DC7068: obj = (T)(new Log2Node(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Log2Node" + } + break; + case 0xEA573358: + switch(lsbId) { + case 0x49379F22: obj = (T)(new ModNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ModNode" + } + break; + case 0xF4196034: + switch(lsbId) { + case 0xE2B9FDE6: obj = (T)(new MeshObjectIterator(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::MeshObjectIterator" + } + break; + case 0xF85C90ED: + switch(lsbId) { + case 0xCE6F90A4: obj = (T)(new ConstMatNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ConstMatNode" + } + break; + case 0xFC006BC8: + switch(lsbId) { + case 0x88CAB4D0: obj = (T)(new NodeIterator(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::NodeIterator" + } + break; + case 0xFC368AA4: + switch(lsbId) { + case 0x4ACE42DA: obj = (T)(new VolumeDataProperty(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::VolumeDataProperty" + } + break; + case 0xFE60932A: + switch(lsbId) { + case 0x66375FAD: obj = (T)(new DotNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::DotNode" + } + break; + default: obj = cls.getDeclaredConstructor(cArg).newInstance(this, handle); break; + } + return obj; + } + catch(Exception e) { + return null; + } + } +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/Log10Node.java b/Autogenerated/Bindings/Java8/lib3mf/Log10Node.java new file mode 100644 index 000000000..77a62cb9b --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/Log10Node.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Log10Node extends OneInputNode { + + public Log10Node(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/Log2Node.java b/Autogenerated/Bindings/Java8/lib3mf/Log2Node.java new file mode 100644 index 000000000..453a51517 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/Log2Node.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Log2Node extends OneInputNode { + + public Log2Node(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/LogNode.java b/Autogenerated/Bindings/Java8/lib3mf/LogNode.java new file mode 100644 index 000000000..1daacaf68 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/LogNode.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class LogNode extends OneInputNode { + + public LogNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/MatVecMultiplicationNode.java b/Autogenerated/Bindings/Java8/lib3mf/MatVecMultiplicationNode.java new file mode 100644 index 000000000..7b90b2f4f --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/MatVecMultiplicationNode.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class MatVecMultiplicationNode extends TwoInputNode { + + public MatVecMultiplicationNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/MaterialMapping.java b/Autogenerated/Bindings/Java8/lib3mf/MaterialMapping.java new file mode 100644 index 000000000..61b63d5a2 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/MaterialMapping.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class MaterialMapping extends FunctionReference { + + public MaterialMapping(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/Matrix4x4.java b/Autogenerated/Bindings/Java8/lib3mf/Matrix4x4.java new file mode 100644 index 000000000..f2edb51bb --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/Matrix4x4.java @@ -0,0 +1,89 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Memory; +import com.sun.jna.Pointer; + +import java.util.Arrays; +import java.util.List; + +public class Matrix4x4 { + + public double[][] Field = new double[4][4]; + + public static final int SIZE = 128; + + public void readFromPointer(Pointer p, long offset) { + Field[0][0] = p.getDouble(offset + 0); + Field[0][1] = p.getDouble(offset + 8); + Field[0][2] = p.getDouble(offset + 16); + Field[0][3] = p.getDouble(offset + 24); + Field[1][0] = p.getDouble(offset + 32); + Field[1][1] = p.getDouble(offset + 40); + Field[1][2] = p.getDouble(offset + 48); + Field[1][3] = p.getDouble(offset + 56); + Field[2][0] = p.getDouble(offset + 64); + Field[2][1] = p.getDouble(offset + 72); + Field[2][2] = p.getDouble(offset + 80); + Field[2][3] = p.getDouble(offset + 88); + Field[3][0] = p.getDouble(offset + 96); + Field[3][1] = p.getDouble(offset + 104); + Field[3][2] = p.getDouble(offset + 112); + Field[3][3] = p.getDouble(offset + 120); + } + + public void writeToPointer(Pointer p, long offset) { + p.setDouble(offset + 0, Field[0][0]); + p.setDouble(offset + 8, Field[0][1]); + p.setDouble(offset + 16, Field[0][2]); + p.setDouble(offset + 24, Field[0][3]); + p.setDouble(offset + 32, Field[1][0]); + p.setDouble(offset + 40, Field[1][1]); + p.setDouble(offset + 48, Field[1][2]); + p.setDouble(offset + 56, Field[1][3]); + p.setDouble(offset + 64, Field[2][0]); + p.setDouble(offset + 72, Field[2][1]); + p.setDouble(offset + 80, Field[2][2]); + p.setDouble(offset + 88, Field[2][3]); + p.setDouble(offset + 96, Field[3][0]); + p.setDouble(offset + 104, Field[3][1]); + p.setDouble(offset + 112, Field[3][2]); + p.setDouble(offset + 120, Field[3][3]); + } + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/MatrixFromColumnsNode.java b/Autogenerated/Bindings/Java8/lib3mf/MatrixFromColumnsNode.java new file mode 100644 index 000000000..58f946632 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/MatrixFromColumnsNode.java @@ -0,0 +1,146 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class MatrixFromColumnsNode extends ImplicitNode { + + public MatrixFromColumnsNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the input for the first column + * + * @return the input for the first column + * @throws Lib3MFException + */ + public ImplicitPort getInputA() throws Lib3MFException { + Pointer bufferColumn0 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_matrixfromcolumnsnode_getinputa.invokeInt(new java.lang.Object[]{mHandle, bufferColumn0})); + Pointer valueColumn0 = bufferColumn0.getPointer(0); + ImplicitPort column0 = null; + if (valueColumn0 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Column0 was a null pointer"); + } + column0 = mWrapper.PolymorphicFactory(valueColumn0, ImplicitPort.class); + return column0; + } + + /** + * Retrieves the input for the second column + * + * @return the input for the second column + * @throws Lib3MFException + */ + public ImplicitPort getInputB() throws Lib3MFException { + Pointer bufferColumn1 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_matrixfromcolumnsnode_getinputb.invokeInt(new java.lang.Object[]{mHandle, bufferColumn1})); + Pointer valueColumn1 = bufferColumn1.getPointer(0); + ImplicitPort column1 = null; + if (valueColumn1 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Column1 was a null pointer"); + } + column1 = mWrapper.PolymorphicFactory(valueColumn1, ImplicitPort.class); + return column1; + } + + /** + * Retrieves the input for the third column + * + * @return the input for the third column + * @throws Lib3MFException + */ + public ImplicitPort getInputC() throws Lib3MFException { + Pointer bufferColumn2 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_matrixfromcolumnsnode_getinputc.invokeInt(new java.lang.Object[]{mHandle, bufferColumn2})); + Pointer valueColumn2 = bufferColumn2.getPointer(0); + ImplicitPort column2 = null; + if (valueColumn2 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Column2 was a null pointer"); + } + column2 = mWrapper.PolymorphicFactory(valueColumn2, ImplicitPort.class); + return column2; + } + + /** + * Retrieves the input for the fourth column + * + * @return the input for the fourth column + * @throws Lib3MFException + */ + public ImplicitPort getInputD() throws Lib3MFException { + Pointer bufferColumn3 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_matrixfromcolumnsnode_getinputd.invokeInt(new java.lang.Object[]{mHandle, bufferColumn3})); + Pointer valueColumn3 = bufferColumn3.getPointer(0); + ImplicitPort column3 = null; + if (valueColumn3 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Column3 was a null pointer"); + } + column3 = mWrapper.PolymorphicFactory(valueColumn3, ImplicitPort.class); + return column3; + } + + /** + * Retrieves the output + * + * @return the output + * @throws Lib3MFException + */ + public ImplicitPort getOutputResult() throws Lib3MFException { + Pointer bufferResult = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_matrixfromcolumnsnode_getoutputresult.invokeInt(new java.lang.Object[]{mHandle, bufferResult})); + Pointer valueResult = bufferResult.getPointer(0); + ImplicitPort result = null; + if (valueResult == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Result was a null pointer"); + } + result = mWrapper.PolymorphicFactory(valueResult, ImplicitPort.class); + return result; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/MatrixFromRowsNode.java b/Autogenerated/Bindings/Java8/lib3mf/MatrixFromRowsNode.java new file mode 100644 index 000000000..ad36b26f5 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/MatrixFromRowsNode.java @@ -0,0 +1,146 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class MatrixFromRowsNode extends ImplicitNode { + + public MatrixFromRowsNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the input for the first row + * + * @return the input for the first row + * @throws Lib3MFException + */ + public ImplicitPort getInputA() throws Lib3MFException { + Pointer bufferRow0 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_matrixfromrowsnode_getinputa.invokeInt(new java.lang.Object[]{mHandle, bufferRow0})); + Pointer valueRow0 = bufferRow0.getPointer(0); + ImplicitPort row0 = null; + if (valueRow0 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Row0 was a null pointer"); + } + row0 = mWrapper.PolymorphicFactory(valueRow0, ImplicitPort.class); + return row0; + } + + /** + * Retrieves the input for the second row + * + * @return the input for the second row + * @throws Lib3MFException + */ + public ImplicitPort getInputB() throws Lib3MFException { + Pointer bufferRow1 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_matrixfromrowsnode_getinputb.invokeInt(new java.lang.Object[]{mHandle, bufferRow1})); + Pointer valueRow1 = bufferRow1.getPointer(0); + ImplicitPort row1 = null; + if (valueRow1 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Row1 was a null pointer"); + } + row1 = mWrapper.PolymorphicFactory(valueRow1, ImplicitPort.class); + return row1; + } + + /** + * Retrieves the input for the third row + * + * @return the input for the third row + * @throws Lib3MFException + */ + public ImplicitPort getInputC() throws Lib3MFException { + Pointer bufferRow2 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_matrixfromrowsnode_getinputc.invokeInt(new java.lang.Object[]{mHandle, bufferRow2})); + Pointer valueRow2 = bufferRow2.getPointer(0); + ImplicitPort row2 = null; + if (valueRow2 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Row2 was a null pointer"); + } + row2 = mWrapper.PolymorphicFactory(valueRow2, ImplicitPort.class); + return row2; + } + + /** + * Retrieves the input for the fourth row + * + * @return the input for the fourth row + * @throws Lib3MFException + */ + public ImplicitPort getInputD() throws Lib3MFException { + Pointer bufferRow3 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_matrixfromrowsnode_getinputd.invokeInt(new java.lang.Object[]{mHandle, bufferRow3})); + Pointer valueRow3 = bufferRow3.getPointer(0); + ImplicitPort row3 = null; + if (valueRow3 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Row3 was a null pointer"); + } + row3 = mWrapper.PolymorphicFactory(valueRow3, ImplicitPort.class); + return row3; + } + + /** + * Retrieves the output + * + * @return the output + * @throws Lib3MFException + */ + public ImplicitPort getOutputResult() throws Lib3MFException { + Pointer bufferResult = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_matrixfromrowsnode_getoutputresult.invokeInt(new java.lang.Object[]{mHandle, bufferResult})); + Pointer valueResult = bufferResult.getPointer(0); + ImplicitPort result = null; + if (valueResult == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Result was a null pointer"); + } + result = mWrapper.PolymorphicFactory(valueResult, ImplicitPort.class); + return result; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/MaxNode.java b/Autogenerated/Bindings/Java8/lib3mf/MaxNode.java new file mode 100644 index 000000000..738668d2d --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/MaxNode.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class MaxNode extends TwoInputNode { + + public MaxNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/MeshNode.java b/Autogenerated/Bindings/Java8/lib3mf/MeshNode.java new file mode 100644 index 000000000..c11c76b6e --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/MeshNode.java @@ -0,0 +1,110 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class MeshNode extends ImplicitNode { + + public MeshNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the input for the model resource id of the mesh + * + * @return the input port for the model resource id of the mesh + * @throws Lib3MFException + */ + public ImplicitPort getInputMesh() throws Lib3MFException { + Pointer bufferMesh = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_meshnode_getinputmesh.invokeInt(new java.lang.Object[]{mHandle, bufferMesh})); + Pointer valueMesh = bufferMesh.getPointer(0); + ImplicitPort mesh = null; + if (valueMesh == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Mesh was a null pointer"); + } + mesh = mWrapper.PolymorphicFactory(valueMesh, ImplicitPort.class); + return mesh; + } + + /** + * Retrieves the input for the position + * + * @return the input port for the position + * @throws Lib3MFException + */ + public ImplicitPort getInputPos() throws Lib3MFException { + Pointer bufferPos = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_meshnode_getinputpos.invokeInt(new java.lang.Object[]{mHandle, bufferPos})); + Pointer valuePos = bufferPos.getPointer(0); + ImplicitPort pos = null; + if (valuePos == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Pos was a null pointer"); + } + pos = mWrapper.PolymorphicFactory(valuePos, ImplicitPort.class); + return pos; + } + + /** + * Retrieves the output + * + * @return the output port for the signed distance to the mesh + * @throws Lib3MFException + */ + public ImplicitPort getOutputDistance() throws Lib3MFException { + Pointer bufferDistance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_meshnode_getoutputdistance.invokeInt(new java.lang.Object[]{mHandle, bufferDistance})); + Pointer valueDistance = bufferDistance.getPointer(0); + ImplicitPort distance = null; + if (valueDistance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Distance was a null pointer"); + } + distance = mWrapper.PolymorphicFactory(valueDistance, ImplicitPort.class); + return distance; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/MeshObject.java b/Autogenerated/Bindings/Java8/lib3mf/MeshObject.java new file mode 100644 index 000000000..8f26f939b --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/MeshObject.java @@ -0,0 +1,504 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class MeshObject extends Object { + + public MeshObject(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the vertex count of a mesh object. + * + * @return filled with the vertex count. + * @throws Lib3MFException + */ + public int getVertexCount() throws Lib3MFException { + Pointer bufferVertexCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_getvertexcount.invokeInt(new java.lang.Object[]{mHandle, bufferVertexCount})); + return bufferVertexCount.getInt(0); + } + + /** + * Returns the triangle count of a mesh object. + * + * @return filled with the triangle count. + * @throws Lib3MFException + */ + public int getTriangleCount() throws Lib3MFException { + Pointer bufferVertexCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_gettrianglecount.invokeInt(new java.lang.Object[]{mHandle, bufferVertexCount})); + return bufferVertexCount.getInt(0); + } + + /** + * Returns the vertex count of a mesh object. + * + * @param index Index of the vertex (0 to vertexcount - 1) + * @return filled with the vertex coordinates. + * @throws Lib3MFException + */ + public Position getVertex(int index) throws Lib3MFException { + Pointer bufferCoordinates = new Memory(Position.SIZE); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_getvertex.invokeInt(new java.lang.Object[]{mHandle, index, bufferCoordinates})); + Position coordinates = new Position(); + coordinates.readFromPointer(bufferCoordinates, 0); + return coordinates; + } + + /** + * Sets the coordinates of a single vertex of a mesh object + * + * @param index Index of the vertex (0 to vertexcount - 1) + * @param coordinates contains the vertex coordinates. + * @throws Lib3MFException + */ + public void setVertex(int index, Position coordinates) throws Lib3MFException { + Pointer bufferCoordinates = new Memory(Position.SIZE); + coordinates.writeToPointer(bufferCoordinates, 0); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_setvertex.invokeInt(new java.lang.Object[]{mHandle, index, bufferCoordinates})); + } + + /** + * Adds a single vertex to a mesh object + * + * @param coordinates contains the vertex coordinates. + * @return Index of the new vertex + * @throws Lib3MFException + */ + public int addVertex(Position coordinates) throws Lib3MFException { + Pointer bufferCoordinates = new Memory(Position.SIZE); + coordinates.writeToPointer(bufferCoordinates, 0); + Pointer bufferNewIndex = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_addvertex.invokeInt(new java.lang.Object[]{mHandle, bufferCoordinates, bufferNewIndex})); + return bufferNewIndex.getInt(0); + } + + /** + * Obtains all vertex positions of a mesh object + * + * @return contains the vertex coordinates. + * @throws Lib3MFException + */ + public Position[] getVertices() throws Lib3MFException { + Pointer countNeededVertices = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_getvertices.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededVertices, null})); + long countVertices = countNeededVertices.getLong(0); + Pointer bufferVertices = new Memory(Math.max(1, countVertices * Position.SIZE)); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_getvertices.invokeInt(new java.lang.Object[]{mHandle, countVertices, countNeededVertices, bufferVertices})); + Position vertices[] = new Position[(int)countVertices]; + for (int i = 0; i < (int)countVertices; i++) { + vertices[i] = new Position(); + vertices[i].readFromPointer(bufferVertices, i * Position.SIZE); + } + return vertices; + } + + /** + * Returns indices of a single triangle of a mesh object. + * + * @param index Index of the triangle (0 to trianglecount - 1) + * @return filled with the triangle indices. + * @throws Lib3MFException + */ + public Triangle getTriangle(int index) throws Lib3MFException { + Pointer bufferIndices = new Memory(Triangle.SIZE); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_gettriangle.invokeInt(new java.lang.Object[]{mHandle, index, bufferIndices})); + Triangle indices = new Triangle(); + indices.readFromPointer(bufferIndices, 0); + return indices; + } + + /** + * Sets the indices of a single triangle of a mesh object. + * + * @param index Index of the triangle (0 to trianglecount - 1) + * @param indices contains the triangle indices. + * @throws Lib3MFException + */ + public void setTriangle(int index, Triangle indices) throws Lib3MFException { + Pointer bufferIndices = new Memory(Triangle.SIZE); + indices.writeToPointer(bufferIndices, 0); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_settriangle.invokeInt(new java.lang.Object[]{mHandle, index, bufferIndices})); + } + + /** + * Adds a single triangle to a mesh object + * + * @param indices contains the triangle indices. + * @return Index of the new triangle + * @throws Lib3MFException + */ + public int addTriangle(Triangle indices) throws Lib3MFException { + Pointer bufferIndices = new Memory(Triangle.SIZE); + indices.writeToPointer(bufferIndices, 0); + Pointer bufferNewIndex = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_addtriangle.invokeInt(new java.lang.Object[]{mHandle, bufferIndices, bufferNewIndex})); + return bufferNewIndex.getInt(0); + } + + /** + * Get all triangles of a mesh object + * + * @return contains the triangle indices. + * @throws Lib3MFException + */ + public Triangle[] getTriangleIndices() throws Lib3MFException { + Pointer countNeededIndices = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_gettriangleindices.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededIndices, null})); + long countIndices = countNeededIndices.getLong(0); + Pointer bufferIndices = new Memory(Math.max(1, countIndices * Triangle.SIZE)); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_gettriangleindices.invokeInt(new java.lang.Object[]{mHandle, countIndices, countNeededIndices, bufferIndices})); + Triangle indices[] = new Triangle[(int)countIndices]; + for (int i = 0; i < (int)countIndices; i++) { + indices[i] = new Triangle(); + indices[i].readFromPointer(bufferIndices, i * Triangle.SIZE); + } + return indices; + } + + /** + * Sets the property at the object-level of the mesh object. + * + * @param uniqueResourceID the object-level Property UniqueResourceID. + * @param propertyID the object-level PropertyID. + * @throws Lib3MFException + */ + public void setObjectLevelProperty(int uniqueResourceID, int propertyID) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_setobjectlevelproperty.invokeInt(new java.lang.Object[]{mHandle, uniqueResourceID, propertyID})); + } + + /** + * Gets the property at the object-level of the mesh object. + * + * @return GetObjectLevelProperty Result Tuple + * @throws Lib3MFException + */ + public GetObjectLevelPropertyResult getObjectLevelProperty() throws Lib3MFException { + Pointer bufferUniqueResourceID = new Memory(4); + Pointer bufferPropertyID = new Memory(4); + Pointer bufferHasObjectLevelProperty = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_getobjectlevelproperty.invokeInt(new java.lang.Object[]{mHandle, bufferUniqueResourceID, bufferPropertyID, bufferHasObjectLevelProperty})); + GetObjectLevelPropertyResult returnTuple = new GetObjectLevelPropertyResult(); + returnTuple.UniqueResourceID = bufferUniqueResourceID.getInt(0); + returnTuple.PropertyID = bufferPropertyID.getInt(0); + returnTuple.HasObjectLevelProperty = bufferHasObjectLevelProperty.getByte(0) != 0; + return returnTuple; + } + + public static class GetObjectLevelPropertyResult { + /** + * the object-level Property UniqueResourceID. + */ + public int UniqueResourceID; + + /** + * the object-level PropertyID. + */ + public int PropertyID; + + /** + * Has an object-level property been specified? + */ + public boolean HasObjectLevelProperty; + + } + /** + * Sets the properties of a single triangle of a mesh object. + * + * @param index Index of the triangle (0 to trianglecount - 1) + * @param properties contains the triangle properties. + * @throws Lib3MFException + */ + public void setTriangleProperties(int index, TriangleProperties properties) throws Lib3MFException { + Pointer bufferProperties = new Memory(TriangleProperties.SIZE); + properties.writeToPointer(bufferProperties, 0); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_settriangleproperties.invokeInt(new java.lang.Object[]{mHandle, index, bufferProperties})); + } + + /** + * Gets the properties of a single triangle of a mesh object. + * + * @param index Index of the triangle (0 to trianglecount - 1) + * @return returns the triangle properties. + * @throws Lib3MFException + */ + public TriangleProperties getTriangleProperties(int index) throws Lib3MFException { + Pointer bufferProperty = new Memory(TriangleProperties.SIZE); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_gettriangleproperties.invokeInt(new java.lang.Object[]{mHandle, index, bufferProperty})); + TriangleProperties property = new TriangleProperties(); + property.readFromPointer(bufferProperty, 0); + return property; + } + + /** + * Sets the properties of all triangles of a mesh object. Sets the object level property to the first entry of the passed triangle properties, if not yet specified. + * + * @param propertiesArray contains the triangle properties array. Must have trianglecount elements. + * @throws Lib3MFException + */ + public void setAllTriangleProperties(TriangleProperties[] propertiesArray) throws Lib3MFException { + Pointer bufferPropertiesArray = new Memory(Math.max(1, TriangleProperties.SIZE * propertiesArray.length)); + for (int i = 0; i < propertiesArray.length; i++) { + propertiesArray[i].writeToPointer(bufferPropertiesArray, i * TriangleProperties.SIZE); + } + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_setalltriangleproperties.invokeInt(new java.lang.Object[]{mHandle, (long) propertiesArray.length, bufferPropertiesArray})); + } + + /** + * Gets the properties of all triangles of a mesh object. + * + * @return returns the triangle properties array. Must have trianglecount elements. + * @throws Lib3MFException + */ + public TriangleProperties[] getAllTriangleProperties() throws Lib3MFException { + Pointer countNeededPropertiesArray = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_getalltriangleproperties.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededPropertiesArray, null})); + long countPropertiesArray = countNeededPropertiesArray.getLong(0); + Pointer bufferPropertiesArray = new Memory(Math.max(1, countPropertiesArray * TriangleProperties.SIZE)); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_getalltriangleproperties.invokeInt(new java.lang.Object[]{mHandle, countPropertiesArray, countNeededPropertiesArray, bufferPropertiesArray})); + TriangleProperties propertiesArray[] = new TriangleProperties[(int)countPropertiesArray]; + for (int i = 0; i < (int)countPropertiesArray; i++) { + propertiesArray[i] = new TriangleProperties(); + propertiesArray[i].readFromPointer(bufferPropertiesArray, i * TriangleProperties.SIZE); + } + return propertiesArray; + } + + /** + * Clears all properties of this mesh object (triangle and object-level). + * + * @throws Lib3MFException + */ + public void clearAllProperties() throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_clearallproperties.invokeInt(new java.lang.Object[]{mHandle})); + } + + /** + * Set all triangles of a mesh object + * + * @param vertices contains the positions. + * @param indices contains the triangle indices. + * @throws Lib3MFException + */ + public void setGeometry(Position[] vertices, Triangle[] indices) throws Lib3MFException { + Pointer bufferVertices = new Memory(Math.max(1, Position.SIZE * vertices.length)); + for (int i = 0; i < vertices.length; i++) { + vertices[i].writeToPointer(bufferVertices, i * Position.SIZE); + } + Pointer bufferIndices = new Memory(Math.max(1, Triangle.SIZE * indices.length)); + for (int i = 0; i < indices.length; i++) { + indices[i].writeToPointer(bufferIndices, i * Triangle.SIZE); + } + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_setgeometry.invokeInt(new java.lang.Object[]{mHandle, (long) vertices.length, bufferVertices, (long) indices.length, bufferIndices})); + } + + /** + * Retrieves, if an object describes a topologically oriented and manifold mesh, according to the core spec. + * + * @return returns, if the object is oriented and manifold. + * @throws Lib3MFException + */ + public boolean isManifoldAndOriented() throws Lib3MFException { + Pointer bufferIsManifoldAndOriented = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_ismanifoldandoriented.invokeInt(new java.lang.Object[]{mHandle, bufferIsManifoldAndOriented})); + return bufferIsManifoldAndOriented.getByte(0) != 0; + } + + /** + * Retrieves the BeamLattice within this MeshObject. + * + * @return the BeamLattice within this MeshObject + * @throws Lib3MFException + */ + public BeamLattice beamLattice() throws Lib3MFException { + Pointer bufferTheBeamLattice = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_beamlattice.invokeInt(new java.lang.Object[]{mHandle, bufferTheBeamLattice})); + Pointer valueTheBeamLattice = bufferTheBeamLattice.getPointer(0); + BeamLattice theBeamLattice = null; + if (valueTheBeamLattice == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheBeamLattice was a null pointer"); + } + theBeamLattice = mWrapper.PolymorphicFactory(valueTheBeamLattice, BeamLattice.class); + return theBeamLattice; + } + + /** + * Retrieves the VolumeData of this MeshObject. + * + * @return the VolumeData of this MeshObject + * @throws Lib3MFException + */ + public VolumeData getVolumeData() throws Lib3MFException { + Pointer bufferTheVolumeData = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_getvolumedata.invokeInt(new java.lang.Object[]{mHandle, bufferTheVolumeData})); + Pointer valueTheVolumeData = bufferTheVolumeData.getPointer(0); + VolumeData theVolumeData = null; + if (valueTheVolumeData != Pointer.NULL) { + theVolumeData = mWrapper.PolymorphicFactory(valueTheVolumeData, VolumeData.class); + } + return theVolumeData; + } + + /** + * Sets the VolumeData of this MeshObject. + * + * @param theVolumeData the VolumeData of this MeshObject + * @throws Lib3MFException + */ + public void setVolumeData(VolumeData theVolumeData) throws Lib3MFException { + Pointer theVolumeDataHandle = null; + if (theVolumeData != null) { + theVolumeDataHandle = theVolumeData.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheVolumeData is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_setvolumedata.invokeInt(new java.lang.Object[]{mHandle, theVolumeDataHandle})); + } + + /** + * Adds a new triangle set. + * + * @param identifier the new identifier. MUST be unique within the mesh. MUST NOT be an empty string + * @param name the human readable name. MUST NOT be an empty string + * @return the new Triangle Set Instance. + * @throws Lib3MFException + */ + public TriangleSet addTriangleSet(String identifier, String name) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesName = name.getBytes(StandardCharsets.UTF_8); + Memory bufferName = new Memory(bytesName.length + 1); + bufferName.write(0, bytesName, 0, bytesName.length); + bufferName.setByte(bytesName.length, (byte)0); + Pointer bufferTheTriangleSet = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_addtriangleset.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferName, bufferTheTriangleSet})); + Pointer valueTheTriangleSet = bufferTheTriangleSet.getPointer(0); + TriangleSet theTriangleSet = null; + if (valueTheTriangleSet == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheTriangleSet was a null pointer"); + } + theTriangleSet = mWrapper.PolymorphicFactory(valueTheTriangleSet, TriangleSet.class); + return theTriangleSet; + } + + /** + * Checks if a triangle set exists. + * + * @param identifier the identifier to be found. + * @return flag if the triangles set exists. + * @throws Lib3MFException + */ + public boolean hasTriangleSet(String identifier) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + Pointer bufferTriangleSetExists = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_hastriangleset.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferTriangleSetExists})); + return bufferTriangleSetExists.getByte(0) != 0; + } + + /** + * Finds a new triangle set by identifier. Fails if not existing. + * + * @param identifier the identifier to be found. + * @return the triangle Set Instance. + * @throws Lib3MFException + */ + public TriangleSet findTriangleSet(String identifier) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + Pointer bufferTheTriangleSet = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_findtriangleset.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferTheTriangleSet})); + Pointer valueTheTriangleSet = bufferTheTriangleSet.getPointer(0); + TriangleSet theTriangleSet = null; + if (valueTheTriangleSet == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheTriangleSet was a null pointer"); + } + theTriangleSet = mWrapper.PolymorphicFactory(valueTheTriangleSet, TriangleSet.class); + return theTriangleSet; + } + + /** + * Returns number of triangle sets. + * + * @return the number of triangle sets of this mesh. + * @throws Lib3MFException + */ + public int getTriangleSetCount() throws Lib3MFException { + Pointer bufferCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_gettrianglesetcount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getInt(0); + } + + /** + * Returns a specific triangle set by index. + * + * @param index the index of the triangle set. + * @return the triangle Set Instance. + * @throws Lib3MFException + */ + public TriangleSet getTriangleSet(int index) throws Lib3MFException { + Pointer bufferTheTriangleSet = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_gettriangleset.invokeInt(new java.lang.Object[]{mHandle, index, bufferTheTriangleSet})); + Pointer valueTheTriangleSet = bufferTheTriangleSet.getPointer(0); + TriangleSet theTriangleSet = null; + if (valueTheTriangleSet == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheTriangleSet was a null pointer"); + } + theTriangleSet = mWrapper.PolymorphicFactory(valueTheTriangleSet, TriangleSet.class); + return theTriangleSet; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/MeshObjectIterator.java b/Autogenerated/Bindings/Java8/lib3mf/MeshObjectIterator.java new file mode 100644 index 000000000..16d8ab997 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/MeshObjectIterator.java @@ -0,0 +1,74 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class MeshObjectIterator extends ResourceIterator { + + public MeshObjectIterator(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the MeshObject the iterator points at. + * + * @return returns the MeshObject instance. + * @throws Lib3MFException + */ + public MeshObject getCurrentMeshObject() throws Lib3MFException { + Pointer bufferResource = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_meshobjectiterator_getcurrentmeshobject.invokeInt(new java.lang.Object[]{mHandle, bufferResource})); + Pointer valueResource = bufferResource.getPointer(0); + MeshObject resource = null; + if (valueResource == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Resource was a null pointer"); + } + resource = mWrapper.PolymorphicFactory(valueResource, MeshObject.class); + return resource; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/MetaData.java b/Autogenerated/Bindings/Java8/lib3mf/MetaData.java new file mode 100644 index 000000000..d2b22481b --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/MetaData.java @@ -0,0 +1,209 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class MetaData extends Base { + + public MetaData(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * returns the namespace URL of the metadata + * + * @return the namespace URL of the metadata + * @throws Lib3MFException + */ + public String getNameSpace() throws Lib3MFException { + Pointer bytesNeededNameSpace = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_metadata_getnamespace.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededNameSpace, null})); + int sizeNameSpace = bytesNeededNameSpace.getInt(0); + Pointer bufferNameSpace = new Memory(sizeNameSpace); + mWrapper.checkError(this, mWrapper.lib3mf_metadata_getnamespace.invokeInt(new java.lang.Object[]{mHandle, sizeNameSpace, bytesNeededNameSpace, bufferNameSpace})); + return new String(bufferNameSpace.getByteArray(0, sizeNameSpace - 1), StandardCharsets.UTF_8); + } + + /** + * sets a new namespace URL of the metadata + * + * @param nameSpace the new namespace URL of the metadata + * @throws Lib3MFException + */ + public void setNameSpace(String nameSpace) throws Lib3MFException { + byte[] bytesNameSpace = nameSpace.getBytes(StandardCharsets.UTF_8); + Memory bufferNameSpace = new Memory(bytesNameSpace.length + 1); + bufferNameSpace.write(0, bytesNameSpace, 0, bytesNameSpace.length); + bufferNameSpace.setByte(bytesNameSpace.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_metadata_setnamespace.invokeInt(new java.lang.Object[]{mHandle, bufferNameSpace})); + } + + /** + * returns the name of a metadata + * + * @return the name of the metadata + * @throws Lib3MFException + */ + public String getName() throws Lib3MFException { + Pointer bytesNeededName = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_metadata_getname.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededName, null})); + int sizeName = bytesNeededName.getInt(0); + Pointer bufferName = new Memory(sizeName); + mWrapper.checkError(this, mWrapper.lib3mf_metadata_getname.invokeInt(new java.lang.Object[]{mHandle, sizeName, bytesNeededName, bufferName})); + return new String(bufferName.getByteArray(0, sizeName - 1), StandardCharsets.UTF_8); + } + + /** + * sets a new name of a metadata + * + * @param name the new name of the metadata + * @throws Lib3MFException + */ + public void setName(String name) throws Lib3MFException { + byte[] bytesName = name.getBytes(StandardCharsets.UTF_8); + Memory bufferName = new Memory(bytesName.length + 1); + bufferName.write(0, bytesName, 0, bytesName.length); + bufferName.setByte(bytesName.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_metadata_setname.invokeInt(new java.lang.Object[]{mHandle, bufferName})); + } + + /** + * returns the (namespace+name) of a metadata + * + * @return the key (namespace+name) of the metadata + * @throws Lib3MFException + */ + public String getKey() throws Lib3MFException { + Pointer bytesNeededKey = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_metadata_getkey.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededKey, null})); + int sizeKey = bytesNeededKey.getInt(0); + Pointer bufferKey = new Memory(sizeKey); + mWrapper.checkError(this, mWrapper.lib3mf_metadata_getkey.invokeInt(new java.lang.Object[]{mHandle, sizeKey, bytesNeededKey, bufferKey})); + return new String(bufferKey.getByteArray(0, sizeKey - 1), StandardCharsets.UTF_8); + } + + /** + * returns, whether a metadata must be preserved + * + * @return returns, whether a metadata must be preserved + * @throws Lib3MFException + */ + public boolean getMustPreserve() throws Lib3MFException { + Pointer bufferMustPreserve = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_metadata_getmustpreserve.invokeInt(new java.lang.Object[]{mHandle, bufferMustPreserve})); + return bufferMustPreserve.getByte(0) != 0; + } + + /** + * sets whether a metadata must be preserved + * + * @param mustPreserve a new value whether a metadata must be preserved + * @throws Lib3MFException + */ + public void setMustPreserve(boolean mustPreserve) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_metadata_setmustpreserve.invokeInt(new java.lang.Object[]{mHandle, mustPreserve})); + } + + /** + * returns the type of a metadata + * + * @return the type of the metadata + * @throws Lib3MFException + */ + public String getType() throws Lib3MFException { + Pointer bytesNeededType = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_metadata_gettype.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededType, null})); + int sizeType = bytesNeededType.getInt(0); + Pointer bufferType = new Memory(sizeType); + mWrapper.checkError(this, mWrapper.lib3mf_metadata_gettype.invokeInt(new java.lang.Object[]{mHandle, sizeType, bytesNeededType, bufferType})); + return new String(bufferType.getByteArray(0, sizeType - 1), StandardCharsets.UTF_8); + } + + /** + * sets a new type of a metadata. This must be a simple XML type + * + * @param type a new type of the metadata + * @throws Lib3MFException + */ + public void setType(String type) throws Lib3MFException { + byte[] bytesType = type.getBytes(StandardCharsets.UTF_8); + Memory bufferType = new Memory(bytesType.length + 1); + bufferType.write(0, bytesType, 0, bytesType.length); + bufferType.setByte(bytesType.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_metadata_settype.invokeInt(new java.lang.Object[]{mHandle, bufferType})); + } + + /** + * returns the value of the metadata + * + * @return the value of the metadata + * @throws Lib3MFException + */ + public String getValue() throws Lib3MFException { + Pointer bytesNeededValue = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_metadata_getvalue.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededValue, null})); + int sizeValue = bytesNeededValue.getInt(0); + Pointer bufferValue = new Memory(sizeValue); + mWrapper.checkError(this, mWrapper.lib3mf_metadata_getvalue.invokeInt(new java.lang.Object[]{mHandle, sizeValue, bytesNeededValue, bufferValue})); + return new String(bufferValue.getByteArray(0, sizeValue - 1), StandardCharsets.UTF_8); + } + + /** + * sets a new value of the metadata + * + * @param value a new value of the metadata + * @throws Lib3MFException + */ + public void setValue(String value) throws Lib3MFException { + byte[] bytesValue = value.getBytes(StandardCharsets.UTF_8); + Memory bufferValue = new Memory(bytesValue.length + 1); + bufferValue.write(0, bytesValue, 0, bytesValue.length); + bufferValue.setByte(bytesValue.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_metadata_setvalue.invokeInt(new java.lang.Object[]{mHandle, bufferValue})); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/MetaDataGroup.java b/Autogenerated/Bindings/Java8/lib3mf/MetaDataGroup.java new file mode 100644 index 000000000..14b82be67 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/MetaDataGroup.java @@ -0,0 +1,180 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class MetaDataGroup extends Base { + + public MetaDataGroup(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * returns the number of metadata in this metadatagroup + * + * @return returns the number metadata + * @throws Lib3MFException + */ + public int getMetaDataCount() throws Lib3MFException { + Pointer bufferCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_metadatagroup_getmetadatacount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getInt(0); + } + + /** + * returns a metadata value within this metadatagroup + * + * @param index Index of the Metadata. + * @return an instance of the metadata + * @throws Lib3MFException + */ + public MetaData getMetaData(int index) throws Lib3MFException { + Pointer bufferMetaData = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_metadatagroup_getmetadata.invokeInt(new java.lang.Object[]{mHandle, index, bufferMetaData})); + Pointer valueMetaData = bufferMetaData.getPointer(0); + MetaData metaData = null; + if (valueMetaData == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "MetaData was a null pointer"); + } + metaData = mWrapper.PolymorphicFactory(valueMetaData, MetaData.class); + return metaData; + } + + /** + * returns a metadata value within this metadatagroup + * + * @param nameSpace the namespace of the metadata + * @param name the name of the Metadata + * @return an instance of the metadata + * @throws Lib3MFException + */ + public MetaData getMetaDataByKey(String nameSpace, String name) throws Lib3MFException { + byte[] bytesNameSpace = nameSpace.getBytes(StandardCharsets.UTF_8); + Memory bufferNameSpace = new Memory(bytesNameSpace.length + 1); + bufferNameSpace.write(0, bytesNameSpace, 0, bytesNameSpace.length); + bufferNameSpace.setByte(bytesNameSpace.length, (byte)0); + byte[] bytesName = name.getBytes(StandardCharsets.UTF_8); + Memory bufferName = new Memory(bytesName.length + 1); + bufferName.write(0, bytesName, 0, bytesName.length); + bufferName.setByte(bytesName.length, (byte)0); + Pointer bufferMetaData = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_metadatagroup_getmetadatabykey.invokeInt(new java.lang.Object[]{mHandle, bufferNameSpace, bufferName, bufferMetaData})); + Pointer valueMetaData = bufferMetaData.getPointer(0); + MetaData metaData = null; + if (valueMetaData == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "MetaData was a null pointer"); + } + metaData = mWrapper.PolymorphicFactory(valueMetaData, MetaData.class); + return metaData; + } + + /** + * removes metadata by index from the model. + * + * @param index Index of the metadata to remove + * @throws Lib3MFException + */ + public void removeMetaDataByIndex(int index) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_metadatagroup_removemetadatabyindex.invokeInt(new java.lang.Object[]{mHandle, index})); + } + + /** + * removes metadata from the model. + * + * @param theMetaData The metadata to remove + * @throws Lib3MFException + */ + public void removeMetaData(MetaData theMetaData) throws Lib3MFException { + Pointer theMetaDataHandle = null; + if (theMetaData != null) { + theMetaDataHandle = theMetaData.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheMetaData is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_metadatagroup_removemetadata.invokeInt(new java.lang.Object[]{mHandle, theMetaDataHandle})); + } + + /** + * adds a new metadata to this metadatagroup + * + * @param nameSpace the namespace of the metadata + * @param name the name of the metadata + * @param value the value of the metadata + * @param type the type of the metadata + * @param mustPreserve should the metadata be preserved + * @return a new instance of the metadata + * @throws Lib3MFException + */ + public MetaData addMetaData(String nameSpace, String name, String value, String type, boolean mustPreserve) throws Lib3MFException { + byte[] bytesNameSpace = nameSpace.getBytes(StandardCharsets.UTF_8); + Memory bufferNameSpace = new Memory(bytesNameSpace.length + 1); + bufferNameSpace.write(0, bytesNameSpace, 0, bytesNameSpace.length); + bufferNameSpace.setByte(bytesNameSpace.length, (byte)0); + byte[] bytesName = name.getBytes(StandardCharsets.UTF_8); + Memory bufferName = new Memory(bytesName.length + 1); + bufferName.write(0, bytesName, 0, bytesName.length); + bufferName.setByte(bytesName.length, (byte)0); + byte[] bytesValue = value.getBytes(StandardCharsets.UTF_8); + Memory bufferValue = new Memory(bytesValue.length + 1); + bufferValue.write(0, bytesValue, 0, bytesValue.length); + bufferValue.setByte(bytesValue.length, (byte)0); + byte[] bytesType = type.getBytes(StandardCharsets.UTF_8); + Memory bufferType = new Memory(bytesType.length + 1); + bufferType.write(0, bytesType, 0, bytesType.length); + bufferType.setByte(bytesType.length, (byte)0); + Pointer bufferMetaData = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_metadatagroup_addmetadata.invokeInt(new java.lang.Object[]{mHandle, bufferNameSpace, bufferName, bufferValue, bufferType, mustPreserve, bufferMetaData})); + Pointer valueMetaData = bufferMetaData.getPointer(0); + MetaData metaData = null; + if (valueMetaData == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "MetaData was a null pointer"); + } + metaData = mWrapper.PolymorphicFactory(valueMetaData, MetaData.class); + return metaData; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/MinNode.java b/Autogenerated/Bindings/Java8/lib3mf/MinNode.java new file mode 100644 index 000000000..214edb242 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/MinNode.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class MinNode extends TwoInputNode { + + public MinNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/ModNode.java b/Autogenerated/Bindings/Java8/lib3mf/ModNode.java new file mode 100644 index 000000000..c2807274e --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/ModNode.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ModNode extends TwoInputNode { + + public ModNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/Model.java b/Autogenerated/Bindings/Java8/lib3mf/Model.java new file mode 100644 index 000000000..44c413fc2 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/Model.java @@ -0,0 +1,1376 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Model extends Base { + + public Model(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the PackagePart within the OPC package that holds the root model. + * + * @return the PackagePart within the OPC package that holds the model-file + * @throws Lib3MFException + */ + public PackagePart rootModelPart() throws Lib3MFException { + Pointer bufferRootModelPart = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_rootmodelpart.invokeInt(new java.lang.Object[]{mHandle, bufferRootModelPart})); + Pointer valueRootModelPart = bufferRootModelPart.getPointer(0); + PackagePart rootModelPart = null; + if (valueRootModelPart == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "RootModelPart was a null pointer"); + } + rootModelPart = mWrapper.PolymorphicFactory(valueRootModelPart, PackagePart.class); + return rootModelPart; + } + + /** + * Returns a new PackagePart for use within the OPC package. + * + * @param absolutePath the absolute Path (physical location) within the OPC package + * @return the new PackagePart within the OPC package + * @throws Lib3MFException + */ + public PackagePart findOrCreatePackagePart(String absolutePath) throws Lib3MFException { + byte[] bytesAbsolutePath = absolutePath.getBytes(StandardCharsets.UTF_8); + Memory bufferAbsolutePath = new Memory(bytesAbsolutePath.length + 1); + bufferAbsolutePath.write(0, bytesAbsolutePath, 0, bytesAbsolutePath.length); + bufferAbsolutePath.setByte(bytesAbsolutePath.length, (byte)0); + Pointer bufferModelPart = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_findorcreatepackagepart.invokeInt(new java.lang.Object[]{mHandle, bufferAbsolutePath, bufferModelPart})); + Pointer valueModelPart = bufferModelPart.getPointer(0); + PackagePart modelPart = null; + if (valueModelPart == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ModelPart was a null pointer"); + } + modelPart = mWrapper.PolymorphicFactory(valueModelPart, PackagePart.class); + return modelPart; + } + + /** + * sets the units of a model. + * + * @param unit Unit enum value for the model unit + * @throws Lib3MFException + */ + public void setUnit(Lib3MFWrapper.ModelUnit unit) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_model_setunit.invokeInt(new java.lang.Object[]{mHandle, Lib3MFWrapper.EnumConversion.convertModelUnitToConst(unit)})); + } + + /** + * returns the units of a model. + * + * @return Unit enum value for the model unit + * @throws Lib3MFException + */ + public Lib3MFWrapper.ModelUnit getUnit() throws Lib3MFException { + Pointer bufferUnit = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_model_getunit.invokeInt(new java.lang.Object[]{mHandle, bufferUnit})); + return Lib3MFWrapper.EnumConversion.convertConstToModelUnit(bufferUnit.getInt(0)); + } + + /** + * retrieves the language of a model + * + * @return language identifier + * @throws Lib3MFException + */ + public String getLanguage() throws Lib3MFException { + Pointer bytesNeededLanguage = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_model_getlanguage.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededLanguage, null})); + int sizeLanguage = bytesNeededLanguage.getInt(0); + Pointer bufferLanguage = new Memory(sizeLanguage); + mWrapper.checkError(this, mWrapper.lib3mf_model_getlanguage.invokeInt(new java.lang.Object[]{mHandle, sizeLanguage, bytesNeededLanguage, bufferLanguage})); + return new String(bufferLanguage.getByteArray(0, sizeLanguage - 1), StandardCharsets.UTF_8); + } + + /** + * sets the language of a model + * + * @param language language identifier + * @throws Lib3MFException + */ + public void setLanguage(String language) throws Lib3MFException { + byte[] bytesLanguage = language.getBytes(StandardCharsets.UTF_8); + Memory bufferLanguage = new Memory(bytesLanguage.length + 1); + bufferLanguage.write(0, bytesLanguage, 0, bytesLanguage.length); + bufferLanguage.setByte(bytesLanguage.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_model_setlanguage.invokeInt(new java.lang.Object[]{mHandle, bufferLanguage})); + } + + /** + * creates a model writer instance for a specific file type + * + * @param writerClass string identifier for the file type + * @return string identifier for the file type + * @throws Lib3MFException + */ + public Writer queryWriter(String writerClass) throws Lib3MFException { + byte[] bytesWriterClass = writerClass.getBytes(StandardCharsets.UTF_8); + Memory bufferWriterClass = new Memory(bytesWriterClass.length + 1); + bufferWriterClass.write(0, bytesWriterClass, 0, bytesWriterClass.length); + bufferWriterClass.setByte(bytesWriterClass.length, (byte)0); + Pointer bufferWriterInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_querywriter.invokeInt(new java.lang.Object[]{mHandle, bufferWriterClass, bufferWriterInstance})); + Pointer valueWriterInstance = bufferWriterInstance.getPointer(0); + Writer writerInstance = null; + if (valueWriterInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "WriterInstance was a null pointer"); + } + writerInstance = mWrapper.PolymorphicFactory(valueWriterInstance, Writer.class); + return writerInstance; + } + + /** + * creates a model reader instance for a specific file type + * + * @param readerClass string identifier for the file type + * @return string identifier for the file type + * @throws Lib3MFException + */ + public Reader queryReader(String readerClass) throws Lib3MFException { + byte[] bytesReaderClass = readerClass.getBytes(StandardCharsets.UTF_8); + Memory bufferReaderClass = new Memory(bytesReaderClass.length + 1); + bufferReaderClass.write(0, bytesReaderClass, 0, bytesReaderClass.length); + bufferReaderClass.setByte(bytesReaderClass.length, (byte)0); + Pointer bufferReaderInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_queryreader.invokeInt(new java.lang.Object[]{mHandle, bufferReaderClass, bufferReaderInstance})); + Pointer valueReaderInstance = bufferReaderInstance.getPointer(0); + Reader readerInstance = null; + if (valueReaderInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ReaderInstance was a null pointer"); + } + readerInstance = mWrapper.PolymorphicFactory(valueReaderInstance, Reader.class); + return readerInstance; + } + + /** + * finds a model resource by its UniqueResourceID + * + * @param uniqueResourceID UniqueResourceID + * @return returns the resource instance + * @throws Lib3MFException + */ + public Resource getResourceByID(int uniqueResourceID) throws Lib3MFException { + Pointer bufferResource = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getresourcebyid.invokeInt(new java.lang.Object[]{mHandle, uniqueResourceID, bufferResource})); + Pointer valueResource = bufferResource.getPointer(0); + Resource resource = null; + if (valueResource == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Resource was a null pointer"); + } + resource = mWrapper.PolymorphicFactory(valueResource, Resource.class); + return resource; + } + + /** + * finds a model texture by its UniqueResourceID + * + * @param uniqueResourceID UniqueResourceID + * @return returns the texture2d instance + * @throws Lib3MFException + */ + public Texture2D getTexture2DByID(int uniqueResourceID) throws Lib3MFException { + Pointer bufferTextureInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_gettexture2dbyid.invokeInt(new java.lang.Object[]{mHandle, uniqueResourceID, bufferTextureInstance})); + Pointer valueTextureInstance = bufferTextureInstance.getPointer(0); + Texture2D textureInstance = null; + if (valueTextureInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TextureInstance was a null pointer"); + } + textureInstance = mWrapper.PolymorphicFactory(valueTextureInstance, Texture2D.class); + return textureInstance; + } + + /** + * returns a Property's type + * + * @param uniqueResourceID Resource ID of the Property to Query + * @return returns a Property's type + * @throws Lib3MFException + */ + public Lib3MFWrapper.PropertyType getPropertyTypeByID(int uniqueResourceID) throws Lib3MFException { + Pointer bufferThePropertyType = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_model_getpropertytypebyid.invokeInt(new java.lang.Object[]{mHandle, uniqueResourceID, bufferThePropertyType})); + return Lib3MFWrapper.EnumConversion.convertConstToPropertyType(bufferThePropertyType.getInt(0)); + } + + /** + * finds a model base material group by its UniqueResourceID + * + * @param uniqueResourceID UniqueResourceID + * @return returns the BaseMaterialGroup instance + * @throws Lib3MFException + */ + public BaseMaterialGroup getBaseMaterialGroupByID(int uniqueResourceID) throws Lib3MFException { + Pointer bufferBaseMaterialGroupInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getbasematerialgroupbyid.invokeInt(new java.lang.Object[]{mHandle, uniqueResourceID, bufferBaseMaterialGroupInstance})); + Pointer valueBaseMaterialGroupInstance = bufferBaseMaterialGroupInstance.getPointer(0); + BaseMaterialGroup baseMaterialGroupInstance = null; + if (valueBaseMaterialGroupInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "BaseMaterialGroupInstance was a null pointer"); + } + baseMaterialGroupInstance = mWrapper.PolymorphicFactory(valueBaseMaterialGroupInstance, BaseMaterialGroup.class); + return baseMaterialGroupInstance; + } + + /** + * finds a model texture2d group by its UniqueResourceID + * + * @param uniqueResourceID UniqueResourceID + * @return returns the Texture2DGroup instance + * @throws Lib3MFException + */ + public Texture2DGroup getTexture2DGroupByID(int uniqueResourceID) throws Lib3MFException { + Pointer bufferTexture2DGroupInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_gettexture2dgroupbyid.invokeInt(new java.lang.Object[]{mHandle, uniqueResourceID, bufferTexture2DGroupInstance})); + Pointer valueTexture2DGroupInstance = bufferTexture2DGroupInstance.getPointer(0); + Texture2DGroup texture2DGroupInstance = null; + if (valueTexture2DGroupInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Texture2DGroupInstance was a null pointer"); + } + texture2DGroupInstance = mWrapper.PolymorphicFactory(valueTexture2DGroupInstance, Texture2DGroup.class); + return texture2DGroupInstance; + } + + /** + * finds a model CompositeMaterials by its UniqueResourceID + * + * @param uniqueResourceID UniqueResourceID + * @return returns the CompositeMaterials instance + * @throws Lib3MFException + */ + public CompositeMaterials getCompositeMaterialsByID(int uniqueResourceID) throws Lib3MFException { + Pointer bufferCompositeMaterialsInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getcompositematerialsbyid.invokeInt(new java.lang.Object[]{mHandle, uniqueResourceID, bufferCompositeMaterialsInstance})); + Pointer valueCompositeMaterialsInstance = bufferCompositeMaterialsInstance.getPointer(0); + CompositeMaterials compositeMaterialsInstance = null; + if (valueCompositeMaterialsInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "CompositeMaterialsInstance was a null pointer"); + } + compositeMaterialsInstance = mWrapper.PolymorphicFactory(valueCompositeMaterialsInstance, CompositeMaterials.class); + return compositeMaterialsInstance; + } + + /** + * finds a model MultiPropertyGroup by its UniqueResourceID + * + * @param uniqueResourceID UniqueResourceID + * @return returns the MultiPropertyGroup instance + * @throws Lib3MFException + */ + public MultiPropertyGroup getMultiPropertyGroupByID(int uniqueResourceID) throws Lib3MFException { + Pointer bufferMultiPropertyGroupInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getmultipropertygroupbyid.invokeInt(new java.lang.Object[]{mHandle, uniqueResourceID, bufferMultiPropertyGroupInstance})); + Pointer valueMultiPropertyGroupInstance = bufferMultiPropertyGroupInstance.getPointer(0); + MultiPropertyGroup multiPropertyGroupInstance = null; + if (valueMultiPropertyGroupInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "MultiPropertyGroupInstance was a null pointer"); + } + multiPropertyGroupInstance = mWrapper.PolymorphicFactory(valueMultiPropertyGroupInstance, MultiPropertyGroup.class); + return multiPropertyGroupInstance; + } + + /** + * finds a mesh object by its UniqueResourceID + * + * @param uniqueResourceID UniqueResourceID + * @return returns the mesh object instance + * @throws Lib3MFException + */ + public MeshObject getMeshObjectByID(int uniqueResourceID) throws Lib3MFException { + Pointer bufferMeshObjectInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getmeshobjectbyid.invokeInt(new java.lang.Object[]{mHandle, uniqueResourceID, bufferMeshObjectInstance})); + Pointer valueMeshObjectInstance = bufferMeshObjectInstance.getPointer(0); + MeshObject meshObjectInstance = null; + if (valueMeshObjectInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "MeshObjectInstance was a null pointer"); + } + meshObjectInstance = mWrapper.PolymorphicFactory(valueMeshObjectInstance, MeshObject.class); + return meshObjectInstance; + } + + /** + * finds a components object by its UniqueResourceID + * + * @param uniqueResourceID UniqueResourceID + * @return returns the components object instance + * @throws Lib3MFException + */ + public ComponentsObject getComponentsObjectByID(int uniqueResourceID) throws Lib3MFException { + Pointer bufferComponentsObjectInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getcomponentsobjectbyid.invokeInt(new java.lang.Object[]{mHandle, uniqueResourceID, bufferComponentsObjectInstance})); + Pointer valueComponentsObjectInstance = bufferComponentsObjectInstance.getPointer(0); + ComponentsObject componentsObjectInstance = null; + if (valueComponentsObjectInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ComponentsObjectInstance was a null pointer"); + } + componentsObjectInstance = mWrapper.PolymorphicFactory(valueComponentsObjectInstance, ComponentsObject.class); + return componentsObjectInstance; + } + + /** + * finds a model color group by its UniqueResourceID + * + * @param uniqueResourceID UniqueResourceID + * @return returns the ColorGroup instance + * @throws Lib3MFException + */ + public ColorGroup getColorGroupByID(int uniqueResourceID) throws Lib3MFException { + Pointer bufferColorGroupInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getcolorgroupbyid.invokeInt(new java.lang.Object[]{mHandle, uniqueResourceID, bufferColorGroupInstance})); + Pointer valueColorGroupInstance = bufferColorGroupInstance.getPointer(0); + ColorGroup colorGroupInstance = null; + if (valueColorGroupInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ColorGroupInstance was a null pointer"); + } + colorGroupInstance = mWrapper.PolymorphicFactory(valueColorGroupInstance, ColorGroup.class); + return colorGroupInstance; + } + + /** + * finds a model slicestack by its UniqueResourceID + * + * @param uniqueResourceID UniqueResourceID + * @return returns the slicestack instance + * @throws Lib3MFException + */ + public SliceStack getSliceStackByID(int uniqueResourceID) throws Lib3MFException { + Pointer bufferSliceStacInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getslicestackbyid.invokeInt(new java.lang.Object[]{mHandle, uniqueResourceID, bufferSliceStacInstance})); + Pointer valueSliceStacInstance = bufferSliceStacInstance.getPointer(0); + SliceStack sliceStacInstance = null; + if (valueSliceStacInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "SliceStacInstance was a null pointer"); + } + sliceStacInstance = mWrapper.PolymorphicFactory(valueSliceStacInstance, SliceStack.class); + return sliceStacInstance; + } + + /** + * finds a level set object by its UniqueResourceID + * + * @param uniqueResourceID UniqueResourceID + * @return returns the level set object instance + * @throws Lib3MFException + */ + public LevelSet getLevelSetByID(int uniqueResourceID) throws Lib3MFException { + Pointer bufferLevelSetObjectInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getlevelsetbyid.invokeInt(new java.lang.Object[]{mHandle, uniqueResourceID, bufferLevelSetObjectInstance})); + Pointer valueLevelSetObjectInstance = bufferLevelSetObjectInstance.getPointer(0); + LevelSet levelSetObjectInstance = null; + if (valueLevelSetObjectInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "LevelSetObjectInstance was a null pointer"); + } + levelSetObjectInstance = mWrapper.PolymorphicFactory(valueLevelSetObjectInstance, LevelSet.class); + return levelSetObjectInstance; + } + + /** + * returns, whether a build has a UUID and, if true, the build's UUID + * + * @return GetBuildUUID Result Tuple + * @throws Lib3MFException + */ + public GetBuildUUIDResult getBuildUUID() throws Lib3MFException { + Pointer bufferHasUUID = new Memory(1); + Pointer bytesNeededUUID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_model_getbuilduuid.invokeInt(new java.lang.Object[]{mHandle, bufferHasUUID, 0, bytesNeededUUID, null})); + int sizeUUID = bytesNeededUUID.getInt(0); + Pointer bufferUUID = new Memory(sizeUUID); + mWrapper.checkError(this, mWrapper.lib3mf_model_getbuilduuid.invokeInt(new java.lang.Object[]{mHandle, bufferHasUUID, sizeUUID, bytesNeededUUID, bufferUUID})); + GetBuildUUIDResult returnTuple = new GetBuildUUIDResult(); + returnTuple.HasUUID = bufferHasUUID.getByte(0) != 0; + returnTuple.UUID = new String(bufferUUID.getByteArray(0, sizeUUID - 1), StandardCharsets.UTF_8); + return returnTuple; + } + + public static class GetBuildUUIDResult { + /** + * flag whether the build has a UUID + */ + public boolean HasUUID; + + /** + * the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' + */ + public String UUID; + + } + /** + * sets the build's UUID + * + * @param uUID the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' + * @throws Lib3MFException + */ + public void setBuildUUID(String uUID) throws Lib3MFException { + byte[] bytesUUID = uUID.getBytes(StandardCharsets.UTF_8); + Memory bufferUUID = new Memory(bytesUUID.length + 1); + bufferUUID.write(0, bytesUUID, 0, bytesUUID.length); + bufferUUID.setByte(bytesUUID.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_model_setbuilduuid.invokeInt(new java.lang.Object[]{mHandle, bufferUUID})); + } + + /** + * creates a build item iterator instance with all build items. + * + * @return returns the iterator instance. + * @throws Lib3MFException + */ + public BuildItemIterator getBuildItems() throws Lib3MFException { + Pointer bufferBuildItemIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getbuilditems.invokeInt(new java.lang.Object[]{mHandle, bufferBuildItemIterator})); + Pointer valueBuildItemIterator = bufferBuildItemIterator.getPointer(0); + BuildItemIterator buildItemIterator = null; + if (valueBuildItemIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "BuildItemIterator was a null pointer"); + } + buildItemIterator = mWrapper.PolymorphicFactory(valueBuildItemIterator, BuildItemIterator.class); + return buildItemIterator; + } + + /** + * Returns the outbox of a Model + * + * @return Outbox of this Model + * @throws Lib3MFException + */ + public Box getOutbox() throws Lib3MFException { + Pointer bufferOutbox = new Memory(Box.SIZE); + mWrapper.checkError(this, mWrapper.lib3mf_model_getoutbox.invokeInt(new java.lang.Object[]{mHandle, bufferOutbox})); + Box outbox = new Box(); + outbox.readFromPointer(bufferOutbox, 0); + return outbox; + } + + /** + * creates a resource iterator instance with all resources. + * + * @return returns the iterator instance. + * @throws Lib3MFException + */ + public ResourceIterator getResources() throws Lib3MFException { + Pointer bufferResourceIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getresources.invokeInt(new java.lang.Object[]{mHandle, bufferResourceIterator})); + Pointer valueResourceIterator = bufferResourceIterator.getPointer(0); + ResourceIterator resourceIterator = null; + if (valueResourceIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceIterator was a null pointer"); + } + resourceIterator = mWrapper.PolymorphicFactory(valueResourceIterator, ResourceIterator.class); + return resourceIterator; + } + + /** + * creates a resource iterator instance with all object resources. + * + * @return returns the iterator instance. + * @throws Lib3MFException + */ + public ObjectIterator getObjects() throws Lib3MFException { + Pointer bufferResourceIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getobjects.invokeInt(new java.lang.Object[]{mHandle, bufferResourceIterator})); + Pointer valueResourceIterator = bufferResourceIterator.getPointer(0); + ObjectIterator resourceIterator = null; + if (valueResourceIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceIterator was a null pointer"); + } + resourceIterator = mWrapper.PolymorphicFactory(valueResourceIterator, ObjectIterator.class); + return resourceIterator; + } + + /** + * creates a resource iterator instance with all mesh object resources. + * + * @return returns the iterator instance. + * @throws Lib3MFException + */ + public MeshObjectIterator getMeshObjects() throws Lib3MFException { + Pointer bufferResourceIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getmeshobjects.invokeInt(new java.lang.Object[]{mHandle, bufferResourceIterator})); + Pointer valueResourceIterator = bufferResourceIterator.getPointer(0); + MeshObjectIterator resourceIterator = null; + if (valueResourceIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceIterator was a null pointer"); + } + resourceIterator = mWrapper.PolymorphicFactory(valueResourceIterator, MeshObjectIterator.class); + return resourceIterator; + } + + /** + * creates a resource iterator instance with all components object resources. + * + * @return returns the iterator instance. + * @throws Lib3MFException + */ + public ComponentsObjectIterator getComponentsObjects() throws Lib3MFException { + Pointer bufferResourceIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getcomponentsobjects.invokeInt(new java.lang.Object[]{mHandle, bufferResourceIterator})); + Pointer valueResourceIterator = bufferResourceIterator.getPointer(0); + ComponentsObjectIterator resourceIterator = null; + if (valueResourceIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceIterator was a null pointer"); + } + resourceIterator = mWrapper.PolymorphicFactory(valueResourceIterator, ComponentsObjectIterator.class); + return resourceIterator; + } + + /** + * creates a Texture2DIterator instance with all texture2d resources. + * + * @return returns the iterator instance. + * @throws Lib3MFException + */ + public Texture2DIterator getTexture2Ds() throws Lib3MFException { + Pointer bufferResourceIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_gettexture2ds.invokeInt(new java.lang.Object[]{mHandle, bufferResourceIterator})); + Pointer valueResourceIterator = bufferResourceIterator.getPointer(0); + Texture2DIterator resourceIterator = null; + if (valueResourceIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceIterator was a null pointer"); + } + resourceIterator = mWrapper.PolymorphicFactory(valueResourceIterator, Texture2DIterator.class); + return resourceIterator; + } + + /** + * creates a BaseMaterialGroupIterator instance with all base material resources. + * + * @return returns the iterator instance. + * @throws Lib3MFException + */ + public BaseMaterialGroupIterator getBaseMaterialGroups() throws Lib3MFException { + Pointer bufferResourceIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getbasematerialgroups.invokeInt(new java.lang.Object[]{mHandle, bufferResourceIterator})); + Pointer valueResourceIterator = bufferResourceIterator.getPointer(0); + BaseMaterialGroupIterator resourceIterator = null; + if (valueResourceIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceIterator was a null pointer"); + } + resourceIterator = mWrapper.PolymorphicFactory(valueResourceIterator, BaseMaterialGroupIterator.class); + return resourceIterator; + } + + /** + * creates a ColorGroupIterator instance with all ColorGroup resources. + * + * @return returns the iterator instance. + * @throws Lib3MFException + */ + public ColorGroupIterator getColorGroups() throws Lib3MFException { + Pointer bufferResourceIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getcolorgroups.invokeInt(new java.lang.Object[]{mHandle, bufferResourceIterator})); + Pointer valueResourceIterator = bufferResourceIterator.getPointer(0); + ColorGroupIterator resourceIterator = null; + if (valueResourceIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceIterator was a null pointer"); + } + resourceIterator = mWrapper.PolymorphicFactory(valueResourceIterator, ColorGroupIterator.class); + return resourceIterator; + } + + /** + * creates a Texture2DGroupIterator instance with all base material resources. + * + * @return returns the iterator instance. + * @throws Lib3MFException + */ + public Texture2DGroupIterator getTexture2DGroups() throws Lib3MFException { + Pointer bufferResourceIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_gettexture2dgroups.invokeInt(new java.lang.Object[]{mHandle, bufferResourceIterator})); + Pointer valueResourceIterator = bufferResourceIterator.getPointer(0); + Texture2DGroupIterator resourceIterator = null; + if (valueResourceIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceIterator was a null pointer"); + } + resourceIterator = mWrapper.PolymorphicFactory(valueResourceIterator, Texture2DGroupIterator.class); + return resourceIterator; + } + + /** + * creates a CompositeMaterialsIterator instance with all CompositeMaterials resources. + * + * @return returns the iterator instance. + * @throws Lib3MFException + */ + public CompositeMaterialsIterator getCompositeMaterials() throws Lib3MFException { + Pointer bufferResourceIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getcompositematerials.invokeInt(new java.lang.Object[]{mHandle, bufferResourceIterator})); + Pointer valueResourceIterator = bufferResourceIterator.getPointer(0); + CompositeMaterialsIterator resourceIterator = null; + if (valueResourceIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceIterator was a null pointer"); + } + resourceIterator = mWrapper.PolymorphicFactory(valueResourceIterator, CompositeMaterialsIterator.class); + return resourceIterator; + } + + /** + * creates a MultiPropertyGroupsIterator instance with all MultiPropertyGroup resources. + * + * @return returns the iterator instance. + * @throws Lib3MFException + */ + public MultiPropertyGroupIterator getMultiPropertyGroups() throws Lib3MFException { + Pointer bufferResourceIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getmultipropertygroups.invokeInt(new java.lang.Object[]{mHandle, bufferResourceIterator})); + Pointer valueResourceIterator = bufferResourceIterator.getPointer(0); + MultiPropertyGroupIterator resourceIterator = null; + if (valueResourceIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceIterator was a null pointer"); + } + resourceIterator = mWrapper.PolymorphicFactory(valueResourceIterator, MultiPropertyGroupIterator.class); + return resourceIterator; + } + + /** + * creates a resource iterator instance with all slice stack resources. + * + * @return returns the iterator instance. + * @throws Lib3MFException + */ + public SliceStackIterator getSliceStacks() throws Lib3MFException { + Pointer bufferResourceIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getslicestacks.invokeInt(new java.lang.Object[]{mHandle, bufferResourceIterator})); + Pointer valueResourceIterator = bufferResourceIterator.getPointer(0); + SliceStackIterator resourceIterator = null; + if (valueResourceIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceIterator was a null pointer"); + } + resourceIterator = mWrapper.PolymorphicFactory(valueResourceIterator, SliceStackIterator.class); + return resourceIterator; + } + + /** + * creates a resource iterator instance with all image3d resources. + * + * @return returns the iterator instance. + * @throws Lib3MFException + */ + public Image3DIterator getImage3Ds() throws Lib3MFException { + Pointer bufferResourceIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getimage3ds.invokeInt(new java.lang.Object[]{mHandle, bufferResourceIterator})); + Pointer valueResourceIterator = bufferResourceIterator.getPointer(0); + Image3DIterator resourceIterator = null; + if (valueResourceIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceIterator was a null pointer"); + } + resourceIterator = mWrapper.PolymorphicFactory(valueResourceIterator, Image3DIterator.class); + return resourceIterator; + } + + /** + * Merges all components and objects which are referenced by a build item into a mesh. The memory is duplicated and a new model is created. + * + * @return returns the merged model instance + * @throws Lib3MFException + */ + public Model mergeToModel() throws Lib3MFException { + Pointer bufferMergedModelInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_mergetomodel.invokeInt(new java.lang.Object[]{mHandle, bufferMergedModelInstance})); + Pointer valueMergedModelInstance = bufferMergedModelInstance.getPointer(0); + Model mergedModelInstance = null; + if (valueMergedModelInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "MergedModelInstance was a null pointer"); + } + mergedModelInstance = mWrapper.PolymorphicFactory(valueMergedModelInstance, Model.class); + return mergedModelInstance; + } + + /** + * Merges the given model into this model. + * + * @param modelInstance model to be merged + * @throws Lib3MFException + */ + public void mergeFromModel(Model modelInstance) throws Lib3MFException { + Pointer modelInstanceHandle = null; + if (modelInstance != null) { + modelInstanceHandle = modelInstance.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ModelInstance is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_model_mergefrommodel.invokeInt(new java.lang.Object[]{mHandle, modelInstanceHandle})); + } + + /** + * adds an empty mesh object to the model. + * + * @return returns the mesh object instance + * @throws Lib3MFException + */ + public MeshObject addMeshObject() throws Lib3MFException { + Pointer bufferMeshObjectInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_addmeshobject.invokeInt(new java.lang.Object[]{mHandle, bufferMeshObjectInstance})); + Pointer valueMeshObjectInstance = bufferMeshObjectInstance.getPointer(0); + MeshObject meshObjectInstance = null; + if (valueMeshObjectInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "MeshObjectInstance was a null pointer"); + } + meshObjectInstance = mWrapper.PolymorphicFactory(valueMeshObjectInstance, MeshObject.class); + return meshObjectInstance; + } + + /** + * adds an empty component object to the model. + * + * @return returns the components object instance + * @throws Lib3MFException + */ + public ComponentsObject addComponentsObject() throws Lib3MFException { + Pointer bufferComponentsObjectInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_addcomponentsobject.invokeInt(new java.lang.Object[]{mHandle, bufferComponentsObjectInstance})); + Pointer valueComponentsObjectInstance = bufferComponentsObjectInstance.getPointer(0); + ComponentsObject componentsObjectInstance = null; + if (valueComponentsObjectInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ComponentsObjectInstance was a null pointer"); + } + componentsObjectInstance = mWrapper.PolymorphicFactory(valueComponentsObjectInstance, ComponentsObject.class); + return componentsObjectInstance; + } + + /** + * creates a new model slicestack by its id + * + * @param zBottom Bottom Z value of the slicestack + * @return returns the new slicestack instance + * @throws Lib3MFException + */ + public SliceStack addSliceStack(double zBottom) throws Lib3MFException { + Pointer bufferSliceStackInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_addslicestack.invokeInt(new java.lang.Object[]{mHandle, zBottom, bufferSliceStackInstance})); + Pointer valueSliceStackInstance = bufferSliceStackInstance.getPointer(0); + SliceStack sliceStackInstance = null; + if (valueSliceStackInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "SliceStackInstance was a null pointer"); + } + sliceStackInstance = mWrapper.PolymorphicFactory(valueSliceStackInstance, SliceStack.class); + return sliceStackInstance; + } + + /** + * adds a texture2d resource to the model. Its path is given by that of an existing attachment. + * + * @param textureAttachment attachment containing the image data. + * @return returns the new texture instance. + * @throws Lib3MFException + */ + public Texture2D addTexture2DFromAttachment(Attachment textureAttachment) throws Lib3MFException { + Pointer textureAttachmentHandle = null; + if (textureAttachment != null) { + textureAttachmentHandle = textureAttachment.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TextureAttachment is a null value."); + } + Pointer bufferTexture2DInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_addtexture2dfromattachment.invokeInt(new java.lang.Object[]{mHandle, textureAttachmentHandle, bufferTexture2DInstance})); + Pointer valueTexture2DInstance = bufferTexture2DInstance.getPointer(0); + Texture2D texture2DInstance = null; + if (valueTexture2DInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Texture2DInstance was a null pointer"); + } + texture2DInstance = mWrapper.PolymorphicFactory(valueTexture2DInstance, Texture2D.class); + return texture2DInstance; + } + + /** + * adds an empty BaseMaterialGroup resource to the model. + * + * @return returns the new base material instance. + * @throws Lib3MFException + */ + public BaseMaterialGroup addBaseMaterialGroup() throws Lib3MFException { + Pointer bufferBaseMaterialGroupInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_addbasematerialgroup.invokeInt(new java.lang.Object[]{mHandle, bufferBaseMaterialGroupInstance})); + Pointer valueBaseMaterialGroupInstance = bufferBaseMaterialGroupInstance.getPointer(0); + BaseMaterialGroup baseMaterialGroupInstance = null; + if (valueBaseMaterialGroupInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "BaseMaterialGroupInstance was a null pointer"); + } + baseMaterialGroupInstance = mWrapper.PolymorphicFactory(valueBaseMaterialGroupInstance, BaseMaterialGroup.class); + return baseMaterialGroupInstance; + } + + /** + * adds an empty ColorGroup resource to the model. + * + * @return returns the new ColorGroup instance. + * @throws Lib3MFException + */ + public ColorGroup addColorGroup() throws Lib3MFException { + Pointer bufferColorGroupInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_addcolorgroup.invokeInt(new java.lang.Object[]{mHandle, bufferColorGroupInstance})); + Pointer valueColorGroupInstance = bufferColorGroupInstance.getPointer(0); + ColorGroup colorGroupInstance = null; + if (valueColorGroupInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ColorGroupInstance was a null pointer"); + } + colorGroupInstance = mWrapper.PolymorphicFactory(valueColorGroupInstance, ColorGroup.class); + return colorGroupInstance; + } + + /** + * adds an empty Texture2DGroup resource to the model. + * + * @param texture2DInstance The texture2D instance of the created Texture2DGroup. + * @return returns the new Texture2DGroup instance. + * @throws Lib3MFException + */ + public Texture2DGroup addTexture2DGroup(Texture2D texture2DInstance) throws Lib3MFException { + Pointer texture2DInstanceHandle = null; + if (texture2DInstance != null) { + texture2DInstanceHandle = texture2DInstance.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Texture2DInstance is a null value."); + } + Pointer bufferTexture2DGroupInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_addtexture2dgroup.invokeInt(new java.lang.Object[]{mHandle, texture2DInstanceHandle, bufferTexture2DGroupInstance})); + Pointer valueTexture2DGroupInstance = bufferTexture2DGroupInstance.getPointer(0); + Texture2DGroup texture2DGroupInstance = null; + if (valueTexture2DGroupInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Texture2DGroupInstance was a null pointer"); + } + texture2DGroupInstance = mWrapper.PolymorphicFactory(valueTexture2DGroupInstance, Texture2DGroup.class); + return texture2DGroupInstance; + } + + /** + * adds an empty CompositeMaterials resource to the model. + * + * @param baseMaterialGroupInstance The BaseMaterialGroup instance of the created CompositeMaterials. + * @return returns the new CompositeMaterials instance. + * @throws Lib3MFException + */ + public CompositeMaterials addCompositeMaterials(BaseMaterialGroup baseMaterialGroupInstance) throws Lib3MFException { + Pointer baseMaterialGroupInstanceHandle = null; + if (baseMaterialGroupInstance != null) { + baseMaterialGroupInstanceHandle = baseMaterialGroupInstance.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "BaseMaterialGroupInstance is a null value."); + } + Pointer bufferCompositeMaterialsInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_addcompositematerials.invokeInt(new java.lang.Object[]{mHandle, baseMaterialGroupInstanceHandle, bufferCompositeMaterialsInstance})); + Pointer valueCompositeMaterialsInstance = bufferCompositeMaterialsInstance.getPointer(0); + CompositeMaterials compositeMaterialsInstance = null; + if (valueCompositeMaterialsInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "CompositeMaterialsInstance was a null pointer"); + } + compositeMaterialsInstance = mWrapper.PolymorphicFactory(valueCompositeMaterialsInstance, CompositeMaterials.class); + return compositeMaterialsInstance; + } + + /** + * adds an empty MultiPropertyGroup resource to the model. + * + * @return returns the new MultiPropertyGroup instance. + * @throws Lib3MFException + */ + public MultiPropertyGroup addMultiPropertyGroup() throws Lib3MFException { + Pointer bufferMultiPropertyGroupInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_addmultipropertygroup.invokeInt(new java.lang.Object[]{mHandle, bufferMultiPropertyGroupInstance})); + Pointer valueMultiPropertyGroupInstance = bufferMultiPropertyGroupInstance.getPointer(0); + MultiPropertyGroup multiPropertyGroupInstance = null; + if (valueMultiPropertyGroupInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "MultiPropertyGroupInstance was a null pointer"); + } + multiPropertyGroupInstance = mWrapper.PolymorphicFactory(valueMultiPropertyGroupInstance, MultiPropertyGroup.class); + return multiPropertyGroupInstance; + } + + /** + * creates a new 3D Image Resource + * + * @param columnCount the number of columns in each sheet. + * @param rowCount the number of rows in each sheet. + * @param sheetCount the number of sheets in the image stack. + * @return returns the new ImageStack instance + * @throws Lib3MFException + */ + public ImageStack addImageStack(int columnCount, int rowCount, int sheetCount) throws Lib3MFException { + Pointer bufferInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_addimagestack.invokeInt(new java.lang.Object[]{mHandle, columnCount, rowCount, sheetCount, bufferInstance})); + Pointer valueInstance = bufferInstance.getPointer(0); + ImageStack instance = null; + if (valueInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Instance was a null pointer"); + } + instance = mWrapper.PolymorphicFactory(valueInstance, ImageStack.class); + return instance; + } + + /** + * finds an ImageStack object by its UniqueResourceID + * + * @param uniqueResourceID UniqueResourceID + * @return returns the image stack instance + * @throws Lib3MFException + */ + public ImageStack getImageStackByID(int uniqueResourceID) throws Lib3MFException { + Pointer bufferImageStackInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getimagestackbyid.invokeInt(new java.lang.Object[]{mHandle, uniqueResourceID, bufferImageStackInstance})); + Pointer valueImageStackInstance = bufferImageStackInstance.getPointer(0); + ImageStack imageStackInstance = null; + if (valueImageStackInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ImageStackInstance was a null pointer"); + } + imageStackInstance = mWrapper.PolymorphicFactory(valueImageStackInstance, ImageStack.class); + return imageStackInstance; + } + + /** + * adds a build item to the model. + * + * @param object Object instance. + * @param transform Transformation matrix. + * @return returns the build item instance. + * @throws Lib3MFException + */ + public BuildItem addBuildItem(Object object, Transform transform) throws Lib3MFException { + Pointer objectHandle = null; + if (object != null) { + objectHandle = object.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Object is a null value."); + } + Pointer bufferTransform = new Memory(Transform.SIZE); + transform.writeToPointer(bufferTransform, 0); + Pointer bufferBuildItemInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_addbuilditem.invokeInt(new java.lang.Object[]{mHandle, objectHandle, bufferTransform, bufferBuildItemInstance})); + Pointer valueBuildItemInstance = bufferBuildItemInstance.getPointer(0); + BuildItem buildItemInstance = null; + if (valueBuildItemInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "BuildItemInstance was a null pointer"); + } + buildItemInstance = mWrapper.PolymorphicFactory(valueBuildItemInstance, BuildItem.class); + return buildItemInstance; + } + + /** + * removes a build item from the model + * + * @param buildItemInstance Build item to remove. + * @throws Lib3MFException + */ + public void removeBuildItem(BuildItem buildItemInstance) throws Lib3MFException { + Pointer buildItemInstanceHandle = null; + if (buildItemInstance != null) { + buildItemInstanceHandle = buildItemInstance.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "BuildItemInstance is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_model_removebuilditem.invokeInt(new java.lang.Object[]{mHandle, buildItemInstanceHandle})); + } + + /** + * Returns the metadata of the model as MetaDataGroup + * + * @return returns an Instance of the metadatagroup of the model + * @throws Lib3MFException + */ + public MetaDataGroup getMetaDataGroup() throws Lib3MFException { + Pointer bufferTheMetaDataGroup = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getmetadatagroup.invokeInt(new java.lang.Object[]{mHandle, bufferTheMetaDataGroup})); + Pointer valueTheMetaDataGroup = bufferTheMetaDataGroup.getPointer(0); + MetaDataGroup theMetaDataGroup = null; + if (valueTheMetaDataGroup == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheMetaDataGroup was a null pointer"); + } + theMetaDataGroup = mWrapper.PolymorphicFactory(valueTheMetaDataGroup, MetaDataGroup.class); + return theMetaDataGroup; + } + + /** + * adds an attachment stream to the model. The OPC part will be related to the model stream with a certain relationship type. + * + * @param uRI Path of the attachment + * @param relationShipType Relationship type of the attachment + * @return Instance of the attachment object + * @throws Lib3MFException + */ + public Attachment addAttachment(String uRI, String relationShipType) throws Lib3MFException { + byte[] bytesURI = uRI.getBytes(StandardCharsets.UTF_8); + Memory bufferURI = new Memory(bytesURI.length + 1); + bufferURI.write(0, bytesURI, 0, bytesURI.length); + bufferURI.setByte(bytesURI.length, (byte)0); + byte[] bytesRelationShipType = relationShipType.getBytes(StandardCharsets.UTF_8); + Memory bufferRelationShipType = new Memory(bytesRelationShipType.length + 1); + bufferRelationShipType.write(0, bytesRelationShipType, 0, bytesRelationShipType.length); + bufferRelationShipType.setByte(bytesRelationShipType.length, (byte)0); + Pointer bufferAttachmentInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_addattachment.invokeInt(new java.lang.Object[]{mHandle, bufferURI, bufferRelationShipType, bufferAttachmentInstance})); + Pointer valueAttachmentInstance = bufferAttachmentInstance.getPointer(0); + Attachment attachmentInstance = null; + if (valueAttachmentInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "AttachmentInstance was a null pointer"); + } + attachmentInstance = mWrapper.PolymorphicFactory(valueAttachmentInstance, Attachment.class); + return attachmentInstance; + } + + /** + * Removes attachment from the model. + * + * @param attachmentInstance Attachment instance to remove + * @throws Lib3MFException + */ + public void removeAttachment(Attachment attachmentInstance) throws Lib3MFException { + Pointer attachmentInstanceHandle = null; + if (attachmentInstance != null) { + attachmentInstanceHandle = attachmentInstance.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "AttachmentInstance is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_model_removeattachment.invokeInt(new java.lang.Object[]{mHandle, attachmentInstanceHandle})); + } + + /** + * retrieves an attachment stream object from the model.. + * + * @param index Index of the attachment stream + * @return Instance of the attachment object + * @throws Lib3MFException + */ + public Attachment getAttachment(int index) throws Lib3MFException { + Pointer bufferAttachmentInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getattachment.invokeInt(new java.lang.Object[]{mHandle, index, bufferAttachmentInstance})); + Pointer valueAttachmentInstance = bufferAttachmentInstance.getPointer(0); + Attachment attachmentInstance = null; + if (valueAttachmentInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "AttachmentInstance was a null pointer"); + } + attachmentInstance = mWrapper.PolymorphicFactory(valueAttachmentInstance, Attachment.class); + return attachmentInstance; + } + + /** + * retrieves an attachment stream object from the model. + * + * @param uRI Path URI in the package + * @return Instance of the attachment object + * @throws Lib3MFException + */ + public Attachment findAttachment(String uRI) throws Lib3MFException { + byte[] bytesURI = uRI.getBytes(StandardCharsets.UTF_8); + Memory bufferURI = new Memory(bytesURI.length + 1); + bufferURI.write(0, bytesURI, 0, bytesURI.length); + bufferURI.setByte(bytesURI.length, (byte)0); + Pointer bufferAttachmentInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_findattachment.invokeInt(new java.lang.Object[]{mHandle, bufferURI, bufferAttachmentInstance})); + Pointer valueAttachmentInstance = bufferAttachmentInstance.getPointer(0); + Attachment attachmentInstance = null; + if (valueAttachmentInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "AttachmentInstance was a null pointer"); + } + attachmentInstance = mWrapper.PolymorphicFactory(valueAttachmentInstance, Attachment.class); + return attachmentInstance; + } + + /** + * retrieves the number of attachments of the model. + * + * @return Returns the number of attachments. + * @throws Lib3MFException + */ + public int getAttachmentCount() throws Lib3MFException { + Pointer bufferAttachmentCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_model_getattachmentcount.invokeInt(new java.lang.Object[]{mHandle, bufferAttachmentCount})); + return bufferAttachmentCount.getInt(0); + } + + /** + * Retrieve whether the OPC package contains a package thumbnail. + * + * @return returns whether the OPC package contains a package thumbnail + * @throws Lib3MFException + */ + public boolean hasPackageThumbnailAttachment() throws Lib3MFException { + Pointer bufferHasThumbnail = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_model_haspackagethumbnailattachment.invokeInt(new java.lang.Object[]{mHandle, bufferHasThumbnail})); + return bufferHasThumbnail.getByte(0) != 0; + } + + /** + * Create a new or the existing package thumbnail for the OPC package. + * + * @return Instance of a new or the existing thumbnailattachment object. + * @throws Lib3MFException + */ + public Attachment createPackageThumbnailAttachment() throws Lib3MFException { + Pointer bufferAttachment = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_createpackagethumbnailattachment.invokeInt(new java.lang.Object[]{mHandle, bufferAttachment})); + Pointer valueAttachment = bufferAttachment.getPointer(0); + Attachment attachment = null; + if (valueAttachment == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Attachment was a null pointer"); + } + attachment = mWrapper.PolymorphicFactory(valueAttachment, Attachment.class); + return attachment; + } + + /** + * Get the attachment to the OPC package containing the package thumbnail. + * + * @return Instance of the thumbnailattachment object or NULL. + * @throws Lib3MFException + */ + public Attachment getPackageThumbnailAttachment() throws Lib3MFException { + Pointer bufferAttachment = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getpackagethumbnailattachment.invokeInt(new java.lang.Object[]{mHandle, bufferAttachment})); + Pointer valueAttachment = bufferAttachment.getPointer(0); + Attachment attachment = null; + if (valueAttachment != Pointer.NULL) { + attachment = mWrapper.PolymorphicFactory(valueAttachment, Attachment.class); + } + return attachment; + } + + /** + * Remove the attachment to the OPC package containing the package thumbnail. + * + * @throws Lib3MFException + */ + public void removePackageThumbnailAttachment() throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_model_removepackagethumbnailattachment.invokeInt(new java.lang.Object[]{mHandle})); + } + + /** + * Adds a new Content Type to the model. + * + * @param extension File Extension + * @param contentType Content Type Identifier + * @throws Lib3MFException + */ + public void addCustomContentType(String extension, String contentType) throws Lib3MFException { + byte[] bytesExtension = extension.getBytes(StandardCharsets.UTF_8); + Memory bufferExtension = new Memory(bytesExtension.length + 1); + bufferExtension.write(0, bytesExtension, 0, bytesExtension.length); + bufferExtension.setByte(bytesExtension.length, (byte)0); + byte[] bytesContentType = contentType.getBytes(StandardCharsets.UTF_8); + Memory bufferContentType = new Memory(bytesContentType.length + 1); + bufferContentType.write(0, bytesContentType, 0, bytesContentType.length); + bufferContentType.setByte(bytesContentType.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_model_addcustomcontenttype.invokeInt(new java.lang.Object[]{mHandle, bufferExtension, bufferContentType})); + } + + /** + * Removes a custom Content Type from the model (UTF8 version). + * + * @param extension File Extension + * @throws Lib3MFException + */ + public void removeCustomContentType(String extension) throws Lib3MFException { + byte[] bytesExtension = extension.getBytes(StandardCharsets.UTF_8); + Memory bufferExtension = new Memory(bytesExtension.length + 1); + bufferExtension.write(0, bytesExtension, 0, bytesExtension.length); + bufferExtension.setByte(bytesExtension.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_model_removecustomcontenttype.invokeInt(new java.lang.Object[]{mHandle, bufferExtension})); + } + + /** + * Sets the random number generator callback for use in the library + * + * @param theCallback The callback used to generate random numbers + * @param userData Userdata to be passed to the callback function + * @throws Lib3MFException + */ + public void setRandomNumberCallback(Lib3MFWrapper.RandomNumberCallback theCallback, Pointer userData) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_model_setrandomnumbercallback.invokeInt(new java.lang.Object[]{mHandle, theCallback, userData})); + } + + /** + * Gets the keystore associated with this model + * + * @return The package keystore + * @throws Lib3MFException + */ + public KeyStore getKeyStore() throws Lib3MFException { + Pointer bufferKeyStore = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getkeystore.invokeInt(new java.lang.Object[]{mHandle, bufferKeyStore})); + Pointer valueKeyStore = bufferKeyStore.getPointer(0); + KeyStore keyStore = null; + if (valueKeyStore == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "KeyStore was a null pointer"); + } + keyStore = mWrapper.PolymorphicFactory(valueKeyStore, KeyStore.class); + return keyStore; + } + + /** + * creates a resource iterator for all functions + * + * @return returns the resource iterator + * @throws Lib3MFException + */ + public FunctionIterator getFunctions() throws Lib3MFException { + Pointer bufferTheResourceIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getfunctions.invokeInt(new java.lang.Object[]{mHandle, bufferTheResourceIterator})); + Pointer valueTheResourceIterator = bufferTheResourceIterator.getPointer(0); + FunctionIterator theResourceIterator = null; + if (valueTheResourceIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheResourceIterator was a null pointer"); + } + theResourceIterator = mWrapper.PolymorphicFactory(valueTheResourceIterator, FunctionIterator.class); + return theResourceIterator; + } + + /** + * adds a function described by nodes to the model + * + * @return returns the function instance + * @throws Lib3MFException + */ + public ImplicitFunction addImplicitFunction() throws Lib3MFException { + Pointer bufferFunctionInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_addimplicitfunction.invokeInt(new java.lang.Object[]{mHandle, bufferFunctionInstance})); + Pointer valueFunctionInstance = bufferFunctionInstance.getPointer(0); + ImplicitFunction functionInstance = null; + if (valueFunctionInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "FunctionInstance was a null pointer"); + } + functionInstance = mWrapper.PolymorphicFactory(valueFunctionInstance, ImplicitFunction.class); + return functionInstance; + } + + /** + * adds a function defined by an image3d to the model + * + * @param image3DInstance the Image3D-instance used for this function + * @return returns the function instance + * @throws Lib3MFException + */ + public FunctionFromImage3D addFunctionFromImage3D(Image3D image3DInstance) throws Lib3MFException { + Pointer image3DInstanceHandle = null; + if (image3DInstance != null) { + image3DInstanceHandle = image3DInstance.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Image3DInstance is a null value."); + } + Pointer bufferFunctionInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_addfunctionfromimage3d.invokeInt(new java.lang.Object[]{mHandle, image3DInstanceHandle, bufferFunctionInstance})); + Pointer valueFunctionInstance = bufferFunctionInstance.getPointer(0); + FunctionFromImage3D functionInstance = null; + if (valueFunctionInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "FunctionInstance was a null pointer"); + } + functionInstance = mWrapper.PolymorphicFactory(valueFunctionInstance, FunctionFromImage3D.class); + return functionInstance; + } + + /** + * adds a volume data resource to the model. + * + * @return returns the new volume data instance. + * @throws Lib3MFException + */ + public VolumeData addVolumeData() throws Lib3MFException { + Pointer bufferVolumeDataInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_addvolumedata.invokeInt(new java.lang.Object[]{mHandle, bufferVolumeDataInstance})); + Pointer valueVolumeDataInstance = bufferVolumeDataInstance.getPointer(0); + VolumeData volumeDataInstance = null; + if (valueVolumeDataInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "VolumeDataInstance was a null pointer"); + } + volumeDataInstance = mWrapper.PolymorphicFactory(valueVolumeDataInstance, VolumeData.class); + return volumeDataInstance; + } + + /** + * adds an empty boundary shape object to the model. + * + * @return returns the mesh object instance + * @throws Lib3MFException + */ + public LevelSet addLevelSet() throws Lib3MFException { + Pointer bufferLevelSetInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_addlevelset.invokeInt(new java.lang.Object[]{mHandle, bufferLevelSetInstance})); + Pointer valueLevelSetInstance = bufferLevelSetInstance.getPointer(0); + LevelSet levelSetInstance = null; + if (valueLevelSetInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "LevelSetInstance was a null pointer"); + } + levelSetInstance = mWrapper.PolymorphicFactory(valueLevelSetInstance, LevelSet.class); + return levelSetInstance; + } + + /** + * creates a resource iterator instance with all boundary shape resources. + * + * @return returns the iterator instance. + * @throws Lib3MFException + */ + public LevelSetIterator getLevelSets() throws Lib3MFException { + Pointer bufferResourceIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getlevelsets.invokeInt(new java.lang.Object[]{mHandle, bufferResourceIterator})); + Pointer valueResourceIterator = bufferResourceIterator.getPointer(0); + LevelSetIterator resourceIterator = null; + if (valueResourceIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceIterator was a null pointer"); + } + resourceIterator = mWrapper.PolymorphicFactory(valueResourceIterator, LevelSetIterator.class); + return resourceIterator; + } + + /** + * Removes a resource from the model + * + * @param resource The resource to remove + * @throws Lib3MFException + */ + public void removeResource(Resource resource) throws Lib3MFException { + Pointer resourceHandle = null; + if (resource != null) { + resourceHandle = resource.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Resource is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_model_removeresource.invokeInt(new java.lang.Object[]{mHandle, resourceHandle})); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/MultiPropertyGroup.java b/Autogenerated/Bindings/Java8/lib3mf/MultiPropertyGroup.java new file mode 100644 index 000000000..3a7457478 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/MultiPropertyGroup.java @@ -0,0 +1,193 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class MultiPropertyGroup extends Resource { + + public MultiPropertyGroup(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the count of MultiProperty-s in the MultiPropertyGroup. + * + * @return returns the count of MultiProperty-s + * @throws Lib3MFException + */ + public int getCount() throws Lib3MFException { + Pointer bufferCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_multipropertygroup_getcount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getInt(0); + } + + /** + * returns all the PropertyIDs of all MultiProperty-s in this MultiPropertyGroup + * + * @return PropertyID of the MultiProperty-s in the MultiPropertyGroup. + * @throws Lib3MFException + */ + public int[] getAllPropertyIDs() throws Lib3MFException { + Pointer countNeededPropertyIDs = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_multipropertygroup_getallpropertyids.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededPropertyIDs, Pointer.NULL})); + long countPropertyIDs = countNeededPropertyIDs.getLong(0); + Pointer bufferPropertyIDs = new Memory(Math.max(1, 4 * countPropertyIDs)); + mWrapper.checkError(this, mWrapper.lib3mf_multipropertygroup_getallpropertyids.invokeInt(new java.lang.Object[]{mHandle, countPropertyIDs, countNeededPropertyIDs, bufferPropertyIDs})); + return bufferPropertyIDs.getIntArray(0, (int)countPropertyIDs); + } + + /** + * Adds a new MultiProperty to the MultiPropertyGroup. + * + * @param propertyIDs The PropertyIDs of the new MultiProperty. + * @return returns the PropertyID of the new MultiProperty in the MultiPropertyGroup. + * @throws Lib3MFException + */ + public int addMultiProperty(int[] propertyIDs) throws Lib3MFException { + Pointer bufferPropertyIDs = new Memory(Math.max(1, 4 * propertyIDs.length)); + for (int i = 0; i < propertyIDs.length; i++) { + bufferPropertyIDs.setInt(4 * i, propertyIDs[i]); + } + Pointer bufferPropertyID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_multipropertygroup_addmultiproperty.invokeInt(new java.lang.Object[]{mHandle, (long) propertyIDs.length, bufferPropertyIDs, bufferPropertyID})); + return bufferPropertyID.getInt(0); + } + + /** + * Sets the PropertyIDs of a MultiProperty. + * + * @param propertyID the PropertyID of the MultiProperty to be changed. + * @param propertyIDs The new PropertyIDs of the MultiProperty + * @throws Lib3MFException + */ + public void setMultiProperty(int propertyID, int[] propertyIDs) throws Lib3MFException { + Pointer bufferPropertyIDs = new Memory(Math.max(1, 4 * propertyIDs.length)); + for (int i = 0; i < propertyIDs.length; i++) { + bufferPropertyIDs.setInt(4 * i, propertyIDs[i]); + } + mWrapper.checkError(this, mWrapper.lib3mf_multipropertygroup_setmultiproperty.invokeInt(new java.lang.Object[]{mHandle, propertyID, (long) propertyIDs.length, bufferPropertyIDs})); + } + + /** + * Obtains the PropertyIDs of a MultiProperty. + * + * @param propertyID the PropertyID of the MultiProperty to be queried. + * @return The PropertyIDs of the MultiProperty + * @throws Lib3MFException + */ + public int[] getMultiProperty(int propertyID) throws Lib3MFException { + Pointer countNeededPropertyIDs = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_multipropertygroup_getmultiproperty.invokeInt(new java.lang.Object[]{mHandle, propertyID, 0L, countNeededPropertyIDs, Pointer.NULL})); + long countPropertyIDs = countNeededPropertyIDs.getLong(0); + Pointer bufferPropertyIDs = new Memory(Math.max(1, 4 * countPropertyIDs)); + mWrapper.checkError(this, mWrapper.lib3mf_multipropertygroup_getmultiproperty.invokeInt(new java.lang.Object[]{mHandle, propertyID, countPropertyIDs, countNeededPropertyIDs, bufferPropertyIDs})); + return bufferPropertyIDs.getIntArray(0, (int)countPropertyIDs); + } + + /** + * Removes a MultiProperty from this MultiPropertyGroup. + * + * @param propertyID the PropertyID of the MultiProperty to be removed. + * @throws Lib3MFException + */ + public void removeMultiProperty(int propertyID) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_multipropertygroup_removemultiproperty.invokeInt(new java.lang.Object[]{mHandle, propertyID})); + } + + /** + * Retrieves the number of layers of this MultiPropertyGroup. + * + * @return returns the number of layers + * @throws Lib3MFException + */ + public int getLayerCount() throws Lib3MFException { + Pointer bufferCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_multipropertygroup_getlayercount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getInt(0); + } + + /** + * Adds a MultiPropertyLayer to this MultiPropertyGroup. + * + * @param theLayer The MultiPropertyLayer to add to this MultiPropertyGroup + * @return returns the index of this MultiPropertyLayer + * @throws Lib3MFException + */ + public int addLayer(MultiPropertyLayer theLayer) throws Lib3MFException { + Pointer bufferTheLayer = new Memory(MultiPropertyLayer.SIZE); + theLayer.writeToPointer(bufferTheLayer, 0); + Pointer bufferLayerIndex = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_multipropertygroup_addlayer.invokeInt(new java.lang.Object[]{mHandle, bufferTheLayer, bufferLayerIndex})); + return bufferLayerIndex.getInt(0); + } + + /** + * Obtains a MultiPropertyLayer of this MultiPropertyGroup. + * + * @param layerIndex The Index of the MultiPropertyLayer queried + * @return The MultiPropertyLayer with index LayerIndex within MultiPropertyGroup + * @throws Lib3MFException + */ + public MultiPropertyLayer getLayer(int layerIndex) throws Lib3MFException { + Pointer bufferTheLayer = new Memory(MultiPropertyLayer.SIZE); + mWrapper.checkError(this, mWrapper.lib3mf_multipropertygroup_getlayer.invokeInt(new java.lang.Object[]{mHandle, layerIndex, bufferTheLayer})); + MultiPropertyLayer theLayer = new MultiPropertyLayer(); + theLayer.readFromPointer(bufferTheLayer, 0); + return theLayer; + } + + /** + * Removes a MultiPropertyLayer from this MultiPropertyGroup. + * + * @param layerIndex The Index of the MultiPropertyLayer to be removed + * @throws Lib3MFException + */ + public void removeLayer(int layerIndex) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_multipropertygroup_removelayer.invokeInt(new java.lang.Object[]{mHandle, layerIndex})); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/MultiPropertyGroupIterator.java b/Autogenerated/Bindings/Java8/lib3mf/MultiPropertyGroupIterator.java new file mode 100644 index 000000000..54014b3fd --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/MultiPropertyGroupIterator.java @@ -0,0 +1,74 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class MultiPropertyGroupIterator extends ResourceIterator { + + public MultiPropertyGroupIterator(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the MultiPropertyGroup the iterator points at. + * + * @return returns the MultiPropertyGroup instance. + * @throws Lib3MFException + */ + public MultiPropertyGroup getCurrentMultiPropertyGroup() throws Lib3MFException { + Pointer bufferResource = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup.invokeInt(new java.lang.Object[]{mHandle, bufferResource})); + Pointer valueResource = bufferResource.getPointer(0); + MultiPropertyGroup resource = null; + if (valueResource == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Resource was a null pointer"); + } + resource = mWrapper.PolymorphicFactory(valueResource, MultiPropertyGroup.class); + return resource; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/MultiPropertyLayer.java b/Autogenerated/Bindings/Java8/lib3mf/MultiPropertyLayer.java new file mode 100644 index 000000000..cc349b19a --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/MultiPropertyLayer.java @@ -0,0 +1,63 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Memory; +import com.sun.jna.Pointer; + +import java.util.Arrays; +import java.util.List; + +public class MultiPropertyLayer { + + public int ResourceID; + + public int TheBlendMethod; + + public static final int SIZE = 8; + + public void readFromPointer(Pointer p, long offset) { + ResourceID = p.getInt(offset + 0); + TheBlendMethod = p.getInt(offset + 4); + } + + public void writeToPointer(Pointer p, long offset) { + p.setInt(offset + 0, ResourceID); + p.setInt(offset + 4, TheBlendMethod); + } + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/MultiplicationNode.java b/Autogenerated/Bindings/Java8/lib3mf/MultiplicationNode.java new file mode 100644 index 000000000..d289041cc --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/MultiplicationNode.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class MultiplicationNode extends TwoInputNode { + + public MultiplicationNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/NodeIterator.java b/Autogenerated/Bindings/Java8/lib3mf/NodeIterator.java new file mode 100644 index 000000000..989a4b153 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/NodeIterator.java @@ -0,0 +1,74 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class NodeIterator extends Iterator { + + public NodeIterator(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the current element + * + * @return The current element + * @throws Lib3MFException + */ + public ImplicitNode getCurrent() throws Lib3MFException { + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_nodeiterator_getcurrent.invokeInt(new java.lang.Object[]{mHandle, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + ImplicitNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, ImplicitNode.class); + return node; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/NormalizeDistanceNode.java b/Autogenerated/Bindings/Java8/lib3mf/NormalizeDistanceNode.java new file mode 100644 index 000000000..525b85458 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/NormalizeDistanceNode.java @@ -0,0 +1,186 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class NormalizeDistanceNode extends ImplicitNode { + + public NormalizeDistanceNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the input for the function id + * + * @return the input port for the function + * @throws Lib3MFException + */ + public ImplicitPort getInputFunctionID() throws Lib3MFException { + Pointer bufferFunction = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_normalizedistancenode_getinputfunctionid.invokeInt(new java.lang.Object[]{mHandle, bufferFunction})); + Pointer valueFunction = bufferFunction.getPointer(0); + ImplicitPort function = null; + if (valueFunction == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Function was a null pointer"); + } + function = mWrapper.PolymorphicFactory(valueFunction, ImplicitPort.class); + return function; + } + + /** + * Retrieves the input for the position + * + * @return the input port for the position (vector) + * @throws Lib3MFException + */ + public ImplicitPort getInputPos() throws Lib3MFException { + Pointer bufferPos = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_normalizedistancenode_getinputpos.invokeInt(new java.lang.Object[]{mHandle, bufferPos})); + Pointer valuePos = bufferPos.getPointer(0); + ImplicitPort pos = null; + if (valuePos == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Pos was a null pointer"); + } + pos = mWrapper.PolymorphicFactory(valuePos, ImplicitPort.class); + return pos; + } + + /** + * Retrieves the input for the finite difference step + * + * @return the input port for the finite difference step + * @throws Lib3MFException + */ + public ImplicitPort getInputStep() throws Lib3MFException { + Pointer bufferStep = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_normalizedistancenode_getinputstep.invokeInt(new java.lang.Object[]{mHandle, bufferStep})); + Pointer valueStep = bufferStep.getPointer(0); + ImplicitPort step = null; + if (valueStep == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Step was a null pointer"); + } + step = mWrapper.PolymorphicFactory(valueStep, ImplicitPort.class); + return step; + } + + /** + * Sets the name of the referenced scalar output + * + * @param scalarOutputName the name of the scalar output of the referenced function + * @throws Lib3MFException + */ + public void setScalarOutputName(String scalarOutputName) throws Lib3MFException { + byte[] bytesScalarOutputName = scalarOutputName.getBytes(StandardCharsets.UTF_8); + Memory bufferScalarOutputName = new Memory(bytesScalarOutputName.length + 1); + bufferScalarOutputName.write(0, bytesScalarOutputName, 0, bytesScalarOutputName.length); + bufferScalarOutputName.setByte(bytesScalarOutputName.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_normalizedistancenode_setscalaroutputname.invokeInt(new java.lang.Object[]{mHandle, bufferScalarOutputName})); + } + + /** + * Retrieves the name of the referenced scalar output + * + * @return the name of the scalar output of the referenced function + * @throws Lib3MFException + */ + public String getScalarOutputName() throws Lib3MFException { + Pointer bytesNeededScalarOutputName = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_normalizedistancenode_getscalaroutputname.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededScalarOutputName, null})); + int sizeScalarOutputName = bytesNeededScalarOutputName.getInt(0); + Pointer bufferScalarOutputName = new Memory(sizeScalarOutputName); + mWrapper.checkError(this, mWrapper.lib3mf_normalizedistancenode_getscalaroutputname.invokeInt(new java.lang.Object[]{mHandle, sizeScalarOutputName, bytesNeededScalarOutputName, bufferScalarOutputName})); + return new String(bufferScalarOutputName.getByteArray(0, sizeScalarOutputName - 1), StandardCharsets.UTF_8); + } + + /** + * Sets the name of the referenced vector input + * + * @param vectorInputName the name of the vector input (float3) of the referenced function + * @throws Lib3MFException + */ + public void setVectorInputName(String vectorInputName) throws Lib3MFException { + byte[] bytesVectorInputName = vectorInputName.getBytes(StandardCharsets.UTF_8); + Memory bufferVectorInputName = new Memory(bytesVectorInputName.length + 1); + bufferVectorInputName.write(0, bytesVectorInputName, 0, bytesVectorInputName.length); + bufferVectorInputName.setByte(bytesVectorInputName.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_normalizedistancenode_setvectorinputname.invokeInt(new java.lang.Object[]{mHandle, bufferVectorInputName})); + } + + /** + * Retrieves the name of the referenced vector input + * + * @return the name of the vector input (float3) of the referenced function + * @throws Lib3MFException + */ + public String getVectorInputName() throws Lib3MFException { + Pointer bytesNeededVectorInputName = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_normalizedistancenode_getvectorinputname.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededVectorInputName, null})); + int sizeVectorInputName = bytesNeededVectorInputName.getInt(0); + Pointer bufferVectorInputName = new Memory(sizeVectorInputName); + mWrapper.checkError(this, mWrapper.lib3mf_normalizedistancenode_getvectorinputname.invokeInt(new java.lang.Object[]{mHandle, sizeVectorInputName, bytesNeededVectorInputName, bufferVectorInputName})); + return new String(bufferVectorInputName.getByteArray(0, sizeVectorInputName - 1), StandardCharsets.UTF_8); + } + + /** + * Retrieves the normalized result output + * + * @return the output port for the normalized distance + * @throws Lib3MFException + */ + public ImplicitPort getOutputResult() throws Lib3MFException { + Pointer bufferResult = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_normalizedistancenode_getoutputresult.invokeInt(new java.lang.Object[]{mHandle, bufferResult})); + Pointer valueResult = bufferResult.getPointer(0); + ImplicitPort result = null; + if (valueResult == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Result was a null pointer"); + } + result = mWrapper.PolymorphicFactory(valueResult, ImplicitPort.class); + return result; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/Object.java b/Autogenerated/Bindings/Java8/lib3mf/Object.java new file mode 100644 index 000000000..0d365df4e --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/Object.java @@ -0,0 +1,381 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Object extends Resource { + + public Object(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves an object's type + * + * @return returns object type enum. + * @throws Lib3MFException + */ + public Lib3MFWrapper.ObjectType getType() throws Lib3MFException { + Pointer bufferObjectType = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_object_gettype.invokeInt(new java.lang.Object[]{mHandle, bufferObjectType})); + return Lib3MFWrapper.EnumConversion.convertConstToObjectType(bufferObjectType.getInt(0)); + } + + /** + * Sets an object's type + * + * @param objectType object type enum. + * @throws Lib3MFException + */ + public void setType(Lib3MFWrapper.ObjectType objectType) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_object_settype.invokeInt(new java.lang.Object[]{mHandle, Lib3MFWrapper.EnumConversion.convertObjectTypeToConst(objectType)})); + } + + /** + * Retrieves an object's name + * + * @return returns object name. + * @throws Lib3MFException + */ + public String getName() throws Lib3MFException { + Pointer bytesNeededName = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_object_getname.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededName, null})); + int sizeName = bytesNeededName.getInt(0); + Pointer bufferName = new Memory(sizeName); + mWrapper.checkError(this, mWrapper.lib3mf_object_getname.invokeInt(new java.lang.Object[]{mHandle, sizeName, bytesNeededName, bufferName})); + return new String(bufferName.getByteArray(0, sizeName - 1), StandardCharsets.UTF_8); + } + + /** + * Sets an object's name string + * + * @param name new object name. + * @throws Lib3MFException + */ + public void setName(String name) throws Lib3MFException { + byte[] bytesName = name.getBytes(StandardCharsets.UTF_8); + Memory bufferName = new Memory(bytesName.length + 1); + bufferName.write(0, bytesName, 0, bytesName.length); + bufferName.setByte(bytesName.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_object_setname.invokeInt(new java.lang.Object[]{mHandle, bufferName})); + } + + /** + * Retrieves an object's part number + * + * @return returns object part number. + * @throws Lib3MFException + */ + public String getPartNumber() throws Lib3MFException { + Pointer bytesNeededPartNumber = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_object_getpartnumber.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededPartNumber, null})); + int sizePartNumber = bytesNeededPartNumber.getInt(0); + Pointer bufferPartNumber = new Memory(sizePartNumber); + mWrapper.checkError(this, mWrapper.lib3mf_object_getpartnumber.invokeInt(new java.lang.Object[]{mHandle, sizePartNumber, bytesNeededPartNumber, bufferPartNumber})); + return new String(bufferPartNumber.getByteArray(0, sizePartNumber - 1), StandardCharsets.UTF_8); + } + + /** + * Sets an objects partnumber string + * + * @param partNumber new object part number. + * @throws Lib3MFException + */ + public void setPartNumber(String partNumber) throws Lib3MFException { + byte[] bytesPartNumber = partNumber.getBytes(StandardCharsets.UTF_8); + Memory bufferPartNumber = new Memory(bytesPartNumber.length + 1); + bufferPartNumber.write(0, bytesPartNumber, 0, bytesPartNumber.length); + bufferPartNumber.setByte(bytesPartNumber.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_object_setpartnumber.invokeInt(new java.lang.Object[]{mHandle, bufferPartNumber})); + } + + /** + * Retrieves, if an object is a mesh object + * + * @return returns, whether the object is a mesh object + * @throws Lib3MFException + */ + public boolean isMeshObject() throws Lib3MFException { + Pointer bufferIsMeshObject = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_object_ismeshobject.invokeInt(new java.lang.Object[]{mHandle, bufferIsMeshObject})); + return bufferIsMeshObject.getByte(0) != 0; + } + + /** + * Retrieves, if an object is a components object + * + * @return returns, whether the object is a components object + * @throws Lib3MFException + */ + public boolean isComponentsObject() throws Lib3MFException { + Pointer bufferIsComponentsObject = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_object_iscomponentsobject.invokeInt(new java.lang.Object[]{mHandle, bufferIsComponentsObject})); + return bufferIsComponentsObject.getByte(0) != 0; + } + + /** + * Retrieves, if an object is a level set object + * + * @return returns, whether the object is a level set object + * @throws Lib3MFException + */ + public boolean isLevelSetObject() throws Lib3MFException { + Pointer bufferIsLevelSetObject = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_object_islevelsetobject.invokeInt(new java.lang.Object[]{mHandle, bufferIsLevelSetObject})); + return bufferIsLevelSetObject.getByte(0) != 0; + } + + /** + * Retrieves, if the object is valid according to the core spec. For mesh objects, we distinguish between the type attribute of the object:In case of object type other, this always means false.In case of object type model or solidsupport, this means, if the mesh suffices all requirements of the core spec chapter 4.1.In case of object type support or surface, this always means true.A component objects is valid if and only if it contains at least one component and all child components are valid objects. + * + * @return returns whether the object is a valid object description + * @throws Lib3MFException + */ + public boolean isValid() throws Lib3MFException { + Pointer bufferIsValid = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_object_isvalid.invokeInt(new java.lang.Object[]{mHandle, bufferIsValid})); + return bufferIsValid.getByte(0) != 0; + } + + /** + * Use an existing attachment as thumbnail for this object + * + * @param attachment Instance of a new or the existing thumbnailattachment object. + * @throws Lib3MFException + */ + public void setAttachmentAsThumbnail(Attachment attachment) throws Lib3MFException { + Pointer attachmentHandle = null; + if (attachment != null) { + attachmentHandle = attachment.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Attachment is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_object_setattachmentasthumbnail.invokeInt(new java.lang.Object[]{mHandle, attachmentHandle})); + } + + /** + * Get the attachment containing the object thumbnail. + * + * @return Instance of the thumbnailattachment object or NULL. + * @throws Lib3MFException + */ + public Attachment getThumbnailAttachment() throws Lib3MFException { + Pointer bufferAttachment = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_object_getthumbnailattachment.invokeInt(new java.lang.Object[]{mHandle, bufferAttachment})); + Pointer valueAttachment = bufferAttachment.getPointer(0); + Attachment attachment = null; + if (valueAttachment != Pointer.NULL) { + attachment = mWrapper.PolymorphicFactory(valueAttachment, Attachment.class); + } + return attachment; + } + + /** + * Clears the attachment. The attachment instance is not removed from the package. + * + * @throws Lib3MFException + */ + public void clearThumbnailAttachment() throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_object_clearthumbnailattachment.invokeInt(new java.lang.Object[]{mHandle})); + } + + /** + * Returns the outbox of a build item + * + * @return Outbox of this build item + * @throws Lib3MFException + */ + public Box getOutbox() throws Lib3MFException { + Pointer bufferOutbox = new Memory(Box.SIZE); + mWrapper.checkError(this, mWrapper.lib3mf_object_getoutbox.invokeInt(new java.lang.Object[]{mHandle, bufferOutbox})); + Box outbox = new Box(); + outbox.readFromPointer(bufferOutbox, 0); + return outbox; + } + + /** + * Retrieves an object's uuid string (see production extension specification) + * + * @return GetUUID Result Tuple + * @throws Lib3MFException + */ + public GetUUIDResult getUUID() throws Lib3MFException { + Pointer bufferHasUUID = new Memory(1); + Pointer bytesNeededUUID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_object_getuuid.invokeInt(new java.lang.Object[]{mHandle, bufferHasUUID, 0, bytesNeededUUID, null})); + int sizeUUID = bytesNeededUUID.getInt(0); + Pointer bufferUUID = new Memory(sizeUUID); + mWrapper.checkError(this, mWrapper.lib3mf_object_getuuid.invokeInt(new java.lang.Object[]{mHandle, bufferHasUUID, sizeUUID, bytesNeededUUID, bufferUUID})); + GetUUIDResult returnTuple = new GetUUIDResult(); + returnTuple.HasUUID = bufferHasUUID.getByte(0) != 0; + returnTuple.UUID = new String(bufferUUID.getByteArray(0, sizeUUID - 1), StandardCharsets.UTF_8); + return returnTuple; + } + + public static class GetUUIDResult { + /** + * flag whether the build item has a UUID + */ + public boolean HasUUID; + + /** + * returns object uuid. + */ + public String UUID; + + } + /** + * Sets a build object's uuid string (see production extension specification) + * + * @param uUID new object uuid string. + * @throws Lib3MFException + */ + public void setUUID(String uUID) throws Lib3MFException { + byte[] bytesUUID = uUID.getBytes(StandardCharsets.UTF_8); + Memory bufferUUID = new Memory(bytesUUID.length + 1); + bufferUUID.write(0, bytesUUID, 0, bytesUUID.length); + bufferUUID.setByte(bytesUUID.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_object_setuuid.invokeInt(new java.lang.Object[]{mHandle, bufferUUID})); + } + + /** + * Returns the metadatagroup of this object + * + * @return returns an Instance of the metadatagroup of this object + * @throws Lib3MFException + */ + public MetaDataGroup getMetaDataGroup() throws Lib3MFException { + Pointer bufferMetaDataGroup = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_object_getmetadatagroup.invokeInt(new java.lang.Object[]{mHandle, bufferMetaDataGroup})); + Pointer valueMetaDataGroup = bufferMetaDataGroup.getPointer(0); + MetaDataGroup metaDataGroup = null; + if (valueMetaDataGroup == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "MetaDataGroup was a null pointer"); + } + metaDataGroup = mWrapper.PolymorphicFactory(valueMetaDataGroup, MetaDataGroup.class); + return metaDataGroup; + } + + /** + * set the meshresolution of the mesh object + * + * @param meshResolution meshresolution of this object + * @throws Lib3MFException + */ + public void setSlicesMeshResolution(Lib3MFWrapper.SlicesMeshResolution meshResolution) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_object_setslicesmeshresolution.invokeInt(new java.lang.Object[]{mHandle, Lib3MFWrapper.EnumConversion.convertSlicesMeshResolutionToConst(meshResolution)})); + } + + /** + * get the meshresolution of the mesh object + * + * @return meshresolution of this object + * @throws Lib3MFException + */ + public Lib3MFWrapper.SlicesMeshResolution getSlicesMeshResolution() throws Lib3MFException { + Pointer bufferMeshResolution = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_object_getslicesmeshresolution.invokeInt(new java.lang.Object[]{mHandle, bufferMeshResolution})); + return Lib3MFWrapper.EnumConversion.convertConstToSlicesMeshResolution(bufferMeshResolution.getInt(0)); + } + + /** + * returns whether the Object has a slice stack. If Recursive is true, also checks whether any references object has a slice stack + * + * @param recursive check also all referenced objects? + * @return does the object have a slice stack? + * @throws Lib3MFException + */ + public boolean hasSlices(boolean recursive) throws Lib3MFException { + Pointer bufferHasSlices = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_object_hasslices.invokeInt(new java.lang.Object[]{mHandle, recursive, bufferHasSlices})); + return bufferHasSlices.getByte(0) != 0; + } + + /** + * unlinks the attached slicestack from this object. If no slice stack is attached, do noting. + * + * @throws Lib3MFException + */ + public void clearSliceStack() throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_object_clearslicestack.invokeInt(new java.lang.Object[]{mHandle})); + } + + /** + * get the Slicestack attached to the object + * + * @return returns the slicestack instance + * @throws Lib3MFException + */ + public SliceStack getSliceStack() throws Lib3MFException { + Pointer bufferSliceStackInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_object_getslicestack.invokeInt(new java.lang.Object[]{mHandle, bufferSliceStackInstance})); + Pointer valueSliceStackInstance = bufferSliceStackInstance.getPointer(0); + SliceStack sliceStackInstance = null; + if (valueSliceStackInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "SliceStackInstance was a null pointer"); + } + sliceStackInstance = mWrapper.PolymorphicFactory(valueSliceStackInstance, SliceStack.class); + return sliceStackInstance; + } + + /** + * assigns a slicestack to the object + * + * @param sliceStackInstance the new slice stack of this Object + * @throws Lib3MFException + */ + public void assignSliceStack(SliceStack sliceStackInstance) throws Lib3MFException { + Pointer sliceStackInstanceHandle = null; + if (sliceStackInstance != null) { + sliceStackInstanceHandle = sliceStackInstance.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "SliceStackInstance is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_object_assignslicestack.invokeInt(new java.lang.Object[]{mHandle, sliceStackInstanceHandle})); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/ObjectIterator.java b/Autogenerated/Bindings/Java8/lib3mf/ObjectIterator.java new file mode 100644 index 000000000..d70f6c75d --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/ObjectIterator.java @@ -0,0 +1,74 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ObjectIterator extends ResourceIterator { + + public ObjectIterator(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the Object the iterator points at. + * + * @return returns the Object instance. + * @throws Lib3MFException + */ + public Object getCurrentObject() throws Lib3MFException { + Pointer bufferResource = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_objectiterator_getcurrentobject.invokeInt(new java.lang.Object[]{mHandle, bufferResource})); + Pointer valueResource = bufferResource.getPointer(0); + Object resource = null; + if (valueResource == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Resource was a null pointer"); + } + resource = mWrapper.PolymorphicFactory(valueResource, Object.class); + return resource; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/OneInputNode.java b/Autogenerated/Bindings/Java8/lib3mf/OneInputNode.java new file mode 100644 index 000000000..e8c564862 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/OneInputNode.java @@ -0,0 +1,92 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class OneInputNode extends ImplicitNode { + + public OneInputNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the input + * + * @return the input + * @throws Lib3MFException + */ + public ImplicitPort getInputA() throws Lib3MFException { + Pointer bufferInput = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_oneinputnode_getinputa.invokeInt(new java.lang.Object[]{mHandle, bufferInput})); + Pointer valueInput = bufferInput.getPointer(0); + ImplicitPort input = null; + if (valueInput == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Input was a null pointer"); + } + input = mWrapper.PolymorphicFactory(valueInput, ImplicitPort.class); + return input; + } + + /** + * Retrieves the output + * + * @return the output + * @throws Lib3MFException + */ + public ImplicitPort getOutputResult() throws Lib3MFException { + Pointer bufferResult = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_oneinputnode_getoutputresult.invokeInt(new java.lang.Object[]{mHandle, bufferResult})); + Pointer valueResult = bufferResult.getPointer(0); + ImplicitPort result = null; + if (valueResult == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Result was a null pointer"); + } + result = mWrapper.PolymorphicFactory(valueResult, ImplicitPort.class); + return result; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/PackagePart.java b/Autogenerated/Bindings/Java8/lib3mf/PackagePart.java new file mode 100644 index 000000000..68f15d610 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/PackagePart.java @@ -0,0 +1,85 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class PackagePart extends Base { + + public PackagePart(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the absolute path of this PackagePart. + * + * @return Returns the absolute path of this PackagePart + * @throws Lib3MFException + */ + public String getPath() throws Lib3MFException { + Pointer bytesNeededPath = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_packagepart_getpath.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededPath, null})); + int sizePath = bytesNeededPath.getInt(0); + Pointer bufferPath = new Memory(sizePath); + mWrapper.checkError(this, mWrapper.lib3mf_packagepart_getpath.invokeInt(new java.lang.Object[]{mHandle, sizePath, bytesNeededPath, bufferPath})); + return new String(bufferPath.getByteArray(0, sizePath - 1), StandardCharsets.UTF_8); + } + + /** + * Sets the absolute path of this PackagePart. + * + * @param path Sets the absolute path of this PackagePart. + * @throws Lib3MFException + */ + public void setPath(String path) throws Lib3MFException { + byte[] bytesPath = path.getBytes(StandardCharsets.UTF_8); + Memory bufferPath = new Memory(bytesPath.length + 1); + bufferPath.write(0, bytesPath, 0, bytesPath.length); + bufferPath.setByte(bytesPath.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_packagepart_setpath.invokeInt(new java.lang.Object[]{mHandle, bufferPath})); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/Position.java b/Autogenerated/Bindings/Java8/lib3mf/Position.java new file mode 100644 index 000000000..8ca7b7f64 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/Position.java @@ -0,0 +1,63 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Memory; +import com.sun.jna.Pointer; + +import java.util.Arrays; +import java.util.List; + +public class Position { + + public float[] Coordinates = new float[3]; + + public static final int SIZE = 12; + + public void readFromPointer(Pointer p, long offset) { + Coordinates[0] = p.getFloat(offset + 0); + Coordinates[1] = p.getFloat(offset + 4); + Coordinates[2] = p.getFloat(offset + 8); + } + + public void writeToPointer(Pointer p, long offset) { + p.setFloat(offset + 0, Coordinates[0]); + p.setFloat(offset + 4, Coordinates[1]); + p.setFloat(offset + 8, Coordinates[2]); + } + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/Position2D.java b/Autogenerated/Bindings/Java8/lib3mf/Position2D.java new file mode 100644 index 000000000..65c9cab65 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/Position2D.java @@ -0,0 +1,61 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Memory; +import com.sun.jna.Pointer; + +import java.util.Arrays; +import java.util.List; + +public class Position2D { + + public float[] Coordinates = new float[2]; + + public static final int SIZE = 8; + + public void readFromPointer(Pointer p, long offset) { + Coordinates[0] = p.getFloat(offset + 0); + Coordinates[1] = p.getFloat(offset + 4); + } + + public void writeToPointer(Pointer p, long offset) { + p.setFloat(offset + 0, Coordinates[0]); + p.setFloat(offset + 4, Coordinates[1]); + } + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/PowNode.java b/Autogenerated/Bindings/Java8/lib3mf/PowNode.java new file mode 100644 index 000000000..1f6e0736d --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/PowNode.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class PowNode extends TwoInputNode { + + public PowNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/Reader.java b/Autogenerated/Bindings/Java8/lib3mf/Reader.java new file mode 100644 index 000000000..e326b9b9c --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/Reader.java @@ -0,0 +1,229 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Reader extends Base { + + public Reader(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Reads a model from a file. The file type is specified by the Model Reader class + * + * @param filename Filename to read from + * @throws Lib3MFException + */ + public void readFromFile(String filename) throws Lib3MFException { + byte[] bytesFilename = filename.getBytes(StandardCharsets.UTF_8); + Memory bufferFilename = new Memory(bytesFilename.length + 1); + bufferFilename.write(0, bytesFilename, 0, bytesFilename.length); + bufferFilename.setByte(bytesFilename.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_reader_readfromfile.invokeInt(new java.lang.Object[]{mHandle, bufferFilename})); + } + + /** + * Reads a model from a memory buffer. + * + * @param buffer Buffer to read from + * @throws Lib3MFException + */ + public void readFromBuffer(byte[] buffer) throws Lib3MFException { + Pointer bufferBuffer = new Memory(Math.max(1, 1 * buffer.length)); + for (int i = 0; i < buffer.length; i++) { + bufferBuffer.setByte(1 * i, buffer[i]); + } + mWrapper.checkError(this, mWrapper.lib3mf_reader_readfrombuffer.invokeInt(new java.lang.Object[]{mHandle, (long) buffer.length, bufferBuffer})); + } + + /** + * Reads a model and from the data provided by a callback function + * + * @param theReadCallback Callback to call for reading a data chunk + * @param streamSize number of bytes the callback returns + * @param theSeekCallback Callback to call for seeking in the stream. + * @param userData Userdata that is passed to the callback function + * @throws Lib3MFException + */ + public void readFromCallback(Lib3MFWrapper.ReadCallback theReadCallback, long streamSize, Lib3MFWrapper.SeekCallback theSeekCallback, Pointer userData) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_reader_readfromcallback.invokeInt(new java.lang.Object[]{mHandle, theReadCallback, streamSize, theSeekCallback, userData})); + } + + /** + * Set the progress callback for calls to this writer + * + * @param progressCallback pointer to the callback function. + * @param userData pointer to arbitrary user data that is passed without modification to the callback. + * @throws Lib3MFException + */ + public void setProgressCallback(Lib3MFWrapper.ProgressCallback progressCallback, Pointer userData) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_reader_setprogresscallback.invokeInt(new java.lang.Object[]{mHandle, progressCallback, userData})); + } + + /** + * Adds a relationship type which shall be read as attachment in memory while loading + * + * @param relationShipType String of the relationship type + * @throws Lib3MFException + */ + public void addRelationToRead(String relationShipType) throws Lib3MFException { + byte[] bytesRelationShipType = relationShipType.getBytes(StandardCharsets.UTF_8); + Memory bufferRelationShipType = new Memory(bytesRelationShipType.length + 1); + bufferRelationShipType.write(0, bytesRelationShipType, 0, bytesRelationShipType.length); + bufferRelationShipType.setByte(bytesRelationShipType.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_reader_addrelationtoread.invokeInt(new java.lang.Object[]{mHandle, bufferRelationShipType})); + } + + /** + * Removes a relationship type which shall be read as attachment in memory while loading + * + * @param relationShipType String of the relationship type + * @throws Lib3MFException + */ + public void removeRelationToRead(String relationShipType) throws Lib3MFException { + byte[] bytesRelationShipType = relationShipType.getBytes(StandardCharsets.UTF_8); + Memory bufferRelationShipType = new Memory(bytesRelationShipType.length + 1); + bufferRelationShipType.write(0, bytesRelationShipType, 0, bytesRelationShipType.length); + bufferRelationShipType.setByte(bytesRelationShipType.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_reader_removerelationtoread.invokeInt(new java.lang.Object[]{mHandle, bufferRelationShipType})); + } + + /** + * Activates (deactivates) the strict mode of the reader. + * + * @param strictModeActive flag whether strict mode is active or not. + * @throws Lib3MFException + */ + public void setStrictModeActive(boolean strictModeActive) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_reader_setstrictmodeactive.invokeInt(new java.lang.Object[]{mHandle, strictModeActive})); + } + + /** + * Queries whether the strict mode of the reader is active or not + * + * @return returns flag whether strict mode is active or not. + * @throws Lib3MFException + */ + public boolean getStrictModeActive() throws Lib3MFException { + Pointer bufferStrictModeActive = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_reader_getstrictmodeactive.invokeInt(new java.lang.Object[]{mHandle, bufferStrictModeActive})); + return bufferStrictModeActive.getByte(0) != 0; + } + + /** + * Returns Warning and Error Information of the read process + * + * @param index Index of the Warning. Valid values are 0 to WarningCount - 1 + * @return GetWarning Result Tuple + * @throws Lib3MFException + */ + public GetWarningResult getWarning(int index) throws Lib3MFException { + Pointer bufferErrorCode = new Memory(4); + Pointer bytesNeededWarning = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_reader_getwarning.invokeInt(new java.lang.Object[]{mHandle, index, bufferErrorCode, 0, bytesNeededWarning, null})); + int sizeWarning = bytesNeededWarning.getInt(0); + Pointer bufferWarning = new Memory(sizeWarning); + mWrapper.checkError(this, mWrapper.lib3mf_reader_getwarning.invokeInt(new java.lang.Object[]{mHandle, index, bufferErrorCode, sizeWarning, bytesNeededWarning, bufferWarning})); + GetWarningResult returnTuple = new GetWarningResult(); + returnTuple.ErrorCode = bufferErrorCode.getInt(0); + returnTuple.Warning = new String(bufferWarning.getByteArray(0, sizeWarning - 1), StandardCharsets.UTF_8); + return returnTuple; + } + + public static class GetWarningResult { + /** + * filled with the error code of the warning + */ + public int ErrorCode; + + /** + * the message of the warning + */ + public String Warning; + + } + /** + * Returns Warning and Error Count of the read process + * + * @return filled with the count of the occurred warnings. + * @throws Lib3MFException + */ + public int getWarningCount() throws Lib3MFException { + Pointer bufferCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_reader_getwarningcount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getInt(0); + } + + /** + * Registers a callback to deal with key wrapping mechanism from keystore + * + * @param consumerID The ConsumerID to register for + * @param theCallback The callback used to decrypt data key + * @param userData Userdata that is passed to the callback function + * @throws Lib3MFException + */ + public void addKeyWrappingCallback(String consumerID, Lib3MFWrapper.KeyWrappingCallback theCallback, Pointer userData) throws Lib3MFException { + byte[] bytesConsumerID = consumerID.getBytes(StandardCharsets.UTF_8); + Memory bufferConsumerID = new Memory(bytesConsumerID.length + 1); + bufferConsumerID.write(0, bytesConsumerID, 0, bytesConsumerID.length); + bufferConsumerID.setByte(bytesConsumerID.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_reader_addkeywrappingcallback.invokeInt(new java.lang.Object[]{mHandle, bufferConsumerID, theCallback, userData})); + } + + /** + * Registers a callback to deal with encryption of content + * + * @param theCallback The callback used to encrypt content + * @param userData Userdata that is passed to the callback function + * @throws Lib3MFException + */ + public void setContentEncryptionCallback(Lib3MFWrapper.ContentEncryptionCallback theCallback, Pointer userData) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_reader_setcontentencryptioncallback.invokeInt(new java.lang.Object[]{mHandle, theCallback, userData})); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/Resource.java b/Autogenerated/Bindings/Java8/lib3mf/Resource.java new file mode 100644 index 000000000..20629c800 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/Resource.java @@ -0,0 +1,126 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Resource extends Base { + + public Resource(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the unique id of this resource within a package. This function will be removed in a later release in favor of GetUniqueResourceID + * + * @return Retrieves the unique id of this resource within a package. + * @throws Lib3MFException + */ + public int getResourceID() throws Lib3MFException { + Pointer bufferUniqueResourceID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_resource_getresourceid.invokeInt(new java.lang.Object[]{mHandle, bufferUniqueResourceID})); + return bufferUniqueResourceID.getInt(0); + } + + /** + * Retrieves the unique id of this resource within a package. + * + * @return Retrieves the unique id of this resource within a package. + * @throws Lib3MFException + */ + public int getUniqueResourceID() throws Lib3MFException { + Pointer bufferUniqueResourceID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_resource_getuniqueresourceid.invokeInt(new java.lang.Object[]{mHandle, bufferUniqueResourceID})); + return bufferUniqueResourceID.getInt(0); + } + + /** + * Returns the PackagePart within which this resource resides + * + * @return the PackagePart within which this resource resides. + * @throws Lib3MFException + */ + public PackagePart packagePart() throws Lib3MFException { + Pointer bufferPackagePart = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_resource_packagepart.invokeInt(new java.lang.Object[]{mHandle, bufferPackagePart})); + Pointer valuePackagePart = bufferPackagePart.getPointer(0); + PackagePart packagePart = null; + if (valuePackagePart == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "PackagePart was a null pointer"); + } + packagePart = mWrapper.PolymorphicFactory(valuePackagePart, PackagePart.class); + return packagePart; + } + + /** + * Sets the new PackagePart within which this resource resides + * + * @param packagePart the new PackagePart within which this resource resides. + * @throws Lib3MFException + */ + public void setPackagePart(PackagePart packagePart) throws Lib3MFException { + Pointer packagePartHandle = null; + if (packagePart != null) { + packagePartHandle = packagePart.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "PackagePart is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_resource_setpackagepart.invokeInt(new java.lang.Object[]{mHandle, packagePartHandle})); + } + + /** + * Retrieves the id of this resource within a model. + * + * @return Retrieves the id of this resource within a model. + * @throws Lib3MFException + */ + public int getModelResourceID() throws Lib3MFException { + Pointer bufferModelResourceId = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_resource_getmodelresourceid.invokeInt(new java.lang.Object[]{mHandle, bufferModelResourceId})); + return bufferModelResourceId.getInt(0); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/ResourceData.java b/Autogenerated/Bindings/Java8/lib3mf/ResourceData.java new file mode 100644 index 000000000..c69fb353d --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/ResourceData.java @@ -0,0 +1,113 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ResourceData extends Base { + + public ResourceData(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Gets the encrypted part path + * + * @return The part path + * @throws Lib3MFException + */ + public PackagePart getPath() throws Lib3MFException { + Pointer bufferPath = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_resourcedata_getpath.invokeInt(new java.lang.Object[]{mHandle, bufferPath})); + Pointer valuePath = bufferPath.getPointer(0); + PackagePart path = null; + if (valuePath == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Path was a null pointer"); + } + path = mWrapper.PolymorphicFactory(valuePath, PackagePart.class); + return path; + } + + /** + * Gets the encryption algorithm used to encrypt this ResourceData + * + * @return The encryption algorithm + * @throws Lib3MFException + */ + public Lib3MFWrapper.EncryptionAlgorithm getEncryptionAlgorithm() throws Lib3MFException { + Pointer bufferEncryptionAlgorithm = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_resourcedata_getencryptionalgorithm.invokeInt(new java.lang.Object[]{mHandle, bufferEncryptionAlgorithm})); + return Lib3MFWrapper.EnumConversion.convertConstToEncryptionAlgorithm(bufferEncryptionAlgorithm.getInt(0)); + } + + /** + * Tells whether this ResourceData is compressed or not + * + * @return The compression method + * @throws Lib3MFException + */ + public Lib3MFWrapper.Compression getCompression() throws Lib3MFException { + Pointer bufferCompression = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_resourcedata_getcompression.invokeInt(new java.lang.Object[]{mHandle, bufferCompression})); + return Lib3MFWrapper.EnumConversion.convertConstToCompression(bufferCompression.getInt(0)); + } + + /** + * Tells whether this ResourceData is compressed or not + * + * @return The compression method + * @throws Lib3MFException + */ + public byte[] getAdditionalAuthenticationData() throws Lib3MFException { + Pointer countNeededByteData = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_resourcedata_getadditionalauthenticationdata.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededByteData, Pointer.NULL})); + long countByteData = countNeededByteData.getLong(0); + Pointer bufferByteData = new Memory(Math.max(1, 1 * countByteData)); + mWrapper.checkError(this, mWrapper.lib3mf_resourcedata_getadditionalauthenticationdata.invokeInt(new java.lang.Object[]{mHandle, countByteData, countNeededByteData, bufferByteData})); + return bufferByteData.getByteArray(0, (int)countByteData); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/ResourceDataGroup.java b/Autogenerated/Bindings/Java8/lib3mf/ResourceDataGroup.java new file mode 100644 index 000000000..9ee79549d --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/ResourceDataGroup.java @@ -0,0 +1,139 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ResourceDataGroup extends Base { + + public ResourceDataGroup(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Sets the resourcedatagroup keyuuid + * + * @return The new resourcedatagroup keyuuid. + * @throws Lib3MFException + */ + public String getKeyUUID() throws Lib3MFException { + Pointer bytesNeededUUID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_resourcedatagroup_getkeyuuid.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededUUID, null})); + int sizeUUID = bytesNeededUUID.getInt(0); + Pointer bufferUUID = new Memory(sizeUUID); + mWrapper.checkError(this, mWrapper.lib3mf_resourcedatagroup_getkeyuuid.invokeInt(new java.lang.Object[]{mHandle, sizeUUID, bytesNeededUUID, bufferUUID})); + return new String(bufferUUID.getByteArray(0, sizeUUID - 1), StandardCharsets.UTF_8); + } + + /** + * Add accessright to resourcedatagroup element + * + * @param consumer The Consumer reference + * @param wrappingAlgorithm The key wrapping algorithm to be used + * @param mgfAlgorithm The mask generation function to be used + * @param digestMethod The digest mechanism to be used + * @return The acess right instance + * @throws Lib3MFException + */ + public AccessRight addAccessRight(Consumer consumer, Lib3MFWrapper.WrappingAlgorithm wrappingAlgorithm, Lib3MFWrapper.MgfAlgorithm mgfAlgorithm, Lib3MFWrapper.DigestMethod digestMethod) throws Lib3MFException { + Pointer consumerHandle = null; + if (consumer != null) { + consumerHandle = consumer.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Consumer is a null value."); + } + Pointer bufferTheAccessRight = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_resourcedatagroup_addaccessright.invokeInt(new java.lang.Object[]{mHandle, consumerHandle, Lib3MFWrapper.EnumConversion.convertWrappingAlgorithmToConst(wrappingAlgorithm), Lib3MFWrapper.EnumConversion.convertMgfAlgorithmToConst(mgfAlgorithm), Lib3MFWrapper.EnumConversion.convertDigestMethodToConst(digestMethod), bufferTheAccessRight})); + Pointer valueTheAccessRight = bufferTheAccessRight.getPointer(0); + AccessRight theAccessRight = null; + if (valueTheAccessRight == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheAccessRight was a null pointer"); + } + theAccessRight = mWrapper.PolymorphicFactory(valueTheAccessRight, AccessRight.class); + return theAccessRight; + } + + /** + * Finds the AccessRight associated with a Consumer + * + * @param consumer The Consumer instance + * @return The AcessRight instance + * @throws Lib3MFException + */ + public AccessRight findAccessRightByConsumer(Consumer consumer) throws Lib3MFException { + Pointer consumerHandle = null; + if (consumer != null) { + consumerHandle = consumer.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Consumer is a null value."); + } + Pointer bufferTheAccessRight = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_resourcedatagroup_findaccessrightbyconsumer.invokeInt(new java.lang.Object[]{mHandle, consumerHandle, bufferTheAccessRight})); + Pointer valueTheAccessRight = bufferTheAccessRight.getPointer(0); + AccessRight theAccessRight = null; + if (valueTheAccessRight != Pointer.NULL) { + theAccessRight = mWrapper.PolymorphicFactory(valueTheAccessRight, AccessRight.class); + } + return theAccessRight; + } + + /** + * Removes access from a Consumer on this resource data group + * + * @param consumer The Consumer instance + * @throws Lib3MFException + */ + public void removeAccessRight(Consumer consumer) throws Lib3MFException { + Pointer consumerHandle = null; + if (consumer != null) { + consumerHandle = consumer.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Consumer is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_resourcedatagroup_removeaccessright.invokeInt(new java.lang.Object[]{mHandle, consumerHandle})); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/ResourceIdNode.java b/Autogenerated/Bindings/Java8/lib3mf/ResourceIdNode.java new file mode 100644 index 000000000..c7ba5bc39 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/ResourceIdNode.java @@ -0,0 +1,108 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ResourceIdNode extends ImplicitNode { + + public ResourceIdNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Sets the Resource that the resourceid attribute of the node will point to + * + * @param resource the resource + * @throws Lib3MFException + */ + public void setResource(Resource resource) throws Lib3MFException { + Pointer resourceHandle = null; + if (resource != null) { + resourceHandle = resource.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Resource is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_resourceidnode_setresource.invokeInt(new java.lang.Object[]{mHandle, resourceHandle})); + } + + /** + * Retrieves the resource of the node + * + * @return the resource + * @throws Lib3MFException + */ + public Resource getResource() throws Lib3MFException { + Pointer bufferResource = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_resourceidnode_getresource.invokeInt(new java.lang.Object[]{mHandle, bufferResource})); + Pointer valueResource = bufferResource.getPointer(0); + Resource resource = null; + if (valueResource == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Resource was a null pointer"); + } + resource = mWrapper.PolymorphicFactory(valueResource, Resource.class); + return resource; + } + + /** + * Retrieves the output + * + * @return the output + * @throws Lib3MFException + */ + public ImplicitPort getOutputValue() throws Lib3MFException { + Pointer bufferValue = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_resourceidnode_getoutputvalue.invokeInt(new java.lang.Object[]{mHandle, bufferValue})); + Pointer valueValue = bufferValue.getPointer(0); + ImplicitPort value = null; + if (valueValue == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Value was a null pointer"); + } + value = mWrapper.PolymorphicFactory(valueValue, ImplicitPort.class); + return value; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/ResourceIterator.java b/Autogenerated/Bindings/Java8/lib3mf/ResourceIterator.java new file mode 100644 index 000000000..6b8f8fe99 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/ResourceIterator.java @@ -0,0 +1,128 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ResourceIterator extends Base { + + public ResourceIterator(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Iterates to the next resource in the list. + * + * @return Iterates to the next resource in the list. + * @throws Lib3MFException + */ + public boolean moveNext() throws Lib3MFException { + Pointer bufferHasNext = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_resourceiterator_movenext.invokeInt(new java.lang.Object[]{mHandle, bufferHasNext})); + return bufferHasNext.getByte(0) != 0; + } + + /** + * Iterates to the previous resource in the list. + * + * @return Iterates to the previous resource in the list. + * @throws Lib3MFException + */ + public boolean movePrevious() throws Lib3MFException { + Pointer bufferHasPrevious = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_resourceiterator_moveprevious.invokeInt(new java.lang.Object[]{mHandle, bufferHasPrevious})); + return bufferHasPrevious.getByte(0) != 0; + } + + /** + * Returns the resource the iterator points at. + * + * @return returns the resource instance. + * @throws Lib3MFException + */ + public Resource getCurrent() throws Lib3MFException { + Pointer bufferResource = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_resourceiterator_getcurrent.invokeInt(new java.lang.Object[]{mHandle, bufferResource})); + Pointer valueResource = bufferResource.getPointer(0); + Resource resource = null; + if (valueResource == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Resource was a null pointer"); + } + resource = mWrapper.PolymorphicFactory(valueResource, Resource.class); + return resource; + } + + /** + * Creates a new resource iterator with the same resource list. + * + * @return returns the cloned Iterator instance + * @throws Lib3MFException + */ + public ResourceIterator clone_() throws Lib3MFException { + Pointer bufferOutResourceIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_resourceiterator_clone.invokeInt(new java.lang.Object[]{mHandle, bufferOutResourceIterator})); + Pointer valueOutResourceIterator = bufferOutResourceIterator.getPointer(0); + ResourceIterator outResourceIterator = null; + if (valueOutResourceIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "OutResourceIterator was a null pointer"); + } + outResourceIterator = mWrapper.PolymorphicFactory(valueOutResourceIterator, ResourceIterator.class); + return outResourceIterator; + } + + /** + * Returns the number of resoucres the iterator captures. + * + * @return returns the number of resoucres the iterator captures. + * @throws Lib3MFException + */ + public long count() throws Lib3MFException { + Pointer bufferCount = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_resourceiterator_count.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getLong(0); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/RoundNode.java b/Autogenerated/Bindings/Java8/lib3mf/RoundNode.java new file mode 100644 index 000000000..2bede99ff --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/RoundNode.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class RoundNode extends OneInputNode { + + public RoundNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/SelectNode.java b/Autogenerated/Bindings/Java8/lib3mf/SelectNode.java new file mode 100644 index 000000000..9423a3da4 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/SelectNode.java @@ -0,0 +1,110 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class SelectNode extends OneInputNode { + + public SelectNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the second input + * + * @return the second input + * @throws Lib3MFException + */ + public ImplicitPort getInputB() throws Lib3MFException { + Pointer bufferB = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_selectnode_getinputb.invokeInt(new java.lang.Object[]{mHandle, bufferB})); + Pointer valueB = bufferB.getPointer(0); + ImplicitPort b = null; + if (valueB == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "B was a null pointer"); + } + b = mWrapper.PolymorphicFactory(valueB, ImplicitPort.class); + return b; + } + + /** + * Retrieves the third input + * + * @return the third input + * @throws Lib3MFException + */ + public ImplicitPort getInputC() throws Lib3MFException { + Pointer bufferC = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_selectnode_getinputc.invokeInt(new java.lang.Object[]{mHandle, bufferC})); + Pointer valueC = bufferC.getPointer(0); + ImplicitPort c = null; + if (valueC == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "C was a null pointer"); + } + c = mWrapper.PolymorphicFactory(valueC, ImplicitPort.class); + return c; + } + + /** + * Retrieves the fourth input + * + * @return the fourth input + * @throws Lib3MFException + */ + public ImplicitPort getInputD() throws Lib3MFException { + Pointer bufferD = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_selectnode_getinputd.invokeInt(new java.lang.Object[]{mHandle, bufferD})); + Pointer valueD = bufferD.getPointer(0); + ImplicitPort d = null; + if (valueD == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "D was a null pointer"); + } + d = mWrapper.PolymorphicFactory(valueD, ImplicitPort.class); + return d; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/SignNode.java b/Autogenerated/Bindings/Java8/lib3mf/SignNode.java new file mode 100644 index 000000000..07c6d7a25 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/SignNode.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class SignNode extends OneInputNode { + + public SignNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/SinNode.java b/Autogenerated/Bindings/Java8/lib3mf/SinNode.java new file mode 100644 index 000000000..d195e1804 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/SinNode.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class SinNode extends OneInputNode { + + public SinNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/SinhNode.java b/Autogenerated/Bindings/Java8/lib3mf/SinhNode.java new file mode 100644 index 000000000..602b71076 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/SinhNode.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class SinhNode extends OneInputNode { + + public SinhNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/Slice.java b/Autogenerated/Bindings/Java8/lib3mf/Slice.java new file mode 100644 index 000000000..61b5e0c10 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/Slice.java @@ -0,0 +1,187 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Slice extends Base { + + public Slice(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Set all vertices of a slice. All polygons will be cleared. + * + * @param vertices contains the positions. + * @throws Lib3MFException + */ + public void setVertices(Position2D[] vertices) throws Lib3MFException { + Pointer bufferVertices = new Memory(Math.max(1, Position2D.SIZE * vertices.length)); + for (int i = 0; i < vertices.length; i++) { + vertices[i].writeToPointer(bufferVertices, i * Position2D.SIZE); + } + mWrapper.checkError(this, mWrapper.lib3mf_slice_setvertices.invokeInt(new java.lang.Object[]{mHandle, (long) vertices.length, bufferVertices})); + } + + /** + * Get all vertices of a slice + * + * @return contains the positions. + * @throws Lib3MFException + */ + public Position2D[] getVertices() throws Lib3MFException { + Pointer countNeededVertices = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_slice_getvertices.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededVertices, null})); + long countVertices = countNeededVertices.getLong(0); + Pointer bufferVertices = new Memory(Math.max(1, countVertices * Position2D.SIZE)); + mWrapper.checkError(this, mWrapper.lib3mf_slice_getvertices.invokeInt(new java.lang.Object[]{mHandle, countVertices, countNeededVertices, bufferVertices})); + Position2D vertices[] = new Position2D[(int)countVertices]; + for (int i = 0; i < (int)countVertices; i++) { + vertices[i] = new Position2D(); + vertices[i].readFromPointer(bufferVertices, i * Position2D.SIZE); + } + return vertices; + } + + /** + * Get the number of vertices in a slice + * + * @return the number of vertices in the slice + * @throws Lib3MFException + */ + public long getVertexCount() throws Lib3MFException { + Pointer bufferCount = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_slice_getvertexcount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getLong(0); + } + + /** + * Add a new polygon to this slice + * + * @param indices the new indices of the new polygon + * @return the index of the new polygon + * @throws Lib3MFException + */ + public long addPolygon(int[] indices) throws Lib3MFException { + Pointer bufferIndices = new Memory(Math.max(1, 4 * indices.length)); + for (int i = 0; i < indices.length; i++) { + bufferIndices.setInt(4 * i, indices[i]); + } + Pointer bufferIndex = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_slice_addpolygon.invokeInt(new java.lang.Object[]{mHandle, (long) indices.length, bufferIndices, bufferIndex})); + return bufferIndex.getLong(0); + } + + /** + * Get the number of polygons in the slice + * + * @return the number of polygons in the slice + * @throws Lib3MFException + */ + public long getPolygonCount() throws Lib3MFException { + Pointer bufferCount = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_slice_getpolygoncount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getLong(0); + } + + /** + * Set all indices of a polygon + * + * @param index the index of the polygon to manipulate + * @param indices the new indices of the index-th polygon + * @throws Lib3MFException + */ + public void setPolygonIndices(long index, int[] indices) throws Lib3MFException { + Pointer bufferIndices = new Memory(Math.max(1, 4 * indices.length)); + for (int i = 0; i < indices.length; i++) { + bufferIndices.setInt(4 * i, indices[i]); + } + mWrapper.checkError(this, mWrapper.lib3mf_slice_setpolygonindices.invokeInt(new java.lang.Object[]{mHandle, index, (long) indices.length, bufferIndices})); + } + + /** + * Get all vertices of a slice + * + * @param index the index of the polygon to manipulate + * @return the indices of the index-th polygon + * @throws Lib3MFException + */ + public int[] getPolygonIndices(long index) throws Lib3MFException { + Pointer countNeededIndices = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_slice_getpolygonindices.invokeInt(new java.lang.Object[]{mHandle, index, 0L, countNeededIndices, Pointer.NULL})); + long countIndices = countNeededIndices.getLong(0); + Pointer bufferIndices = new Memory(Math.max(1, 4 * countIndices)); + mWrapper.checkError(this, mWrapper.lib3mf_slice_getpolygonindices.invokeInt(new java.lang.Object[]{mHandle, index, countIndices, countNeededIndices, bufferIndices})); + return bufferIndices.getIntArray(0, (int)countIndices); + } + + /** + * Get the number of vertices in a slice + * + * @param index the index of the polygon to manipulate + * @return the number of indices of the index-th polygon + * @throws Lib3MFException + */ + public long getPolygonIndexCount(long index) throws Lib3MFException { + Pointer bufferCount = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_slice_getpolygonindexcount.invokeInt(new java.lang.Object[]{mHandle, index, bufferCount})); + return bufferCount.getLong(0); + } + + /** + * Get the upper Z-Coordinate of this slice. + * + * @return the upper Z-Coordinate of this slice + * @throws Lib3MFException + */ + public double getZTop() throws Lib3MFException { + Pointer bufferZTop = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_slice_getztop.invokeInt(new java.lang.Object[]{mHandle, bufferZTop})); + return bufferZTop.getDouble(0); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/SliceStack.java b/Autogenerated/Bindings/Java8/lib3mf/SliceStack.java new file mode 100644 index 000000000..9d409fec3 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/SliceStack.java @@ -0,0 +1,203 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class SliceStack extends Resource { + + public SliceStack(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Get the lower Z-Coordinate of the slice stack. + * + * @return the lower Z-Coordinate the slice stack + * @throws Lib3MFException + */ + public double getBottomZ() throws Lib3MFException { + Pointer bufferZBottom = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_slicestack_getbottomz.invokeInt(new java.lang.Object[]{mHandle, bufferZBottom})); + return bufferZBottom.getDouble(0); + } + + /** + * Returns the number of slices + * + * @return the number of slices + * @throws Lib3MFException + */ + public long getSliceCount() throws Lib3MFException { + Pointer bufferCount = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_slicestack_getslicecount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getLong(0); + } + + /** + * Query a slice from the slice stack + * + * @param sliceIndex the index of the slice + * @return the Slice instance + * @throws Lib3MFException + */ + public Slice getSlice(long sliceIndex) throws Lib3MFException { + Pointer bufferTheSlice = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_slicestack_getslice.invokeInt(new java.lang.Object[]{mHandle, sliceIndex, bufferTheSlice})); + Pointer valueTheSlice = bufferTheSlice.getPointer(0); + Slice theSlice = null; + if (valueTheSlice == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheSlice was a null pointer"); + } + theSlice = mWrapper.PolymorphicFactory(valueTheSlice, Slice.class); + return theSlice; + } + + /** + * Returns the number of slices + * + * @param zTop upper Z coordinate of the slice + * @return a new Slice instance + * @throws Lib3MFException + */ + public Slice addSlice(double zTop) throws Lib3MFException { + Pointer bufferTheSlice = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_slicestack_addslice.invokeInt(new java.lang.Object[]{mHandle, zTop, bufferTheSlice})); + Pointer valueTheSlice = bufferTheSlice.getPointer(0); + Slice theSlice = null; + if (valueTheSlice == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheSlice was a null pointer"); + } + theSlice = mWrapper.PolymorphicFactory(valueTheSlice, Slice.class); + return theSlice; + } + + /** + * Returns the number of slice refs + * + * @return the number of slicereferences + * @throws Lib3MFException + */ + public long getSliceRefCount() throws Lib3MFException { + Pointer bufferCount = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_slicestack_getslicerefcount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getLong(0); + } + + /** + * Adds another existing slicestack as sliceref in this slicestack + * + * @param theSliceStack the slicestack to use as sliceref + * @throws Lib3MFException + */ + public void addSliceStackReference(SliceStack theSliceStack) throws Lib3MFException { + Pointer theSliceStackHandle = null; + if (theSliceStack != null) { + theSliceStackHandle = theSliceStack.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheSliceStack is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_slicestack_addslicestackreference.invokeInt(new java.lang.Object[]{mHandle, theSliceStackHandle})); + } + + /** + * Adds another existing slicestack as sliceref in this slicestack + * + * @param sliceRefIndex the index of the slice ref + * @return the slicestack that is used as sliceref + * @throws Lib3MFException + */ + public SliceStack getSliceStackReference(long sliceRefIndex) throws Lib3MFException { + Pointer bufferTheSliceStack = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_slicestack_getslicestackreference.invokeInt(new java.lang.Object[]{mHandle, sliceRefIndex, bufferTheSliceStack})); + Pointer valueTheSliceStack = bufferTheSliceStack.getPointer(0); + SliceStack theSliceStack = null; + if (valueTheSliceStack == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheSliceStack was a null pointer"); + } + theSliceStack = mWrapper.PolymorphicFactory(valueTheSliceStack, SliceStack.class); + return theSliceStack; + } + + /** + * Removes the indirection of slices via slice-refs, i.e. creates the slices of all slice refs of this SliceStack as actual slices of this SliceStack. All previously existing slices or slicerefs will be removed. + * + * @throws Lib3MFException + */ + public void collapseSliceReferences() throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_slicestack_collapseslicereferences.invokeInt(new java.lang.Object[]{mHandle})); + } + + /** + * Sets the package path where this Slice should be stored. Input an empty string to reset the path + * + * @param path the package path where this Slice should be stored + * @throws Lib3MFException + */ + public void setOwnPath(String path) throws Lib3MFException { + byte[] bytesPath = path.getBytes(StandardCharsets.UTF_8); + Memory bufferPath = new Memory(bytesPath.length + 1); + bufferPath.write(0, bytesPath, 0, bytesPath.length); + bufferPath.setByte(bytesPath.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_slicestack_setownpath.invokeInt(new java.lang.Object[]{mHandle, bufferPath})); + } + + /** + * Obtains the package path where this Slice should be stored. Returns an empty string if the slicestack is stored within the root model. + * + * @return the package path where this Slice will be stored + * @throws Lib3MFException + */ + public String getOwnPath() throws Lib3MFException { + Pointer bytesNeededPath = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_slicestack_getownpath.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededPath, null})); + int sizePath = bytesNeededPath.getInt(0); + Pointer bufferPath = new Memory(sizePath); + mWrapper.checkError(this, mWrapper.lib3mf_slicestack_getownpath.invokeInt(new java.lang.Object[]{mHandle, sizePath, bytesNeededPath, bufferPath})); + return new String(bufferPath.getByteArray(0, sizePath - 1), StandardCharsets.UTF_8); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/SliceStackIterator.java b/Autogenerated/Bindings/Java8/lib3mf/SliceStackIterator.java new file mode 100644 index 000000000..f2334a347 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/SliceStackIterator.java @@ -0,0 +1,74 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class SliceStackIterator extends ResourceIterator { + + public SliceStackIterator(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the SliceStack the iterator points at. + * + * @return returns the SliceStack instance. + * @throws Lib3MFException + */ + public SliceStack getCurrentSliceStack() throws Lib3MFException { + Pointer bufferResource = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_slicestackiterator_getcurrentslicestack.invokeInt(new java.lang.Object[]{mHandle, bufferResource})); + Pointer valueResource = bufferResource.getPointer(0); + SliceStack resource = null; + if (valueResource == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Resource was a null pointer"); + } + resource = mWrapper.PolymorphicFactory(valueResource, SliceStack.class); + return resource; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/SqrtNode.java b/Autogenerated/Bindings/Java8/lib3mf/SqrtNode.java new file mode 100644 index 000000000..595fa4799 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/SqrtNode.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class SqrtNode extends OneInputNode { + + public SqrtNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/SubtractionNode.java b/Autogenerated/Bindings/Java8/lib3mf/SubtractionNode.java new file mode 100644 index 000000000..13fea4988 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/SubtractionNode.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class SubtractionNode extends TwoInputNode { + + public SubtractionNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/TanNode.java b/Autogenerated/Bindings/Java8/lib3mf/TanNode.java new file mode 100644 index 000000000..bb282765d --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/TanNode.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class TanNode extends OneInputNode { + + public TanNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/TanhNode.java b/Autogenerated/Bindings/Java8/lib3mf/TanhNode.java new file mode 100644 index 000000000..11079eb84 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/TanhNode.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class TanhNode extends OneInputNode { + + public TanhNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/Tex2Coord.java b/Autogenerated/Bindings/Java8/lib3mf/Tex2Coord.java new file mode 100644 index 000000000..183717a5d --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/Tex2Coord.java @@ -0,0 +1,63 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Memory; +import com.sun.jna.Pointer; + +import java.util.Arrays; +import java.util.List; + +public class Tex2Coord { + + public double U; + + public double V; + + public static final int SIZE = 16; + + public void readFromPointer(Pointer p, long offset) { + U = p.getDouble(offset + 0); + V = p.getDouble(offset + 8); + } + + public void writeToPointer(Pointer p, long offset) { + p.setDouble(offset + 0, U); + p.setDouble(offset + 8, V); + } + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/Texture2D.java b/Autogenerated/Bindings/Java8/lib3mf/Texture2D.java new file mode 100644 index 000000000..726f30df4 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/Texture2D.java @@ -0,0 +1,173 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Texture2D extends Resource { + + public Texture2D(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the attachment located at the path of the texture. + * + * @return attachment that holds the texture's image information. + * @throws Lib3MFException + */ + public Attachment getAttachment() throws Lib3MFException { + Pointer bufferAttachment = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_texture2d_getattachment.invokeInt(new java.lang.Object[]{mHandle, bufferAttachment})); + Pointer valueAttachment = bufferAttachment.getPointer(0); + Attachment attachment = null; + if (valueAttachment == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Attachment was a null pointer"); + } + attachment = mWrapper.PolymorphicFactory(valueAttachment, Attachment.class); + return attachment; + } + + /** + * Sets the texture's package path to the path of the attachment. + * + * @param attachment attachment that holds the texture's image information. + * @throws Lib3MFException + */ + public void setAttachment(Attachment attachment) throws Lib3MFException { + Pointer attachmentHandle = null; + if (attachment != null) { + attachmentHandle = attachment.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Attachment is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_texture2d_setattachment.invokeInt(new java.lang.Object[]{mHandle, attachmentHandle})); + } + + /** + * Retrieves a texture's content type. + * + * @return returns content type enum. + * @throws Lib3MFException + */ + public Lib3MFWrapper.TextureType getContentType() throws Lib3MFException { + Pointer bufferContentType = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_texture2d_getcontenttype.invokeInt(new java.lang.Object[]{mHandle, bufferContentType})); + return Lib3MFWrapper.EnumConversion.convertConstToTextureType(bufferContentType.getInt(0)); + } + + /** + * Retrieves a texture's content type. + * + * @param contentType new Content Type + * @throws Lib3MFException + */ + public void setContentType(Lib3MFWrapper.TextureType contentType) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_texture2d_setcontenttype.invokeInt(new java.lang.Object[]{mHandle, Lib3MFWrapper.EnumConversion.convertTextureTypeToConst(contentType)})); + } + + /** + * Retrieves a texture's tilestyle type. + * + * @return GetTileStyleUV Result Tuple + * @throws Lib3MFException + */ + public GetTileStyleUVResult getTileStyleUV() throws Lib3MFException { + Pointer bufferTileStyleU = new Memory(4); + Pointer bufferTileStyleV = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_texture2d_gettilestyleuv.invokeInt(new java.lang.Object[]{mHandle, bufferTileStyleU, bufferTileStyleV})); + GetTileStyleUVResult returnTuple = new GetTileStyleUVResult(); + returnTuple.TileStyleU = Lib3MFWrapper.EnumConversion.convertConstToTextureTileStyle(bufferTileStyleU.getInt(0)); + returnTuple.TileStyleV = Lib3MFWrapper.EnumConversion.convertConstToTextureTileStyle(bufferTileStyleV.getInt(0)); + return returnTuple; + } + + public static class GetTileStyleUVResult { + /** + * returns tilestyle type enum. + */ + public Lib3MFWrapper.TextureTileStyle TileStyleU; + + /** + * returns tilestyle type enum. + */ + public Lib3MFWrapper.TextureTileStyle TileStyleV; + + } + /** + * Sets a texture's tilestyle type. + * + * @param tileStyleU new tilestyle type enum. + * @param tileStyleV new tilestyle type enum. + * @throws Lib3MFException + */ + public void setTileStyleUV(Lib3MFWrapper.TextureTileStyle tileStyleU, Lib3MFWrapper.TextureTileStyle tileStyleV) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_texture2d_settilestyleuv.invokeInt(new java.lang.Object[]{mHandle, Lib3MFWrapper.EnumConversion.convertTextureTileStyleToConst(tileStyleU), Lib3MFWrapper.EnumConversion.convertTextureTileStyleToConst(tileStyleV)})); + } + + /** + * Retrieves a texture's filter type. + * + * @return returns filter type enum. + * @throws Lib3MFException + */ + public Lib3MFWrapper.TextureFilter getFilter() throws Lib3MFException { + Pointer bufferFilter = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_texture2d_getfilter.invokeInt(new java.lang.Object[]{mHandle, bufferFilter})); + return Lib3MFWrapper.EnumConversion.convertConstToTextureFilter(bufferFilter.getInt(0)); + } + + /** + * Sets a texture's filter type. + * + * @param filter sets new filter type enum. + * @throws Lib3MFException + */ + public void setFilter(Lib3MFWrapper.TextureFilter filter) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_texture2d_setfilter.invokeInt(new java.lang.Object[]{mHandle, Lib3MFWrapper.EnumConversion.convertTextureFilterToConst(filter)})); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/Texture2DGroup.java b/Autogenerated/Bindings/Java8/lib3mf/Texture2DGroup.java new file mode 100644 index 000000000..d5775e26c --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/Texture2DGroup.java @@ -0,0 +1,141 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Texture2DGroup extends Resource { + + public Texture2DGroup(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the count of tex2coords in the Texture2DGroup. + * + * @return returns the count of tex2coords. + * @throws Lib3MFException + */ + public int getCount() throws Lib3MFException { + Pointer bufferCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_texture2dgroup_getcount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getInt(0); + } + + /** + * returns all the PropertyIDs of all tex2coords in this Texture2DGroup + * + * @return PropertyID of the tex2coords in the Texture2DGroup. + * @throws Lib3MFException + */ + public int[] getAllPropertyIDs() throws Lib3MFException { + Pointer countNeededPropertyIDs = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_texture2dgroup_getallpropertyids.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededPropertyIDs, Pointer.NULL})); + long countPropertyIDs = countNeededPropertyIDs.getLong(0); + Pointer bufferPropertyIDs = new Memory(Math.max(1, 4 * countPropertyIDs)); + mWrapper.checkError(this, mWrapper.lib3mf_texture2dgroup_getallpropertyids.invokeInt(new java.lang.Object[]{mHandle, countPropertyIDs, countNeededPropertyIDs, bufferPropertyIDs})); + return bufferPropertyIDs.getIntArray(0, (int)countPropertyIDs); + } + + /** + * Adds a new tex2coord to the Texture2DGroup + * + * @param uVCoordinate The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. + * @return returns new PropertyID of the new tex2coord in the Texture2DGroup. + * @throws Lib3MFException + */ + public int addTex2Coord(Tex2Coord uVCoordinate) throws Lib3MFException { + Pointer bufferUVCoordinate = new Memory(Tex2Coord.SIZE); + uVCoordinate.writeToPointer(bufferUVCoordinate, 0); + Pointer bufferPropertyID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_texture2dgroup_addtex2coord.invokeInt(new java.lang.Object[]{mHandle, bufferUVCoordinate, bufferPropertyID})); + return bufferPropertyID.getInt(0); + } + + /** + * Obtains a tex2coord to the Texture2DGroup + * + * @param propertyID the PropertyID of the tex2coord in the Texture2DGroup. + * @return The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. + * @throws Lib3MFException + */ + public Tex2Coord getTex2Coord(int propertyID) throws Lib3MFException { + Pointer bufferUVCoordinate = new Memory(Tex2Coord.SIZE); + mWrapper.checkError(this, mWrapper.lib3mf_texture2dgroup_gettex2coord.invokeInt(new java.lang.Object[]{mHandle, propertyID, bufferUVCoordinate})); + Tex2Coord uVCoordinate = new Tex2Coord(); + uVCoordinate.readFromPointer(bufferUVCoordinate, 0); + return uVCoordinate; + } + + /** + * Removes a tex2coords from the Texture2DGroup. + * + * @param propertyID PropertyID of the tex2coords in the Texture2DGroup. + * @throws Lib3MFException + */ + public void removeTex2Coord(int propertyID) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_texture2dgroup_removetex2coord.invokeInt(new java.lang.Object[]{mHandle, propertyID})); + } + + /** + * Obtains the texture2D instance of this group. + * + * @return the texture2D instance of this group. + * @throws Lib3MFException + */ + public Texture2D getTexture2D() throws Lib3MFException { + Pointer bufferTexture2DInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_texture2dgroup_gettexture2d.invokeInt(new java.lang.Object[]{mHandle, bufferTexture2DInstance})); + Pointer valueTexture2DInstance = bufferTexture2DInstance.getPointer(0); + Texture2D texture2DInstance = null; + if (valueTexture2DInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Texture2DInstance was a null pointer"); + } + texture2DInstance = mWrapper.PolymorphicFactory(valueTexture2DInstance, Texture2D.class); + return texture2DInstance; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/Texture2DGroupIterator.java b/Autogenerated/Bindings/Java8/lib3mf/Texture2DGroupIterator.java new file mode 100644 index 000000000..f7e5cd330 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/Texture2DGroupIterator.java @@ -0,0 +1,74 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Texture2DGroupIterator extends ResourceIterator { + + public Texture2DGroupIterator(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the Texture2DGroup the iterator points at. + * + * @return returns the Texture2DGroup instance. + * @throws Lib3MFException + */ + public Texture2DGroup getCurrentTexture2DGroup() throws Lib3MFException { + Pointer bufferResource = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_texture2dgroupiterator_getcurrenttexture2dgroup.invokeInt(new java.lang.Object[]{mHandle, bufferResource})); + Pointer valueResource = bufferResource.getPointer(0); + Texture2DGroup resource = null; + if (valueResource == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Resource was a null pointer"); + } + resource = mWrapper.PolymorphicFactory(valueResource, Texture2DGroup.class); + return resource; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/Texture2DIterator.java b/Autogenerated/Bindings/Java8/lib3mf/Texture2DIterator.java new file mode 100644 index 000000000..2b8ed0e27 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/Texture2DIterator.java @@ -0,0 +1,74 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Texture2DIterator extends ResourceIterator { + + public Texture2DIterator(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the Texture2D the iterator points at. + * + * @return returns the Texture2D instance. + * @throws Lib3MFException + */ + public Texture2D getCurrentTexture2D() throws Lib3MFException { + Pointer bufferResource = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_texture2diterator_getcurrenttexture2d.invokeInt(new java.lang.Object[]{mHandle, bufferResource})); + Pointer valueResource = bufferResource.getPointer(0); + Texture2D resource = null; + if (valueResource == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Resource was a null pointer"); + } + resource = mWrapper.PolymorphicFactory(valueResource, Texture2D.class); + return resource; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/Transform.java b/Autogenerated/Bindings/Java8/lib3mf/Transform.java new file mode 100644 index 000000000..ed02ea877 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/Transform.java @@ -0,0 +1,81 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Memory; +import com.sun.jna.Pointer; + +import java.util.Arrays; +import java.util.List; + +public class Transform { + + public float[][] Fields = new float[3][4]; + + public static final int SIZE = 48; + + public void readFromPointer(Pointer p, long offset) { + Fields[0][0] = p.getFloat(offset + 0); + Fields[0][1] = p.getFloat(offset + 4); + Fields[0][2] = p.getFloat(offset + 8); + Fields[0][3] = p.getFloat(offset + 12); + Fields[1][0] = p.getFloat(offset + 16); + Fields[1][1] = p.getFloat(offset + 20); + Fields[1][2] = p.getFloat(offset + 24); + Fields[1][3] = p.getFloat(offset + 28); + Fields[2][0] = p.getFloat(offset + 32); + Fields[2][1] = p.getFloat(offset + 36); + Fields[2][2] = p.getFloat(offset + 40); + Fields[2][3] = p.getFloat(offset + 44); + } + + public void writeToPointer(Pointer p, long offset) { + p.setFloat(offset + 0, Fields[0][0]); + p.setFloat(offset + 4, Fields[0][1]); + p.setFloat(offset + 8, Fields[0][2]); + p.setFloat(offset + 12, Fields[0][3]); + p.setFloat(offset + 16, Fields[1][0]); + p.setFloat(offset + 20, Fields[1][1]); + p.setFloat(offset + 24, Fields[1][2]); + p.setFloat(offset + 28, Fields[1][3]); + p.setFloat(offset + 32, Fields[2][0]); + p.setFloat(offset + 36, Fields[2][1]); + p.setFloat(offset + 40, Fields[2][2]); + p.setFloat(offset + 44, Fields[2][3]); + } + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/TransposeNode.java b/Autogenerated/Bindings/Java8/lib3mf/TransposeNode.java new file mode 100644 index 000000000..0ab7a82d9 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/TransposeNode.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class TransposeNode extends OneInputNode { + + public TransposeNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/Triangle.java b/Autogenerated/Bindings/Java8/lib3mf/Triangle.java new file mode 100644 index 000000000..c561cd299 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/Triangle.java @@ -0,0 +1,63 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Memory; +import com.sun.jna.Pointer; + +import java.util.Arrays; +import java.util.List; + +public class Triangle { + + public int[] Indices = new int[3]; + + public static final int SIZE = 12; + + public void readFromPointer(Pointer p, long offset) { + Indices[0] = p.getInt(offset + 0); + Indices[1] = p.getInt(offset + 4); + Indices[2] = p.getInt(offset + 8); + } + + public void writeToPointer(Pointer p, long offset) { + p.setInt(offset + 0, Indices[0]); + p.setInt(offset + 4, Indices[1]); + p.setInt(offset + 8, Indices[2]); + } + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/TriangleProperties.java b/Autogenerated/Bindings/Java8/lib3mf/TriangleProperties.java new file mode 100644 index 000000000..7328dc17f --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/TriangleProperties.java @@ -0,0 +1,67 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Memory; +import com.sun.jna.Pointer; + +import java.util.Arrays; +import java.util.List; + +public class TriangleProperties { + + public int ResourceID; + + public int[] PropertyIDs = new int[3]; + + public static final int SIZE = 16; + + public void readFromPointer(Pointer p, long offset) { + ResourceID = p.getInt(offset + 0); + PropertyIDs[0] = p.getInt(offset + 4); + PropertyIDs[1] = p.getInt(offset + 8); + PropertyIDs[2] = p.getInt(offset + 12); + } + + public void writeToPointer(Pointer p, long offset) { + p.setInt(offset + 0, ResourceID); + p.setInt(offset + 4, PropertyIDs[0]); + p.setInt(offset + 8, PropertyIDs[1]); + p.setInt(offset + 12, PropertyIDs[2]); + } + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/TriangleSet.java b/Autogenerated/Bindings/Java8/lib3mf/TriangleSet.java new file mode 100644 index 000000000..5b682aa0e --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/TriangleSet.java @@ -0,0 +1,235 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class TriangleSet extends Base { + + public TriangleSet(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * sets the name of the triangle set + * + * @param name the new name + * @throws Lib3MFException + */ + public void setName(String name) throws Lib3MFException { + byte[] bytesName = name.getBytes(StandardCharsets.UTF_8); + Memory bufferName = new Memory(bytesName.length + 1); + bufferName.write(0, bytesName, 0, bytesName.length); + bufferName.setByte(bytesName.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_triangleset_setname.invokeInt(new java.lang.Object[]{mHandle, bufferName})); + } + + /** + * returns the name of the triangle set + * + * @return returns the name + * @throws Lib3MFException + */ + public String getName() throws Lib3MFException { + Pointer bytesNeededName = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_triangleset_getname.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededName, null})); + int sizeName = bytesNeededName.getInt(0); + Pointer bufferName = new Memory(sizeName); + mWrapper.checkError(this, mWrapper.lib3mf_triangleset_getname.invokeInt(new java.lang.Object[]{mHandle, sizeName, bytesNeededName, bufferName})); + return new String(bufferName.getByteArray(0, sizeName - 1), StandardCharsets.UTF_8); + } + + /** + * sets the identifier of the triangle set. + * + * @param identifier the new identifier. MUST be unique within the mesh. MUST NOT be an empty string + * @throws Lib3MFException + */ + public void setIdentifier(String identifier) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_triangleset_setidentifier.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier})); + } + + /** + * returns the identifier of the triangle set + * + * @return returns the identifier + * @throws Lib3MFException + */ + public String getIdentifier() throws Lib3MFException { + Pointer bytesNeededIdentifier = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_triangleset_getidentifier.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededIdentifier, null})); + int sizeIdentifier = bytesNeededIdentifier.getInt(0); + Pointer bufferIdentifier = new Memory(sizeIdentifier); + mWrapper.checkError(this, mWrapper.lib3mf_triangleset_getidentifier.invokeInt(new java.lang.Object[]{mHandle, sizeIdentifier, bytesNeededIdentifier, bufferIdentifier})); + return new String(bufferIdentifier.getByteArray(0, sizeIdentifier - 1), StandardCharsets.UTF_8); + } + + /** + * adds a triangle to the set. Does nothing if triangle is already in the set. + * + * @param triangleIndex Triangle index to add. MUST be between 0 and TriangleCount - 1. + * @throws Lib3MFException + */ + public void addTriangle(int triangleIndex) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_triangleset_addtriangle.invokeInt(new java.lang.Object[]{mHandle, triangleIndex})); + } + + /** + * removes a triangle from the set + * + * @param triangleIndex Triangle index to remove. MUST be between 0 and TriangleCount - 1. + * @throws Lib3MFException + */ + public void removeTriangle(int triangleIndex) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_triangleset_removetriangle.invokeInt(new java.lang.Object[]{mHandle, triangleIndex})); + } + + /** + * clears all triangles from the list + * + * @throws Lib3MFException + */ + public void clear() throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_triangleset_clear.invokeInt(new java.lang.Object[]{mHandle})); + } + + /** + * Sets all triangles in the list, while clearing old values. Duplicates will be merged. + * + * @param triangleIndices Triangle indices to add. Every element MUST be between 0 and TriangleCount - 1. + * @throws Lib3MFException + */ + public void setTriangleList(int[] triangleIndices) throws Lib3MFException { + Pointer bufferTriangleIndices = new Memory(Math.max(1, 4 * triangleIndices.length)); + for (int i = 0; i < triangleIndices.length; i++) { + bufferTriangleIndices.setInt(4 * i, triangleIndices[i]); + } + mWrapper.checkError(this, mWrapper.lib3mf_triangleset_settrianglelist.invokeInt(new java.lang.Object[]{mHandle, (long) triangleIndices.length, bufferTriangleIndices})); + } + + /** + * Retrieves all the triangles in the TriangleSet + * + * @return retrieves the indices of the triangles in this TriangleSet + * @throws Lib3MFException + */ + public int[] getTriangleList() throws Lib3MFException { + Pointer countNeededTriangleIndices = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_triangleset_gettrianglelist.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededTriangleIndices, Pointer.NULL})); + long countTriangleIndices = countNeededTriangleIndices.getLong(0); + Pointer bufferTriangleIndices = new Memory(Math.max(1, 4 * countTriangleIndices)); + mWrapper.checkError(this, mWrapper.lib3mf_triangleset_gettrianglelist.invokeInt(new java.lang.Object[]{mHandle, countTriangleIndices, countNeededTriangleIndices, bufferTriangleIndices})); + return bufferTriangleIndices.getIntArray(0, (int)countTriangleIndices); + } + + /** + * Adds multiple triangles in the list. Duplicates will be merged. + * + * @param triangleIndices Triangle indices to add. Every element MUST be between 0 and TriangleCount - 1. + * @throws Lib3MFException + */ + public void addTriangleList(int[] triangleIndices) throws Lib3MFException { + Pointer bufferTriangleIndices = new Memory(Math.max(1, 4 * triangleIndices.length)); + for (int i = 0; i < triangleIndices.length; i++) { + bufferTriangleIndices.setInt(4 * i, triangleIndices[i]); + } + mWrapper.checkError(this, mWrapper.lib3mf_triangleset_addtrianglelist.invokeInt(new java.lang.Object[]{mHandle, (long) triangleIndices.length, bufferTriangleIndices})); + } + + /** + * Merges another Triangle set. + * + * @param otherTriangleSet Other triangle set to merge. + * @param deleteOther Flag if other triangle set is getting removed. + * @throws Lib3MFException + */ + public void merge(TriangleSet otherTriangleSet, boolean deleteOther) throws Lib3MFException { + Pointer otherTriangleSetHandle = null; + if (otherTriangleSet != null) { + otherTriangleSetHandle = otherTriangleSet.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "OtherTriangleSet is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_triangleset_merge.invokeInt(new java.lang.Object[]{mHandle, otherTriangleSetHandle, deleteOther})); + } + + /** + * Deletes the whole set from the mesh. + * + * @throws Lib3MFException + */ + public void deleteSet() throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_triangleset_deleteset.invokeInt(new java.lang.Object[]{mHandle})); + } + + /** + * Duplicates the set in the mesh. + * + * @param identifier the new identifier. MUST be unique within the mesh. MUST NOT be an empty string + * @return Copy of the triangle set. + * @throws Lib3MFException + */ + public TriangleSet duplicate(String identifier) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + Pointer bufferNewSet = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_triangleset_duplicate.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferNewSet})); + Pointer valueNewSet = bufferNewSet.getPointer(0); + TriangleSet newSet = null; + if (valueNewSet == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "NewSet was a null pointer"); + } + newSet = mWrapper.PolymorphicFactory(valueNewSet, TriangleSet.class); + return newSet; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/TwoInputNode.java b/Autogenerated/Bindings/Java8/lib3mf/TwoInputNode.java new file mode 100644 index 000000000..50bd8349a --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/TwoInputNode.java @@ -0,0 +1,74 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class TwoInputNode extends OneInputNode { + + public TwoInputNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the second input + * + * @return the second input + * @throws Lib3MFException + */ + public ImplicitPort getInputB() throws Lib3MFException { + Pointer bufferB = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_twoinputnode_getinputb.invokeInt(new java.lang.Object[]{mHandle, bufferB})); + Pointer valueB = bufferB.getPointer(0); + ImplicitPort b = null; + if (valueB == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "B was a null pointer"); + } + b = mWrapper.PolymorphicFactory(valueB, ImplicitPort.class); + return b; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/UnsignedMeshNode.java b/Autogenerated/Bindings/Java8/lib3mf/UnsignedMeshNode.java new file mode 100644 index 000000000..d792a6ad1 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/UnsignedMeshNode.java @@ -0,0 +1,110 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class UnsignedMeshNode extends ImplicitNode { + + public UnsignedMeshNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the input for the model resource id of the mesh + * + * @return the input port for the model resource id of the mesh + * @throws Lib3MFException + */ + public ImplicitPort getInputMesh() throws Lib3MFException { + Pointer bufferMesh = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_unsignedmeshnode_getinputmesh.invokeInt(new java.lang.Object[]{mHandle, bufferMesh})); + Pointer valueMesh = bufferMesh.getPointer(0); + ImplicitPort mesh = null; + if (valueMesh == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Mesh was a null pointer"); + } + mesh = mWrapper.PolymorphicFactory(valueMesh, ImplicitPort.class); + return mesh; + } + + /** + * Retrieves the input for the position + * + * @return the input port for the position + * @throws Lib3MFException + */ + public ImplicitPort getInputPos() throws Lib3MFException { + Pointer bufferPos = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_unsignedmeshnode_getinputpos.invokeInt(new java.lang.Object[]{mHandle, bufferPos})); + Pointer valuePos = bufferPos.getPointer(0); + ImplicitPort pos = null; + if (valuePos == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Pos was a null pointer"); + } + pos = mWrapper.PolymorphicFactory(valuePos, ImplicitPort.class); + return pos; + } + + /** + * Retrieves the output + * + * @return the output port for the unsigned distance to the mesh + * @throws Lib3MFException + */ + public ImplicitPort getOutputDistance() throws Lib3MFException { + Pointer bufferDistance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_unsignedmeshnode_getoutputdistance.invokeInt(new java.lang.Object[]{mHandle, bufferDistance})); + Pointer valueDistance = bufferDistance.getPointer(0); + ImplicitPort distance = null; + if (valueDistance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Distance was a null pointer"); + } + distance = mWrapper.PolymorphicFactory(valueDistance, ImplicitPort.class); + return distance; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/Vector.java b/Autogenerated/Bindings/Java8/lib3mf/Vector.java new file mode 100644 index 000000000..ab8e4f415 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/Vector.java @@ -0,0 +1,63 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Memory; +import com.sun.jna.Pointer; + +import java.util.Arrays; +import java.util.List; + +public class Vector { + + public double[] Coordinates = new double[3]; + + public static final int SIZE = 24; + + public void readFromPointer(Pointer p, long offset) { + Coordinates[0] = p.getDouble(offset + 0); + Coordinates[1] = p.getDouble(offset + 8); + Coordinates[2] = p.getDouble(offset + 16); + } + + public void writeToPointer(Pointer p, long offset) { + p.setDouble(offset + 0, Coordinates[0]); + p.setDouble(offset + 8, Coordinates[1]); + p.setDouble(offset + 16, Coordinates[2]); + } + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/VectorFromScalarNode.java b/Autogenerated/Bindings/Java8/lib3mf/VectorFromScalarNode.java new file mode 100644 index 000000000..6c84b6e68 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/VectorFromScalarNode.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class VectorFromScalarNode extends OneInputNode { + + public VectorFromScalarNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/VolumeData.java b/Autogenerated/Bindings/Java8/lib3mf/VolumeData.java new file mode 100644 index 000000000..39865a786 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/VolumeData.java @@ -0,0 +1,222 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class VolumeData extends Resource { + + public VolumeData(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the VolumeDataComposite of this VolumeData instance + * + * @return filled with the VolumeDataComposite of this VolumeData instance. + * @throws Lib3MFException + */ + public VolumeDataComposite getComposite() throws Lib3MFException { + Pointer bufferTheCompositeData = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_volumedata_getcomposite.invokeInt(new java.lang.Object[]{mHandle, bufferTheCompositeData})); + Pointer valueTheCompositeData = bufferTheCompositeData.getPointer(0); + VolumeDataComposite theCompositeData = null; + if (valueTheCompositeData != Pointer.NULL) { + theCompositeData = mWrapper.PolymorphicFactory(valueTheCompositeData, VolumeDataComposite.class); + } + return theCompositeData; + } + + /** + * Creates a new VolumeDataComposite for this VolumeData instance + * + * @return The new VolumeDataComposite of this VolumeData instance. + * @throws Lib3MFException + */ + public VolumeDataComposite createNewComposite() throws Lib3MFException { + Pointer bufferTheCompositeData = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_volumedata_createnewcomposite.invokeInt(new java.lang.Object[]{mHandle, bufferTheCompositeData})); + Pointer valueTheCompositeData = bufferTheCompositeData.getPointer(0); + VolumeDataComposite theCompositeData = null; + if (valueTheCompositeData == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheCompositeData was a null pointer"); + } + theCompositeData = mWrapper.PolymorphicFactory(valueTheCompositeData, VolumeDataComposite.class); + return theCompositeData; + } + + /** + * Removes the VolumeDataComposite of this VolumeData instance + * + * @throws Lib3MFException + */ + public void removeComposite() throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_volumedata_removecomposite.invokeInt(new java.lang.Object[]{mHandle})); + } + + /** + * Returns the VolumeDataColor of this VolumeData instance + * + * @return filled with the VolumeDataColor of this VolumeData instance. + * @throws Lib3MFException + */ + public VolumeDataColor getColor() throws Lib3MFException { + Pointer bufferTheColorData = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_volumedata_getcolor.invokeInt(new java.lang.Object[]{mHandle, bufferTheColorData})); + Pointer valueTheColorData = bufferTheColorData.getPointer(0); + VolumeDataColor theColorData = null; + if (valueTheColorData != Pointer.NULL) { + theColorData = mWrapper.PolymorphicFactory(valueTheColorData, VolumeDataColor.class); + } + return theColorData; + } + + /** + * Creates a new VolumeDataColor for this VolumeData instance + * + * @param theFunction Function used in this element + * @return The new VolumeDataColor of this VolumeData instance. + * @throws Lib3MFException + */ + public VolumeDataColor createNewColor(Function theFunction) throws Lib3MFException { + Pointer theFunctionHandle = null; + if (theFunction != null) { + theFunctionHandle = theFunction.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheFunction is a null value."); + } + Pointer bufferTheColorData = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_volumedata_createnewcolor.invokeInt(new java.lang.Object[]{mHandle, theFunctionHandle, bufferTheColorData})); + Pointer valueTheColorData = bufferTheColorData.getPointer(0); + VolumeDataColor theColorData = null; + if (valueTheColorData == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheColorData was a null pointer"); + } + theColorData = mWrapper.PolymorphicFactory(valueTheColorData, VolumeDataColor.class); + return theColorData; + } + + /** + * Removes the VolumeDataColor of this VolumeData instance + * + * @throws Lib3MFException + */ + public void removeColor() throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_volumedata_removecolor.invokeInt(new java.lang.Object[]{mHandle})); + } + + /** + * Returns the number of VolumeDataProperty + * + * @return the number of VolumeDataProperty-elements within this VolumeData + * @throws Lib3MFException + */ + public int getPropertyCount() throws Lib3MFException { + Pointer bufferCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_volumedata_getpropertycount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getInt(0); + } + + /** + * Returns the VolumeDataProperty at a given Index + * + * @param index the index of the VolumeDataProperty to be returned. + * @return the VolumeDataProperty at the given index. + * @throws Lib3MFException + */ + public VolumeDataProperty getProperty(int index) throws Lib3MFException { + Pointer bufferTheVolumeDataProperty = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_volumedata_getproperty.invokeInt(new java.lang.Object[]{mHandle, index, bufferTheVolumeDataProperty})); + Pointer valueTheVolumeDataProperty = bufferTheVolumeDataProperty.getPointer(0); + VolumeDataProperty theVolumeDataProperty = null; + if (valueTheVolumeDataProperty == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheVolumeDataProperty was a null pointer"); + } + theVolumeDataProperty = mWrapper.PolymorphicFactory(valueTheVolumeDataProperty, VolumeDataProperty.class); + return theVolumeDataProperty; + } + + /** + * Adds a new VolumeDataProperty from a Function + * + * @param name the qualified name (namespace+name) of the Property + * @param theFunction Function used in this element + * @return the newly created VolumeDataProperty. + * @throws Lib3MFException + */ + public VolumeDataProperty addPropertyFromFunction(String name, Function theFunction) throws Lib3MFException { + byte[] bytesName = name.getBytes(StandardCharsets.UTF_8); + Memory bufferName = new Memory(bytesName.length + 1); + bufferName.write(0, bytesName, 0, bytesName.length); + bufferName.setByte(bytesName.length, (byte)0); + Pointer theFunctionHandle = null; + if (theFunction != null) { + theFunctionHandle = theFunction.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheFunction is a null value."); + } + Pointer bufferTheVolumeDataProperty = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_volumedata_addpropertyfromfunction.invokeInt(new java.lang.Object[]{mHandle, bufferName, theFunctionHandle, bufferTheVolumeDataProperty})); + Pointer valueTheVolumeDataProperty = bufferTheVolumeDataProperty.getPointer(0); + VolumeDataProperty theVolumeDataProperty = null; + if (valueTheVolumeDataProperty == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheVolumeDataProperty was a null pointer"); + } + theVolumeDataProperty = mWrapper.PolymorphicFactory(valueTheVolumeDataProperty, VolumeDataProperty.class); + return theVolumeDataProperty; + } + + /** + * Removes the VolumeDataProperty with a given index + * + * @param index the index of the VolumeDataProperty to be removed. + * @throws Lib3MFException + */ + public void removeProperty(int index) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_volumedata_removeproperty.invokeInt(new java.lang.Object[]{mHandle, index})); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/VolumeDataColor.java b/Autogenerated/Bindings/Java8/lib3mf/VolumeDataColor.java new file mode 100644 index 000000000..fba325e90 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/VolumeDataColor.java @@ -0,0 +1,56 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class VolumeDataColor extends FunctionReference { + + public VolumeDataColor(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/VolumeDataComposite.java b/Autogenerated/Bindings/Java8/lib3mf/VolumeDataComposite.java new file mode 100644 index 000000000..3acbe3489 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/VolumeDataComposite.java @@ -0,0 +1,152 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class VolumeDataComposite extends Base { + + public VolumeDataComposite(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the BaseMaterialGroup used within this volume data item + * + * @return The BaseMaterialGroup instance of this VolumeDataComposite element + * @throws Lib3MFException + */ + public BaseMaterialGroup getBaseMaterialGroup() throws Lib3MFException { + Pointer bufferBaseMaterialGroupInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_volumedatacomposite_getbasematerialgroup.invokeInt(new java.lang.Object[]{mHandle, bufferBaseMaterialGroupInstance})); + Pointer valueBaseMaterialGroupInstance = bufferBaseMaterialGroupInstance.getPointer(0); + BaseMaterialGroup baseMaterialGroupInstance = null; + if (valueBaseMaterialGroupInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "BaseMaterialGroupInstance was a null pointer"); + } + baseMaterialGroupInstance = mWrapper.PolymorphicFactory(valueBaseMaterialGroupInstance, BaseMaterialGroup.class); + return baseMaterialGroupInstance; + } + + /** + * Sets the BaseMaterialGroup to use within this volume data item. + * + * @param baseMaterialGroupInstance The new BaseMaterialGroup instance of this VolumeDataComposite element + * @throws Lib3MFException + */ + public void setBaseMaterialGroup(BaseMaterialGroup baseMaterialGroupInstance) throws Lib3MFException { + Pointer baseMaterialGroupInstanceHandle = null; + if (baseMaterialGroupInstance != null) { + baseMaterialGroupInstanceHandle = baseMaterialGroupInstance.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "BaseMaterialGroupInstance is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_volumedatacomposite_setbasematerialgroup.invokeInt(new java.lang.Object[]{mHandle, baseMaterialGroupInstanceHandle})); + } + + /** + * Returns the number of material mappings of this VolumeDataComposite element + * + * @return the number of material mappings. + * @throws Lib3MFException + */ + public int getMaterialMappingCount() throws Lib3MFException { + Pointer bufferCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_volumedatacomposite_getmaterialmappingcount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getInt(0); + } + + /** + * Returns MaterialMapping with given index + * + * @param index Index of the MaterialMapping in question. + * @return MaterialMapping used in this element + * @throws Lib3MFException + */ + public MaterialMapping getMaterialMapping(int index) throws Lib3MFException { + Pointer bufferTheMaterialMapping = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_volumedatacomposite_getmaterialmapping.invokeInt(new java.lang.Object[]{mHandle, index, bufferTheMaterialMapping})); + Pointer valueTheMaterialMapping = bufferTheMaterialMapping.getPointer(0); + MaterialMapping theMaterialMapping = null; + if (valueTheMaterialMapping == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheMaterialMapping was a null pointer"); + } + theMaterialMapping = mWrapper.PolymorphicFactory(valueTheMaterialMapping, MaterialMapping.class); + return theMaterialMapping; + } + + /** + * Adds a MaterialMapping + * + * @param transform new transformation matrix + * @return The new MaterialMapping + * @throws Lib3MFException + */ + public MaterialMapping addMaterialMapping(Transform transform) throws Lib3MFException { + Pointer bufferTransform = new Memory(Transform.SIZE); + transform.writeToPointer(bufferTransform, 0); + Pointer bufferTheMaterialMapping = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_volumedatacomposite_addmaterialmapping.invokeInt(new java.lang.Object[]{mHandle, bufferTransform, bufferTheMaterialMapping})); + Pointer valueTheMaterialMapping = bufferTheMaterialMapping.getPointer(0); + MaterialMapping theMaterialMapping = null; + if (valueTheMaterialMapping == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheMaterialMapping was a null pointer"); + } + theMaterialMapping = mWrapper.PolymorphicFactory(valueTheMaterialMapping, MaterialMapping.class); + return theMaterialMapping; + } + + /** + * Removes the MaterialMapping with given index + * + * @param index The index of the MaterialMapping to be removed. + * @throws Lib3MFException + */ + public void removeMaterialMapping(int index) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_volumedatacomposite_removematerialmapping.invokeInt(new java.lang.Object[]{mHandle, index})); + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/VolumeDataProperty.java b/Autogenerated/Bindings/Java8/lib3mf/VolumeDataProperty.java new file mode 100644 index 000000000..1e58a5578 --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/VolumeDataProperty.java @@ -0,0 +1,93 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class VolumeDataProperty extends FunctionReference { + + public VolumeDataProperty(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Gets the qualified name of this property. + * + * @return The qualified name of this property. + * @throws Lib3MFException + */ + public String getName() throws Lib3MFException { + Pointer bytesNeededPropertyName = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_volumedataproperty_getname.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededPropertyName, null})); + int sizePropertyName = bytesNeededPropertyName.getInt(0); + Pointer bufferPropertyName = new Memory(sizePropertyName); + mWrapper.checkError(this, mWrapper.lib3mf_volumedataproperty_getname.invokeInt(new java.lang.Object[]{mHandle, sizePropertyName, bytesNeededPropertyName, bufferPropertyName})); + return new String(bufferPropertyName.getByteArray(0, sizePropertyName - 1), StandardCharsets.UTF_8); + } + + /** + * Sets whether this property is required to process this 3MF document instance. + * + * @param isRequired New value for whether this property is required to process this 3MF document instance. + * @throws Lib3MFException + */ + public void setIsRequired(boolean isRequired) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_volumedataproperty_setisrequired.invokeInt(new java.lang.Object[]{mHandle, isRequired})); + } + + /** + * Returns whether this property is required to process this 3MF document instance. + * + * @return Is this property required to process this 3MF document instance? + * @throws Lib3MFException + */ + public boolean isRequired() throws Lib3MFException { + Pointer bufferIsRequired = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_volumedataproperty_isrequired.invokeInt(new java.lang.Object[]{mHandle, bufferIsRequired})); + return bufferIsRequired.getByte(0) != 0; + } + + +} + diff --git a/Autogenerated/Bindings/Java8/lib3mf/Writer.java b/Autogenerated/Bindings/Java8/lib3mf/Writer.java new file mode 100644 index 000000000..15d75b68b --- /dev/null +++ b/Autogenerated/Bindings/Java8/lib3mf/Writer.java @@ -0,0 +1,235 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Writer extends Base { + + public Writer(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Writes out the model as file. The file type is specified by the Model Writer class. + * + * @param filename Filename to write into + * @throws Lib3MFException + */ + public void writeToFile(String filename) throws Lib3MFException { + byte[] bytesFilename = filename.getBytes(StandardCharsets.UTF_8); + Memory bufferFilename = new Memory(bytesFilename.length + 1); + bufferFilename.write(0, bytesFilename, 0, bytesFilename.length); + bufferFilename.setByte(bytesFilename.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_writer_writetofile.invokeInt(new java.lang.Object[]{mHandle, bufferFilename})); + } + + /** + * Retrieves the size of the full 3MF file stream. + * + * @return the stream size + * @throws Lib3MFException + */ + public long getStreamSize() throws Lib3MFException { + Pointer bufferStreamSize = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_writer_getstreamsize.invokeInt(new java.lang.Object[]{mHandle, bufferStreamSize})); + return bufferStreamSize.getLong(0); + } + + /** + * Writes out the 3MF file into a memory buffer + * + * @return buffer to write into + * @throws Lib3MFException + */ + public byte[] writeToBuffer() throws Lib3MFException { + Pointer countNeededBuffer = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_writer_writetobuffer.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededBuffer, Pointer.NULL})); + long countBuffer = countNeededBuffer.getLong(0); + Pointer bufferBuffer = new Memory(Math.max(1, 1 * countBuffer)); + mWrapper.checkError(this, mWrapper.lib3mf_writer_writetobuffer.invokeInt(new java.lang.Object[]{mHandle, countBuffer, countNeededBuffer, bufferBuffer})); + return bufferBuffer.getByteArray(0, (int)countBuffer); + } + + /** + * Writes out the model and passes the data to a provided callback function. The file type is specified by the Model Writer class. + * + * @param theWriteCallback Callback to call for writing a data chunk + * @param theSeekCallback Callback to call for seeking in the stream + * @param userData Userdata that is passed to the callback function + * @throws Lib3MFException + */ + public void writeToCallback(Lib3MFWrapper.WriteCallback theWriteCallback, Lib3MFWrapper.SeekCallback theSeekCallback, Pointer userData) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_writer_writetocallback.invokeInt(new java.lang.Object[]{mHandle, theWriteCallback, theSeekCallback, userData})); + } + + /** + * Set the progress callback for calls to this writer + * + * @param progressCallback pointer to the callback function. + * @param userData pointer to arbitrary user data that is passed without modification to the callback. + * @throws Lib3MFException + */ + public void setProgressCallback(Lib3MFWrapper.ProgressCallback progressCallback, Pointer userData) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_writer_setprogresscallback.invokeInt(new java.lang.Object[]{mHandle, progressCallback, userData})); + } + + /** + * Returns the number of digits after the decimal point to be written in each vertex coordinate-value. + * + * @return The number of digits to be written in each vertex coordinate-value after the decimal point. + * @throws Lib3MFException + */ + public int getDecimalPrecision() throws Lib3MFException { + Pointer bufferDecimalPrecision = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_writer_getdecimalprecision.invokeInt(new java.lang.Object[]{mHandle, bufferDecimalPrecision})); + return bufferDecimalPrecision.getInt(0); + } + + /** + * Sets the number of digits after the decimal point to be written in each vertex coordinate-value. + * + * @param decimalPrecision The number of digits to be written in each vertex coordinate-value after the decimal point. + * @throws Lib3MFException + */ + public void setDecimalPrecision(int decimalPrecision) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_writer_setdecimalprecision.invokeInt(new java.lang.Object[]{mHandle, decimalPrecision})); + } + + /** + * Activates (deactivates) the strict mode of the reader. + * + * @param strictModeActive flag whether strict mode is active or not. + * @throws Lib3MFException + */ + public void setStrictModeActive(boolean strictModeActive) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_writer_setstrictmodeactive.invokeInt(new java.lang.Object[]{mHandle, strictModeActive})); + } + + /** + * Queries whether the strict mode of the reader is active or not + * + * @return returns flag whether strict mode is active or not. + * @throws Lib3MFException + */ + public boolean getStrictModeActive() throws Lib3MFException { + Pointer bufferStrictModeActive = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_writer_getstrictmodeactive.invokeInt(new java.lang.Object[]{mHandle, bufferStrictModeActive})); + return bufferStrictModeActive.getByte(0) != 0; + } + + /** + * Returns Warning and Error Information of the read process + * + * @param index Index of the Warning. Valid values are 0 to WarningCount - 1 + * @return GetWarning Result Tuple + * @throws Lib3MFException + */ + public GetWarningResult getWarning(int index) throws Lib3MFException { + Pointer bufferErrorCode = new Memory(4); + Pointer bytesNeededWarning = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_writer_getwarning.invokeInt(new java.lang.Object[]{mHandle, index, bufferErrorCode, 0, bytesNeededWarning, null})); + int sizeWarning = bytesNeededWarning.getInt(0); + Pointer bufferWarning = new Memory(sizeWarning); + mWrapper.checkError(this, mWrapper.lib3mf_writer_getwarning.invokeInt(new java.lang.Object[]{mHandle, index, bufferErrorCode, sizeWarning, bytesNeededWarning, bufferWarning})); + GetWarningResult returnTuple = new GetWarningResult(); + returnTuple.ErrorCode = bufferErrorCode.getInt(0); + returnTuple.Warning = new String(bufferWarning.getByteArray(0, sizeWarning - 1), StandardCharsets.UTF_8); + return returnTuple; + } + + public static class GetWarningResult { + /** + * filled with the error code of the warning + */ + public int ErrorCode; + + /** + * the message of the warning + */ + public String Warning; + + } + /** + * Returns Warning and Error Count of the read process + * + * @return filled with the count of the occurred warnings. + * @throws Lib3MFException + */ + public int getWarningCount() throws Lib3MFException { + Pointer bufferCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_writer_getwarningcount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getInt(0); + } + + /** + * Registers a callback to deal with data key encryption/decryption from keystore + * + * @param consumerID The ConsumerID to register for + * @param theCallback The callback to be callede for wrapping and encryption key + * @param userData Userdata that is passed to the callback function + * @throws Lib3MFException + */ + public void addKeyWrappingCallback(String consumerID, Lib3MFWrapper.KeyWrappingCallback theCallback, Pointer userData) throws Lib3MFException { + byte[] bytesConsumerID = consumerID.getBytes(StandardCharsets.UTF_8); + Memory bufferConsumerID = new Memory(bytesConsumerID.length + 1); + bufferConsumerID.write(0, bytesConsumerID, 0, bytesConsumerID.length); + bufferConsumerID.setByte(bytesConsumerID.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_writer_addkeywrappingcallback.invokeInt(new java.lang.Object[]{mHandle, bufferConsumerID, theCallback, userData})); + } + + /** + * Registers a callback to deal with encryption of content + * + * @param theCallback The callback used to encrypt content + * @param userData Userdata that is passed to the callback function + * @throws Lib3MFException + */ + public void setContentEncryptionCallback(Lib3MFWrapper.ContentEncryptionCallback theCallback, Pointer userData) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_writer_setcontentencryptioncallback.invokeInt(new java.lang.Object[]{mHandle, theCallback, userData})); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/build_jar.sh b/Autogenerated/Bindings/Java9/build_jar.sh new file mode 100644 index 000000000..02819608f --- /dev/null +++ b/Autogenerated/Bindings/Java9/build_jar.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -euxo pipefail + +cd "$(dirname "$0")" +echo "Download JNA" +[ -f jna-5.5.0.jar ] || curl -O https://repo1.maven.org/maven2/net/java/dev/jna/jna/5.5.0/jna-5.5.0.jar + +echo "Compile Java Bindings" +javac -classpath *.jar lib3mf/* + +echo "Create JAR" +jar cvf lib3mf-2.5.0.jar lib3mf diff --git a/Autogenerated/Bindings/Java9/lib3mf/AbsNode.java b/Autogenerated/Bindings/Java9/lib3mf/AbsNode.java new file mode 100644 index 000000000..957af31fd --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/AbsNode.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class AbsNode extends OneInputNode { + + public AbsNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/AccessRight.java b/Autogenerated/Bindings/Java9/lib3mf/AccessRight.java new file mode 100644 index 000000000..e2ede36da --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/AccessRight.java @@ -0,0 +1,111 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class AccessRight extends Base { + + public AccessRight(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Gets the consumer associated with this access right + * + * @return The consumer instance + * @throws Lib3MFException + */ + public Consumer getConsumer() throws Lib3MFException { + Pointer bufferConsumer = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_accessright_getconsumer.invokeInt(new java.lang.Object[]{mHandle, bufferConsumer})); + Pointer valueConsumer = bufferConsumer.getPointer(0); + Consumer consumer = null; + if (valueConsumer == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Consumer was a null pointer"); + } + consumer = mWrapper.PolymorphicFactory(valueConsumer, Consumer.class); + return consumer; + } + + /** + * Gets the associated encryption algorithm + * + * @return The algorithm used for the key in this accessright + * @throws Lib3MFException + */ + public Lib3MFWrapper.WrappingAlgorithm getWrappingAlgorithm() throws Lib3MFException { + Pointer bufferAlgorithm = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_accessright_getwrappingalgorithm.invokeInt(new java.lang.Object[]{mHandle, bufferAlgorithm})); + return Lib3MFWrapper.EnumConversion.convertConstToWrappingAlgorithm(bufferAlgorithm.getInt(0)); + } + + /** + * Gets the associated mask generation function algorithm + * + * @return The MFG1 algorithm + * @throws Lib3MFException + */ + public Lib3MFWrapper.MgfAlgorithm getMgfAlgorithm() throws Lib3MFException { + Pointer bufferAlgorithm = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_accessright_getmgfalgorithm.invokeInt(new java.lang.Object[]{mHandle, bufferAlgorithm})); + return Lib3MFWrapper.EnumConversion.convertConstToMgfAlgorithm(bufferAlgorithm.getInt(0)); + } + + /** + * Gets the digest method assoicated + * + * @return The digest method for this accessright + * @throws Lib3MFException + */ + public Lib3MFWrapper.DigestMethod getDigestMethod() throws Lib3MFException { + Pointer bufferAlgorithm = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_accessright_getdigestmethod.invokeInt(new java.lang.Object[]{mHandle, bufferAlgorithm})); + return Lib3MFWrapper.EnumConversion.convertConstToDigestMethod(bufferAlgorithm.getInt(0)); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/AdditionNode.java b/Autogenerated/Bindings/Java9/lib3mf/AdditionNode.java new file mode 100644 index 000000000..8598e6a39 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/AdditionNode.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class AdditionNode extends TwoInputNode { + + public AdditionNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/ArcCosNode.java b/Autogenerated/Bindings/Java9/lib3mf/ArcCosNode.java new file mode 100644 index 000000000..e5155737f --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/ArcCosNode.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ArcCosNode extends OneInputNode { + + public ArcCosNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/ArcSinNode.java b/Autogenerated/Bindings/Java9/lib3mf/ArcSinNode.java new file mode 100644 index 000000000..8ac1ebe2a --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/ArcSinNode.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ArcSinNode extends OneInputNode { + + public ArcSinNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/ArcTan2Node.java b/Autogenerated/Bindings/Java9/lib3mf/ArcTan2Node.java new file mode 100644 index 000000000..3ef4aa2f3 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/ArcTan2Node.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ArcTan2Node extends TwoInputNode { + + public ArcTan2Node(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/ArcTanNode.java b/Autogenerated/Bindings/Java9/lib3mf/ArcTanNode.java new file mode 100644 index 000000000..e7fcec449 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/ArcTanNode.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ArcTanNode extends OneInputNode { + + public ArcTanNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/Attachment.java b/Autogenerated/Bindings/Java9/lib3mf/Attachment.java new file mode 100644 index 000000000..6054d35d6 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/Attachment.java @@ -0,0 +1,215 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Attachment extends Base { + + public Attachment(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves an attachment's package path. This function will be removed in a later release. + * + * @return returns the attachment's package path string + * @throws Lib3MFException + */ + public String getPath() throws Lib3MFException { + Pointer bytesNeededPath = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_attachment_getpath.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededPath, null})); + int sizePath = bytesNeededPath.getInt(0); + Pointer bufferPath = new Memory(sizePath); + mWrapper.checkError(this, mWrapper.lib3mf_attachment_getpath.invokeInt(new java.lang.Object[]{mHandle, sizePath, bytesNeededPath, bufferPath})); + return new String(bufferPath.getByteArray(0, sizePath - 1), StandardCharsets.UTF_8); + } + + /** + * Sets an attachment's package path. This function will be removed in a later release. + * + * @param path new path of the attachment. + * @throws Lib3MFException + */ + public void setPath(String path) throws Lib3MFException { + byte[] bytesPath = path.getBytes(StandardCharsets.UTF_8); + Memory bufferPath = new Memory(bytesPath.length + 1); + bufferPath.write(0, bytesPath, 0, bytesPath.length); + bufferPath.setByte(bytesPath.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_attachment_setpath.invokeInt(new java.lang.Object[]{mHandle, bufferPath})); + } + + /** + * Returns the PackagePart that is this attachment. + * + * @return The PackagePart of this attachment. + * @throws Lib3MFException + */ + public PackagePart packagePart() throws Lib3MFException { + Pointer bufferPackagePart = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_attachment_packagepart.invokeInt(new java.lang.Object[]{mHandle, bufferPackagePart})); + Pointer valuePackagePart = bufferPackagePart.getPointer(0); + PackagePart packagePart = null; + if (valuePackagePart == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "PackagePart was a null pointer"); + } + packagePart = mWrapper.PolymorphicFactory(valuePackagePart, PackagePart.class); + return packagePart; + } + + /** + * Retrieves an attachment's relationship type + * + * @return returns the attachment's package relationship type string + * @throws Lib3MFException + */ + public String getRelationShipType() throws Lib3MFException { + Pointer bytesNeededPath = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_attachment_getrelationshiptype.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededPath, null})); + int sizePath = bytesNeededPath.getInt(0); + Pointer bufferPath = new Memory(sizePath); + mWrapper.checkError(this, mWrapper.lib3mf_attachment_getrelationshiptype.invokeInt(new java.lang.Object[]{mHandle, sizePath, bytesNeededPath, bufferPath})); + return new String(bufferPath.getByteArray(0, sizePath - 1), StandardCharsets.UTF_8); + } + + /** + * Sets an attachment's relationship type. + * + * @param path new relationship type string. + * @throws Lib3MFException + */ + public void setRelationShipType(String path) throws Lib3MFException { + byte[] bytesPath = path.getBytes(StandardCharsets.UTF_8); + Memory bufferPath = new Memory(bytesPath.length + 1); + bufferPath.write(0, bytesPath, 0, bytesPath.length); + bufferPath.setByte(bytesPath.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_attachment_setrelationshiptype.invokeInt(new java.lang.Object[]{mHandle, bufferPath})); + } + + /** + * Writes out the attachment as file. + * + * @param fileName file to write into. + * @throws Lib3MFException + */ + public void writeToFile(String fileName) throws Lib3MFException { + byte[] bytesFileName = fileName.getBytes(StandardCharsets.UTF_8); + Memory bufferFileName = new Memory(bytesFileName.length + 1); + bufferFileName.write(0, bytesFileName, 0, bytesFileName.length); + bufferFileName.setByte(bytesFileName.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_attachment_writetofile.invokeInt(new java.lang.Object[]{mHandle, bufferFileName})); + } + + /** + * Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer methods. + * + * @param fileName file to read from. + * @throws Lib3MFException + */ + public void readFromFile(String fileName) throws Lib3MFException { + byte[] bytesFileName = fileName.getBytes(StandardCharsets.UTF_8); + Memory bufferFileName = new Memory(bytesFileName.length + 1); + bufferFileName.write(0, bytesFileName, 0, bytesFileName.length); + bufferFileName.setByte(bytesFileName.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_attachment_readfromfile.invokeInt(new java.lang.Object[]{mHandle, bufferFileName})); + } + + /** + * Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer methods. + * + * @param theReadCallback Callback to call for reading a data chunk + * @param streamSize number of bytes the callback returns + * @param theSeekCallback Callback to call for seeking in the stream. + * @param userData Userdata that is passed to the callback function + * @throws Lib3MFException + */ + public void readFromCallback(Lib3MFWrapper.ReadCallback theReadCallback, long streamSize, Lib3MFWrapper.SeekCallback theSeekCallback, Pointer userData) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_attachment_readfromcallback.invokeInt(new java.lang.Object[]{mHandle, theReadCallback, streamSize, theSeekCallback, userData})); + } + + /** + * Retrieves the size of the attachment stream + * + * @return the stream size + * @throws Lib3MFException + */ + public long getStreamSize() throws Lib3MFException { + Pointer bufferStreamSize = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_attachment_getstreamsize.invokeInt(new java.lang.Object[]{mHandle, bufferStreamSize})); + return bufferStreamSize.getLong(0); + } + + /** + * Writes out the attachment into a buffer + * + * @return Buffer to write into + * @throws Lib3MFException + */ + public byte[] writeToBuffer() throws Lib3MFException { + Pointer countNeededBuffer = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_attachment_writetobuffer.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededBuffer, Pointer.NULL})); + long countBuffer = countNeededBuffer.getLong(0); + Pointer bufferBuffer = new Memory(Math.max(1, 1 * countBuffer)); + mWrapper.checkError(this, mWrapper.lib3mf_attachment_writetobuffer.invokeInt(new java.lang.Object[]{mHandle, countBuffer, countNeededBuffer, bufferBuffer})); + return bufferBuffer.getByteArray(0, (int)countBuffer); + } + + /** + * Reads an attachment from a memory buffer. This buffer is immediately read (in contrast to the ReadFromCallback and ReadFromFile-methods). + * + * @param buffer Buffer to read from + * @throws Lib3MFException + */ + public void readFromBuffer(byte[] buffer) throws Lib3MFException { + Pointer bufferBuffer = new Memory(Math.max(1, 1 * buffer.length)); + for (int i = 0; i < buffer.length; i++) { + bufferBuffer.setByte(1 * i, buffer[i]); + } + mWrapper.checkError(this, mWrapper.lib3mf_attachment_readfrombuffer.invokeInt(new java.lang.Object[]{mHandle, (long) buffer.length, bufferBuffer})); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/Ball.java b/Autogenerated/Bindings/Java9/lib3mf/Ball.java new file mode 100644 index 000000000..c01b96185 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/Ball.java @@ -0,0 +1,63 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Memory; +import com.sun.jna.Pointer; + +import java.util.Arrays; +import java.util.List; + +public class Ball { + + public int Index; + + public double Radius; + + public static final int SIZE = 12; + + public void readFromPointer(Pointer p, long offset) { + Index = p.getInt(offset + 0); + Radius = p.getDouble(offset + 4); + } + + public void writeToPointer(Pointer p, long offset) { + p.setInt(offset + 0, Index); + p.setDouble(offset + 4, Radius); + } + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/Base.java b/Autogenerated/Bindings/Java9/lib3mf/Base.java new file mode 100644 index 000000000..4c4e5b2e2 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/Base.java @@ -0,0 +1,101 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Base { + + protected static final Cleaner mCleaner = Cleaner.create(); + + protected Pointer mHandle; + + protected Lib3MFWrapper mWrapper; + + public Base(Lib3MFWrapper wrapper, Pointer handle) { + mHandle = handle; + mWrapper = wrapper; + mCleaner.register(this, new InstanceReleaser(this)); + } + + public Pointer getHandle() { + return mHandle; + } + + protected static class InstanceReleaser implements Runnable{ + + protected Pointer mHandle; + + protected Lib3MFWrapper mWrapper; + + protected InstanceReleaser(Base instance) { + mHandle = instance.mHandle; + mWrapper = instance.mWrapper; + } + + @Override + public void run() { + try { + mWrapper.checkError(null, mWrapper.lib3mf_release.invokeInt(new java.lang.Object[]{mHandle})); + } catch (Lib3MFException e) { + e.printStackTrace(); + } + } + } + /** + * Get Class Type Id + * + * @return Class type as a 64 bits integer + * @throws Lib3MFException + */ + public long classTypeId() throws Lib3MFException { + Pointer bufferClassTypeId = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_base_classtypeid.invokeInt(new java.lang.Object[]{mHandle, bufferClassTypeId})); + return bufferClassTypeId.getLong(0); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/BaseMaterialGroup.java b/Autogenerated/Bindings/Java9/lib3mf/BaseMaterialGroup.java new file mode 100644 index 000000000..d90668096 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/BaseMaterialGroup.java @@ -0,0 +1,173 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class BaseMaterialGroup extends Resource { + + public BaseMaterialGroup(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the count of base materials in the material group. + * + * @return returns the count of base materials. + * @throws Lib3MFException + */ + public int getCount() throws Lib3MFException { + Pointer bufferCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_basematerialgroup_getcount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getInt(0); + } + + /** + * returns all the PropertyIDs of all materials in this group + * + * @return PropertyID of the material in the material group. + * @throws Lib3MFException + */ + public int[] getAllPropertyIDs() throws Lib3MFException { + Pointer countNeededPropertyIDs = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_basematerialgroup_getallpropertyids.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededPropertyIDs, Pointer.NULL})); + long countPropertyIDs = countNeededPropertyIDs.getLong(0); + Pointer bufferPropertyIDs = new Memory(Math.max(1, 4 * countPropertyIDs)); + mWrapper.checkError(this, mWrapper.lib3mf_basematerialgroup_getallpropertyids.invokeInt(new java.lang.Object[]{mHandle, countPropertyIDs, countNeededPropertyIDs, bufferPropertyIDs})); + return bufferPropertyIDs.getIntArray(0, (int)countPropertyIDs); + } + + /** + * Adds a new material to the material group + * + * @param name new name of the base material. + * @param displayColor Display color of the material + * @return returns new PropertyID of the new material in the material group. + * @throws Lib3MFException + */ + public int addMaterial(String name, Color displayColor) throws Lib3MFException { + byte[] bytesName = name.getBytes(StandardCharsets.UTF_8); + Memory bufferName = new Memory(bytesName.length + 1); + bufferName.write(0, bytesName, 0, bytesName.length); + bufferName.setByte(bytesName.length, (byte)0); + Pointer bufferDisplayColor = new Memory(Color.SIZE); + displayColor.writeToPointer(bufferDisplayColor, 0); + Pointer bufferPropertyID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_basematerialgroup_addmaterial.invokeInt(new java.lang.Object[]{mHandle, bufferName, bufferDisplayColor, bufferPropertyID})); + return bufferPropertyID.getInt(0); + } + + /** + * Removes a material from the material group. + * + * @param propertyID PropertyID of the material in the material group. + * @throws Lib3MFException + */ + public void removeMaterial(int propertyID) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_basematerialgroup_removematerial.invokeInt(new java.lang.Object[]{mHandle, propertyID})); + } + + /** + * Returns the base material's name + * + * @param propertyID PropertyID of the material in the material group. + * @return returns the name of the base material. + * @throws Lib3MFException + */ + public String getName(int propertyID) throws Lib3MFException { + Pointer bytesNeededName = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_basematerialgroup_getname.invokeInt(new java.lang.Object[]{mHandle, propertyID, 0, bytesNeededName, null})); + int sizeName = bytesNeededName.getInt(0); + Pointer bufferName = new Memory(sizeName); + mWrapper.checkError(this, mWrapper.lib3mf_basematerialgroup_getname.invokeInt(new java.lang.Object[]{mHandle, propertyID, sizeName, bytesNeededName, bufferName})); + return new String(bufferName.getByteArray(0, sizeName - 1), StandardCharsets.UTF_8); + } + + /** + * Sets a base material's name + * + * @param propertyID PropertyID of the material in the material group. + * @param name new name of the base material. + * @throws Lib3MFException + */ + public void setName(int propertyID, String name) throws Lib3MFException { + byte[] bytesName = name.getBytes(StandardCharsets.UTF_8); + Memory bufferName = new Memory(bytesName.length + 1); + bufferName.write(0, bytesName, 0, bytesName.length); + bufferName.setByte(bytesName.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_basematerialgroup_setname.invokeInt(new java.lang.Object[]{mHandle, propertyID, bufferName})); + } + + /** + * Sets a base material's display color. + * + * @param propertyID PropertyID of the material in the material group. + * @param theColor The base material's display color + * @throws Lib3MFException + */ + public void setDisplayColor(int propertyID, Color theColor) throws Lib3MFException { + Pointer bufferTheColor = new Memory(Color.SIZE); + theColor.writeToPointer(bufferTheColor, 0); + mWrapper.checkError(this, mWrapper.lib3mf_basematerialgroup_setdisplaycolor.invokeInt(new java.lang.Object[]{mHandle, propertyID, bufferTheColor})); + } + + /** + * Returns a base material's display color. + * + * @param propertyID PropertyID of the material in the material group. + * @return The base material's display color + * @throws Lib3MFException + */ + public Color getDisplayColor(int propertyID) throws Lib3MFException { + Pointer bufferTheColor = new Memory(Color.SIZE); + mWrapper.checkError(this, mWrapper.lib3mf_basematerialgroup_getdisplaycolor.invokeInt(new java.lang.Object[]{mHandle, propertyID, bufferTheColor})); + Color theColor = new Color(); + theColor.readFromPointer(bufferTheColor, 0); + return theColor; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/BaseMaterialGroupIterator.java b/Autogenerated/Bindings/Java9/lib3mf/BaseMaterialGroupIterator.java new file mode 100644 index 000000000..71fd65b9e --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/BaseMaterialGroupIterator.java @@ -0,0 +1,75 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class BaseMaterialGroupIterator extends ResourceIterator { + + public BaseMaterialGroupIterator(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the MaterialGroup the iterator points at. + * + * @return returns the BaseMaterialGroup instance. + * @throws Lib3MFException + */ + public BaseMaterialGroup getCurrentBaseMaterialGroup() throws Lib3MFException { + Pointer bufferResource = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_basematerialgroupiterator_getcurrentbasematerialgroup.invokeInt(new java.lang.Object[]{mHandle, bufferResource})); + Pointer valueResource = bufferResource.getPointer(0); + BaseMaterialGroup resource = null; + if (valueResource == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Resource was a null pointer"); + } + resource = mWrapper.PolymorphicFactory(valueResource, BaseMaterialGroup.class); + return resource; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/Beam.java b/Autogenerated/Bindings/Java9/lib3mf/Beam.java new file mode 100644 index 000000000..40cbe6400 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/Beam.java @@ -0,0 +1,73 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Memory; +import com.sun.jna.Pointer; + +import java.util.Arrays; +import java.util.List; + +public class Beam { + + public int[] Indices = new int[2]; + + public double[] Radii = new double[2]; + + public int[] CapModes = new int[2]; + + public static final int SIZE = 32; + + public void readFromPointer(Pointer p, long offset) { + Indices[0] = p.getInt(offset + 0); + Indices[1] = p.getInt(offset + 4); + Radii[0] = p.getDouble(offset + 8); + Radii[1] = p.getDouble(offset + 16); + CapModes[0] = p.getInt(offset + 24); + CapModes[1] = p.getInt(offset + 28); + } + + public void writeToPointer(Pointer p, long offset) { + p.setInt(offset + 0, Indices[0]); + p.setInt(offset + 4, Indices[1]); + p.setDouble(offset + 8, Radii[0]); + p.setDouble(offset + 16, Radii[1]); + p.setInt(offset + 24, CapModes[0]); + p.setInt(offset + 28, CapModes[1]); + } + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/BeamLattice.java b/Autogenerated/Bindings/Java9/lib3mf/BeamLattice.java new file mode 100644 index 000000000..bd3313a3f --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/BeamLattice.java @@ -0,0 +1,422 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class BeamLattice extends Base { + + public BeamLattice(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the minimal length of beams for the beamlattice. + * + * @return minimal length of beams for the beamlattice + * @throws Lib3MFException + */ + public double getMinLength() throws Lib3MFException { + Pointer bufferMinLength = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_getminlength.invokeInt(new java.lang.Object[]{mHandle, bufferMinLength})); + return bufferMinLength.getDouble(0); + } + + /** + * Sets the minimal length of beams for the beamlattice. + * + * @param minLength minimal length of beams for the beamlattice + * @throws Lib3MFException + */ + public void setMinLength(double minLength) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_setminlength.invokeInt(new java.lang.Object[]{mHandle, minLength})); + } + + /** + * Returns the clipping mode and the clipping-mesh for the beamlattice of this mesh. + * + * @return GetClipping Result Tuple + * @throws Lib3MFException + */ + public GetClippingResult getClipping() throws Lib3MFException { + Pointer bufferClipMode = new Memory(4); + Pointer bufferUniqueResourceID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_getclipping.invokeInt(new java.lang.Object[]{mHandle, bufferClipMode, bufferUniqueResourceID})); + GetClippingResult returnTuple = new GetClippingResult(); + returnTuple.ClipMode = Lib3MFWrapper.EnumConversion.convertConstToBeamLatticeClipMode(bufferClipMode.getInt(0)); + returnTuple.UniqueResourceID = bufferUniqueResourceID.getInt(0); + return returnTuple; + } + + public static class GetClippingResult { + /** + * contains the clip mode of this mesh + */ + public Lib3MFWrapper.BeamLatticeClipMode ClipMode; + + /** + * filled with the UniqueResourceID of the clipping mesh-object or an undefined value if pClipMode is MODELBEAMLATTICECLIPMODE_NONE + */ + public int UniqueResourceID; + + } + /** + * Sets the clipping mode and the clipping-mesh for the beamlattice of this mesh. + * + * @param clipMode contains the clip mode of this mesh + * @param uniqueResourceID the UniqueResourceID of the clipping mesh-object. This mesh-object has to be defined before setting the Clipping. + * @throws Lib3MFException + */ + public void setClipping(Lib3MFWrapper.BeamLatticeClipMode clipMode, int uniqueResourceID) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_setclipping.invokeInt(new java.lang.Object[]{mHandle, Lib3MFWrapper.EnumConversion.convertBeamLatticeClipModeToConst(clipMode), uniqueResourceID})); + } + + /** + * Returns the representation-mesh for the beamlattice of this mesh. + * + * @return GetRepresentation Result Tuple + * @throws Lib3MFException + */ + public GetRepresentationResult getRepresentation() throws Lib3MFException { + Pointer bufferHasRepresentation = new Memory(1); + Pointer bufferUniqueResourceID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_getrepresentation.invokeInt(new java.lang.Object[]{mHandle, bufferHasRepresentation, bufferUniqueResourceID})); + GetRepresentationResult returnTuple = new GetRepresentationResult(); + returnTuple.HasRepresentation = bufferHasRepresentation.getByte(0) != 0; + returnTuple.UniqueResourceID = bufferUniqueResourceID.getInt(0); + return returnTuple; + } + + public static class GetRepresentationResult { + /** + * flag whether the beamlattice has a representation mesh. + */ + public boolean HasRepresentation; + + /** + * filled with the UniqueResourceID of the clipping mesh-object. + */ + public int UniqueResourceID; + + } + /** + * Sets the representation-mesh for the beamlattice of this mesh. + * + * @param uniqueResourceID the UniqueResourceID of the representation mesh-object. This mesh-object has to be defined before setting the representation. + * @throws Lib3MFException + */ + public void setRepresentation(int uniqueResourceID) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_setrepresentation.invokeInt(new java.lang.Object[]{mHandle, uniqueResourceID})); + } + + /** + * Returns the ball mode and the default ball radius for the beamlattice of this mesh. + * + * @return GetBallOptions Result Tuple + * @throws Lib3MFException + */ + public GetBallOptionsResult getBallOptions() throws Lib3MFException { + Pointer bufferBallMode = new Memory(4); + Pointer bufferBallRadius = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_getballoptions.invokeInt(new java.lang.Object[]{mHandle, bufferBallMode, bufferBallRadius})); + GetBallOptionsResult returnTuple = new GetBallOptionsResult(); + returnTuple.BallMode = Lib3MFWrapper.EnumConversion.convertConstToBeamLatticeBallMode(bufferBallMode.getInt(0)); + returnTuple.BallRadius = bufferBallRadius.getDouble(0); + return returnTuple; + } + + public static class GetBallOptionsResult { + /** + * contains the ball mode of this mesh + */ + public Lib3MFWrapper.BeamLatticeBallMode BallMode; + + /** + * default ball radius of balls for the beamlattice + */ + public double BallRadius; + + } + /** + * Sets the ball mode and thedefault ball radius for the beamlattice. + * + * @param ballMode contains the ball mode of this mesh + * @param ballRadius default ball radius of balls for the beamlattice + * @throws Lib3MFException + */ + public void setBallOptions(Lib3MFWrapper.BeamLatticeBallMode ballMode, double ballRadius) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_setballoptions.invokeInt(new java.lang.Object[]{mHandle, Lib3MFWrapper.EnumConversion.convertBeamLatticeBallModeToConst(ballMode), ballRadius})); + } + + /** + * Returns the beam count of a mesh object. + * + * @return filled with the beam count. + * @throws Lib3MFException + */ + public int getBeamCount() throws Lib3MFException { + Pointer bufferCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_getbeamcount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getInt(0); + } + + /** + * Returns indices, radii and capmodes of a single beam of a mesh object. + * + * @param index Index of the beam (0 to beamcount - 1). + * @return filled with the beam indices, radii and capmodes. + * @throws Lib3MFException + */ + public Beam getBeam(int index) throws Lib3MFException { + Pointer bufferBeamInfo = new Memory(Beam.SIZE); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_getbeam.invokeInt(new java.lang.Object[]{mHandle, index, bufferBeamInfo})); + Beam beamInfo = new Beam(); + beamInfo.readFromPointer(bufferBeamInfo, 0); + return beamInfo; + } + + /** + * Adds a single beam to a mesh object. + * + * @param beamInfo contains the node indices, radii and capmodes. + * @return filled with the new Index of the beam. + * @throws Lib3MFException + */ + public int addBeam(Beam beamInfo) throws Lib3MFException { + Pointer bufferBeamInfo = new Memory(Beam.SIZE); + beamInfo.writeToPointer(bufferBeamInfo, 0); + Pointer bufferIndex = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_addbeam.invokeInt(new java.lang.Object[]{mHandle, bufferBeamInfo, bufferIndex})); + return bufferIndex.getInt(0); + } + + /** + * Sets the indices, radii and capmodes of a single beam of a mesh object. + * + * @param index Index of the beam (0 to beamcount - 1). + * @param beamInfo filled with the beam indices, radii and capmodes. + * @throws Lib3MFException + */ + public void setBeam(int index, Beam beamInfo) throws Lib3MFException { + Pointer bufferBeamInfo = new Memory(Beam.SIZE); + beamInfo.writeToPointer(bufferBeamInfo, 0); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_setbeam.invokeInt(new java.lang.Object[]{mHandle, index, bufferBeamInfo})); + } + + /** + * Sets all beam indices, radii and capmodes of a mesh object. + * + * @param beamInfo contains information of a number of beams + * @throws Lib3MFException + */ + public void setBeams(Beam[] beamInfo) throws Lib3MFException { + Pointer bufferBeamInfo = new Memory(Math.max(1, Beam.SIZE * beamInfo.length)); + for (int i = 0; i < beamInfo.length; i++) { + beamInfo[i].writeToPointer(bufferBeamInfo, i * Beam.SIZE); + } + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_setbeams.invokeInt(new java.lang.Object[]{mHandle, (long) beamInfo.length, bufferBeamInfo})); + } + + /** + * obtains all beam indices, radii and capmodes of a mesh object. + * + * @return contains information of all beams + * @throws Lib3MFException + */ + public Beam[] getBeams() throws Lib3MFException { + Pointer countNeededBeamInfo = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_getbeams.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededBeamInfo, null})); + long countBeamInfo = countNeededBeamInfo.getLong(0); + Pointer bufferBeamInfo = new Memory(Math.max(1, countBeamInfo * Beam.SIZE)); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_getbeams.invokeInt(new java.lang.Object[]{mHandle, countBeamInfo, countNeededBeamInfo, bufferBeamInfo})); + Beam beamInfo[] = new Beam[(int)countBeamInfo]; + for (int i = 0; i < (int)countBeamInfo; i++) { + beamInfo[i] = new Beam(); + beamInfo[i].readFromPointer(bufferBeamInfo, i * Beam.SIZE); + } + return beamInfo; + } + + /** + * Returns the ball count of a mesh object. + * + * @return filled with the ball count. + * @throws Lib3MFException + */ + public int getBallCount() throws Lib3MFException { + Pointer bufferCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_getballcount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getInt(0); + } + + /** + * Returns index and radius of a single ball of a mesh object. + * + * @param index Index of the ball (0 to ballcount - 1). + * @return filled with the ball node index and radius. + * @throws Lib3MFException + */ + public Ball getBall(int index) throws Lib3MFException { + Pointer bufferBallInfo = new Memory(Ball.SIZE); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_getball.invokeInt(new java.lang.Object[]{mHandle, index, bufferBallInfo})); + Ball ballInfo = new Ball(); + ballInfo.readFromPointer(bufferBallInfo, 0); + return ballInfo; + } + + /** + * Adds a single ball to a mesh object. + * + * @param ballInfo contains the node index and radius. + * @return filled with the new Index of the ball. + * @throws Lib3MFException + */ + public int addBall(Ball ballInfo) throws Lib3MFException { + Pointer bufferBallInfo = new Memory(Ball.SIZE); + ballInfo.writeToPointer(bufferBallInfo, 0); + Pointer bufferIndex = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_addball.invokeInt(new java.lang.Object[]{mHandle, bufferBallInfo, bufferIndex})); + return bufferIndex.getInt(0); + } + + /** + * Sets the index and radius of a single ball of a mesh object. + * + * @param index Index of the ball (0 to ballcount - 1). + * @param ballInfo filled with the ball node index and radius. + * @throws Lib3MFException + */ + public void setBall(int index, Ball ballInfo) throws Lib3MFException { + Pointer bufferBallInfo = new Memory(Ball.SIZE); + ballInfo.writeToPointer(bufferBallInfo, 0); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_setball.invokeInt(new java.lang.Object[]{mHandle, index, bufferBallInfo})); + } + + /** + * Sets all ball indices and radii of a mesh object. + * + * @param ballInfo contains information of a number of balls + * @throws Lib3MFException + */ + public void setBalls(Ball[] ballInfo) throws Lib3MFException { + Pointer bufferBallInfo = new Memory(Math.max(1, Ball.SIZE * ballInfo.length)); + for (int i = 0; i < ballInfo.length; i++) { + ballInfo[i].writeToPointer(bufferBallInfo, i * Ball.SIZE); + } + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_setballs.invokeInt(new java.lang.Object[]{mHandle, (long) ballInfo.length, bufferBallInfo})); + } + + /** + * obtains all ball indices and radii of a mesh object. + * + * @return contains information of all balls + * @throws Lib3MFException + */ + public Ball[] getBalls() throws Lib3MFException { + Pointer countNeededBallInfo = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_getballs.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededBallInfo, null})); + long countBallInfo = countNeededBallInfo.getLong(0); + Pointer bufferBallInfo = new Memory(Math.max(1, countBallInfo * Ball.SIZE)); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_getballs.invokeInt(new java.lang.Object[]{mHandle, countBallInfo, countNeededBallInfo, bufferBallInfo})); + Ball ballInfo[] = new Ball[(int)countBallInfo]; + for (int i = 0; i < (int)countBallInfo; i++) { + ballInfo[i] = new Ball(); + ballInfo[i].readFromPointer(bufferBallInfo, i * Ball.SIZE); + } + return ballInfo; + } + + /** + * Returns the number of beamsets of a mesh object. + * + * @return filled with the beamset count. + * @throws Lib3MFException + */ + public int getBeamSetCount() throws Lib3MFException { + Pointer bufferCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_getbeamsetcount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getInt(0); + } + + /** + * Adds an empty beamset to a mesh object + * + * @return the new beamset + * @throws Lib3MFException + */ + public BeamSet addBeamSet() throws Lib3MFException { + Pointer bufferBeamSet = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_addbeamset.invokeInt(new java.lang.Object[]{mHandle, bufferBeamSet})); + Pointer valueBeamSet = bufferBeamSet.getPointer(0); + BeamSet beamSet = null; + if (valueBeamSet == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "BeamSet was a null pointer"); + } + beamSet = mWrapper.PolymorphicFactory(valueBeamSet, BeamSet.class); + return beamSet; + } + + /** + * Returns a beamset of a mesh object + * + * @param index index of the requested beamset (0 ... beamsetcount-1). + * @return the requested beamset + * @throws Lib3MFException + */ + public BeamSet getBeamSet(int index) throws Lib3MFException { + Pointer bufferBeamSet = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_beamlattice_getbeamset.invokeInt(new java.lang.Object[]{mHandle, index, bufferBeamSet})); + Pointer valueBeamSet = bufferBeamSet.getPointer(0); + BeamSet beamSet = null; + if (valueBeamSet == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "BeamSet was a null pointer"); + } + beamSet = mWrapper.PolymorphicFactory(valueBeamSet, BeamSet.class); + return beamSet; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/BeamLatticeNode.java b/Autogenerated/Bindings/Java9/lib3mf/BeamLatticeNode.java new file mode 100644 index 000000000..80904d2e2 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/BeamLatticeNode.java @@ -0,0 +1,133 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class BeamLatticeNode extends ImplicitNode { + + public BeamLatticeNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the input for the model resource id of the beam lattice + * + * @return the input port for the model resource id of the beam lattice (mesh with beamlattice extension) + * @throws Lib3MFException + */ + public ImplicitPort getInputBeamLattice() throws Lib3MFException { + Pointer bufferBeamLattice = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_beamlatticenode_getinputbeamlattice.invokeInt(new java.lang.Object[]{mHandle, bufferBeamLattice})); + Pointer valueBeamLattice = bufferBeamLattice.getPointer(0); + ImplicitPort beamLattice = null; + if (valueBeamLattice == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "BeamLattice was a null pointer"); + } + beamLattice = mWrapper.PolymorphicFactory(valueBeamLattice, ImplicitPort.class); + return beamLattice; + } + + /** + * Retrieves the input for the position + * + * @return the input port for the position + * @throws Lib3MFException + */ + public ImplicitPort getInputPos() throws Lib3MFException { + Pointer bufferPos = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_beamlatticenode_getinputpos.invokeInt(new java.lang.Object[]{mHandle, bufferPos})); + Pointer valuePos = bufferPos.getPointer(0); + ImplicitPort pos = null; + if (valuePos == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Pos was a null pointer"); + } + pos = mWrapper.PolymorphicFactory(valuePos, ImplicitPort.class); + return pos; + } + + /** + * Retrieves the output + * + * @return the output port for the signed distance to the beam lattice + * @throws Lib3MFException + */ + public ImplicitPort getOutputDistance() throws Lib3MFException { + Pointer bufferDistance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_beamlatticenode_getoutputdistance.invokeInt(new java.lang.Object[]{mHandle, bufferDistance})); + Pointer valueDistance = bufferDistance.getPointer(0); + ImplicitPort distance = null; + if (valueDistance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Distance was a null pointer"); + } + distance = mWrapper.PolymorphicFactory(valueDistance, ImplicitPort.class); + return distance; + } + + /** + * Sets the accurate range for distance computation + * + * @param accurateRange the accurate range in model units + * @throws Lib3MFException + */ + public void setAccurateRange(double accurateRange) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_beamlatticenode_setaccuraterange.invokeInt(new java.lang.Object[]{mHandle, accurateRange})); + } + + /** + * Retrieves the accurate range for distance computation + * + * @return the accurate range in model units + * @throws Lib3MFException + */ + public double getAccurateRange() throws Lib3MFException { + Pointer bufferAccurateRange = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_beamlatticenode_getaccuraterange.invokeInt(new java.lang.Object[]{mHandle, bufferAccurateRange})); + return bufferAccurateRange.getDouble(0); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/BeamSet.java b/Autogenerated/Bindings/Java9/lib3mf/BeamSet.java new file mode 100644 index 000000000..db06c5e0a --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/BeamSet.java @@ -0,0 +1,197 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class BeamSet extends Base { + + public BeamSet(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Sets a beamset's name string + * + * @param name new name of the beamset. + * @throws Lib3MFException + */ + public void setName(String name) throws Lib3MFException { + byte[] bytesName = name.getBytes(StandardCharsets.UTF_8); + Memory bufferName = new Memory(bytesName.length + 1); + bufferName.write(0, bytesName, 0, bytesName.length); + bufferName.setByte(bytesName.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_beamset_setname.invokeInt(new java.lang.Object[]{mHandle, bufferName})); + } + + /** + * Retrieves a beamset's name string + * + * @return returns the name of the beamset. + * @throws Lib3MFException + */ + public String getName() throws Lib3MFException { + Pointer bytesNeededName = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_beamset_getname.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededName, null})); + int sizeName = bytesNeededName.getInt(0); + Pointer bufferName = new Memory(sizeName); + mWrapper.checkError(this, mWrapper.lib3mf_beamset_getname.invokeInt(new java.lang.Object[]{mHandle, sizeName, bytesNeededName, bufferName})); + return new String(bufferName.getByteArray(0, sizeName - 1), StandardCharsets.UTF_8); + } + + /** + * Sets a beamset's identifier string + * + * @param identifier new name of the beamset. + * @throws Lib3MFException + */ + public void setIdentifier(String identifier) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_beamset_setidentifier.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier})); + } + + /** + * Retrieves a beamset's identifier string + * + * @return returns the identifier of the beamset. + * @throws Lib3MFException + */ + public String getIdentifier() throws Lib3MFException { + Pointer bytesNeededIdentifier = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_beamset_getidentifier.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededIdentifier, null})); + int sizeIdentifier = bytesNeededIdentifier.getInt(0); + Pointer bufferIdentifier = new Memory(sizeIdentifier); + mWrapper.checkError(this, mWrapper.lib3mf_beamset_getidentifier.invokeInt(new java.lang.Object[]{mHandle, sizeIdentifier, bytesNeededIdentifier, bufferIdentifier})); + return new String(bufferIdentifier.getByteArray(0, sizeIdentifier - 1), StandardCharsets.UTF_8); + } + + /** + * Retrieves the reference count of a beamset + * + * @return returns the reference count + * @throws Lib3MFException + */ + public int getReferenceCount() throws Lib3MFException { + Pointer bufferCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_beamset_getreferencecount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getInt(0); + } + + /** + * Sets the references of a beamset + * + * @param references the new indices of all beams in this beamset + * @throws Lib3MFException + */ + public void setReferences(int[] references) throws Lib3MFException { + Pointer bufferReferences = new Memory(Math.max(1, 4 * references.length)); + for (int i = 0; i < references.length; i++) { + bufferReferences.setInt(4 * i, references[i]); + } + mWrapper.checkError(this, mWrapper.lib3mf_beamset_setreferences.invokeInt(new java.lang.Object[]{mHandle, (long) references.length, bufferReferences})); + } + + /** + * Retrieves the references of a beamset + * + * @return retrieves the indices of all beams in this beamset + * @throws Lib3MFException + */ + public int[] getReferences() throws Lib3MFException { + Pointer countNeededReferences = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_beamset_getreferences.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededReferences, Pointer.NULL})); + long countReferences = countNeededReferences.getLong(0); + Pointer bufferReferences = new Memory(Math.max(1, 4 * countReferences)); + mWrapper.checkError(this, mWrapper.lib3mf_beamset_getreferences.invokeInt(new java.lang.Object[]{mHandle, countReferences, countNeededReferences, bufferReferences})); + return bufferReferences.getIntArray(0, (int)countReferences); + } + + /** + * Retrieves the ball reference count of a beamset + * + * @return returns the ball reference count + * @throws Lib3MFException + */ + public int getBallReferenceCount() throws Lib3MFException { + Pointer bufferCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_beamset_getballreferencecount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getInt(0); + } + + /** + * Sets the ball references of a beamset + * + * @param ballReferences the new indices of all balls in this beamset + * @throws Lib3MFException + */ + public void setBallReferences(int[] ballReferences) throws Lib3MFException { + Pointer bufferBallReferences = new Memory(Math.max(1, 4 * ballReferences.length)); + for (int i = 0; i < ballReferences.length; i++) { + bufferBallReferences.setInt(4 * i, ballReferences[i]); + } + mWrapper.checkError(this, mWrapper.lib3mf_beamset_setballreferences.invokeInt(new java.lang.Object[]{mHandle, (long) ballReferences.length, bufferBallReferences})); + } + + /** + * Retrieves the ball references of a beamset + * + * @return retrieves the indices of all balls in this beamset + * @throws Lib3MFException + */ + public int[] getBallReferences() throws Lib3MFException { + Pointer countNeededBallReferences = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_beamset_getballreferences.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededBallReferences, Pointer.NULL})); + long countBallReferences = countNeededBallReferences.getLong(0); + Pointer bufferBallReferences = new Memory(Math.max(1, 4 * countBallReferences)); + mWrapper.checkError(this, mWrapper.lib3mf_beamset_getballreferences.invokeInt(new java.lang.Object[]{mHandle, countBallReferences, countNeededBallReferences, bufferBallReferences})); + return bufferBallReferences.getIntArray(0, (int)countBallReferences); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/Box.java b/Autogenerated/Bindings/Java9/lib3mf/Box.java new file mode 100644 index 000000000..70a3484e0 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/Box.java @@ -0,0 +1,71 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Memory; +import com.sun.jna.Pointer; + +import java.util.Arrays; +import java.util.List; + +public class Box { + + public float[] MinCoordinate = new float[3]; + + public float[] MaxCoordinate = new float[3]; + + public static final int SIZE = 24; + + public void readFromPointer(Pointer p, long offset) { + MinCoordinate[0] = p.getFloat(offset + 0); + MinCoordinate[1] = p.getFloat(offset + 4); + MinCoordinate[2] = p.getFloat(offset + 8); + MaxCoordinate[0] = p.getFloat(offset + 12); + MaxCoordinate[1] = p.getFloat(offset + 16); + MaxCoordinate[2] = p.getFloat(offset + 20); + } + + public void writeToPointer(Pointer p, long offset) { + p.setFloat(offset + 0, MinCoordinate[0]); + p.setFloat(offset + 4, MinCoordinate[1]); + p.setFloat(offset + 8, MinCoordinate[2]); + p.setFloat(offset + 12, MaxCoordinate[0]); + p.setFloat(offset + 16, MaxCoordinate[1]); + p.setFloat(offset + 20, MaxCoordinate[2]); + } + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/BuildItem.java b/Autogenerated/Bindings/Java9/lib3mf/BuildItem.java new file mode 100644 index 000000000..40afd4c09 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/BuildItem.java @@ -0,0 +1,231 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class BuildItem extends Base { + + public BuildItem(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the object resource associated to a build item + * + * @return returns the associated resource instance + * @throws Lib3MFException + */ + public Object getObjectResource() throws Lib3MFException { + Pointer bufferObjectResource = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_builditem_getobjectresource.invokeInt(new java.lang.Object[]{mHandle, bufferObjectResource})); + Pointer valueObjectResource = bufferObjectResource.getPointer(0); + Object objectResource = null; + if (valueObjectResource == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ObjectResource was a null pointer"); + } + objectResource = mWrapper.PolymorphicFactory(valueObjectResource, Object.class); + return objectResource; + } + + /** + * returns, whether a build item has a UUID and, if true, the build item's UUID + * + * @return GetUUID Result Tuple + * @throws Lib3MFException + */ + public GetUUIDResult getUUID() throws Lib3MFException { + Pointer bufferHasUUID = new Memory(1); + Pointer bytesNeededUUID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_builditem_getuuid.invokeInt(new java.lang.Object[]{mHandle, bufferHasUUID, 0, bytesNeededUUID, null})); + int sizeUUID = bytesNeededUUID.getInt(0); + Pointer bufferUUID = new Memory(sizeUUID); + mWrapper.checkError(this, mWrapper.lib3mf_builditem_getuuid.invokeInt(new java.lang.Object[]{mHandle, bufferHasUUID, sizeUUID, bytesNeededUUID, bufferUUID})); + GetUUIDResult returnTuple = new GetUUIDResult(); + returnTuple.HasUUID = bufferHasUUID.getByte(0) != 0; + returnTuple.UUID = new String(bufferUUID.getByteArray(0, sizeUUID - 1), StandardCharsets.UTF_8); + return returnTuple; + } + + public static class GetUUIDResult { + /** + * flag whether the build item has a UUID + */ + public boolean HasUUID; + + /** + * the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' + */ + public String UUID; + + } + /** + * sets the build item's UUID + * + * @param uUID the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' + * @throws Lib3MFException + */ + public void setUUID(String uUID) throws Lib3MFException { + byte[] bytesUUID = uUID.getBytes(StandardCharsets.UTF_8); + Memory bufferUUID = new Memory(bytesUUID.length + 1); + bufferUUID.write(0, bytesUUID, 0, bytesUUID.length); + bufferUUID.setByte(bytesUUID.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_builditem_setuuid.invokeInt(new java.lang.Object[]{mHandle, bufferUUID})); + } + + /** + * Retrieves the object UniqueResourceID associated to a build item + * + * @return returns the UniqueResourceID of the object + * @throws Lib3MFException + */ + public int getObjectResourceID() throws Lib3MFException { + Pointer bufferUniqueResourceID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_builditem_getobjectresourceid.invokeInt(new java.lang.Object[]{mHandle, bufferUniqueResourceID})); + return bufferUniqueResourceID.getInt(0); + } + + /** + * Checks, if a build item has a non-identity transformation matrix + * + * @return returns true, if the transformation matrix is not the identity + * @throws Lib3MFException + */ + public boolean hasObjectTransform() throws Lib3MFException { + Pointer bufferHasTransform = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_builditem_hasobjecttransform.invokeInt(new java.lang.Object[]{mHandle, bufferHasTransform})); + return bufferHasTransform.getByte(0) != 0; + } + + /** + * Retrieves a build item's transformation matrix. + * + * @return returns the transformation matrix + * @throws Lib3MFException + */ + public Transform getObjectTransform() throws Lib3MFException { + Pointer bufferTransform = new Memory(Transform.SIZE); + mWrapper.checkError(this, mWrapper.lib3mf_builditem_getobjecttransform.invokeInt(new java.lang.Object[]{mHandle, bufferTransform})); + Transform transform = new Transform(); + transform.readFromPointer(bufferTransform, 0); + return transform; + } + + /** + * Sets a build item's transformation matrix. + * + * @param transform new transformation matrix + * @throws Lib3MFException + */ + public void setObjectTransform(Transform transform) throws Lib3MFException { + Pointer bufferTransform = new Memory(Transform.SIZE); + transform.writeToPointer(bufferTransform, 0); + mWrapper.checkError(this, mWrapper.lib3mf_builditem_setobjecttransform.invokeInt(new java.lang.Object[]{mHandle, bufferTransform})); + } + + /** + * Retrieves a build item's part number string + * + * @return Returns a build item's part number string + * @throws Lib3MFException + */ + public String getPartNumber() throws Lib3MFException { + Pointer bytesNeededPartNumber = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_builditem_getpartnumber.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededPartNumber, null})); + int sizePartNumber = bytesNeededPartNumber.getInt(0); + Pointer bufferPartNumber = new Memory(sizePartNumber); + mWrapper.checkError(this, mWrapper.lib3mf_builditem_getpartnumber.invokeInt(new java.lang.Object[]{mHandle, sizePartNumber, bytesNeededPartNumber, bufferPartNumber})); + return new String(bufferPartNumber.getByteArray(0, sizePartNumber - 1), StandardCharsets.UTF_8); + } + + /** + * Sets a build item's part number string + * + * @param setPartnumber new part number string for referencing parts from the outside world + * @throws Lib3MFException + */ + public void setPartNumber(String setPartnumber) throws Lib3MFException { + byte[] bytesSetPartnumber = setPartnumber.getBytes(StandardCharsets.UTF_8); + Memory bufferSetPartnumber = new Memory(bytesSetPartnumber.length + 1); + bufferSetPartnumber.write(0, bytesSetPartnumber, 0, bytesSetPartnumber.length); + bufferSetPartnumber.setByte(bytesSetPartnumber.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_builditem_setpartnumber.invokeInt(new java.lang.Object[]{mHandle, bufferSetPartnumber})); + } + + /** + * Returns the metadatagroup of this build item + * + * @return returns an Instance of the metadatagroup of this build item + * @throws Lib3MFException + */ + public MetaDataGroup getMetaDataGroup() throws Lib3MFException { + Pointer bufferMetaDataGroup = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_builditem_getmetadatagroup.invokeInt(new java.lang.Object[]{mHandle, bufferMetaDataGroup})); + Pointer valueMetaDataGroup = bufferMetaDataGroup.getPointer(0); + MetaDataGroup metaDataGroup = null; + if (valueMetaDataGroup == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "MetaDataGroup was a null pointer"); + } + metaDataGroup = mWrapper.PolymorphicFactory(valueMetaDataGroup, MetaDataGroup.class); + return metaDataGroup; + } + + /** + * Returns the outbox of a build item + * + * @return Outbox of this build item + * @throws Lib3MFException + */ + public Box getOutbox() throws Lib3MFException { + Pointer bufferOutbox = new Memory(Box.SIZE); + mWrapper.checkError(this, mWrapper.lib3mf_builditem_getoutbox.invokeInt(new java.lang.Object[]{mHandle, bufferOutbox})); + Box outbox = new Box(); + outbox.readFromPointer(bufferOutbox, 0); + return outbox; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/BuildItemIterator.java b/Autogenerated/Bindings/Java9/lib3mf/BuildItemIterator.java new file mode 100644 index 000000000..2388b4369 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/BuildItemIterator.java @@ -0,0 +1,129 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class BuildItemIterator extends Base { + + public BuildItemIterator(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Iterates to the next build item in the list. + * + * @return Iterates to the next build item in the list. + * @throws Lib3MFException + */ + public boolean moveNext() throws Lib3MFException { + Pointer bufferHasNext = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_builditemiterator_movenext.invokeInt(new java.lang.Object[]{mHandle, bufferHasNext})); + return bufferHasNext.getByte(0) != 0; + } + + /** + * Iterates to the previous build item in the list. + * + * @return Iterates to the previous build item in the list. + * @throws Lib3MFException + */ + public boolean movePrevious() throws Lib3MFException { + Pointer bufferHasPrevious = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_builditemiterator_moveprevious.invokeInt(new java.lang.Object[]{mHandle, bufferHasPrevious})); + return bufferHasPrevious.getByte(0) != 0; + } + + /** + * Returns the build item the iterator points at. + * + * @return returns the build item instance. + * @throws Lib3MFException + */ + public BuildItem getCurrent() throws Lib3MFException { + Pointer bufferBuildItem = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_builditemiterator_getcurrent.invokeInt(new java.lang.Object[]{mHandle, bufferBuildItem})); + Pointer valueBuildItem = bufferBuildItem.getPointer(0); + BuildItem buildItem = null; + if (valueBuildItem == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "BuildItem was a null pointer"); + } + buildItem = mWrapper.PolymorphicFactory(valueBuildItem, BuildItem.class); + return buildItem; + } + + /** + * Creates a new build item iterator with the same build item list. + * + * @return returns the cloned Iterator instance + * @throws Lib3MFException + */ + public BuildItemIterator clone_() throws Lib3MFException { + Pointer bufferOutBuildItemIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_builditemiterator_clone.invokeInt(new java.lang.Object[]{mHandle, bufferOutBuildItemIterator})); + Pointer valueOutBuildItemIterator = bufferOutBuildItemIterator.getPointer(0); + BuildItemIterator outBuildItemIterator = null; + if (valueOutBuildItemIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "OutBuildItemIterator was a null pointer"); + } + outBuildItemIterator = mWrapper.PolymorphicFactory(valueOutBuildItemIterator, BuildItemIterator.class); + return outBuildItemIterator; + } + + /** + * Returns the number of build items the iterator captures. + * + * @return returns the number of build items the iterator captures. + * @throws Lib3MFException + */ + public long count() throws Lib3MFException { + Pointer bufferCount = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_builditemiterator_count.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getLong(0); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/CeilNode.java b/Autogenerated/Bindings/Java9/lib3mf/CeilNode.java new file mode 100644 index 000000000..d2061211f --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/CeilNode.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class CeilNode extends OneInputNode { + + public CeilNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/ClampNode.java b/Autogenerated/Bindings/Java9/lib3mf/ClampNode.java new file mode 100644 index 000000000..9e800eafd --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/ClampNode.java @@ -0,0 +1,93 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ClampNode extends OneInputNode { + + public ClampNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the input for the lower limit + * + * @return the input for the lower limit + * @throws Lib3MFException + */ + public ImplicitPort getInputMin() throws Lib3MFException { + Pointer bufferMin = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_clampnode_getinputmin.invokeInt(new java.lang.Object[]{mHandle, bufferMin})); + Pointer valueMin = bufferMin.getPointer(0); + ImplicitPort min = null; + if (valueMin == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Min was a null pointer"); + } + min = mWrapper.PolymorphicFactory(valueMin, ImplicitPort.class); + return min; + } + + /** + * Retrieves the input for the upper limit + * + * @return the input for the upper limit + * @throws Lib3MFException + */ + public ImplicitPort getInputMax() throws Lib3MFException { + Pointer bufferMax = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_clampnode_getinputmax.invokeInt(new java.lang.Object[]{mHandle, bufferMax})); + Pointer valueMax = bufferMax.getPointer(0); + ImplicitPort max = null; + if (valueMax == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Max was a null pointer"); + } + max = mWrapper.PolymorphicFactory(valueMax, ImplicitPort.class); + return max; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/Color.java b/Autogenerated/Bindings/Java9/lib3mf/Color.java new file mode 100644 index 000000000..66de0245e --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/Color.java @@ -0,0 +1,71 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Memory; +import com.sun.jna.Pointer; + +import java.util.Arrays; +import java.util.List; + +public class Color { + + public byte Red; + + public byte Green; + + public byte Blue; + + public byte Alpha; + + public static final int SIZE = 4; + + public void readFromPointer(Pointer p, long offset) { + Red = p.getByte(offset + 0); + Green = p.getByte(offset + 1); + Blue = p.getByte(offset + 2); + Alpha = p.getByte(offset + 3); + } + + public void writeToPointer(Pointer p, long offset) { + p.setByte(offset + 0, Red); + p.setByte(offset + 1, Green); + p.setByte(offset + 2, Blue); + p.setByte(offset + 3, Alpha); + } + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/ColorGroup.java b/Autogenerated/Bindings/Java9/lib3mf/ColorGroup.java new file mode 100644 index 000000000..e15e294da --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/ColorGroup.java @@ -0,0 +1,137 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ColorGroup extends Resource { + + public ColorGroup(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the count of base materials in this Color Group. + * + * @return returns the count of colors within this color group. + * @throws Lib3MFException + */ + public int getCount() throws Lib3MFException { + Pointer bufferCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_colorgroup_getcount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getInt(0); + } + + /** + * returns all the PropertyIDs of all colors within this group + * + * @return PropertyID of the color in the color group. + * @throws Lib3MFException + */ + public int[] getAllPropertyIDs() throws Lib3MFException { + Pointer countNeededPropertyIDs = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_colorgroup_getallpropertyids.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededPropertyIDs, Pointer.NULL})); + long countPropertyIDs = countNeededPropertyIDs.getLong(0); + Pointer bufferPropertyIDs = new Memory(Math.max(1, 4 * countPropertyIDs)); + mWrapper.checkError(this, mWrapper.lib3mf_colorgroup_getallpropertyids.invokeInt(new java.lang.Object[]{mHandle, countPropertyIDs, countNeededPropertyIDs, bufferPropertyIDs})); + return bufferPropertyIDs.getIntArray(0, (int)countPropertyIDs); + } + + /** + * Adds a new value. + * + * @param theColor The new color + * @return PropertyID of the new color within this color group. + * @throws Lib3MFException + */ + public int addColor(Color theColor) throws Lib3MFException { + Pointer bufferTheColor = new Memory(Color.SIZE); + theColor.writeToPointer(bufferTheColor, 0); + Pointer bufferPropertyID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_colorgroup_addcolor.invokeInt(new java.lang.Object[]{mHandle, bufferTheColor, bufferPropertyID})); + return bufferPropertyID.getInt(0); + } + + /** + * Removes a color from the color group. + * + * @param propertyID PropertyID of the color to be removed from the color group. + * @throws Lib3MFException + */ + public void removeColor(int propertyID) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_colorgroup_removecolor.invokeInt(new java.lang.Object[]{mHandle, propertyID})); + } + + /** + * Sets a color value. + * + * @param propertyID PropertyID of a color within this color group. + * @param theColor The color + * @throws Lib3MFException + */ + public void setColor(int propertyID, Color theColor) throws Lib3MFException { + Pointer bufferTheColor = new Memory(Color.SIZE); + theColor.writeToPointer(bufferTheColor, 0); + mWrapper.checkError(this, mWrapper.lib3mf_colorgroup_setcolor.invokeInt(new java.lang.Object[]{mHandle, propertyID, bufferTheColor})); + } + + /** + * Sets a color value. + * + * @param propertyID PropertyID of a color within this color group. + * @return The color + * @throws Lib3MFException + */ + public Color getColor(int propertyID) throws Lib3MFException { + Pointer bufferTheColor = new Memory(Color.SIZE); + mWrapper.checkError(this, mWrapper.lib3mf_colorgroup_getcolor.invokeInt(new java.lang.Object[]{mHandle, propertyID, bufferTheColor})); + Color theColor = new Color(); + theColor.readFromPointer(bufferTheColor, 0); + return theColor; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/ColorGroupIterator.java b/Autogenerated/Bindings/Java9/lib3mf/ColorGroupIterator.java new file mode 100644 index 000000000..80ca2cc6d --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/ColorGroupIterator.java @@ -0,0 +1,75 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ColorGroupIterator extends ResourceIterator { + + public ColorGroupIterator(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the ColorGroup the iterator points at. + * + * @return returns the ColorGroup instance. + * @throws Lib3MFException + */ + public ColorGroup getCurrentColorGroup() throws Lib3MFException { + Pointer bufferResource = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_colorgroupiterator_getcurrentcolorgroup.invokeInt(new java.lang.Object[]{mHandle, bufferResource})); + Pointer valueResource = bufferResource.getPointer(0); + ColorGroup resource = null; + if (valueResource == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Resource was a null pointer"); + } + resource = mWrapper.PolymorphicFactory(valueResource, ColorGroup.class); + return resource; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/Component.java b/Autogenerated/Bindings/Java9/lib3mf/Component.java new file mode 100644 index 000000000..e1a7a62ff --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/Component.java @@ -0,0 +1,170 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Component extends Base { + + public Component(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the Resource Instance of the component. + * + * @return filled with the Resource Instance. + * @throws Lib3MFException + */ + public Object getObjectResource() throws Lib3MFException { + Pointer bufferObjectResource = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_component_getobjectresource.invokeInt(new java.lang.Object[]{mHandle, bufferObjectResource})); + Pointer valueObjectResource = bufferObjectResource.getPointer(0); + Object objectResource = null; + if (valueObjectResource == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ObjectResource was a null pointer"); + } + objectResource = mWrapper.PolymorphicFactory(valueObjectResource, Object.class); + return objectResource; + } + + /** + * Returns the UniqueResourceID of the component. + * + * @return returns the UniqueResourceID. + * @throws Lib3MFException + */ + public int getObjectResourceID() throws Lib3MFException { + Pointer bufferUniqueResourceID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_component_getobjectresourceid.invokeInt(new java.lang.Object[]{mHandle, bufferUniqueResourceID})); + return bufferUniqueResourceID.getInt(0); + } + + /** + * returns, whether a component has a UUID and, if true, the component's UUID + * + * @return GetUUID Result Tuple + * @throws Lib3MFException + */ + public GetUUIDResult getUUID() throws Lib3MFException { + Pointer bufferHasUUID = new Memory(1); + Pointer bytesNeededUUID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_component_getuuid.invokeInt(new java.lang.Object[]{mHandle, bufferHasUUID, 0, bytesNeededUUID, null})); + int sizeUUID = bytesNeededUUID.getInt(0); + Pointer bufferUUID = new Memory(sizeUUID); + mWrapper.checkError(this, mWrapper.lib3mf_component_getuuid.invokeInt(new java.lang.Object[]{mHandle, bufferHasUUID, sizeUUID, bytesNeededUUID, bufferUUID})); + GetUUIDResult returnTuple = new GetUUIDResult(); + returnTuple.HasUUID = bufferHasUUID.getByte(0) != 0; + returnTuple.UUID = new String(bufferUUID.getByteArray(0, sizeUUID - 1), StandardCharsets.UTF_8); + return returnTuple; + } + + public static class GetUUIDResult { + /** + * flag whether the component has a UUID + */ + public boolean HasUUID; + + /** + * the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' + */ + public String UUID; + + } + /** + * sets the component's UUID + * + * @param uUID the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' + * @throws Lib3MFException + */ + public void setUUID(String uUID) throws Lib3MFException { + byte[] bytesUUID = uUID.getBytes(StandardCharsets.UTF_8); + Memory bufferUUID = new Memory(bytesUUID.length + 1); + bufferUUID.write(0, bytesUUID, 0, bytesUUID.length); + bufferUUID.setByte(bytesUUID.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_component_setuuid.invokeInt(new java.lang.Object[]{mHandle, bufferUUID})); + } + + /** + * Returns, if the component has a different transformation than the identity matrix + * + * @return if true is returned, the transformation is not equal than the identity + * @throws Lib3MFException + */ + public boolean hasTransform() throws Lib3MFException { + Pointer bufferHasTransform = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_component_hastransform.invokeInt(new java.lang.Object[]{mHandle, bufferHasTransform})); + return bufferHasTransform.getByte(0) != 0; + } + + /** + * Returns the transformation matrix of the component. + * + * @return filled with the component transformation matrix + * @throws Lib3MFException + */ + public Transform getTransform() throws Lib3MFException { + Pointer bufferTransform = new Memory(Transform.SIZE); + mWrapper.checkError(this, mWrapper.lib3mf_component_gettransform.invokeInt(new java.lang.Object[]{mHandle, bufferTransform})); + Transform transform = new Transform(); + transform.readFromPointer(bufferTransform, 0); + return transform; + } + + /** + * Sets the transformation matrix of the component. + * + * @param transform new transformation matrix + * @throws Lib3MFException + */ + public void setTransform(Transform transform) throws Lib3MFException { + Pointer bufferTransform = new Memory(Transform.SIZE); + transform.writeToPointer(bufferTransform, 0); + mWrapper.checkError(this, mWrapper.lib3mf_component_settransform.invokeInt(new java.lang.Object[]{mHandle, bufferTransform})); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/ComponentsObject.java b/Autogenerated/Bindings/Java9/lib3mf/ComponentsObject.java new file mode 100644 index 000000000..e85be17de --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/ComponentsObject.java @@ -0,0 +1,116 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ComponentsObject extends Object { + + public ComponentsObject(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Adds a new component to a components object. + * + * @param objectResource object to add as component. Must not lead to circular references! + * @param transform optional transform matrix for the component. + * @return new component instance + * @throws Lib3MFException + */ + public Component addComponent(Object objectResource, Transform transform) throws Lib3MFException { + Pointer objectResourceHandle = null; + if (objectResource != null) { + objectResourceHandle = objectResource.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ObjectResource is a null value."); + } + Pointer bufferTransform = new Memory(Transform.SIZE); + transform.writeToPointer(bufferTransform, 0); + Pointer bufferComponentInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_componentsobject_addcomponent.invokeInt(new java.lang.Object[]{mHandle, objectResourceHandle, bufferTransform, bufferComponentInstance})); + Pointer valueComponentInstance = bufferComponentInstance.getPointer(0); + Component componentInstance = null; + if (valueComponentInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ComponentInstance was a null pointer"); + } + componentInstance = mWrapper.PolymorphicFactory(valueComponentInstance, Component.class); + return componentInstance; + } + + /** + * Retrieves a component from a component object. + * + * @param index index of the component to retrieve (0 to componentcount - 1) + * @return component instance + * @throws Lib3MFException + */ + public Component getComponent(int index) throws Lib3MFException { + Pointer bufferComponentInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_componentsobject_getcomponent.invokeInt(new java.lang.Object[]{mHandle, index, bufferComponentInstance})); + Pointer valueComponentInstance = bufferComponentInstance.getPointer(0); + Component componentInstance = null; + if (valueComponentInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ComponentInstance was a null pointer"); + } + componentInstance = mWrapper.PolymorphicFactory(valueComponentInstance, Component.class); + return componentInstance; + } + + /** + * Retrieves a component count of a component object. + * + * @return returns the component count + * @throws Lib3MFException + */ + public int getComponentCount() throws Lib3MFException { + Pointer bufferCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_componentsobject_getcomponentcount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getInt(0); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/ComponentsObjectIterator.java b/Autogenerated/Bindings/Java9/lib3mf/ComponentsObjectIterator.java new file mode 100644 index 000000000..78261987c --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/ComponentsObjectIterator.java @@ -0,0 +1,75 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ComponentsObjectIterator extends ResourceIterator { + + public ComponentsObjectIterator(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the ComponentsObject the iterator points at. + * + * @return returns the ComponentsObject instance. + * @throws Lib3MFException + */ + public ComponentsObject getCurrentComponentsObject() throws Lib3MFException { + Pointer bufferResource = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_componentsobjectiterator_getcurrentcomponentsobject.invokeInt(new java.lang.Object[]{mHandle, bufferResource})); + Pointer valueResource = bufferResource.getPointer(0); + ComponentsObject resource = null; + if (valueResource == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Resource was a null pointer"); + } + resource = mWrapper.PolymorphicFactory(valueResource, ComponentsObject.class); + return resource; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/ComposeMatrixNode.java b/Autogenerated/Bindings/Java9/lib3mf/ComposeMatrixNode.java new file mode 100644 index 000000000..e1c5abe50 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/ComposeMatrixNode.java @@ -0,0 +1,363 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ComposeMatrixNode extends ImplicitNode { + + public ComposeMatrixNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the input for the element 0 0 + * + * @return the input for the m00 element + * @throws Lib3MFException + */ + public ImplicitPort getInputM00() throws Lib3MFException { + Pointer bufferM00 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composematrixnode_getinputm00.invokeInt(new java.lang.Object[]{mHandle, bufferM00})); + Pointer valueM00 = bufferM00.getPointer(0); + ImplicitPort m00 = null; + if (valueM00 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "M00 was a null pointer"); + } + m00 = mWrapper.PolymorphicFactory(valueM00, ImplicitPort.class); + return m00; + } + + /** + * Retrieves the input for the element 0 1 + * + * @return the input for the m01 element + * @throws Lib3MFException + */ + public ImplicitPort getInputM01() throws Lib3MFException { + Pointer bufferM01 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composematrixnode_getinputm01.invokeInt(new java.lang.Object[]{mHandle, bufferM01})); + Pointer valueM01 = bufferM01.getPointer(0); + ImplicitPort m01 = null; + if (valueM01 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "M01 was a null pointer"); + } + m01 = mWrapper.PolymorphicFactory(valueM01, ImplicitPort.class); + return m01; + } + + /** + * Retrieves the input for the element 0 2 + * + * @return the input for the m02 element + * @throws Lib3MFException + */ + public ImplicitPort getInputM02() throws Lib3MFException { + Pointer bufferM02 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composematrixnode_getinputm02.invokeInt(new java.lang.Object[]{mHandle, bufferM02})); + Pointer valueM02 = bufferM02.getPointer(0); + ImplicitPort m02 = null; + if (valueM02 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "M02 was a null pointer"); + } + m02 = mWrapper.PolymorphicFactory(valueM02, ImplicitPort.class); + return m02; + } + + /** + * Retrieves the input for the element 0 3 + * + * @return the input for the m03 element + * @throws Lib3MFException + */ + public ImplicitPort getInputM03() throws Lib3MFException { + Pointer bufferM03 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composematrixnode_getinputm03.invokeInt(new java.lang.Object[]{mHandle, bufferM03})); + Pointer valueM03 = bufferM03.getPointer(0); + ImplicitPort m03 = null; + if (valueM03 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "M03 was a null pointer"); + } + m03 = mWrapper.PolymorphicFactory(valueM03, ImplicitPort.class); + return m03; + } + + /** + * Retrieves the input for the element 1 0 + * + * @return the input for the m10 element + * @throws Lib3MFException + */ + public ImplicitPort getInputM10() throws Lib3MFException { + Pointer bufferM10 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composematrixnode_getinputm10.invokeInt(new java.lang.Object[]{mHandle, bufferM10})); + Pointer valueM10 = bufferM10.getPointer(0); + ImplicitPort m10 = null; + if (valueM10 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "M10 was a null pointer"); + } + m10 = mWrapper.PolymorphicFactory(valueM10, ImplicitPort.class); + return m10; + } + + /** + * Retrieves the input for the element 1 1 + * + * @return the input for the m11 element + * @throws Lib3MFException + */ + public ImplicitPort getInputM11() throws Lib3MFException { + Pointer bufferM11 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composematrixnode_getinputm11.invokeInt(new java.lang.Object[]{mHandle, bufferM11})); + Pointer valueM11 = bufferM11.getPointer(0); + ImplicitPort m11 = null; + if (valueM11 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "M11 was a null pointer"); + } + m11 = mWrapper.PolymorphicFactory(valueM11, ImplicitPort.class); + return m11; + } + + /** + * Retrieves the input for the element 1 2 + * + * @return the input for the m12 element + * @throws Lib3MFException + */ + public ImplicitPort getInputM12() throws Lib3MFException { + Pointer bufferM12 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composematrixnode_getinputm12.invokeInt(new java.lang.Object[]{mHandle, bufferM12})); + Pointer valueM12 = bufferM12.getPointer(0); + ImplicitPort m12 = null; + if (valueM12 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "M12 was a null pointer"); + } + m12 = mWrapper.PolymorphicFactory(valueM12, ImplicitPort.class); + return m12; + } + + /** + * Retrieves the input for the element 1 3 + * + * @return the input for the m13 element + * @throws Lib3MFException + */ + public ImplicitPort getInputM13() throws Lib3MFException { + Pointer bufferM13 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composematrixnode_getinputm13.invokeInt(new java.lang.Object[]{mHandle, bufferM13})); + Pointer valueM13 = bufferM13.getPointer(0); + ImplicitPort m13 = null; + if (valueM13 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "M13 was a null pointer"); + } + m13 = mWrapper.PolymorphicFactory(valueM13, ImplicitPort.class); + return m13; + } + + /** + * Retrieves the input for the element 2 0 + * + * @return the input for the m20 element + * @throws Lib3MFException + */ + public ImplicitPort getInputM20() throws Lib3MFException { + Pointer bufferM20 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composematrixnode_getinputm20.invokeInt(new java.lang.Object[]{mHandle, bufferM20})); + Pointer valueM20 = bufferM20.getPointer(0); + ImplicitPort m20 = null; + if (valueM20 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "M20 was a null pointer"); + } + m20 = mWrapper.PolymorphicFactory(valueM20, ImplicitPort.class); + return m20; + } + + /** + * Retrieves the input for the element 2 1 + * + * @return + * @throws Lib3MFException + */ + public ImplicitPort getInputM21() throws Lib3MFException { + Pointer bufferM21 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composematrixnode_getinputm21.invokeInt(new java.lang.Object[]{mHandle, bufferM21})); + Pointer valueM21 = bufferM21.getPointer(0); + ImplicitPort m21 = null; + if (valueM21 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "M21 was a null pointer"); + } + m21 = mWrapper.PolymorphicFactory(valueM21, ImplicitPort.class); + return m21; + } + + /** + * Retrieves the input for the element 2 2 + * + * @return the input for the m22 element + * @throws Lib3MFException + */ + public ImplicitPort getInputM22() throws Lib3MFException { + Pointer bufferM22 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composematrixnode_getinputm22.invokeInt(new java.lang.Object[]{mHandle, bufferM22})); + Pointer valueM22 = bufferM22.getPointer(0); + ImplicitPort m22 = null; + if (valueM22 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "M22 was a null pointer"); + } + m22 = mWrapper.PolymorphicFactory(valueM22, ImplicitPort.class); + return m22; + } + + /** + * Retrieves the input for the element 2 3 + * + * @return the input for the m23 element + * @throws Lib3MFException + */ + public ImplicitPort getInputM23() throws Lib3MFException { + Pointer bufferM23 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composematrixnode_getinputm23.invokeInt(new java.lang.Object[]{mHandle, bufferM23})); + Pointer valueM23 = bufferM23.getPointer(0); + ImplicitPort m23 = null; + if (valueM23 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "M23 was a null pointer"); + } + m23 = mWrapper.PolymorphicFactory(valueM23, ImplicitPort.class); + return m23; + } + + /** + * Retrieves the input for the element 3 0 + * + * @return the input for the m30 element + * @throws Lib3MFException + */ + public ImplicitPort getInputM30() throws Lib3MFException { + Pointer bufferM30 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composematrixnode_getinputm30.invokeInt(new java.lang.Object[]{mHandle, bufferM30})); + Pointer valueM30 = bufferM30.getPointer(0); + ImplicitPort m30 = null; + if (valueM30 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "M30 was a null pointer"); + } + m30 = mWrapper.PolymorphicFactory(valueM30, ImplicitPort.class); + return m30; + } + + /** + * Retrieves the input for the element 3 1 + * + * @return the input for the m31 element + * @throws Lib3MFException + */ + public ImplicitPort getInputM31() throws Lib3MFException { + Pointer bufferM31 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composematrixnode_getinputm31.invokeInt(new java.lang.Object[]{mHandle, bufferM31})); + Pointer valueM31 = bufferM31.getPointer(0); + ImplicitPort m31 = null; + if (valueM31 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "M31 was a null pointer"); + } + m31 = mWrapper.PolymorphicFactory(valueM31, ImplicitPort.class); + return m31; + } + + /** + * Retrieves the input for the element 3 2 + * + * @return the input for the m32 element + * @throws Lib3MFException + */ + public ImplicitPort getInputM32() throws Lib3MFException { + Pointer bufferM32 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composematrixnode_getinputm32.invokeInt(new java.lang.Object[]{mHandle, bufferM32})); + Pointer valueM32 = bufferM32.getPointer(0); + ImplicitPort m32 = null; + if (valueM32 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "M32 was a null pointer"); + } + m32 = mWrapper.PolymorphicFactory(valueM32, ImplicitPort.class); + return m32; + } + + /** + * Retrieves the input for the element 3 3 + * + * @return the input for the m33 element + * @throws Lib3MFException + */ + public ImplicitPort getInputM33() throws Lib3MFException { + Pointer bufferM33 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composematrixnode_getinputm33.invokeInt(new java.lang.Object[]{mHandle, bufferM33})); + Pointer valueM33 = bufferM33.getPointer(0); + ImplicitPort m33 = null; + if (valueM33 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "M33 was a null pointer"); + } + m33 = mWrapper.PolymorphicFactory(valueM33, ImplicitPort.class); + return m33; + } + + /** + * Retrieves the output + * + * @return the output + * @throws Lib3MFException + */ + public ImplicitPort getOutputResult() throws Lib3MFException { + Pointer bufferResult = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composematrixnode_getoutputresult.invokeInt(new java.lang.Object[]{mHandle, bufferResult})); + Pointer valueResult = bufferResult.getPointer(0); + ImplicitPort result = null; + if (valueResult == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Result was a null pointer"); + } + result = mWrapper.PolymorphicFactory(valueResult, ImplicitPort.class); + return result; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/ComposeVectorNode.java b/Autogenerated/Bindings/Java9/lib3mf/ComposeVectorNode.java new file mode 100644 index 000000000..dd80c11a2 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/ComposeVectorNode.java @@ -0,0 +1,129 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ComposeVectorNode extends ImplicitNode { + + public ComposeVectorNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the input for the x component + * + * @return the input for the x component + * @throws Lib3MFException + */ + public ImplicitPort getInputX() throws Lib3MFException { + Pointer bufferX = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composevectornode_getinputx.invokeInt(new java.lang.Object[]{mHandle, bufferX})); + Pointer valueX = bufferX.getPointer(0); + ImplicitPort x = null; + if (valueX == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "X was a null pointer"); + } + x = mWrapper.PolymorphicFactory(valueX, ImplicitPort.class); + return x; + } + + /** + * Retrieves the input for the y component + * + * @return the input for the y component + * @throws Lib3MFException + */ + public ImplicitPort getInputY() throws Lib3MFException { + Pointer bufferY = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composevectornode_getinputy.invokeInt(new java.lang.Object[]{mHandle, bufferY})); + Pointer valueY = bufferY.getPointer(0); + ImplicitPort y = null; + if (valueY == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Y was a null pointer"); + } + y = mWrapper.PolymorphicFactory(valueY, ImplicitPort.class); + return y; + } + + /** + * Retrieves the input for the z component + * + * @return the input for the z component + * @throws Lib3MFException + */ + public ImplicitPort getInputZ() throws Lib3MFException { + Pointer bufferZ = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composevectornode_getinputz.invokeInt(new java.lang.Object[]{mHandle, bufferZ})); + Pointer valueZ = bufferZ.getPointer(0); + ImplicitPort z = null; + if (valueZ == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Z was a null pointer"); + } + z = mWrapper.PolymorphicFactory(valueZ, ImplicitPort.class); + return z; + } + + /** + * Retrieves the output + * + * @return the output + * @throws Lib3MFException + */ + public ImplicitPort getOutputResult() throws Lib3MFException { + Pointer bufferResult = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_composevectornode_getoutputresult.invokeInt(new java.lang.Object[]{mHandle, bufferResult})); + Pointer valueResult = bufferResult.getPointer(0); + ImplicitPort result = null; + if (valueResult == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Result was a null pointer"); + } + result = mWrapper.PolymorphicFactory(valueResult, ImplicitPort.class); + return result; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/CompositeConstituent.java b/Autogenerated/Bindings/Java9/lib3mf/CompositeConstituent.java new file mode 100644 index 000000000..8a799bd84 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/CompositeConstituent.java @@ -0,0 +1,63 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Memory; +import com.sun.jna.Pointer; + +import java.util.Arrays; +import java.util.List; + +public class CompositeConstituent { + + public int PropertyID; + + public double MixingRatio; + + public static final int SIZE = 12; + + public void readFromPointer(Pointer p, long offset) { + PropertyID = p.getInt(offset + 0); + MixingRatio = p.getDouble(offset + 4); + } + + public void writeToPointer(Pointer p, long offset) { + p.setInt(offset + 0, PropertyID); + p.setDouble(offset + 4, MixingRatio); + } + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/CompositeMaterials.java b/Autogenerated/Bindings/Java9/lib3mf/CompositeMaterials.java new file mode 100644 index 000000000..c9110a1f9 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/CompositeMaterials.java @@ -0,0 +1,150 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class CompositeMaterials extends Resource { + + public CompositeMaterials(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the count of Composite-s in the CompositeMaterials. + * + * @return returns the count of Composite-s + * @throws Lib3MFException + */ + public int getCount() throws Lib3MFException { + Pointer bufferCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_compositematerials_getcount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getInt(0); + } + + /** + * returns all the PropertyIDs of all Composite-Mixing Values in this CompositeMaterials + * + * @return PropertyID of the Composite-Mixing Values in the CompositeMaterials. + * @throws Lib3MFException + */ + public int[] getAllPropertyIDs() throws Lib3MFException { + Pointer countNeededPropertyIDs = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_compositematerials_getallpropertyids.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededPropertyIDs, Pointer.NULL})); + long countPropertyIDs = countNeededPropertyIDs.getLong(0); + Pointer bufferPropertyIDs = new Memory(Math.max(1, 4 * countPropertyIDs)); + mWrapper.checkError(this, mWrapper.lib3mf_compositematerials_getallpropertyids.invokeInt(new java.lang.Object[]{mHandle, countPropertyIDs, countNeededPropertyIDs, bufferPropertyIDs})); + return bufferPropertyIDs.getIntArray(0, (int)countPropertyIDs); + } + + /** + * Obtains the BaseMaterialGroup instance of this CompositeMaterials. + * + * @return returns the BaseMaterialGroup instance of this CompositeMaterials + * @throws Lib3MFException + */ + public BaseMaterialGroup getBaseMaterialGroup() throws Lib3MFException { + Pointer bufferBaseMaterialGroupInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_compositematerials_getbasematerialgroup.invokeInt(new java.lang.Object[]{mHandle, bufferBaseMaterialGroupInstance})); + Pointer valueBaseMaterialGroupInstance = bufferBaseMaterialGroupInstance.getPointer(0); + BaseMaterialGroup baseMaterialGroupInstance = null; + if (valueBaseMaterialGroupInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "BaseMaterialGroupInstance was a null pointer"); + } + baseMaterialGroupInstance = mWrapper.PolymorphicFactory(valueBaseMaterialGroupInstance, BaseMaterialGroup.class); + return baseMaterialGroupInstance; + } + + /** + * Adds a new Composite-Mixing Values to the CompositeMaterials. + * + * @param composite The Composite Constituents to be added as composite + * @return returns new PropertyID of the new Composite in the CompositeMaterials. + * @throws Lib3MFException + */ + public int addComposite(CompositeConstituent[] composite) throws Lib3MFException { + Pointer bufferComposite = new Memory(Math.max(1, CompositeConstituent.SIZE * composite.length)); + for (int i = 0; i < composite.length; i++) { + composite[i].writeToPointer(bufferComposite, i * CompositeConstituent.SIZE); + } + Pointer bufferPropertyID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_compositematerials_addcomposite.invokeInt(new java.lang.Object[]{mHandle, (long) composite.length, bufferComposite, bufferPropertyID})); + return bufferPropertyID.getInt(0); + } + + /** + * Removes a Composite-Maxing Ratio from the CompositeMaterials. + * + * @param propertyID PropertyID of the Composite-Mixing Values in the CompositeMaterials to be removed. + * @throws Lib3MFException + */ + public void removeComposite(int propertyID) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_compositematerials_removecomposite.invokeInt(new java.lang.Object[]{mHandle, propertyID})); + } + + /** + * Obtains a Composite-Maxing Ratio of this CompositeMaterials. + * + * @param propertyID the PropertyID of the Composite-Maxing Ratio in the CompositeMaterials. + * @return The Composite-Mixing Values with the given PropertyID + * @throws Lib3MFException + */ + public CompositeConstituent[] getComposite(int propertyID) throws Lib3MFException { + Pointer countNeededComposite = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_compositematerials_getcomposite.invokeInt(new java.lang.Object[]{mHandle, propertyID, 0L, countNeededComposite, null})); + long countComposite = countNeededComposite.getLong(0); + Pointer bufferComposite = new Memory(Math.max(1, countComposite * CompositeConstituent.SIZE)); + mWrapper.checkError(this, mWrapper.lib3mf_compositematerials_getcomposite.invokeInt(new java.lang.Object[]{mHandle, propertyID, countComposite, countNeededComposite, bufferComposite})); + CompositeConstituent composite[] = new CompositeConstituent[(int)countComposite]; + for (int i = 0; i < (int)countComposite; i++) { + composite[i] = new CompositeConstituent(); + composite[i].readFromPointer(bufferComposite, i * CompositeConstituent.SIZE); + } + return composite; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/CompositeMaterialsIterator.java b/Autogenerated/Bindings/Java9/lib3mf/CompositeMaterialsIterator.java new file mode 100644 index 000000000..6e2bb33f6 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/CompositeMaterialsIterator.java @@ -0,0 +1,75 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class CompositeMaterialsIterator extends ResourceIterator { + + public CompositeMaterialsIterator(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the CompositeMaterials the iterator points at. + * + * @return returns the CompositeMaterials instance. + * @throws Lib3MFException + */ + public CompositeMaterials getCurrentCompositeMaterials() throws Lib3MFException { + Pointer bufferResource = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_compositematerialsiterator_getcurrentcompositematerials.invokeInt(new java.lang.Object[]{mHandle, bufferResource})); + Pointer valueResource = bufferResource.getPointer(0); + CompositeMaterials resource = null; + if (valueResource == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Resource was a null pointer"); + } + resource = mWrapper.PolymorphicFactory(valueResource, CompositeMaterials.class); + return resource; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/ConstMatNode.java b/Autogenerated/Bindings/Java9/lib3mf/ConstMatNode.java new file mode 100644 index 000000000..806365a98 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/ConstMatNode.java @@ -0,0 +1,101 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ConstMatNode extends ImplicitNode { + + public ConstMatNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Sets the matrix value of the node + * + * @param value the value + * @throws Lib3MFException + */ + public void setMatrix(Matrix4x4 value) throws Lib3MFException { + Pointer bufferValue = new Memory(Matrix4x4.SIZE); + value.writeToPointer(bufferValue, 0); + mWrapper.checkError(this, mWrapper.lib3mf_constmatnode_setmatrix.invokeInt(new java.lang.Object[]{mHandle, bufferValue})); + } + + /** + * Retrieves the matrix value of the node + * + * @return the matrix + * @throws Lib3MFException + */ + public Matrix4x4 getMatrix() throws Lib3MFException { + Pointer bufferValue = new Memory(Matrix4x4.SIZE); + mWrapper.checkError(this, mWrapper.lib3mf_constmatnode_getmatrix.invokeInt(new java.lang.Object[]{mHandle, bufferValue})); + Matrix4x4 value = new Matrix4x4(); + value.readFromPointer(bufferValue, 0); + return value; + } + + /** + * Retrieves the output + * + * @return the output + * @throws Lib3MFException + */ + public ImplicitPort getOutputMatrix() throws Lib3MFException { + Pointer bufferMatrix = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_constmatnode_getoutputmatrix.invokeInt(new java.lang.Object[]{mHandle, bufferMatrix})); + Pointer valueMatrix = bufferMatrix.getPointer(0); + ImplicitPort matrix = null; + if (valueMatrix == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Matrix was a null pointer"); + } + matrix = mWrapper.PolymorphicFactory(valueMatrix, ImplicitPort.class); + return matrix; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/ConstVecNode.java b/Autogenerated/Bindings/Java9/lib3mf/ConstVecNode.java new file mode 100644 index 000000000..b360d1631 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/ConstVecNode.java @@ -0,0 +1,101 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ConstVecNode extends ImplicitNode { + + public ConstVecNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Sets the vector value of the node + * + * @param value the value + * @throws Lib3MFException + */ + public void setVector(Vector value) throws Lib3MFException { + Pointer bufferValue = new Memory(Vector.SIZE); + value.writeToPointer(bufferValue, 0); + mWrapper.checkError(this, mWrapper.lib3mf_constvecnode_setvector.invokeInt(new java.lang.Object[]{mHandle, bufferValue})); + } + + /** + * Retrieves the vector value of the node + * + * @return the value + * @throws Lib3MFException + */ + public Vector getVector() throws Lib3MFException { + Pointer bufferValue = new Memory(Vector.SIZE); + mWrapper.checkError(this, mWrapper.lib3mf_constvecnode_getvector.invokeInt(new java.lang.Object[]{mHandle, bufferValue})); + Vector value = new Vector(); + value.readFromPointer(bufferValue, 0); + return value; + } + + /** + * Retrieves the output + * + * @return the output + * @throws Lib3MFException + */ + public ImplicitPort getOutputVector() throws Lib3MFException { + Pointer bufferVector = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_constvecnode_getoutputvector.invokeInt(new java.lang.Object[]{mHandle, bufferVector})); + Pointer valueVector = bufferVector.getPointer(0); + ImplicitPort vector = null; + if (valueVector == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Vector was a null pointer"); + } + vector = mWrapper.PolymorphicFactory(valueVector, ImplicitPort.class); + return vector; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/ConstantNode.java b/Autogenerated/Bindings/Java9/lib3mf/ConstantNode.java new file mode 100644 index 000000000..15fa87dac --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/ConstantNode.java @@ -0,0 +1,97 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ConstantNode extends ImplicitNode { + + public ConstantNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Sets the constant value of the node + * + * @param value the value + * @throws Lib3MFException + */ + public void setConstant(double value) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_constantnode_setconstant.invokeInt(new java.lang.Object[]{mHandle, value})); + } + + /** + * Retrieves the constant value of the node + * + * @return the value + * @throws Lib3MFException + */ + public double getConstant() throws Lib3MFException { + Pointer bufferValue = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_constantnode_getconstant.invokeInt(new java.lang.Object[]{mHandle, bufferValue})); + return bufferValue.getDouble(0); + } + + /** + * Retrieves the output + * + * @return the output + * @throws Lib3MFException + */ + public ImplicitPort getOutputValue() throws Lib3MFException { + Pointer bufferValue = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_constantnode_getoutputvalue.invokeInt(new java.lang.Object[]{mHandle, bufferValue})); + Pointer valueValue = bufferValue.getPointer(0); + ImplicitPort value = null; + if (valueValue == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Value was a null pointer"); + } + value = mWrapper.PolymorphicFactory(valueValue, ImplicitPort.class); + return value; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/Consumer.java b/Autogenerated/Bindings/Java9/lib3mf/Consumer.java new file mode 100644 index 000000000..0dfb0252c --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/Consumer.java @@ -0,0 +1,102 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Consumer extends Base { + + public Consumer(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Gets the consumerid + * + * @return A unique identifier for the consumers + * @throws Lib3MFException + */ + public String getConsumerID() throws Lib3MFException { + Pointer bytesNeededConsumerID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_consumer_getconsumerid.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededConsumerID, null})); + int sizeConsumerID = bytesNeededConsumerID.getInt(0); + Pointer bufferConsumerID = new Memory(sizeConsumerID); + mWrapper.checkError(this, mWrapper.lib3mf_consumer_getconsumerid.invokeInt(new java.lang.Object[]{mHandle, sizeConsumerID, bytesNeededConsumerID, bufferConsumerID})); + return new String(bufferConsumerID.getByteArray(0, sizeConsumerID - 1), StandardCharsets.UTF_8); + } + + /** + * Getts the keyid + * + * @return The identifier for the key of this consumer + * @throws Lib3MFException + */ + public String getKeyID() throws Lib3MFException { + Pointer bytesNeededKeyID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_consumer_getkeyid.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededKeyID, null})); + int sizeKeyID = bytesNeededKeyID.getInt(0); + Pointer bufferKeyID = new Memory(sizeKeyID); + mWrapper.checkError(this, mWrapper.lib3mf_consumer_getkeyid.invokeInt(new java.lang.Object[]{mHandle, sizeKeyID, bytesNeededKeyID, bufferKeyID})); + return new String(bufferKeyID.getByteArray(0, sizeKeyID - 1), StandardCharsets.UTF_8); + } + + /** + * Gets the keyvalue associated with this consumer + * + * @return The public key, when available, of this consumer + * @throws Lib3MFException + */ + public String getKeyValue() throws Lib3MFException { + Pointer bytesNeededKeyValue = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_consumer_getkeyvalue.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededKeyValue, null})); + int sizeKeyValue = bytesNeededKeyValue.getInt(0); + Pointer bufferKeyValue = new Memory(sizeKeyValue); + mWrapper.checkError(this, mWrapper.lib3mf_consumer_getkeyvalue.invokeInt(new java.lang.Object[]{mHandle, sizeKeyValue, bytesNeededKeyValue, bufferKeyValue})); + return new String(bufferKeyValue.getByteArray(0, sizeKeyValue - 1), StandardCharsets.UTF_8); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/ContentEncryptionParams.java b/Autogenerated/Bindings/Java9/lib3mf/ContentEncryptionParams.java new file mode 100644 index 000000000..e3297535d --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/ContentEncryptionParams.java @@ -0,0 +1,170 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ContentEncryptionParams extends Base { + + public ContentEncryptionParams(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the encryption method to be used in this encryption process + * + * @return + * @throws Lib3MFException + */ + public Lib3MFWrapper.EncryptionAlgorithm getEncryptionAlgorithm() throws Lib3MFException { + Pointer bufferAlgorithm = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_contentencryptionparams_getencryptionalgorithm.invokeInt(new java.lang.Object[]{mHandle, bufferAlgorithm})); + return Lib3MFWrapper.EnumConversion.convertConstToEncryptionAlgorithm(bufferAlgorithm.getInt(0)); + } + + /** + * Gets the key for the resource associated + * + * @return Pointer to a buffer where to place the key. + * @throws Lib3MFException + */ + public byte[] getKey() throws Lib3MFException { + Pointer countNeededByteData = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_contentencryptionparams_getkey.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededByteData, Pointer.NULL})); + long countByteData = countNeededByteData.getLong(0); + Pointer bufferByteData = new Memory(Math.max(1, 1 * countByteData)); + mWrapper.checkError(this, mWrapper.lib3mf_contentencryptionparams_getkey.invokeInt(new java.lang.Object[]{mHandle, countByteData, countNeededByteData, bufferByteData})); + return bufferByteData.getByteArray(0, (int)countByteData); + } + + /** + * Gets the IV data + * + * @return Pointer to a buffer where to place the data. + * @throws Lib3MFException + */ + public byte[] getInitializationVector() throws Lib3MFException { + Pointer countNeededByteData = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_contentencryptionparams_getinitializationvector.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededByteData, Pointer.NULL})); + long countByteData = countNeededByteData.getLong(0); + Pointer bufferByteData = new Memory(Math.max(1, 1 * countByteData)); + mWrapper.checkError(this, mWrapper.lib3mf_contentencryptionparams_getinitializationvector.invokeInt(new java.lang.Object[]{mHandle, countByteData, countNeededByteData, bufferByteData})); + return bufferByteData.getByteArray(0, (int)countByteData); + } + + /** + * A handler descriptor that uniquely identifies the context of the resource. Each resource will be assigned a different value + * + * @return Pointer to a buffer where to place the data. + * @throws Lib3MFException + */ + public byte[] getAuthenticationTag() throws Lib3MFException { + Pointer countNeededByteData = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_contentencryptionparams_getauthenticationtag.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededByteData, Pointer.NULL})); + long countByteData = countNeededByteData.getLong(0); + Pointer bufferByteData = new Memory(Math.max(1, 1 * countByteData)); + mWrapper.checkError(this, mWrapper.lib3mf_contentencryptionparams_getauthenticationtag.invokeInt(new java.lang.Object[]{mHandle, countByteData, countNeededByteData, bufferByteData})); + return bufferByteData.getByteArray(0, (int)countByteData); + } + + /** + * Sets the authentication tag + * + * @param byteData The authentication tag size + * @throws Lib3MFException + */ + public void setAuthenticationTag(byte[] byteData) throws Lib3MFException { + Pointer bufferByteData = new Memory(Math.max(1, 1 * byteData.length)); + for (int i = 0; i < byteData.length; i++) { + bufferByteData.setByte(1 * i, byteData[i]); + } + mWrapper.checkError(this, mWrapper.lib3mf_contentencryptionparams_setauthenticationtag.invokeInt(new java.lang.Object[]{mHandle, (long) byteData.length, bufferByteData})); + } + + /** + * A handler descriptor that uniquely identifies the context of the resource. Each resource will be assigned a different value + * + * @return Buffer where the data will be placed + * @throws Lib3MFException + */ + public byte[] getAdditionalAuthenticationData() throws Lib3MFException { + Pointer countNeededByteData = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_contentencryptionparams_getadditionalauthenticationdata.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededByteData, Pointer.NULL})); + long countByteData = countNeededByteData.getLong(0); + Pointer bufferByteData = new Memory(Math.max(1, 1 * countByteData)); + mWrapper.checkError(this, mWrapper.lib3mf_contentencryptionparams_getadditionalauthenticationdata.invokeInt(new java.lang.Object[]{mHandle, countByteData, countNeededByteData, bufferByteData})); + return bufferByteData.getByteArray(0, (int)countByteData); + } + + /** + * A handler descriptor that uniquely identifies the context of the resource. Each resource will be assigned a different value + * + * @return + * @throws Lib3MFException + */ + public long getDescriptor() throws Lib3MFException { + Pointer bufferDescriptor = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_contentencryptionparams_getdescriptor.invokeInt(new java.lang.Object[]{mHandle, bufferDescriptor})); + return bufferDescriptor.getLong(0); + } + + /** + * Gets the resourcedatagroup keyuuid + * + * @return The resourcedatagroup keyuuid that may be use to reference an external key + * @throws Lib3MFException + */ + public String getKeyUUID() throws Lib3MFException { + Pointer bytesNeededUUID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_contentencryptionparams_getkeyuuid.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededUUID, null})); + int sizeUUID = bytesNeededUUID.getInt(0); + Pointer bufferUUID = new Memory(sizeUUID); + mWrapper.checkError(this, mWrapper.lib3mf_contentencryptionparams_getkeyuuid.invokeInt(new java.lang.Object[]{mHandle, sizeUUID, bytesNeededUUID, bufferUUID})); + return new String(bufferUUID.getByteArray(0, sizeUUID - 1), StandardCharsets.UTF_8); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/CosNode.java b/Autogenerated/Bindings/Java9/lib3mf/CosNode.java new file mode 100644 index 000000000..ae8d4871f --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/CosNode.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class CosNode extends OneInputNode { + + public CosNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/CoshNode.java b/Autogenerated/Bindings/Java9/lib3mf/CoshNode.java new file mode 100644 index 000000000..fbc37e690 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/CoshNode.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class CoshNode extends OneInputNode { + + public CoshNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/CrossNode.java b/Autogenerated/Bindings/Java9/lib3mf/CrossNode.java new file mode 100644 index 000000000..c5fc4dbbb --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/CrossNode.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class CrossNode extends TwoInputNode { + + public CrossNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/DecomposeVectorNode.java b/Autogenerated/Bindings/Java9/lib3mf/DecomposeVectorNode.java new file mode 100644 index 000000000..9ee6ab9f9 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/DecomposeVectorNode.java @@ -0,0 +1,129 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class DecomposeVectorNode extends ImplicitNode { + + public DecomposeVectorNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the input + * + * @return the input port for the vector to decompose + * @throws Lib3MFException + */ + public ImplicitPort getInputA() throws Lib3MFException { + Pointer bufferA = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_decomposevectornode_getinputa.invokeInt(new java.lang.Object[]{mHandle, bufferA})); + Pointer valueA = bufferA.getPointer(0); + ImplicitPort a = null; + if (valueA == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "A was a null pointer"); + } + a = mWrapper.PolymorphicFactory(valueA, ImplicitPort.class); + return a; + } + + /** + * Retrieves the output for the x component + * + * @return the output for the x component + * @throws Lib3MFException + */ + public ImplicitPort getOutputX() throws Lib3MFException { + Pointer bufferX = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_decomposevectornode_getoutputx.invokeInt(new java.lang.Object[]{mHandle, bufferX})); + Pointer valueX = bufferX.getPointer(0); + ImplicitPort x = null; + if (valueX == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "X was a null pointer"); + } + x = mWrapper.PolymorphicFactory(valueX, ImplicitPort.class); + return x; + } + + /** + * Retrieves the output for the y component + * + * @return the output for the y component + * @throws Lib3MFException + */ + public ImplicitPort getOutputY() throws Lib3MFException { + Pointer bufferY = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_decomposevectornode_getoutputy.invokeInt(new java.lang.Object[]{mHandle, bufferY})); + Pointer valueY = bufferY.getPointer(0); + ImplicitPort y = null; + if (valueY == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Y was a null pointer"); + } + y = mWrapper.PolymorphicFactory(valueY, ImplicitPort.class); + return y; + } + + /** + * Retrieves the output for the z component + * + * @return the output for the z component + * @throws Lib3MFException + */ + public ImplicitPort getOutputZ() throws Lib3MFException { + Pointer bufferZ = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_decomposevectornode_getoutputz.invokeInt(new java.lang.Object[]{mHandle, bufferZ})); + Pointer valueZ = bufferZ.getPointer(0); + ImplicitPort z = null; + if (valueZ == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Z was a null pointer"); + } + z = mWrapper.PolymorphicFactory(valueZ, ImplicitPort.class); + return z; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/DivisionNode.java b/Autogenerated/Bindings/Java9/lib3mf/DivisionNode.java new file mode 100644 index 000000000..d2b444822 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/DivisionNode.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class DivisionNode extends TwoInputNode { + + public DivisionNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/DotNode.java b/Autogenerated/Bindings/Java9/lib3mf/DotNode.java new file mode 100644 index 000000000..1de2776a9 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/DotNode.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class DotNode extends TwoInputNode { + + public DotNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/ExpNode.java b/Autogenerated/Bindings/Java9/lib3mf/ExpNode.java new file mode 100644 index 000000000..15c7b06ff --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/ExpNode.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ExpNode extends OneInputNode { + + public ExpNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/FloorNode.java b/Autogenerated/Bindings/Java9/lib3mf/FloorNode.java new file mode 100644 index 000000000..630e11abe --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/FloorNode.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class FloorNode extends OneInputNode { + + public FloorNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/FmodNode.java b/Autogenerated/Bindings/Java9/lib3mf/FmodNode.java new file mode 100644 index 000000000..d1b545091 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/FmodNode.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class FmodNode extends TwoInputNode { + + public FmodNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/FractNode.java b/Autogenerated/Bindings/Java9/lib3mf/FractNode.java new file mode 100644 index 000000000..6ab1368f7 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/FractNode.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class FractNode extends OneInputNode { + + public FractNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/Function.java b/Autogenerated/Bindings/Java9/lib3mf/Function.java new file mode 100644 index 000000000..fd5f332a5 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/Function.java @@ -0,0 +1,258 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Function extends Resource { + + public Function(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the display name of the function + * + * @return the display name + * @throws Lib3MFException + */ + public String getDisplayName() throws Lib3MFException { + Pointer bytesNeededDisplayName = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_function_getdisplayname.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededDisplayName, null})); + int sizeDisplayName = bytesNeededDisplayName.getInt(0); + Pointer bufferDisplayName = new Memory(sizeDisplayName); + mWrapper.checkError(this, mWrapper.lib3mf_function_getdisplayname.invokeInt(new java.lang.Object[]{mHandle, sizeDisplayName, bytesNeededDisplayName, bufferDisplayName})); + return new String(bufferDisplayName.getByteArray(0, sizeDisplayName - 1), StandardCharsets.UTF_8); + } + + /** + * Sets the display name of the function + * + * @param displayName the display name + * @throws Lib3MFException + */ + public void setDisplayName(String displayName) throws Lib3MFException { + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_function_setdisplayname.invokeInt(new java.lang.Object[]{mHandle, bufferDisplayName})); + } + + /** + * Add an input + * + * @param identifier the identifier of the input + * @param displayName the display name of the input + * @param type the type of the input + * @return The added input port + * @throws Lib3MFException + */ + public ImplicitPort addInput(String identifier, String displayName, Lib3MFWrapper.ImplicitPortType type) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + Pointer bufferPort = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_function_addinput.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, Lib3MFWrapper.EnumConversion.convertImplicitPortTypeToConst(type), bufferPort})); + Pointer valuePort = bufferPort.getPointer(0); + ImplicitPort port = null; + if (valuePort == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Port was a null pointer"); + } + port = mWrapper.PolymorphicFactory(valuePort, ImplicitPort.class); + return port; + } + + /** + * Retrieves the inputs + * + * @return iterator for the list of inputs + * @throws Lib3MFException + */ + public ImplicitPortIterator getInputs() throws Lib3MFException { + Pointer bufferIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_function_getinputs.invokeInt(new java.lang.Object[]{mHandle, bufferIterator})); + Pointer valueIterator = bufferIterator.getPointer(0); + ImplicitPortIterator iterator = null; + if (valueIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Iterator was a null pointer"); + } + iterator = mWrapper.PolymorphicFactory(valueIterator, ImplicitPortIterator.class); + return iterator; + } + + /** + * Removes an input + * + * @param input The input to be removed + * @throws Lib3MFException + */ + public void removeInput(ImplicitPort input) throws Lib3MFException { + Pointer inputHandle = null; + if (input != null) { + inputHandle = input.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Input is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_function_removeinput.invokeInt(new java.lang.Object[]{mHandle, inputHandle})); + } + + /** + * Add an output + * + * @param identifier the identifier of the output + * @param displayName the display name of the output + * @param type the type of the input + * @return The added input port + * @throws Lib3MFException + */ + public ImplicitPort addOutput(String identifier, String displayName, Lib3MFWrapper.ImplicitPortType type) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + Pointer bufferPort = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_function_addoutput.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, Lib3MFWrapper.EnumConversion.convertImplicitPortTypeToConst(type), bufferPort})); + Pointer valuePort = bufferPort.getPointer(0); + ImplicitPort port = null; + if (valuePort == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Port was a null pointer"); + } + port = mWrapper.PolymorphicFactory(valuePort, ImplicitPort.class); + return port; + } + + /** + * Retrieves the outputs + * + * @return iterator for the outputs + * @throws Lib3MFException + */ + public ImplicitPortIterator getOutputs() throws Lib3MFException { + Pointer bufferIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_function_getoutputs.invokeInt(new java.lang.Object[]{mHandle, bufferIterator})); + Pointer valueIterator = bufferIterator.getPointer(0); + ImplicitPortIterator iterator = null; + if (valueIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Iterator was a null pointer"); + } + iterator = mWrapper.PolymorphicFactory(valueIterator, ImplicitPortIterator.class); + return iterator; + } + + /** + * Removes an output + * + * @param output The output to be removed + * @throws Lib3MFException + */ + public void removeOutput(ImplicitPort output) throws Lib3MFException { + Pointer outputHandle = null; + if (output != null) { + outputHandle = output.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Output is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_function_removeoutput.invokeInt(new java.lang.Object[]{mHandle, outputHandle})); + } + + /** + * Retrieves an input + * + * @param identifier the identifier of the input + * @return the input port + * @throws Lib3MFException + */ + public ImplicitPort findInput(String identifier) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + Pointer bufferInput = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_function_findinput.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferInput})); + Pointer valueInput = bufferInput.getPointer(0); + ImplicitPort input = null; + if (valueInput == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Input was a null pointer"); + } + input = mWrapper.PolymorphicFactory(valueInput, ImplicitPort.class); + return input; + } + + /** + * Retrieves an output + * + * @param identifier the identifier of the output + * @return the output port + * @throws Lib3MFException + */ + public ImplicitPort findOutput(String identifier) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + Pointer bufferOutput = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_function_findoutput.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferOutput})); + Pointer valueOutput = bufferOutput.getPointer(0); + ImplicitPort output = null; + if (valueOutput == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Output was a null pointer"); + } + output = mWrapper.PolymorphicFactory(valueOutput, ImplicitPort.class); + return output; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/FunctionCallNode.java b/Autogenerated/Bindings/Java9/lib3mf/FunctionCallNode.java new file mode 100644 index 000000000..57d14a149 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/FunctionCallNode.java @@ -0,0 +1,75 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class FunctionCallNode extends ImplicitNode { + + public FunctionCallNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the input for the function id + * + * @return the input port for the function + * @throws Lib3MFException + */ + public ImplicitPort getInputFunctionID() throws Lib3MFException { + Pointer bufferFunction = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_functioncallnode_getinputfunctionid.invokeInt(new java.lang.Object[]{mHandle, bufferFunction})); + Pointer valueFunction = bufferFunction.getPointer(0); + ImplicitPort function = null; + if (valueFunction == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Function was a null pointer"); + } + function = mWrapper.PolymorphicFactory(valueFunction, ImplicitPort.class); + return function; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/FunctionFromImage3D.java b/Autogenerated/Bindings/Java9/lib3mf/FunctionFromImage3D.java new file mode 100644 index 000000000..c8aa233c3 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/FunctionFromImage3D.java @@ -0,0 +1,204 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class FunctionFromImage3D extends Function { + + public FunctionFromImage3D(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the selected 3D image. + * + * @return image instance + * @throws Lib3MFException + */ + public Image3D getImage3D() throws Lib3MFException { + Pointer bufferImage3D = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_functionfromimage3d_getimage3d.invokeInt(new java.lang.Object[]{mHandle, bufferImage3D})); + Pointer valueImage3D = bufferImage3D.getPointer(0); + Image3D image3D = null; + if (valueImage3D == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Image3D was a null pointer"); + } + image3D = mWrapper.PolymorphicFactory(valueImage3D, Image3D.class); + return image3D; + } + + /** + * Sets the 3D image of the selector. + * + * @param image3D image instance + * @throws Lib3MFException + */ + public void setImage3D(Image3D image3D) throws Lib3MFException { + Pointer image3DHandle = null; + if (image3D != null) { + image3DHandle = image3D.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Image3D is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_functionfromimage3d_setimage3d.invokeInt(new java.lang.Object[]{mHandle, image3DHandle})); + } + + /** + * Sets the texture filter of the selector. + * + * @param filter texture filter + * @throws Lib3MFException + */ + public void setFilter(Lib3MFWrapper.TextureFilter filter) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_functionfromimage3d_setfilter.invokeInt(new java.lang.Object[]{mHandle, Lib3MFWrapper.EnumConversion.convertTextureFilterToConst(filter)})); + } + + /** + * Returns the texture filter of the selector. + * + * @return texture filter + * @throws Lib3MFException + */ + public Lib3MFWrapper.TextureFilter getFilter() throws Lib3MFException { + Pointer bufferFilter = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_functionfromimage3d_getfilter.invokeInt(new java.lang.Object[]{mHandle, bufferFilter})); + return Lib3MFWrapper.EnumConversion.convertConstToTextureFilter(bufferFilter.getInt(0)); + } + + /** + * Sets the tile styles of the selector. + * + * @param tileStyleU tile style in U + * @param tileStyleV tile style in V + * @param tileStyleW tile style in W + * @throws Lib3MFException + */ + public void setTileStyles(Lib3MFWrapper.TextureTileStyle tileStyleU, Lib3MFWrapper.TextureTileStyle tileStyleV, Lib3MFWrapper.TextureTileStyle tileStyleW) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_functionfromimage3d_settilestyles.invokeInt(new java.lang.Object[]{mHandle, Lib3MFWrapper.EnumConversion.convertTextureTileStyleToConst(tileStyleU), Lib3MFWrapper.EnumConversion.convertTextureTileStyleToConst(tileStyleV), Lib3MFWrapper.EnumConversion.convertTextureTileStyleToConst(tileStyleW)})); + } + + /** + * Retrieves the tile styles of the selector. + * + * @return GetTileStyles Result Tuple + * @throws Lib3MFException + */ + public GetTileStylesResult getTileStyles() throws Lib3MFException { + Pointer bufferTileStyleU = new Memory(4); + Pointer bufferTileStyleV = new Memory(4); + Pointer bufferTileStyleW = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_functionfromimage3d_gettilestyles.invokeInt(new java.lang.Object[]{mHandle, bufferTileStyleU, bufferTileStyleV, bufferTileStyleW})); + GetTileStylesResult returnTuple = new GetTileStylesResult(); + returnTuple.TileStyleU = Lib3MFWrapper.EnumConversion.convertConstToTextureTileStyle(bufferTileStyleU.getInt(0)); + returnTuple.TileStyleV = Lib3MFWrapper.EnumConversion.convertConstToTextureTileStyle(bufferTileStyleV.getInt(0)); + returnTuple.TileStyleW = Lib3MFWrapper.EnumConversion.convertConstToTextureTileStyle(bufferTileStyleW.getInt(0)); + return returnTuple; + } + + public static class GetTileStylesResult { + /** + * tile style in U + */ + public Lib3MFWrapper.TextureTileStyle TileStyleU; + + /** + * tile style in V + */ + public Lib3MFWrapper.TextureTileStyle TileStyleV; + + /** + * tile style in W + */ + public Lib3MFWrapper.TextureTileStyle TileStyleW; + + } + /** + * returns the offset value for the pixel values in the Image3D + * + * @return the offset value for the pixel values in the Image3D + * @throws Lib3MFException + */ + public double getOffset() throws Lib3MFException { + Pointer bufferOffset = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_functionfromimage3d_getoffset.invokeInt(new java.lang.Object[]{mHandle, bufferOffset})); + return bufferOffset.getDouble(0); + } + + /** + * Sets the offset value for the pixel values in the Image3D + * + * @param offset the offset value for the pixel values in the Image3D + * @throws Lib3MFException + */ + public void setOffset(double offset) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_functionfromimage3d_setoffset.invokeInt(new java.lang.Object[]{mHandle, offset})); + } + + /** + * returns the scale value for the pixel values in the Image3D + * + * @return the scale value for the pixel values in the Image3D + * @throws Lib3MFException + */ + public double getScale() throws Lib3MFException { + Pointer bufferScale = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_functionfromimage3d_getscale.invokeInt(new java.lang.Object[]{mHandle, bufferScale})); + return bufferScale.getDouble(0); + } + + /** + * Sets the scale value for the pixel values in the Image3D + * + * @param scale the scale value for the pixel values in the Image3D + * @throws Lib3MFException + */ + public void setScale(double scale) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_functionfromimage3d_setscale.invokeInt(new java.lang.Object[]{mHandle, scale})); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/FunctionGradientNode.java b/Autogenerated/Bindings/Java9/lib3mf/FunctionGradientNode.java new file mode 100644 index 000000000..4d13d1a49 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/FunctionGradientNode.java @@ -0,0 +1,223 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class FunctionGradientNode extends ImplicitNode { + + public FunctionGradientNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the input for the function id + * + * @return the input port for the function + * @throws Lib3MFException + */ + public ImplicitPort getInputFunctionID() throws Lib3MFException { + Pointer bufferFunction = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_functiongradientnode_getinputfunctionid.invokeInt(new java.lang.Object[]{mHandle, bufferFunction})); + Pointer valueFunction = bufferFunction.getPointer(0); + ImplicitPort function = null; + if (valueFunction == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Function was a null pointer"); + } + function = mWrapper.PolymorphicFactory(valueFunction, ImplicitPort.class); + return function; + } + + /** + * Retrieves the input for the position + * + * @return the input port for the position + * @throws Lib3MFException + */ + public ImplicitPort getInputPos() throws Lib3MFException { + Pointer bufferPos = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_functiongradientnode_getinputpos.invokeInt(new java.lang.Object[]{mHandle, bufferPos})); + Pointer valuePos = bufferPos.getPointer(0); + ImplicitPort pos = null; + if (valuePos == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Pos was a null pointer"); + } + pos = mWrapper.PolymorphicFactory(valuePos, ImplicitPort.class); + return pos; + } + + /** + * Retrieves the input for the finite difference step + * + * @return the input port for the finite difference step + * @throws Lib3MFException + */ + public ImplicitPort getInputStep() throws Lib3MFException { + Pointer bufferStep = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_functiongradientnode_getinputstep.invokeInt(new java.lang.Object[]{mHandle, bufferStep})); + Pointer valueStep = bufferStep.getPointer(0); + ImplicitPort step = null; + if (valueStep == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Step was a null pointer"); + } + step = mWrapper.PolymorphicFactory(valueStep, ImplicitPort.class); + return step; + } + + /** + * Sets the name of the referenced scalar output + * + * @param scalarOutputName the name of the scalar output of the referenced function + * @throws Lib3MFException + */ + public void setScalarOutputName(String scalarOutputName) throws Lib3MFException { + byte[] bytesScalarOutputName = scalarOutputName.getBytes(StandardCharsets.UTF_8); + Memory bufferScalarOutputName = new Memory(bytesScalarOutputName.length + 1); + bufferScalarOutputName.write(0, bytesScalarOutputName, 0, bytesScalarOutputName.length); + bufferScalarOutputName.setByte(bytesScalarOutputName.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_functiongradientnode_setscalaroutputname.invokeInt(new java.lang.Object[]{mHandle, bufferScalarOutputName})); + } + + /** + * Retrieves the name of the referenced scalar output + * + * @return the name of the scalar output of the referenced function + * @throws Lib3MFException + */ + public String getScalarOutputName() throws Lib3MFException { + Pointer bytesNeededScalarOutputName = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_functiongradientnode_getscalaroutputname.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededScalarOutputName, null})); + int sizeScalarOutputName = bytesNeededScalarOutputName.getInt(0); + Pointer bufferScalarOutputName = new Memory(sizeScalarOutputName); + mWrapper.checkError(this, mWrapper.lib3mf_functiongradientnode_getscalaroutputname.invokeInt(new java.lang.Object[]{mHandle, sizeScalarOutputName, bytesNeededScalarOutputName, bufferScalarOutputName})); + return new String(bufferScalarOutputName.getByteArray(0, sizeScalarOutputName - 1), StandardCharsets.UTF_8); + } + + /** + * Sets the name of the referenced vector input + * + * @param vectorInputName the name of the vector input (float3) of the referenced function + * @throws Lib3MFException + */ + public void setVectorInputName(String vectorInputName) throws Lib3MFException { + byte[] bytesVectorInputName = vectorInputName.getBytes(StandardCharsets.UTF_8); + Memory bufferVectorInputName = new Memory(bytesVectorInputName.length + 1); + bufferVectorInputName.write(0, bytesVectorInputName, 0, bytesVectorInputName.length); + bufferVectorInputName.setByte(bytesVectorInputName.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_functiongradientnode_setvectorinputname.invokeInt(new java.lang.Object[]{mHandle, bufferVectorInputName})); + } + + /** + * Retrieves the name of the referenced vector input + * + * @return the name of the vector input (float3) of the referenced function + * @throws Lib3MFException + */ + public String getVectorInputName() throws Lib3MFException { + Pointer bytesNeededVectorInputName = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_functiongradientnode_getvectorinputname.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededVectorInputName, null})); + int sizeVectorInputName = bytesNeededVectorInputName.getInt(0); + Pointer bufferVectorInputName = new Memory(sizeVectorInputName); + mWrapper.checkError(this, mWrapper.lib3mf_functiongradientnode_getvectorinputname.invokeInt(new java.lang.Object[]{mHandle, sizeVectorInputName, bytesNeededVectorInputName, bufferVectorInputName})); + return new String(bufferVectorInputName.getByteArray(0, sizeVectorInputName - 1), StandardCharsets.UTF_8); + } + + /** + * Retrieves the normalized gradient output + * + * @return the output port for the normalized gradient + * @throws Lib3MFException + */ + public ImplicitPort getOutputVector() throws Lib3MFException { + Pointer bufferVector = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_functiongradientnode_getoutputvector.invokeInt(new java.lang.Object[]{mHandle, bufferVector})); + Pointer valueVector = bufferVector.getPointer(0); + ImplicitPort vector = null; + if (valueVector == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Vector was a null pointer"); + } + vector = mWrapper.PolymorphicFactory(valueVector, ImplicitPort.class); + return vector; + } + + /** + * Retrieves the raw gradient output + * + * @return the output port for the raw gradient + * @throws Lib3MFException + */ + public ImplicitPort getOutputGradient() throws Lib3MFException { + Pointer bufferGradient = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_functiongradientnode_getoutputgradient.invokeInt(new java.lang.Object[]{mHandle, bufferGradient})); + Pointer valueGradient = bufferGradient.getPointer(0); + ImplicitPort gradient = null; + if (valueGradient == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Gradient was a null pointer"); + } + gradient = mWrapper.PolymorphicFactory(valueGradient, ImplicitPort.class); + return gradient; + } + + /** + * Retrieves the gradient magnitude output + * + * @return the output port for the gradient magnitude + * @throws Lib3MFException + */ + public ImplicitPort getOutputMagnitude() throws Lib3MFException { + Pointer bufferMagnitude = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_functiongradientnode_getoutputmagnitude.invokeInt(new java.lang.Object[]{mHandle, bufferMagnitude})); + Pointer valueMagnitude = bufferMagnitude.getPointer(0); + ImplicitPort magnitude = null; + if (valueMagnitude == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Magnitude was a null pointer"); + } + magnitude = mWrapper.PolymorphicFactory(valueMagnitude, ImplicitPort.class); + return magnitude; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/FunctionIterator.java b/Autogenerated/Bindings/Java9/lib3mf/FunctionIterator.java new file mode 100644 index 000000000..763b7e40e --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/FunctionIterator.java @@ -0,0 +1,75 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class FunctionIterator extends ResourceIterator { + + public FunctionIterator(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the Function the iterator points at. + * + * @return returns the Function instance. + * @throws Lib3MFException + */ + public Function getCurrentFunction() throws Lib3MFException { + Pointer bufferResource = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_functioniterator_getcurrentfunction.invokeInt(new java.lang.Object[]{mHandle, bufferResource})); + Pointer valueResource = bufferResource.getPointer(0); + Function resource = null; + if (valueResource == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Resource was a null pointer"); + } + resource = mWrapper.PolymorphicFactory(valueResource, Function.class); + return resource; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/FunctionReference.java b/Autogenerated/Bindings/Java9/lib3mf/FunctionReference.java new file mode 100644 index 000000000..974d3d6fd --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/FunctionReference.java @@ -0,0 +1,178 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class FunctionReference extends Base { + + public FunctionReference(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the UniqueResourceID of the Function. Only functions with a 'pos'-input are allowed. + * + * @return returns the UniqueResourceID. + * @throws Lib3MFException + */ + public int getFunctionResourceID() throws Lib3MFException { + Pointer bufferUniqueResourceID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_functionreference_getfunctionresourceid.invokeInt(new java.lang.Object[]{mHandle, bufferUniqueResourceID})); + return bufferUniqueResourceID.getInt(0); + } + + /** + * Sets the UniqueResourceID to refer to. + * + * @param uniqueResourceID UniqueResourceID of the function + * @throws Lib3MFException + */ + public void setFunctionResourceID(int uniqueResourceID) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_functionreference_setfunctionresourceid.invokeInt(new java.lang.Object[]{mHandle, uniqueResourceID})); + } + + /** + * Returns the transformation matrix into the coordinate system of the referenced Function. + * + * @return the transformation matrix + * @throws Lib3MFException + */ + public Transform getTransform() throws Lib3MFException { + Pointer bufferTransform = new Memory(Transform.SIZE); + mWrapper.checkError(this, mWrapper.lib3mf_functionreference_gettransform.invokeInt(new java.lang.Object[]{mHandle, bufferTransform})); + Transform transform = new Transform(); + transform.readFromPointer(bufferTransform, 0); + return transform; + } + + /** + * Sets the transformation matrix into the coordinate system of the referenced Function. + * + * @param transform new transformation matrix + * @throws Lib3MFException + */ + public void setTransform(Transform transform) throws Lib3MFException { + Pointer bufferTransform = new Memory(Transform.SIZE); + transform.writeToPointer(bufferTransform, 0); + mWrapper.checkError(this, mWrapper.lib3mf_functionreference_settransform.invokeInt(new java.lang.Object[]{mHandle, bufferTransform})); + } + + /** + * Returns the name of the function output channel to use. + * + * @return the name of the function output channel + * @throws Lib3MFException + */ + public String getChannelName() throws Lib3MFException { + Pointer bytesNeededChannelName = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_functionreference_getchannelname.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededChannelName, null})); + int sizeChannelName = bytesNeededChannelName.getInt(0); + Pointer bufferChannelName = new Memory(sizeChannelName); + mWrapper.checkError(this, mWrapper.lib3mf_functionreference_getchannelname.invokeInt(new java.lang.Object[]{mHandle, sizeChannelName, bytesNeededChannelName, bufferChannelName})); + return new String(bufferChannelName.getByteArray(0, sizeChannelName - 1), StandardCharsets.UTF_8); + } + + /** + * Sets the name of the function output channel to use. + * + * @param channelName new name of the function output channel + * @throws Lib3MFException + */ + public void setChannelName(String channelName) throws Lib3MFException { + byte[] bytesChannelName = channelName.getBytes(StandardCharsets.UTF_8); + Memory bufferChannelName = new Memory(bytesChannelName.length + 1); + bufferChannelName.write(0, bytesChannelName, 0, bytesChannelName.length); + bufferChannelName.setByte(bytesChannelName.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_functionreference_setchannelname.invokeInt(new java.lang.Object[]{mHandle, bufferChannelName})); + } + + /** + * Sets the minimal feature size as a hint for the function evaluator + * + * @param minFeatureSize minimal feature size + * @throws Lib3MFException + */ + public void setMinFeatureSize(double minFeatureSize) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_functionreference_setminfeaturesize.invokeInt(new java.lang.Object[]{mHandle, minFeatureSize})); + } + + /** + * Returns the minimal feature size as a hint for the function evaluator + * + * @return minimal feature size + * @throws Lib3MFException + */ + public double getMinFeatureSize() throws Lib3MFException { + Pointer bufferMinFeatureSize = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_functionreference_getminfeaturesize.invokeInt(new java.lang.Object[]{mHandle, bufferMinFeatureSize})); + return bufferMinFeatureSize.getDouble(0); + } + + /** + * Sets the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). + * + * @param fallBackValue fallback value + * @throws Lib3MFException + */ + public void setFallBackValue(double fallBackValue) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_functionreference_setfallbackvalue.invokeInt(new java.lang.Object[]{mHandle, fallBackValue})); + } + + /** + * Returns the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). + * + * @return fallback value + * @throws Lib3MFException + */ + public double getFallBackValue() throws Lib3MFException { + Pointer bufferFallBackValue = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_functionreference_getfallbackvalue.invokeInt(new java.lang.Object[]{mHandle, bufferFallBackValue})); + return bufferFallBackValue.getDouble(0); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/Image3D.java b/Autogenerated/Bindings/Java9/lib3mf/Image3D.java new file mode 100644 index 000000000..62b722891 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/Image3D.java @@ -0,0 +1,98 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Image3D extends Resource { + + public Image3D(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * returns the name of this Image3D + * + * @return the name of this Image3D + * @throws Lib3MFException + */ + public String getName() throws Lib3MFException { + Pointer bytesNeededName = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_image3d_getname.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededName, null})); + int sizeName = bytesNeededName.getInt(0); + Pointer bufferName = new Memory(sizeName); + mWrapper.checkError(this, mWrapper.lib3mf_image3d_getname.invokeInt(new java.lang.Object[]{mHandle, sizeName, bytesNeededName, bufferName})); + return new String(bufferName.getByteArray(0, sizeName - 1), StandardCharsets.UTF_8); + } + + /** + * sets a new name of this Image3D + * + * @param name the new name of this Image3D + * @throws Lib3MFException + */ + public void setName(String name) throws Lib3MFException { + byte[] bytesName = name.getBytes(StandardCharsets.UTF_8); + Memory bufferName = new Memory(bytesName.length + 1); + bufferName.write(0, bytesName, 0, bytesName.length); + bufferName.setByte(bytesName.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_image3d_setname.invokeInt(new java.lang.Object[]{mHandle, bufferName})); + } + + /** + * Retrieves, if this Image3D is a ImageStack + * + * @return returns, whether the Image3D is an ImageStack + * @throws Lib3MFException + */ + public boolean isImageStack() throws Lib3MFException { + Pointer bufferIsImageStack = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_image3d_isimagestack.invokeInt(new java.lang.Object[]{mHandle, bufferIsImageStack})); + return bufferIsImageStack.getByte(0) != 0; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/Image3DIterator.java b/Autogenerated/Bindings/Java9/lib3mf/Image3DIterator.java new file mode 100644 index 000000000..28e747078 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/Image3DIterator.java @@ -0,0 +1,75 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Image3DIterator extends ResourceIterator { + + public Image3DIterator(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the Image3D the iterator points at. + * + * @return returns the Image3D instance. + * @throws Lib3MFException + */ + public Image3D getCurrentImage3D() throws Lib3MFException { + Pointer bufferResource = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_image3diterator_getcurrentimage3d.invokeInt(new java.lang.Object[]{mHandle, bufferResource})); + Pointer valueResource = bufferResource.getPointer(0); + Image3D resource = null; + if (valueResource == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Resource was a null pointer"); + } + resource = mWrapper.PolymorphicFactory(valueResource, Image3D.class); + return resource; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/ImageStack.java b/Autogenerated/Bindings/Java9/lib3mf/ImageStack.java new file mode 100644 index 000000000..fc38fbc4f --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/ImageStack.java @@ -0,0 +1,231 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ImageStack extends Image3D { + + public ImageStack(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the number of rows in each image of this image3d + * + * @return number of rows + * @throws Lib3MFException + */ + public int getRowCount() throws Lib3MFException { + Pointer bufferRowCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_imagestack_getrowcount.invokeInt(new java.lang.Object[]{mHandle, bufferRowCount})); + return bufferRowCount.getInt(0); + } + + /** + * Sets the number of rows in each image of this image3d + * + * @param rowCount number of rows + * @throws Lib3MFException + */ + public void setRowCount(int rowCount) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_imagestack_setrowcount.invokeInt(new java.lang.Object[]{mHandle, rowCount})); + } + + /** + * Retrieves the number of columns in each image of this image3d + * + * @return number of columns + * @throws Lib3MFException + */ + public int getColumnCount() throws Lib3MFException { + Pointer bufferColumnCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_imagestack_getcolumncount.invokeInt(new java.lang.Object[]{mHandle, bufferColumnCount})); + return bufferColumnCount.getInt(0); + } + + /** + * Sets the number of columns in each image of this image3d + * + * @param columnCount number of columns + * @throws Lib3MFException + */ + public void setColumnCount(int columnCount) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_imagestack_setcolumncount.invokeInt(new java.lang.Object[]{mHandle, columnCount})); + } + + /** + * Retrieves the number of images in the stack. + * + * @return number of images + * @throws Lib3MFException + */ + public int getSheetCount() throws Lib3MFException { + Pointer bufferSheetCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_imagestack_getsheetcount.invokeInt(new java.lang.Object[]{mHandle, bufferSheetCount})); + return bufferSheetCount.getInt(0); + } + + /** + * Retrieves a sheet of the stack. Raises an error if sheet is not set. + * + * @param index index of the image (0-based) + * @return attachment containing the image + * @throws Lib3MFException + */ + public Attachment getSheet(int index) throws Lib3MFException { + Pointer bufferSheet = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_imagestack_getsheet.invokeInt(new java.lang.Object[]{mHandle, index, bufferSheet})); + Pointer valueSheet = bufferSheet.getPointer(0); + Attachment sheet = null; + if (valueSheet == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Sheet was a null pointer"); + } + sheet = mWrapper.PolymorphicFactory(valueSheet, Attachment.class); + return sheet; + } + + /** + * Sets a sheet to an existing attachment. + * + * @param index index of the image (0-based) + * @param sheet attachment containing the image + * @throws Lib3MFException + */ + public void setSheet(int index, Attachment sheet) throws Lib3MFException { + Pointer sheetHandle = null; + if (sheet != null) { + sheetHandle = sheet.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Sheet is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_imagestack_setsheet.invokeInt(new java.lang.Object[]{mHandle, index, sheetHandle})); + } + + /** + * Creates a new sheet attachment with empty data. + * + * @param index index of the image (0-based) + * @param path path of part in the package + * @return attachment containing the image + * @throws Lib3MFException + */ + public Attachment createEmptySheet(int index, String path) throws Lib3MFException { + byte[] bytesPath = path.getBytes(StandardCharsets.UTF_8); + Memory bufferPath = new Memory(bytesPath.length + 1); + bufferPath.write(0, bytesPath, 0, bytesPath.length); + bufferPath.setByte(bytesPath.length, (byte)0); + Pointer bufferSheet = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_imagestack_createemptysheet.invokeInt(new java.lang.Object[]{mHandle, index, bufferPath, bufferSheet})); + Pointer valueSheet = bufferSheet.getPointer(0); + Attachment sheet = null; + if (valueSheet == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Sheet was a null pointer"); + } + sheet = mWrapper.PolymorphicFactory(valueSheet, Attachment.class); + return sheet; + } + + /** + * Creates a new sheet attachment from a memory buffer. + * + * @param index index of the image (0-based) + * @param path path of part in the package + * @param data binary image data + * @return attachment containing the image + * @throws Lib3MFException + */ + public Attachment createSheetFromBuffer(int index, String path, byte[] data) throws Lib3MFException { + byte[] bytesPath = path.getBytes(StandardCharsets.UTF_8); + Memory bufferPath = new Memory(bytesPath.length + 1); + bufferPath.write(0, bytesPath, 0, bytesPath.length); + bufferPath.setByte(bytesPath.length, (byte)0); + Pointer bufferData = new Memory(Math.max(1, 1 * data.length)); + for (int i = 0; i < data.length; i++) { + bufferData.setByte(1 * i, data[i]); + } + Pointer bufferSheet = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_imagestack_createsheetfrombuffer.invokeInt(new java.lang.Object[]{mHandle, index, bufferPath, (long) data.length, bufferData, bufferSheet})); + Pointer valueSheet = bufferSheet.getPointer(0); + Attachment sheet = null; + if (valueSheet == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Sheet was a null pointer"); + } + sheet = mWrapper.PolymorphicFactory(valueSheet, Attachment.class); + return sheet; + } + + /** + * Creates a new sheet attachment from a file on disk. + * + * @param index index of the image (0-based) + * @param path path of part in the package + * @param fileName file name to read from + * @return attachment containing the image + * @throws Lib3MFException + */ + public Attachment createSheetFromFile(int index, String path, String fileName) throws Lib3MFException { + byte[] bytesPath = path.getBytes(StandardCharsets.UTF_8); + Memory bufferPath = new Memory(bytesPath.length + 1); + bufferPath.write(0, bytesPath, 0, bytesPath.length); + bufferPath.setByte(bytesPath.length, (byte)0); + byte[] bytesFileName = fileName.getBytes(StandardCharsets.UTF_8); + Memory bufferFileName = new Memory(bytesFileName.length + 1); + bufferFileName.write(0, bytesFileName, 0, bytesFileName.length); + bufferFileName.setByte(bytesFileName.length, (byte)0); + Pointer bufferSheet = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_imagestack_createsheetfromfile.invokeInt(new java.lang.Object[]{mHandle, index, bufferPath, bufferFileName, bufferSheet})); + Pointer valueSheet = bufferSheet.getPointer(0); + Attachment sheet = null; + if (valueSheet == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Sheet was a null pointer"); + } + sheet = mWrapper.PolymorphicFactory(valueSheet, Attachment.class); + return sheet; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/ImplicitFunction.java b/Autogenerated/Bindings/Java9/lib3mf/ImplicitFunction.java new file mode 100644 index 000000000..6e885097a --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/ImplicitFunction.java @@ -0,0 +1,1962 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ImplicitFunction extends Function { + + public ImplicitFunction(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the identifier of the function + * + * @return the identifier + * @throws Lib3MFException + */ + public String getIdentifier() throws Lib3MFException { + Pointer bytesNeededIdentifier = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_getidentifier.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededIdentifier, null})); + int sizeIdentifier = bytesNeededIdentifier.getInt(0); + Pointer bufferIdentifier = new Memory(sizeIdentifier); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_getidentifier.invokeInt(new java.lang.Object[]{mHandle, sizeIdentifier, bytesNeededIdentifier, bufferIdentifier})); + return new String(bufferIdentifier.getByteArray(0, sizeIdentifier - 1), StandardCharsets.UTF_8); + } + + /** + * Sets the identifier of the function + * + * @param identifier the identifier + * @throws Lib3MFException + */ + public void setIdentifier(String identifier) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_setidentifier.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier})); + } + + /** + * Add a node + * + * @param nodeType the type of the node + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public ImplicitNode addNode(Lib3MFWrapper.ImplicitNodeType nodeType, String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addnode.invokeInt(new java.lang.Object[]{mHandle, Lib3MFWrapper.EnumConversion.convertImplicitNodeTypeToConst(nodeType), bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + ImplicitNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, ImplicitNode.class); + return node; + } + + /** + * Add a SinNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public SinNode addSinNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addsinnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + SinNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, SinNode.class); + return node; + } + + /** + * Add a CosNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public CosNode addCosNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addcosnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + CosNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, CosNode.class); + return node; + } + + /** + * Add a TanNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public TanNode addTanNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addtannode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + TanNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, TanNode.class); + return node; + } + + /** + * Add a ArcSinNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public ArcSinNode addArcSinNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addarcsinnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + ArcSinNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, ArcSinNode.class); + return node; + } + + /** + * Add a ArcCosNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public ArcCosNode addArcCosNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addarccosnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + ArcCosNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, ArcCosNode.class); + return node; + } + + /** + * Add a ArcTan2Node + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public ArcTan2Node addArcTan2Node(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addarctan2node.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + ArcTan2Node node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, ArcTan2Node.class); + return node; + } + + /** + * Add a SinhNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public SinhNode addSinhNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addsinhnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + SinhNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, SinhNode.class); + return node; + } + + /** + * Add a CoshNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public CoshNode addCoshNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addcoshnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + CoshNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, CoshNode.class); + return node; + } + + /** + * Add a TanhNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public TanhNode addTanhNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addtanhnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + TanhNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, TanhNode.class); + return node; + } + + /** + * Add a RoundNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public RoundNode addRoundNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addroundnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + RoundNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, RoundNode.class); + return node; + } + + /** + * Add a CeilNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public CeilNode addCeilNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addceilnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + CeilNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, CeilNode.class); + return node; + } + + /** + * Add a FloorNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public FloorNode addFloorNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addfloornode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + FloorNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, FloorNode.class); + return node; + } + + /** + * Add a SignNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public SignNode addSignNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addsignnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + SignNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, SignNode.class); + return node; + } + + /** + * Add a FractNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public FractNode addFractNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addfractnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + FractNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, FractNode.class); + return node; + } + + /** + * Add a AbsNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public AbsNode addAbsNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addabsnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + AbsNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, AbsNode.class); + return node; + } + + /** + * Add a ExpNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public ExpNode addExpNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addexpnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + ExpNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, ExpNode.class); + return node; + } + + /** + * Add a LogNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public LogNode addLogNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addlognode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + LogNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, LogNode.class); + return node; + } + + /** + * Add a Log2Node + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public Log2Node addLog2Node(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addlog2node.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + Log2Node node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, Log2Node.class); + return node; + } + + /** + * Add a Log10Node + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public Log10Node addLog10Node(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addlog10node.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + Log10Node node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, Log10Node.class); + return node; + } + + /** + * Add a LengthNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public LengthNode addLengthNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addlengthnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + LengthNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, LengthNode.class); + return node; + } + + /** + * Add a TransposeNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public TransposeNode addTransposeNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addtransposenode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + TransposeNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, TransposeNode.class); + return node; + } + + /** + * Add a InverseNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public InverseNode addInverseNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addinversenode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + InverseNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, InverseNode.class); + return node; + } + + /** + * Add a SqrtNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public SqrtNode addSqrtNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addsqrtnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + SqrtNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, SqrtNode.class); + return node; + } + + /** + * Add a ResourceIdNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public ResourceIdNode addResourceIdNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addresourceidnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + ResourceIdNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, ResourceIdNode.class); + return node; + } + + /** + * Add an AdditionNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public AdditionNode addAdditionNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addadditionnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + AdditionNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, AdditionNode.class); + return node; + } + + /** + * Add a SubtractionNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public SubtractionNode addSubtractionNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addsubtractionnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + SubtractionNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, SubtractionNode.class); + return node; + } + + /** + * Add a MultiplicationNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public MultiplicationNode addMultiplicationNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addmultiplicationnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + MultiplicationNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, MultiplicationNode.class); + return node; + } + + /** + * Add a DivisionNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public DivisionNode addDivisionNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_adddivisionnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + DivisionNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, DivisionNode.class); + return node; + } + + /** + * Add a DotNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public DotNode addDotNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_adddotnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + DotNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, DotNode.class); + return node; + } + + /** + * Add a CrossNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public CrossNode addCrossNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addcrossnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + CrossNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, CrossNode.class); + return node; + } + + /** + * Add a MatVecMultiplicationNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public MatVecMultiplicationNode addMatVecMultiplicationNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addmatvecmultiplicationnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + MatVecMultiplicationNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, MatVecMultiplicationNode.class); + return node; + } + + /** + * Add a MinNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public MinNode addMinNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addminnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + MinNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, MinNode.class); + return node; + } + + /** + * Add a MaxNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public MaxNode addMaxNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addmaxnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + MaxNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, MaxNode.class); + return node; + } + + /** + * Add a FmodNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public FmodNode addFmodNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addfmodnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + FmodNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, FmodNode.class); + return node; + } + + /** + * Add a PowNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public PowNode addPowNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addpownode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + PowNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, PowNode.class); + return node; + } + + /** + * Add a SelectNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public SelectNode addSelectNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addselectnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + SelectNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, SelectNode.class); + return node; + } + + /** + * Add a ClampNode + * + * @param identifier the identifier of the node + * @param configuration the configuration of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public ClampNode addClampNode(String identifier, Lib3MFWrapper.ImplicitNodeConfiguration configuration, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addclampnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, Lib3MFWrapper.EnumConversion.convertImplicitNodeConfigurationToConst(configuration), bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + ClampNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, ClampNode.class); + return node; + } + + /** + * Add a ComposeVectorNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public ComposeVectorNode addComposeVectorNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addcomposevectornode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + ComposeVectorNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, ComposeVectorNode.class); + return node; + } + + /** + * Add a VectorFromScalar + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public VectorFromScalarNode addVectorFromScalarNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addvectorfromscalarnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + VectorFromScalarNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, VectorFromScalarNode.class); + return node; + } + + /** + * Add a DecomposeVectorNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public DecomposeVectorNode addDecomposeVectorNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_adddecomposevectornode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + DecomposeVectorNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, DecomposeVectorNode.class); + return node; + } + + /** + * Add a ComposeMatrixNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public ComposeMatrixNode addComposeMatrixNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addcomposematrixnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + ComposeMatrixNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, ComposeMatrixNode.class); + return node; + } + + /** + * Add a MatrixFromRowsNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public MatrixFromRowsNode addMatrixFromRowsNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addmatrixfromrowsnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + MatrixFromRowsNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, MatrixFromRowsNode.class); + return node; + } + + /** + * Add a MatrixFromColumnsNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public MatrixFromColumnsNode addMatrixFromColumnsNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addmatrixfromcolumnsnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + MatrixFromColumnsNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, MatrixFromColumnsNode.class); + return node; + } + + /** + * Add a ConstantNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public ConstantNode addConstantNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addconstantnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + ConstantNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, ConstantNode.class); + return node; + } + + /** + * Add a ConstVecNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public ConstVecNode addConstVecNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addconstvecnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + ConstVecNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, ConstVecNode.class); + return node; + } + + /** + * Add a ConstMatNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public ConstMatNode addConstMatNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addconstmatnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + ConstMatNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, ConstMatNode.class); + return node; + } + + /** + * Add a MeshNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public MeshNode addMeshNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addmeshnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + MeshNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, MeshNode.class); + return node; + } + + /** + * Add a UnsignedMeshNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public UnsignedMeshNode addUnsignedMeshNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addunsignedmeshnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + UnsignedMeshNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, UnsignedMeshNode.class); + return node; + } + + /** + * Add a BeamLatticeNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public BeamLatticeNode addBeamLatticeNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addbeamlatticenode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + BeamLatticeNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, BeamLatticeNode.class); + return node; + } + + /** + * Add a FunctionGradientNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public FunctionGradientNode addFunctionGradientNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addfunctiongradientnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + FunctionGradientNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, FunctionGradientNode.class); + return node; + } + + /** + * Add a NormalizeDistanceNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public NormalizeDistanceNode addNormalizeDistanceNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addnormalizedistancenode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + NormalizeDistanceNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, NormalizeDistanceNode.class); + return node; + } + + /** + * Add a FunctionCallNode + * + * @param identifier the identifier of the node + * @param displayName the display name of the node + * @param tag the tag of the node + * @return the added node + * @throws Lib3MFException + */ + public FunctionCallNode addFunctionCallNode(String identifier, String displayName, String tag) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addfunctioncallnode.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferTag, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + FunctionCallNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, FunctionCallNode.class); + return node; + } + + /** + * Retrieves the nodes + * + * @return iterator for the list of nodes + * @throws Lib3MFException + */ + public NodeIterator getNodes() throws Lib3MFException { + Pointer bufferIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_getnodes.invokeInt(new java.lang.Object[]{mHandle, bufferIterator})); + Pointer valueIterator = bufferIterator.getPointer(0); + NodeIterator iterator = null; + if (valueIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Iterator was a null pointer"); + } + iterator = mWrapper.PolymorphicFactory(valueIterator, NodeIterator.class); + return iterator; + } + + /** + * Removes a node + * + * @param node The node to be removed + * @throws Lib3MFException + */ + public void removeNode(ImplicitNode node) throws Lib3MFException { + Pointer nodeHandle = null; + if (node != null) { + nodeHandle = node.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_removenode.invokeInt(new java.lang.Object[]{mHandle, nodeHandle})); + } + + /** + * Add a link + * + * @param source the source port + * @param target the target port + * @throws Lib3MFException + */ + public void addLink(ImplicitPort source, ImplicitPort target) throws Lib3MFException { + Pointer sourceHandle = null; + if (source != null) { + sourceHandle = source.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Source is a null value."); + } + Pointer targetHandle = null; + if (target != null) { + targetHandle = target.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Target is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addlink.invokeInt(new java.lang.Object[]{mHandle, sourceHandle, targetHandle})); + } + + /** + * Add a link + * + * @param source name of the source port in the format nodename.portname + * @param target name of the target port in the format nodename.portname + * @throws Lib3MFException + */ + public void addLinkByNames(String source, String target) throws Lib3MFException { + byte[] bytesSource = source.getBytes(StandardCharsets.UTF_8); + Memory bufferSource = new Memory(bytesSource.length + 1); + bufferSource.write(0, bytesSource, 0, bytesSource.length); + bufferSource.setByte(bytesSource.length, (byte)0); + byte[] bytesTarget = target.getBytes(StandardCharsets.UTF_8); + Memory bufferTarget = new Memory(bytesTarget.length + 1); + bufferTarget.write(0, bytesTarget, 0, bytesTarget.length); + bufferTarget.setByte(bytesTarget.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_addlinkbynames.invokeInt(new java.lang.Object[]{mHandle, bufferSource, bufferTarget})); + } + + /** + * Clears the function + * + * @throws Lib3MFException + */ + public void clear() throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_clear.invokeInt(new java.lang.Object[]{mHandle})); + } + + /** + * Sorts the nodes topologically + * + * @throws Lib3MFException + */ + public void sortNodesTopologically() throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_implicitfunction_sortnodestopologically.invokeInt(new java.lang.Object[]{mHandle})); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/ImplicitNode.java b/Autogenerated/Bindings/Java9/lib3mf/ImplicitNode.java new file mode 100644 index 000000000..fd11cfa02 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/ImplicitNode.java @@ -0,0 +1,304 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ImplicitNode extends Base { + + public ImplicitNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the identifier of the node + * + * @return the identifier + * @throws Lib3MFException + */ + public String getIdentifier() throws Lib3MFException { + Pointer bytesNeededIdentifier = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_implicitnode_getidentifier.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededIdentifier, null})); + int sizeIdentifier = bytesNeededIdentifier.getInt(0); + Pointer bufferIdentifier = new Memory(sizeIdentifier); + mWrapper.checkError(this, mWrapper.lib3mf_implicitnode_getidentifier.invokeInt(new java.lang.Object[]{mHandle, sizeIdentifier, bytesNeededIdentifier, bufferIdentifier})); + return new String(bufferIdentifier.getByteArray(0, sizeIdentifier - 1), StandardCharsets.UTF_8); + } + + /** + * Sets the identifier of the node + * + * @param identifier the identifier + * @throws Lib3MFException + */ + public void setIdentifier(String identifier) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_implicitnode_setidentifier.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier})); + } + + /** + * Retrieves the display name of the node + * + * @return the display name + * @throws Lib3MFException + */ + public String getDisplayName() throws Lib3MFException { + Pointer bytesNeededDisplayName = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_implicitnode_getdisplayname.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededDisplayName, null})); + int sizeDisplayName = bytesNeededDisplayName.getInt(0); + Pointer bufferDisplayName = new Memory(sizeDisplayName); + mWrapper.checkError(this, mWrapper.lib3mf_implicitnode_getdisplayname.invokeInt(new java.lang.Object[]{mHandle, sizeDisplayName, bytesNeededDisplayName, bufferDisplayName})); + return new String(bufferDisplayName.getByteArray(0, sizeDisplayName - 1), StandardCharsets.UTF_8); + } + + /** + * Sets the display name of the node + * + * @param displayName the display name + * @throws Lib3MFException + */ + public void setDisplayName(String displayName) throws Lib3MFException { + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_implicitnode_setdisplayname.invokeInt(new java.lang.Object[]{mHandle, bufferDisplayName})); + } + + /** + * Retrieves the tag of the node + * + * @return the tag + * @throws Lib3MFException + */ + public String getTag() throws Lib3MFException { + Pointer bytesNeededTag = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_implicitnode_gettag.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededTag, null})); + int sizeTag = bytesNeededTag.getInt(0); + Pointer bufferTag = new Memory(sizeTag); + mWrapper.checkError(this, mWrapper.lib3mf_implicitnode_gettag.invokeInt(new java.lang.Object[]{mHandle, sizeTag, bytesNeededTag, bufferTag})); + return new String(bufferTag.getByteArray(0, sizeTag - 1), StandardCharsets.UTF_8); + } + + /** + * Sets the tag of the node + * + * @param tag the tag + * @throws Lib3MFException + */ + public void setTag(String tag) throws Lib3MFException { + byte[] bytesTag = tag.getBytes(StandardCharsets.UTF_8); + Memory bufferTag = new Memory(bytesTag.length + 1); + bufferTag.write(0, bytesTag, 0, bytesTag.length); + bufferTag.setByte(bytesTag.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_implicitnode_settag.invokeInt(new java.lang.Object[]{mHandle, bufferTag})); + } + + /** + * Retrieves the type of the node + * + * @return the type of the node + * @throws Lib3MFException + */ + public Lib3MFWrapper.ImplicitNodeType getNodeType() throws Lib3MFException { + Pointer bufferType = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_implicitnode_getnodetype.invokeInt(new java.lang.Object[]{mHandle, bufferType})); + return Lib3MFWrapper.EnumConversion.convertConstToImplicitNodeType(bufferType.getInt(0)); + } + + /** + * Add an input + * + * @param identifier the identifier of the input + * @param displayName the display name of the input + * @return + * @throws Lib3MFException + */ + public ImplicitPort addInput(String identifier, String displayName) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + Pointer bufferPort = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitnode_addinput.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferPort})); + Pointer valuePort = bufferPort.getPointer(0); + ImplicitPort port = null; + if (valuePort == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Port was a null pointer"); + } + port = mWrapper.PolymorphicFactory(valuePort, ImplicitPort.class); + return port; + } + + /** + * Retrieves the inputs + * + * @return the iterator for the inputs + * @throws Lib3MFException + */ + public ImplicitPortIterator getInputs() throws Lib3MFException { + Pointer bufferIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitnode_getinputs.invokeInt(new java.lang.Object[]{mHandle, bufferIterator})); + Pointer valueIterator = bufferIterator.getPointer(0); + ImplicitPortIterator iterator = null; + if (valueIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Iterator was a null pointer"); + } + iterator = mWrapper.PolymorphicFactory(valueIterator, ImplicitPortIterator.class); + return iterator; + } + + /** + * Add an output + * + * @param identifier the identifier of the output + * @param displayName the display name of the output + * @return + * @throws Lib3MFException + */ + public ImplicitPort addOutput(String identifier, String displayName) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + Pointer bufferPort = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitnode_addoutput.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferDisplayName, bufferPort})); + Pointer valuePort = bufferPort.getPointer(0); + ImplicitPort port = null; + if (valuePort == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Port was a null pointer"); + } + port = mWrapper.PolymorphicFactory(valuePort, ImplicitPort.class); + return port; + } + + /** + * Retrieves the outputs + * + * @return the iterator the outputs + * @throws Lib3MFException + */ + public ImplicitPortIterator getOutputs() throws Lib3MFException { + Pointer bufferIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitnode_getoutputs.invokeInt(new java.lang.Object[]{mHandle, bufferIterator})); + Pointer valueIterator = bufferIterator.getPointer(0); + ImplicitPortIterator iterator = null; + if (valueIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Iterator was a null pointer"); + } + iterator = mWrapper.PolymorphicFactory(valueIterator, ImplicitPortIterator.class); + return iterator; + } + + /** + * Retrieves an input + * + * @param identifier the identifier of the input + * @return the input port + * @throws Lib3MFException + */ + public ImplicitPort findInput(String identifier) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + Pointer bufferInput = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitnode_findinput.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferInput})); + Pointer valueInput = bufferInput.getPointer(0); + ImplicitPort input = null; + if (valueInput != Pointer.NULL) { + input = mWrapper.PolymorphicFactory(valueInput, ImplicitPort.class); + } + return input; + } + + /** + * Retrieves an output + * + * @param identifier the identifier of the output + * @return the output port + * @throws Lib3MFException + */ + public ImplicitPort findOutput(String identifier) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + Pointer bufferOutput = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitnode_findoutput.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferOutput})); + Pointer valueOutput = bufferOutput.getPointer(0); + ImplicitPort output = null; + if (valueOutput != Pointer.NULL) { + output = mWrapper.PolymorphicFactory(valueOutput, ImplicitPort.class); + } + return output; + } + + /** + * Checks if the types of the input and output ports are valid for the node type + * + * @return true, if the types are valid + * @throws Lib3MFException + */ + public boolean areTypesValid() throws Lib3MFException { + Pointer bufferValid = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_implicitnode_aretypesvalid.invokeInt(new java.lang.Object[]{mHandle, bufferValid})); + return bufferValid.getByte(0) != 0; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/ImplicitPort.java b/Autogenerated/Bindings/Java9/lib3mf/ImplicitPort.java new file mode 100644 index 000000000..76e76a43f --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/ImplicitPort.java @@ -0,0 +1,166 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ImplicitPort extends Base { + + public ImplicitPort(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the identifier of the port + * + * @return the identifier + * @throws Lib3MFException + */ + public String getIdentifier() throws Lib3MFException { + Pointer bytesNeededIdentifier = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_implicitport_getidentifier.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededIdentifier, null})); + int sizeIdentifier = bytesNeededIdentifier.getInt(0); + Pointer bufferIdentifier = new Memory(sizeIdentifier); + mWrapper.checkError(this, mWrapper.lib3mf_implicitport_getidentifier.invokeInt(new java.lang.Object[]{mHandle, sizeIdentifier, bytesNeededIdentifier, bufferIdentifier})); + return new String(bufferIdentifier.getByteArray(0, sizeIdentifier - 1), StandardCharsets.UTF_8); + } + + /** + * Sets the identifier of the port + * + * @param identifier the identifier + * @throws Lib3MFException + */ + public void setIdentifier(String identifier) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_implicitport_setidentifier.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier})); + } + + /** + * Retrieves the display name of the port + * + * @return the display name + * @throws Lib3MFException + */ + public String getDisplayName() throws Lib3MFException { + Pointer bytesNeededDisplayName = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_implicitport_getdisplayname.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededDisplayName, null})); + int sizeDisplayName = bytesNeededDisplayName.getInt(0); + Pointer bufferDisplayName = new Memory(sizeDisplayName); + mWrapper.checkError(this, mWrapper.lib3mf_implicitport_getdisplayname.invokeInt(new java.lang.Object[]{mHandle, sizeDisplayName, bytesNeededDisplayName, bufferDisplayName})); + return new String(bufferDisplayName.getByteArray(0, sizeDisplayName - 1), StandardCharsets.UTF_8); + } + + /** + * Sets the display name of the port + * + * @param displayName the display name + * @throws Lib3MFException + */ + public void setDisplayName(String displayName) throws Lib3MFException { + byte[] bytesDisplayName = displayName.getBytes(StandardCharsets.UTF_8); + Memory bufferDisplayName = new Memory(bytesDisplayName.length + 1); + bufferDisplayName.write(0, bytesDisplayName, 0, bytesDisplayName.length); + bufferDisplayName.setByte(bytesDisplayName.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_implicitport_setdisplayname.invokeInt(new java.lang.Object[]{mHandle, bufferDisplayName})); + } + + /** + * Sets the type of the port + * + * @param implicitPortType the type + * @throws Lib3MFException + */ + public void setType(Lib3MFWrapper.ImplicitPortType implicitPortType) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_implicitport_settype.invokeInt(new java.lang.Object[]{mHandle, Lib3MFWrapper.EnumConversion.convertImplicitPortTypeToConst(implicitPortType)})); + } + + /** + * Retrieves the type of the port + * + * @return the type + * @throws Lib3MFException + */ + public Lib3MFWrapper.ImplicitPortType getType() throws Lib3MFException { + Pointer bufferImplicitPortType = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_implicitport_gettype.invokeInt(new java.lang.Object[]{mHandle, bufferImplicitPortType})); + return Lib3MFWrapper.EnumConversion.convertConstToImplicitPortType(bufferImplicitPortType.getInt(0)); + } + + /** + * Retrieves the reference of the port, only used for input ports + * + * @return the reference + * @throws Lib3MFException + */ + public String getReference() throws Lib3MFException { + Pointer bytesNeededReference = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_implicitport_getreference.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededReference, null})); + int sizeReference = bytesNeededReference.getInt(0); + Pointer bufferReference = new Memory(sizeReference); + mWrapper.checkError(this, mWrapper.lib3mf_implicitport_getreference.invokeInt(new java.lang.Object[]{mHandle, sizeReference, bytesNeededReference, bufferReference})); + return new String(bufferReference.getByteArray(0, sizeReference - 1), StandardCharsets.UTF_8); + } + + /** + * Sets the reference of the port, only used for input ports + * + * @param reference the reference + * @throws Lib3MFException + */ + public void setReference(String reference) throws Lib3MFException { + byte[] bytesReference = reference.getBytes(StandardCharsets.UTF_8); + Memory bufferReference = new Memory(bytesReference.length + 1); + bufferReference.write(0, bytesReference, 0, bytesReference.length); + bufferReference.setByte(bytesReference.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_implicitport_setreference.invokeInt(new java.lang.Object[]{mHandle, bufferReference})); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/ImplicitPortIterator.java b/Autogenerated/Bindings/Java9/lib3mf/ImplicitPortIterator.java new file mode 100644 index 000000000..cd95d03fd --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/ImplicitPortIterator.java @@ -0,0 +1,75 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ImplicitPortIterator extends Iterator { + + public ImplicitPortIterator(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the current element + * + * @return The current element + * @throws Lib3MFException + */ + public ImplicitPort getCurrent() throws Lib3MFException { + Pointer bufferPort = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_implicitportiterator_getcurrent.invokeInt(new java.lang.Object[]{mHandle, bufferPort})); + Pointer valuePort = bufferPort.getPointer(0); + ImplicitPort port = null; + if (valuePort == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Port was a null pointer"); + } + port = mWrapper.PolymorphicFactory(valuePort, ImplicitPort.class); + return port; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/InverseNode.java b/Autogenerated/Bindings/Java9/lib3mf/InverseNode.java new file mode 100644 index 000000000..3f65fd48c --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/InverseNode.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class InverseNode extends OneInputNode { + + public InverseNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/Iterator.java b/Autogenerated/Bindings/Java9/lib3mf/Iterator.java new file mode 100644 index 000000000..b073b0954 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/Iterator.java @@ -0,0 +1,93 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Iterator extends Base { + + public Iterator(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Iterates to the next item in the list. + * + * @return Iterates to the next item in the list. + * @throws Lib3MFException + */ + public boolean moveNext() throws Lib3MFException { + Pointer bufferHasNext = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_iterator_movenext.invokeInt(new java.lang.Object[]{mHandle, bufferHasNext})); + return bufferHasNext.getByte(0) != 0; + } + + /** + * Iterates to the previous item in the list. + * + * @return Iterates to the previous item in the list. + * @throws Lib3MFException + */ + public boolean movePrevious() throws Lib3MFException { + Pointer bufferHasPrevious = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_iterator_moveprevious.invokeInt(new java.lang.Object[]{mHandle, bufferHasPrevious})); + return bufferHasPrevious.getByte(0) != 0; + } + + /** + * Returns the number of items the iterator captures. + * + * @return returns the number of items the iterator captures. + * @throws Lib3MFException + */ + public long count() throws Lib3MFException { + Pointer bufferCount = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_iterator_count.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getLong(0); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/KeyStore.java b/Autogenerated/Bindings/Java9/lib3mf/KeyStore.java new file mode 100644 index 000000000..f77c807d4 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/KeyStore.java @@ -0,0 +1,403 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class KeyStore extends Base { + + public KeyStore(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Adds a consumer to the keystore + * + * @param consumerID A unique identifier for the consumer + * @param keyID The id of the key of the consumer + * @param keyValue The public key for this consumer in PEM format + * @return The consumer instance + * @throws Lib3MFException + */ + public Consumer addConsumer(String consumerID, String keyID, String keyValue) throws Lib3MFException { + byte[] bytesConsumerID = consumerID.getBytes(StandardCharsets.UTF_8); + Memory bufferConsumerID = new Memory(bytesConsumerID.length + 1); + bufferConsumerID.write(0, bytesConsumerID, 0, bytesConsumerID.length); + bufferConsumerID.setByte(bytesConsumerID.length, (byte)0); + byte[] bytesKeyID = keyID.getBytes(StandardCharsets.UTF_8); + Memory bufferKeyID = new Memory(bytesKeyID.length + 1); + bufferKeyID.write(0, bytesKeyID, 0, bytesKeyID.length); + bufferKeyID.setByte(bytesKeyID.length, (byte)0); + byte[] bytesKeyValue = keyValue.getBytes(StandardCharsets.UTF_8); + Memory bufferKeyValue = new Memory(bytesKeyValue.length + 1); + bufferKeyValue.write(0, bytesKeyValue, 0, bytesKeyValue.length); + bufferKeyValue.setByte(bytesKeyValue.length, (byte)0); + Pointer bufferConsumer = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_keystore_addconsumer.invokeInt(new java.lang.Object[]{mHandle, bufferConsumerID, bufferKeyID, bufferKeyValue, bufferConsumer})); + Pointer valueConsumer = bufferConsumer.getPointer(0); + Consumer consumer = null; + if (valueConsumer == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Consumer was a null pointer"); + } + consumer = mWrapper.PolymorphicFactory(valueConsumer, Consumer.class); + return consumer; + } + + /** + * Gets the number of consumers in the keystore + * + * @return The consumer count + * @throws Lib3MFException + */ + public long getConsumerCount() throws Lib3MFException { + Pointer bufferCount = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_keystore_getconsumercount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getLong(0); + } + + /** + * Get a consumer from the keystore + * + * @param consumerIndex The index of the consumer + * @return The consumer instance + * @throws Lib3MFException + */ + public Consumer getConsumer(long consumerIndex) throws Lib3MFException { + Pointer bufferConsumer = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_keystore_getconsumer.invokeInt(new java.lang.Object[]{mHandle, consumerIndex, bufferConsumer})); + Pointer valueConsumer = bufferConsumer.getPointer(0); + Consumer consumer = null; + if (valueConsumer == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Consumer was a null pointer"); + } + consumer = mWrapper.PolymorphicFactory(valueConsumer, Consumer.class); + return consumer; + } + + /** + * Removes a consumer from the keystore + * + * @param consumer The consumer instance to remove + * @throws Lib3MFException + */ + public void removeConsumer(Consumer consumer) throws Lib3MFException { + Pointer consumerHandle = null; + if (consumer != null) { + consumerHandle = consumer.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Consumer is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_keystore_removeconsumer.invokeInt(new java.lang.Object[]{mHandle, consumerHandle})); + } + + /** + * Finds a consumer by ID + * + * @param consumerID The ID of the consumer + * @return The consumer instance + * @throws Lib3MFException + */ + public Consumer findConsumer(String consumerID) throws Lib3MFException { + byte[] bytesConsumerID = consumerID.getBytes(StandardCharsets.UTF_8); + Memory bufferConsumerID = new Memory(bytesConsumerID.length + 1); + bufferConsumerID.write(0, bytesConsumerID, 0, bytesConsumerID.length); + bufferConsumerID.setByte(bytesConsumerID.length, (byte)0); + Pointer bufferConsumer = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_keystore_findconsumer.invokeInt(new java.lang.Object[]{mHandle, bufferConsumerID, bufferConsumer})); + Pointer valueConsumer = bufferConsumer.getPointer(0); + Consumer consumer = null; + if (valueConsumer != Pointer.NULL) { + consumer = mWrapper.PolymorphicFactory(valueConsumer, Consumer.class); + } + return consumer; + } + + /** + * Gets the number of resource data group in the keysore + * + * @return The number of resource data available + * @throws Lib3MFException + */ + public long getResourceDataGroupCount() throws Lib3MFException { + Pointer bufferCount = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_keystore_getresourcedatagroupcount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getLong(0); + } + + /** + * Adds a resource data group into the keystore. + * + * @return The resource data group instance + * @throws Lib3MFException + */ + public ResourceDataGroup addResourceDataGroup() throws Lib3MFException { + Pointer bufferResourceDataGroup = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_keystore_addresourcedatagroup.invokeInt(new java.lang.Object[]{mHandle, bufferResourceDataGroup})); + Pointer valueResourceDataGroup = bufferResourceDataGroup.getPointer(0); + ResourceDataGroup resourceDataGroup = null; + if (valueResourceDataGroup == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceDataGroup was a null pointer"); + } + resourceDataGroup = mWrapper.PolymorphicFactory(valueResourceDataGroup, ResourceDataGroup.class); + return resourceDataGroup; + } + + /** + * Gets a resource data group + * + * @param resourceDataIndex The index of the resource data + * @return The resource data group instance + * @throws Lib3MFException + */ + public ResourceDataGroup getResourceDataGroup(long resourceDataIndex) throws Lib3MFException { + Pointer bufferResourceDataGroup = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_keystore_getresourcedatagroup.invokeInt(new java.lang.Object[]{mHandle, resourceDataIndex, bufferResourceDataGroup})); + Pointer valueResourceDataGroup = bufferResourceDataGroup.getPointer(0); + ResourceDataGroup resourceDataGroup = null; + if (valueResourceDataGroup == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceDataGroup was a null pointer"); + } + resourceDataGroup = mWrapper.PolymorphicFactory(valueResourceDataGroup, ResourceDataGroup.class); + return resourceDataGroup; + } + + /** + * Removes a resource data group + * + * @param resourceDataGroup The resource data group instance + * @throws Lib3MFException + */ + public void removeResourceDataGroup(ResourceDataGroup resourceDataGroup) throws Lib3MFException { + Pointer resourceDataGroupHandle = null; + if (resourceDataGroup != null) { + resourceDataGroupHandle = resourceDataGroup.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceDataGroup is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_keystore_removeresourcedatagroup.invokeInt(new java.lang.Object[]{mHandle, resourceDataGroupHandle})); + } + + /** + * Finds a resource data group that contains a particular resourcedata + * + * @param partPath The target path for the resourcedata hold by the resource data group + * @return The data resource instance + * @throws Lib3MFException + */ + public ResourceDataGroup findResourceDataGroup(PackagePart partPath) throws Lib3MFException { + Pointer partPathHandle = null; + if (partPath != null) { + partPathHandle = partPath.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "PartPath is a null value."); + } + Pointer bufferResourceDataGroup = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_keystore_findresourcedatagroup.invokeInt(new java.lang.Object[]{mHandle, partPathHandle, bufferResourceDataGroup})); + Pointer valueResourceDataGroup = bufferResourceDataGroup.getPointer(0); + ResourceDataGroup resourceDataGroup = null; + if (valueResourceDataGroup != Pointer.NULL) { + resourceDataGroup = mWrapper.PolymorphicFactory(valueResourceDataGroup, ResourceDataGroup.class); + } + return resourceDataGroup; + } + + /** + * Add resourcedata to resourcedatagroup element + * + * @param resourceDataGroup The resource data group where to add this resource data + * @param partPath The path of the part to be encrypted + * @param algorithm The encryption algorithm to be used to encrypt this resource + * @param compression Whether compression should be used prior to encryption + * @param additionalAuthenticationData Additional data to be encrypted along the contents for better security + * @return The data resource instance + * @throws Lib3MFException + */ + public ResourceData addResourceData(ResourceDataGroup resourceDataGroup, PackagePart partPath, Lib3MFWrapper.EncryptionAlgorithm algorithm, Lib3MFWrapper.Compression compression, byte[] additionalAuthenticationData) throws Lib3MFException { + Pointer resourceDataGroupHandle = null; + if (resourceDataGroup != null) { + resourceDataGroupHandle = resourceDataGroup.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceDataGroup is a null value."); + } + Pointer partPathHandle = null; + if (partPath != null) { + partPathHandle = partPath.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "PartPath is a null value."); + } + Pointer bufferAdditionalAuthenticationData = new Memory(Math.max(1, 1 * additionalAuthenticationData.length)); + for (int i = 0; i < additionalAuthenticationData.length; i++) { + bufferAdditionalAuthenticationData.setByte(1 * i, additionalAuthenticationData[i]); + } + Pointer bufferResourceData = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_keystore_addresourcedata.invokeInt(new java.lang.Object[]{mHandle, resourceDataGroupHandle, partPathHandle, Lib3MFWrapper.EnumConversion.convertEncryptionAlgorithmToConst(algorithm), Lib3MFWrapper.EnumConversion.convertCompressionToConst(compression), (long) additionalAuthenticationData.length, bufferAdditionalAuthenticationData, bufferResourceData})); + Pointer valueResourceData = bufferResourceData.getPointer(0); + ResourceData resourceData = null; + if (valueResourceData == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceData was a null pointer"); + } + resourceData = mWrapper.PolymorphicFactory(valueResourceData, ResourceData.class); + return resourceData; + } + + /** + * Removes a resource data + * + * @param resourceData The resource data to be removed + * @throws Lib3MFException + */ + public void removeResourceData(ResourceData resourceData) throws Lib3MFException { + Pointer resourceDataHandle = null; + if (resourceData != null) { + resourceDataHandle = resourceData.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceData is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_keystore_removeresourcedata.invokeInt(new java.lang.Object[]{mHandle, resourceDataHandle})); + } + + /** + * Finds a resource data on this resource group + * + * @param resourcePath The target path for the resourcedata + * @return The resource data instance + * @throws Lib3MFException + */ + public ResourceData findResourceData(PackagePart resourcePath) throws Lib3MFException { + Pointer resourcePathHandle = null; + if (resourcePath != null) { + resourcePathHandle = resourcePath.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourcePath is a null value."); + } + Pointer bufferResourceData = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_keystore_findresourcedata.invokeInt(new java.lang.Object[]{mHandle, resourcePathHandle, bufferResourceData})); + Pointer valueResourceData = bufferResourceData.getPointer(0); + ResourceData resourceData = null; + if (valueResourceData != Pointer.NULL) { + resourceData = mWrapper.PolymorphicFactory(valueResourceData, ResourceData.class); + } + return resourceData; + } + + /** + * Gets the number of resource data in the keysore + * + * @return The number of resource data available + * @throws Lib3MFException + */ + public long getResourceDataCount() throws Lib3MFException { + Pointer bufferCount = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_keystore_getresourcedatacount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getLong(0); + } + + /** + * Gets a resource data + * + * @param resourceDataIndex The index of the resource data + * @return The data resource instance + * @throws Lib3MFException + */ + public ResourceData getResourceData(long resourceDataIndex) throws Lib3MFException { + Pointer bufferResourceData = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_keystore_getresourcedata.invokeInt(new java.lang.Object[]{mHandle, resourceDataIndex, bufferResourceData})); + Pointer valueResourceData = bufferResourceData.getPointer(0); + ResourceData resourceData = null; + if (valueResourceData == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceData was a null pointer"); + } + resourceData = mWrapper.PolymorphicFactory(valueResourceData, ResourceData.class); + return resourceData; + } + + /** + * Gets the keystore UUID + * + * @return GetUUID Result Tuple + * @throws Lib3MFException + */ + public GetUUIDResult getUUID() throws Lib3MFException { + Pointer bufferHasUUID = new Memory(1); + Pointer bytesNeededUUID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_keystore_getuuid.invokeInt(new java.lang.Object[]{mHandle, bufferHasUUID, 0, bytesNeededUUID, null})); + int sizeUUID = bytesNeededUUID.getInt(0); + Pointer bufferUUID = new Memory(sizeUUID); + mWrapper.checkError(this, mWrapper.lib3mf_keystore_getuuid.invokeInt(new java.lang.Object[]{mHandle, bufferHasUUID, sizeUUID, bytesNeededUUID, bufferUUID})); + GetUUIDResult returnTuple = new GetUUIDResult(); + returnTuple.HasUUID = bufferHasUUID.getByte(0) != 0; + returnTuple.UUID = new String(bufferUUID.getByteArray(0, sizeUUID - 1), StandardCharsets.UTF_8); + return returnTuple; + } + + public static class GetUUIDResult { + /** + * flag whether the keystore has a UUID + */ + public boolean HasUUID; + + /** + * returns the keystore uuid. + */ + public String UUID; + + } + /** + * Sets the keystore UUID + * + * @param uUID The new keystore uuid. + * @throws Lib3MFException + */ + public void setUUID(String uUID) throws Lib3MFException { + byte[] bytesUUID = uUID.getBytes(StandardCharsets.UTF_8); + Memory bufferUUID = new Memory(bytesUUID.length + 1); + bufferUUID.write(0, bytesUUID, 0, bytesUUID.length); + bufferUUID.setByte(bytesUUID.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_keystore_setuuid.invokeInt(new java.lang.Object[]{mHandle, bufferUUID})); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/LengthNode.java b/Autogenerated/Bindings/Java9/lib3mf/LengthNode.java new file mode 100644 index 000000000..2e1251a8c --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/LengthNode.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class LengthNode extends OneInputNode { + + public LengthNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/LevelSet.java b/Autogenerated/Bindings/Java9/lib3mf/LevelSet.java new file mode 100644 index 000000000..6c99f35d7 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/LevelSet.java @@ -0,0 +1,277 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class LevelSet extends Object { + + public LevelSet(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the function that is used as boundary shape. + * + * @return the function to use as boundary shape + * @throws Lib3MFException + */ + public Function getFunction() throws Lib3MFException { + Pointer bufferTheFunction = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_levelset_getfunction.invokeInt(new java.lang.Object[]{mHandle, bufferTheFunction})); + Pointer valueTheFunction = bufferTheFunction.getPointer(0); + Function theFunction = null; + if (valueTheFunction != Pointer.NULL) { + theFunction = mWrapper.PolymorphicFactory(valueTheFunction, Function.class); + } + return theFunction; + } + + /** + * Sets the function to use as boundary shape. + * + * @param theFunction the function to use as boundary shape + * @throws Lib3MFException + */ + public void setFunction(Function theFunction) throws Lib3MFException { + Pointer theFunctionHandle = null; + if (theFunction != null) { + theFunctionHandle = theFunction.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheFunction is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_levelset_setfunction.invokeInt(new java.lang.Object[]{mHandle, theFunctionHandle})); + } + + /** + * Returns the transformation matrix into the coordinate system of the referenced Function. + * + * @return the transformation matrix + * @throws Lib3MFException + */ + public Transform getTransform() throws Lib3MFException { + Pointer bufferTransform = new Memory(Transform.SIZE); + mWrapper.checkError(this, mWrapper.lib3mf_levelset_gettransform.invokeInt(new java.lang.Object[]{mHandle, bufferTransform})); + Transform transform = new Transform(); + transform.readFromPointer(bufferTransform, 0); + return transform; + } + + /** + * Sets the transformation matrix into the coordinate system of the referenced Function. + * + * @param transform new transformation matrix + * @throws Lib3MFException + */ + public void setTransform(Transform transform) throws Lib3MFException { + Pointer bufferTransform = new Memory(Transform.SIZE); + transform.writeToPointer(bufferTransform, 0); + mWrapper.checkError(this, mWrapper.lib3mf_levelset_settransform.invokeInt(new java.lang.Object[]{mHandle, bufferTransform})); + } + + /** + * Returns the name of the function output channel to use. + * + * @return the name of the function output channel + * @throws Lib3MFException + */ + public String getChannelName() throws Lib3MFException { + Pointer bytesNeededChannelName = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_levelset_getchannelname.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededChannelName, null})); + int sizeChannelName = bytesNeededChannelName.getInt(0); + Pointer bufferChannelName = new Memory(sizeChannelName); + mWrapper.checkError(this, mWrapper.lib3mf_levelset_getchannelname.invokeInt(new java.lang.Object[]{mHandle, sizeChannelName, bytesNeededChannelName, bufferChannelName})); + return new String(bufferChannelName.getByteArray(0, sizeChannelName - 1), StandardCharsets.UTF_8); + } + + /** + * Sets the name of the function output channel to use. + * + * @param channelName new name of the function output channel + * @throws Lib3MFException + */ + public void setChannelName(String channelName) throws Lib3MFException { + byte[] bytesChannelName = channelName.getBytes(StandardCharsets.UTF_8); + Memory bufferChannelName = new Memory(bytesChannelName.length + 1); + bufferChannelName.write(0, bytesChannelName, 0, bytesChannelName.length); + bufferChannelName.setByte(bytesChannelName.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_levelset_setchannelname.invokeInt(new java.lang.Object[]{mHandle, bufferChannelName})); + } + + /** + * Sets the minimal feature size as a hint for the function evaluator + * + * @param minFeatureSize minimal feature size + * @throws Lib3MFException + */ + public void setMinFeatureSize(double minFeatureSize) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_levelset_setminfeaturesize.invokeInt(new java.lang.Object[]{mHandle, minFeatureSize})); + } + + /** + * Returns the minimal feature size as a hint for the function evaluator + * + * @return minimal feature size + * @throws Lib3MFException + */ + public double getMinFeatureSize() throws Lib3MFException { + Pointer bufferMinFeatureSize = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_levelset_getminfeaturesize.invokeInt(new java.lang.Object[]{mHandle, bufferMinFeatureSize})); + return bufferMinFeatureSize.getDouble(0); + } + + /** + * Sets the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). + * + * @param fallBackValue fallback value + * @throws Lib3MFException + */ + public void setFallBackValue(double fallBackValue) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_levelset_setfallbackvalue.invokeInt(new java.lang.Object[]{mHandle, fallBackValue})); + } + + /** + * Returns the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). + * + * @return fallback value + * @throws Lib3MFException + */ + public double getFallBackValue() throws Lib3MFException { + Pointer bufferFallBackValue = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_levelset_getfallbackvalue.invokeInt(new java.lang.Object[]{mHandle, bufferFallBackValue})); + return bufferFallBackValue.getDouble(0); + } + + /** + * If set only the bounding box of the mesh is intersected with the boundary + * + * @param meshBBoxOnly If set only the bounding box of the mesh is intersected with the boundary + * @throws Lib3MFException + */ + public void setMeshBBoxOnly(boolean meshBBoxOnly) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_levelset_setmeshbboxonly.invokeInt(new java.lang.Object[]{mHandle, meshBBoxOnly})); + } + + /** + * If set only the bounding box of the mesh is intersected with the boundary + * + * @return If set only the bounding box of the mesh is intersected with the boundary + * @throws Lib3MFException + */ + public boolean getMeshBBoxOnly() throws Lib3MFException { + Pointer bufferMeshBBoxOnly = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_levelset_getmeshbboxonly.invokeInt(new java.lang.Object[]{mHandle, bufferMeshBBoxOnly})); + return bufferMeshBBoxOnly.getByte(0) != 0; + } + + /** + * Sets the mesh to use as evaluation domain + * + * @param theMesh The mesh + * @throws Lib3MFException + */ + public void setMesh(MeshObject theMesh) throws Lib3MFException { + Pointer theMeshHandle = null; + if (theMesh != null) { + theMeshHandle = theMesh.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheMesh is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_levelset_setmesh.invokeInt(new java.lang.Object[]{mHandle, theMeshHandle})); + } + + /** + * Returns the mesh that is used as evaluation domain + * + * @return The mesh + * @throws Lib3MFException + */ + public MeshObject getMesh() throws Lib3MFException { + Pointer bufferTheMesh = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_levelset_getmesh.invokeInt(new java.lang.Object[]{mHandle, bufferTheMesh})); + Pointer valueTheMesh = bufferTheMesh.getPointer(0); + MeshObject theMesh = null; + if (valueTheMesh != Pointer.NULL) { + theMesh = mWrapper.PolymorphicFactory(valueTheMesh, MeshObject.class); + } + return theMesh; + } + + /** + * Retrieves the VolumeData this Object. + * + * @return the VolumeData of this Object + * @throws Lib3MFException + */ + public VolumeData getVolumeData() throws Lib3MFException { + Pointer bufferTheVolumeData = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_levelset_getvolumedata.invokeInt(new java.lang.Object[]{mHandle, bufferTheVolumeData})); + Pointer valueTheVolumeData = bufferTheVolumeData.getPointer(0); + VolumeData theVolumeData = null; + if (valueTheVolumeData != Pointer.NULL) { + theVolumeData = mWrapper.PolymorphicFactory(valueTheVolumeData, VolumeData.class); + } + return theVolumeData; + } + + /** + * Sets the VolumeData of this LevelSet. + * + * @param theVolumeData the VolumeData of this MeshObject + * @throws Lib3MFException + */ + public void setVolumeData(VolumeData theVolumeData) throws Lib3MFException { + Pointer theVolumeDataHandle = null; + if (theVolumeData != null) { + theVolumeDataHandle = theVolumeData.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheVolumeData is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_levelset_setvolumedata.invokeInt(new java.lang.Object[]{mHandle, theVolumeDataHandle})); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/LevelSetIterator.java b/Autogenerated/Bindings/Java9/lib3mf/LevelSetIterator.java new file mode 100644 index 000000000..18612fee1 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/LevelSetIterator.java @@ -0,0 +1,75 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class LevelSetIterator extends ResourceIterator { + + public LevelSetIterator(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the LevelSet the iterator points at. + * + * @return returns the MeshObject instance. + * @throws Lib3MFException + */ + public LevelSet getCurrentLevelSet() throws Lib3MFException { + Pointer bufferResource = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_levelsetiterator_getcurrentlevelset.invokeInt(new java.lang.Object[]{mHandle, bufferResource})); + Pointer valueResource = bufferResource.getPointer(0); + LevelSet resource = null; + if (valueResource == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Resource was a null pointer"); + } + resource = mWrapper.PolymorphicFactory(valueResource, LevelSet.class); + return resource; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/Lib3MFException.java b/Autogenerated/Bindings/Java9/lib3mf/Lib3MFException.java new file mode 100644 index 000000000..c6f0fffb0 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/Lib3MFException.java @@ -0,0 +1,222 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import java.util.HashMap; +import java.util.Map; + +public class Lib3MFException extends Exception { + + // Error Constants for Lib3MF + public static final int LIB3MF_SUCCESS = 0; + public static final int LIB3MF_ERROR_NOTIMPLEMENTED = 1; + public static final int LIB3MF_ERROR_INVALIDPARAM = 2; + public static final int LIB3MF_ERROR_INVALIDCAST = 3; + public static final int LIB3MF_ERROR_BUFFERTOOSMALL = 4; + public static final int LIB3MF_ERROR_GENERICEXCEPTION = 5; + public static final int LIB3MF_ERROR_COULDNOTLOADLIBRARY = 6; + public static final int LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT = 7; + public static final int LIB3MF_ERROR_INCOMPATIBLEBINARYVERSION = 8; + public static final int LIB3MF_ERROR_CALCULATIONABORTED = 10; + public static final int LIB3MF_ERROR_SHOULDNOTBECALLED = 11; + public static final int LIB3MF_ERROR_READERCLASSUNKNOWN = 100; + public static final int LIB3MF_ERROR_WRITERCLASSUNKNOWN = 101; + public static final int LIB3MF_ERROR_ITERATORINVALIDINDEX = 102; + public static final int LIB3MF_ERROR_INVALIDMODELRESOURCE = 103; + public static final int LIB3MF_ERROR_RESOURCENOTFOUND = 104; + public static final int LIB3MF_ERROR_INVALIDMODEL = 105; + public static final int LIB3MF_ERROR_INVALIDOBJECT = 106; + public static final int LIB3MF_ERROR_INVALIDMESHOBJECT = 107; + public static final int LIB3MF_ERROR_INVALIDCOMPONENTSOBJECT = 108; + public static final int LIB3MF_ERROR_INVALIDCOMPONENT = 109; + public static final int LIB3MF_ERROR_INVALIDBUILDITEM = 110; + public static final int LIB3MF_ERROR_INVALIDBASEMATERIALGROUP = 111; + public static final int LIB3MF_ERROR_INVALIDSLICESTACKRESOURCE = 112; + public static final int LIB3MF_ERROR_INVALIDTEXTURERESOURCE = 113; + public static final int LIB3MF_ERROR_INVALIDCOLORGROUP = 114; + public static final int LIB3MF_ERROR_INVALIDTEXTURE2DGROUP = 115; + public static final int LIB3MF_ERROR_INVALIDCOMPOSITEMATERIALS = 116; + public static final int LIB3MF_ERROR_INVALIDMULTIPROPERTYGROUP = 117; + public static final int LIB3MF_ERROR_INVALIDRESOURCEINDEX = 120; + public static final int LIB3MF_ERROR_ATTACHMENTNOTFOUND = 121; + public static final int LIB3MF_ERROR_FORBIDDENCYCLICREFERENCE = 130; + public static final int LIB3MF_ERROR_INVALIDATTACHMENTSTREAM = 131; + public static final int LIB3MF_ERROR_INVALIDPROPERTYCOUNT = 132; + public static final int LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER = 140; + public static final int LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT = 141; + public static final int LIB3MF_ERROR_INVALIDRESOURCE = 142; + public static final int LIB3MF_ERROR_INVALIDLEVELSET = 143; + public static final int LIB3MF_ERROR_COULDNOTFINDTRIANGLESET = 144; + public static final int LIB3MF_ERROR_INVALIDTRIANGLESETINDEX = 145; + public static final int LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE = 2000; + public static final int LIB3MF_ERROR_INVALIDKEYSTORE = 3000; + public static final int LIB3MF_ERROR_INVALIDKEYSTORECONSUMER = 3001; + public static final int LIB3MF_ERROR_KEYSTORECONSUMERNOTFOUND = 3002; + public static final int LIB3MF_ERROR_KEYSTORERESOURCEDATANOTFOUND = 3003; + public static final int LIB3MF_ERROR_SECURECONTEXTNOTREGISTERED = 3004; + public static final int LIB3MF_ERROR_INVALIDKEYSIZE = 3005; + public static final int LIB3MF_ERROR_INCOMPATIBLEPORTTYPES = 4000; + public static final int LIB3MF_ERROR_GRAPHISCYCLIC = 4001; + public static final int LIB3MF_ERROR_INPUTNOTSET = 4002; + public static final int LIB3MF_ERROR_INVALIDNODECONFIGURATION = 4003; + + public static final Map ErrorCodeMap = new HashMap(); + public static final Map ErrorDescriptionMap = new HashMap(); + + static { + ErrorCodeMap.put(LIB3MF_ERROR_NOTIMPLEMENTED, "LIB3MF_ERROR_NOTIMPLEMENTED"); + ErrorDescriptionMap.put(LIB3MF_ERROR_NOTIMPLEMENTED, "functionality not implemented"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDPARAM, "LIB3MF_ERROR_INVALIDPARAM"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDPARAM, "an invalid parameter was passed"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDCAST, "LIB3MF_ERROR_INVALIDCAST"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDCAST, "a type cast failed"); + ErrorCodeMap.put(LIB3MF_ERROR_BUFFERTOOSMALL, "LIB3MF_ERROR_BUFFERTOOSMALL"); + ErrorDescriptionMap.put(LIB3MF_ERROR_BUFFERTOOSMALL, "a provided buffer is too small"); + ErrorCodeMap.put(LIB3MF_ERROR_GENERICEXCEPTION, "LIB3MF_ERROR_GENERICEXCEPTION"); + ErrorDescriptionMap.put(LIB3MF_ERROR_GENERICEXCEPTION, "a generic exception occurred"); + ErrorCodeMap.put(LIB3MF_ERROR_COULDNOTLOADLIBRARY, "LIB3MF_ERROR_COULDNOTLOADLIBRARY"); + ErrorDescriptionMap.put(LIB3MF_ERROR_COULDNOTLOADLIBRARY, "the library could not be loaded"); + ErrorCodeMap.put(LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT, "LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT"); + ErrorDescriptionMap.put(LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT, "a required exported symbol could not be found in the library"); + ErrorCodeMap.put(LIB3MF_ERROR_INCOMPATIBLEBINARYVERSION, "LIB3MF_ERROR_INCOMPATIBLEBINARYVERSION"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INCOMPATIBLEBINARYVERSION, "the version of the binary interface does not match the bindings interface"); + ErrorCodeMap.put(LIB3MF_ERROR_CALCULATIONABORTED, "LIB3MF_ERROR_CALCULATIONABORTED"); + ErrorDescriptionMap.put(LIB3MF_ERROR_CALCULATIONABORTED, "a calculation has been aborted"); + ErrorCodeMap.put(LIB3MF_ERROR_SHOULDNOTBECALLED, "LIB3MF_ERROR_SHOULDNOTBECALLED"); + ErrorDescriptionMap.put(LIB3MF_ERROR_SHOULDNOTBECALLED, "functionality should not be called"); + ErrorCodeMap.put(LIB3MF_ERROR_READERCLASSUNKNOWN, "LIB3MF_ERROR_READERCLASSUNKNOWN"); + ErrorDescriptionMap.put(LIB3MF_ERROR_READERCLASSUNKNOWN, "the queried reader class is unknown"); + ErrorCodeMap.put(LIB3MF_ERROR_WRITERCLASSUNKNOWN, "LIB3MF_ERROR_WRITERCLASSUNKNOWN"); + ErrorDescriptionMap.put(LIB3MF_ERROR_WRITERCLASSUNKNOWN, "the queried writer class is unknown"); + ErrorCodeMap.put(LIB3MF_ERROR_ITERATORINVALIDINDEX, "LIB3MF_ERROR_ITERATORINVALIDINDEX"); + ErrorDescriptionMap.put(LIB3MF_ERROR_ITERATORINVALIDINDEX, "the current index of an iterator is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDMODELRESOURCE, "LIB3MF_ERROR_INVALIDMODELRESOURCE"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDMODELRESOURCE, "no Model Resource has been given"); + ErrorCodeMap.put(LIB3MF_ERROR_RESOURCENOTFOUND, "LIB3MF_ERROR_RESOURCENOTFOUND"); + ErrorDescriptionMap.put(LIB3MF_ERROR_RESOURCENOTFOUND, "Resource not found"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDMODEL, "LIB3MF_ERROR_INVALIDMODEL"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDMODEL, "A model is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDOBJECT, "LIB3MF_ERROR_INVALIDOBJECT"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDOBJECT, "An object is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDMESHOBJECT, "LIB3MF_ERROR_INVALIDMESHOBJECT"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDMESHOBJECT, "A mesh object is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDCOMPONENTSOBJECT, "LIB3MF_ERROR_INVALIDCOMPONENTSOBJECT"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDCOMPONENTSOBJECT, "A components object is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDCOMPONENT, "LIB3MF_ERROR_INVALIDCOMPONENT"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDCOMPONENT, "A component is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDBUILDITEM, "LIB3MF_ERROR_INVALIDBUILDITEM"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDBUILDITEM, "A build item is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDBASEMATERIALGROUP, "LIB3MF_ERROR_INVALIDBASEMATERIALGROUP"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDBASEMATERIALGROUP, "A basematerialgroup is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDSLICESTACKRESOURCE, "LIB3MF_ERROR_INVALIDSLICESTACKRESOURCE"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDSLICESTACKRESOURCE, "A slicestack resource is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDTEXTURERESOURCE, "LIB3MF_ERROR_INVALIDTEXTURERESOURCE"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDTEXTURERESOURCE, "A texture resource is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDCOLORGROUP, "LIB3MF_ERROR_INVALIDCOLORGROUP"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDCOLORGROUP, "A color group resource is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDTEXTURE2DGROUP, "LIB3MF_ERROR_INVALIDTEXTURE2DGROUP"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDTEXTURE2DGROUP, "A texture2d group resource is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDCOMPOSITEMATERIALS, "LIB3MF_ERROR_INVALIDCOMPOSITEMATERIALS"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDCOMPOSITEMATERIALS, "A composite materials resource is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDMULTIPROPERTYGROUP, "LIB3MF_ERROR_INVALIDMULTIPROPERTYGROUP"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDMULTIPROPERTYGROUP, "A MultiPropertyGroup resource is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDRESOURCEINDEX, "LIB3MF_ERROR_INVALIDRESOURCEINDEX"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDRESOURCEINDEX, "A resource index is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_ATTACHMENTNOTFOUND, "LIB3MF_ERROR_ATTACHMENTNOTFOUND"); + ErrorDescriptionMap.put(LIB3MF_ERROR_ATTACHMENTNOTFOUND, "Attachment not found"); + ErrorCodeMap.put(LIB3MF_ERROR_FORBIDDENCYCLICREFERENCE, "LIB3MF_ERROR_FORBIDDENCYCLICREFERENCE"); + ErrorDescriptionMap.put(LIB3MF_ERROR_FORBIDDENCYCLICREFERENCE, "A component references one of its ancestors"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDATTACHMENTSTREAM, "LIB3MF_ERROR_INVALIDATTACHMENTSTREAM"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDATTACHMENTSTREAM, "An attachment stream is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDPROPERTYCOUNT, "LIB3MF_ERROR_INVALIDPROPERTYCOUNT"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDPROPERTYCOUNT, "Invalid property count."); + ErrorCodeMap.put(LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER, "LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER"); + ErrorDescriptionMap.put(LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER, "A progress identifier is unknown"); + ErrorCodeMap.put(LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT, "LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT"); + ErrorDescriptionMap.put(LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT, "An element buffer exceeds its spec limit"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDRESOURCE, "LIB3MF_ERROR_INVALIDRESOURCE"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDRESOURCE, "A resource is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDLEVELSET, "LIB3MF_ERROR_INVALIDLEVELSET"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDLEVELSET, "A level set is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_COULDNOTFINDTRIANGLESET, "LIB3MF_ERROR_COULDNOTFINDTRIANGLESET"); + ErrorDescriptionMap.put(LIB3MF_ERROR_COULDNOTFINDTRIANGLESET, "Could not find triangle set"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDTRIANGLESETINDEX, "LIB3MF_ERROR_INVALIDTRIANGLESETINDEX"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDTRIANGLESETINDEX, "Invalid triangle set index"); + ErrorCodeMap.put(LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE, "LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE"); + ErrorDescriptionMap.put(LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE, "This object type is not valid for beamlattices"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDKEYSTORE, "LIB3MF_ERROR_INVALIDKEYSTORE"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDKEYSTORE, "The keystore object is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDKEYSTORECONSUMER, "LIB3MF_ERROR_INVALIDKEYSTORECONSUMER"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDKEYSTORECONSUMER, "The consumer keystore object is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_KEYSTORECONSUMERNOTFOUND, "LIB3MF_ERROR_KEYSTORECONSUMERNOTFOUND"); + ErrorDescriptionMap.put(LIB3MF_ERROR_KEYSTORECONSUMERNOTFOUND, "A consumer has not been found"); + ErrorCodeMap.put(LIB3MF_ERROR_KEYSTORERESOURCEDATANOTFOUND, "LIB3MF_ERROR_KEYSTORERESOURCEDATANOTFOUND"); + ErrorDescriptionMap.put(LIB3MF_ERROR_KEYSTORERESOURCEDATANOTFOUND, "A resource data has not been found"); + ErrorCodeMap.put(LIB3MF_ERROR_SECURECONTEXTNOTREGISTERED, "LIB3MF_ERROR_SECURECONTEXTNOTREGISTERED"); + ErrorDescriptionMap.put(LIB3MF_ERROR_SECURECONTEXTNOTREGISTERED, "A Key or Conentent encryption callback has not been registered"); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDKEYSIZE, "LIB3MF_ERROR_INVALIDKEYSIZE"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDKEYSIZE, "The key size is invalid"); + ErrorCodeMap.put(LIB3MF_ERROR_INCOMPATIBLEPORTTYPES, "LIB3MF_ERROR_INCOMPATIBLEPORTTYPES"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INCOMPATIBLEPORTTYPES, "Link could not be added, the port types are incompatible"); + ErrorCodeMap.put(LIB3MF_ERROR_GRAPHISCYCLIC, "LIB3MF_ERROR_GRAPHISCYCLIC"); + ErrorDescriptionMap.put(LIB3MF_ERROR_GRAPHISCYCLIC, "The functin graph is cyclic. Only dircected graphs are valid and can be topological sorted."); + ErrorCodeMap.put(LIB3MF_ERROR_INPUTNOTSET, "LIB3MF_ERROR_INPUTNOTSET"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INPUTNOTSET, "The input of a node is not set."); + ErrorCodeMap.put(LIB3MF_ERROR_INVALIDNODECONFIGURATION, "LIB3MF_ERROR_INVALIDNODECONFIGURATION"); + ErrorDescriptionMap.put(LIB3MF_ERROR_INVALIDNODECONFIGURATION, "The selected node configuration is not supported"); + } + + protected int mErrorCode; + + protected String mErrorString; + + protected String mErrorDescription; + + public Lib3MFException(int errorCode, String message){ + super(message); + mErrorCode = errorCode; + mErrorString = ErrorCodeMap.get(errorCode); + mErrorString = (mErrorString != null) ? mErrorString : "Unknown error code"; + mErrorDescription = ErrorDescriptionMap.get(errorCode); + mErrorDescription = (mErrorDescription != null) ? mErrorDescription : ""; + } + + @Override + public String toString() { + return mErrorCode + ": " + mErrorString + " (" + mErrorDescription + " - " + getMessage() + ")"; + } +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/Lib3MFWrapper.java b/Autogenerated/Bindings/Java9/lib3mf/Lib3MFWrapper.java new file mode 100644 index 000000000..9fe35e40b --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/Lib3MFWrapper.java @@ -0,0 +1,4118 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.*; + +import java.nio.charset.StandardCharsets; + + +public class Lib3MFWrapper { + + public static final int PROPERTYTYPE_NOPROPERTYTYPE = 0; + public static final int PROPERTYTYPE_BASEMATERIAL = 1; + public static final int PROPERTYTYPE_TEXCOORD = 2; + public static final int PROPERTYTYPE_COLORS = 3; + public static final int PROPERTYTYPE_COMPOSITE = 4; + public static final int PROPERTYTYPE_MULTI = 5; + + public enum PropertyType { + eNoPropertyType, + eBaseMaterial, + eTexCoord, + eColors, + eComposite, + eMulti + } + + public static final int SLICESMESHRESOLUTION_FULLRES = 0; + public static final int SLICESMESHRESOLUTION_LOWRES = 1; + + public enum SlicesMeshResolution { + eFullres, + eLowres + } + + public static final int MODELUNIT_MICROMETER = 0; + public static final int MODELUNIT_MILLIMETER = 1; + public static final int MODELUNIT_CENTIMETER = 2; + public static final int MODELUNIT_INCH = 3; + public static final int MODELUNIT_FOOT = 4; + public static final int MODELUNIT_METER = 5; + + public enum ModelUnit { + eMicroMeter, + eMilliMeter, + eCentiMeter, + eInch, + eFoot, + eMeter + } + + public static final int OBJECTTYPE_OTHER = 0; + public static final int OBJECTTYPE_MODEL = 1; + public static final int OBJECTTYPE_SUPPORT = 2; + public static final int OBJECTTYPE_SOLIDSUPPORT = 3; + public static final int OBJECTTYPE_SURFACE = 4; + + public enum ObjectType { + eOther, + eModel, + eSupport, + eSolidSupport, + eSurface + } + + public static final int TEXTURETYPE_UNKNOWN = 0; + public static final int TEXTURETYPE_PNG = 1; + public static final int TEXTURETYPE_JPEG = 2; + + public enum TextureType { + eUnknown, + ePNG, + eJPEG + } + + public static final int TEXTURETILESTYLE_WRAP = 0; + public static final int TEXTURETILESTYLE_MIRROR = 1; + public static final int TEXTURETILESTYLE_CLAMP = 2; + public static final int TEXTURETILESTYLE_NOTILESTYLE = 3; + + public enum TextureTileStyle { + eWrap, + eMirror, + eClamp, + eNoTileStyle + } + + public static final int TEXTUREFILTER_AUTO = 0; + public static final int TEXTUREFILTER_LINEAR = 1; + public static final int TEXTUREFILTER_NEAREST = 2; + + public enum TextureFilter { + eAuto, + eLinear, + eNearest + } + + public static final int BEAMLATTICECAPMODE_SPHERE = 0; + public static final int BEAMLATTICECAPMODE_HEMISPHERE = 1; + public static final int BEAMLATTICECAPMODE_BUTT = 2; + + public enum BeamLatticeCapMode { + eSphere, + eHemiSphere, + eButt + } + + public static final int BEAMLATTICECLIPMODE_NOCLIPMODE = 0; + public static final int BEAMLATTICECLIPMODE_INSIDE = 1; + public static final int BEAMLATTICECLIPMODE_OUTSIDE = 2; + + public enum BeamLatticeClipMode { + eNoClipMode, + eInside, + eOutside + } + + public static final int BEAMLATTICEBALLMODE_BEAMLATTICEBALLMODENONE = 0; + public static final int BEAMLATTICEBALLMODE_MIXED = 1; + public static final int BEAMLATTICEBALLMODE_ALL = 2; + + public enum BeamLatticeBallMode { + eBeamLatticeBallModeNone, + eMixed, + eAll + } + + public static final int PROGRESSIDENTIFIER_QUERYCANCELED = 0; + public static final int PROGRESSIDENTIFIER_DONE = 1; + public static final int PROGRESSIDENTIFIER_CLEANUP = 2; + public static final int PROGRESSIDENTIFIER_READSTREAM = 3; + public static final int PROGRESSIDENTIFIER_EXTRACTOPCPACKAGE = 4; + public static final int PROGRESSIDENTIFIER_READNONROOTMODELS = 5; + public static final int PROGRESSIDENTIFIER_READROOTMODEL = 6; + public static final int PROGRESSIDENTIFIER_READRESOURCES = 7; + public static final int PROGRESSIDENTIFIER_READMESH = 8; + public static final int PROGRESSIDENTIFIER_READSLICES = 9; + public static final int PROGRESSIDENTIFIER_READBUILD = 10; + public static final int PROGRESSIDENTIFIER_READCUSTOMATTACHMENT = 11; + public static final int PROGRESSIDENTIFIER_READTEXTURETACHMENTS = 12; + public static final int PROGRESSIDENTIFIER_CREATEOPCPACKAGE = 13; + public static final int PROGRESSIDENTIFIER_WRITEMODELSTOSTREAM = 14; + public static final int PROGRESSIDENTIFIER_WRITEROOTMODEL = 15; + public static final int PROGRESSIDENTIFIER_WRITENONROOTMODELS = 16; + public static final int PROGRESSIDENTIFIER_WRITEATTACHMENTS = 17; + public static final int PROGRESSIDENTIFIER_WRITECONTENTTYPES = 18; + public static final int PROGRESSIDENTIFIER_WRITENOBJECTS = 19; + public static final int PROGRESSIDENTIFIER_WRITENODES = 20; + public static final int PROGRESSIDENTIFIER_WRITETRIANGLES = 21; + public static final int PROGRESSIDENTIFIER_WRITESLICES = 22; + public static final int PROGRESSIDENTIFIER_WRITEKEYSTORE = 23; + + public enum ProgressIdentifier { + eQUERYCANCELED, + eDONE, + eCLEANUP, + eREADSTREAM, + eEXTRACTOPCPACKAGE, + eREADNONROOTMODELS, + eREADROOTMODEL, + eREADRESOURCES, + eREADMESH, + eREADSLICES, + eREADBUILD, + eREADCUSTOMATTACHMENT, + eREADTEXTURETACHMENTS, + eCREATEOPCPACKAGE, + eWRITEMODELSTOSTREAM, + eWRITEROOTMODEL, + eWRITENONROOTMODELS, + eWRITEATTACHMENTS, + eWRITECONTENTTYPES, + eWRITENOBJECTS, + eWRITENODES, + eWRITETRIANGLES, + eWRITESLICES, + eWRITEKEYSTORE + } + + public static final int BLENDMETHOD_NOBLENDMETHOD = 0; + public static final int BLENDMETHOD_MIX = 1; + public static final int BLENDMETHOD_MULTIPLY = 2; + + public enum BlendMethod { + eNoBlendMethod, + eMix, + eMultiply + } + + public static final int CHANNELNAME_RED = 0; + public static final int CHANNELNAME_GREEN = 1; + public static final int CHANNELNAME_BLUE = 2; + public static final int CHANNELNAME_ALPHA = 3; + + public enum ChannelName { + eRed, + eGreen, + eBlue, + eAlpha + } + + public static final int COMPOSITIONMETHOD_WEIGHTEDSUM = 0; + public static final int COMPOSITIONMETHOD_MULTIPLY = 1; + public static final int COMPOSITIONMETHOD_MIN = 2; + public static final int COMPOSITIONMETHOD_MAX = 3; + public static final int COMPOSITIONMETHOD_MASK = 4; + + public enum CompositionMethod { + eWeightedSum, + eMultiply, + eMin, + eMax, + eMask + } + + public static final int COMPOSITIONSPACE_RAW = 0; + public static final int COMPOSITIONSPACE_LINEARCOLOR = 1; + + public enum CompositionSpace { + eRaw, + eLinearColor + } + + public static final int IMPLICITNODETYPE_ADDITION = 0; + public static final int IMPLICITNODETYPE_SUBTRACTION = 1; + public static final int IMPLICITNODETYPE_MULTIPLICATION = 2; + public static final int IMPLICITNODETYPE_DIVISION = 3; + public static final int IMPLICITNODETYPE_CONSTANT = 4; + public static final int IMPLICITNODETYPE_CONSTVEC = 5; + public static final int IMPLICITNODETYPE_CONSTMAT = 6; + public static final int IMPLICITNODETYPE_COMPOSEVECTOR = 7; + public static final int IMPLICITNODETYPE_DECOMPOSEVECTOR = 8; + public static final int IMPLICITNODETYPE_COMPOSEMATRIX = 9; + public static final int IMPLICITNODETYPE_MATRIXFROMCOLUMNS = 10; + public static final int IMPLICITNODETYPE_MATRIXFROMROWS = 11; + public static final int IMPLICITNODETYPE_DOT = 12; + public static final int IMPLICITNODETYPE_CROSS = 13; + public static final int IMPLICITNODETYPE_MATVECMULTIPLICATION = 14; + public static final int IMPLICITNODETYPE_TRANSPOSE = 15; + public static final int IMPLICITNODETYPE_INVERSE = 16; + public static final int IMPLICITNODETYPE_SINUS = 17; + public static final int IMPLICITNODETYPE_COSINUS = 18; + public static final int IMPLICITNODETYPE_TAN = 19; + public static final int IMPLICITNODETYPE_ARCSIN = 20; + public static final int IMPLICITNODETYPE_ARCCOS = 21; + public static final int IMPLICITNODETYPE_ARCTAN = 22; + public static final int IMPLICITNODETYPE_ARCTAN2 = 23; + public static final int IMPLICITNODETYPE_MIN = 24; + public static final int IMPLICITNODETYPE_MAX = 25; + public static final int IMPLICITNODETYPE_ABS = 26; + public static final int IMPLICITNODETYPE_FMOD = 27; + public static final int IMPLICITNODETYPE_POW = 28; + public static final int IMPLICITNODETYPE_SQRT = 29; + public static final int IMPLICITNODETYPE_EXP = 30; + public static final int IMPLICITNODETYPE_LOG = 31; + public static final int IMPLICITNODETYPE_LOG2 = 32; + public static final int IMPLICITNODETYPE_LOG10 = 33; + public static final int IMPLICITNODETYPE_SELECT = 34; + public static final int IMPLICITNODETYPE_CLAMP = 35; + public static final int IMPLICITNODETYPE_SINH = 36; + public static final int IMPLICITNODETYPE_COSH = 37; + public static final int IMPLICITNODETYPE_TANH = 38; + public static final int IMPLICITNODETYPE_ROUND = 39; + public static final int IMPLICITNODETYPE_CEIL = 40; + public static final int IMPLICITNODETYPE_FLOOR = 41; + public static final int IMPLICITNODETYPE_SIGN = 42; + public static final int IMPLICITNODETYPE_FRACT = 43; + public static final int IMPLICITNODETYPE_FUNCTIONCALL = 44; + public static final int IMPLICITNODETYPE_MESH = 45; + public static final int IMPLICITNODETYPE_LENGTH = 46; + public static final int IMPLICITNODETYPE_CONSTRESOURCEID = 47; + public static final int IMPLICITNODETYPE_VECTORFROMSCALAR = 48; + public static final int IMPLICITNODETYPE_UNSIGNEDMESH = 49; + public static final int IMPLICITNODETYPE_MOD = 50; + public static final int IMPLICITNODETYPE_BEAMLATTICE = 51; + public static final int IMPLICITNODETYPE_FUNCTIONGRADIENT = 52; + public static final int IMPLICITNODETYPE_NORMALIZEDISTANCE = 53; + + public enum ImplicitNodeType { + eAddition, + eSubtraction, + eMultiplication, + eDivision, + eConstant, + eConstVec, + eConstMat, + eComposeVector, + eDecomposeVector, + eComposeMatrix, + eMatrixFromColumns, + eMatrixFromRows, + eDot, + eCross, + eMatVecMultiplication, + eTranspose, + eInverse, + eSinus, + eCosinus, + eTan, + eArcSin, + eArcCos, + eArcTan, + eArcTan2, + eMin, + eMax, + eAbs, + eFmod, + ePow, + eSqrt, + eExp, + eLog, + eLog2, + eLog10, + eSelect, + eClamp, + eSinh, + eCosh, + eTanh, + eRound, + eCeil, + eFloor, + eSign, + eFract, + eFunctionCall, + eMesh, + eLength, + eConstResourceID, + eVectorFromScalar, + eUnsignedMesh, + eMod, + eBeamLattice, + eFunctionGradient, + eNormalizeDistance + } + + public static final int IMPLICITPORTTYPE_SCALAR = 0; + public static final int IMPLICITPORTTYPE_VECTOR = 1; + public static final int IMPLICITPORTTYPE_MATRIX = 2; + public static final int IMPLICITPORTTYPE_RESOURCEID = 3; + + public enum ImplicitPortType { + eScalar, + eVector, + eMatrix, + eResourceID + } + + public static final int IMPLICITNODECONFIGURATION_DEFAULT = 0; + public static final int IMPLICITNODECONFIGURATION_SCALARTOSCALAR = 1; + public static final int IMPLICITNODECONFIGURATION_VECTORTOVECTOR = 2; + public static final int IMPLICITNODECONFIGURATION_MATRIXTOMATRIX = 3; + + public enum ImplicitNodeConfiguration { + eDefault, + eScalarToScalar, + eVectorToVector, + eMatrixToMatrix + } + + public static final int ENCRYPTIONALGORITHM_AES256_GCM = 1; + + public enum EncryptionAlgorithm { + eAES256_GCM + } + + public static final int WRAPPINGALGORITHM_RSA_OAEP = 0; + + public enum WrappingAlgorithm { + eRSA_OAEP + } + + public static final int MGFALGORITHM_MGF1_SHA1 = 160; + public static final int MGFALGORITHM_MGF1_SHA224 = 224; + public static final int MGFALGORITHM_MGF1_SHA256 = 256; + public static final int MGFALGORITHM_MGF1_SHA384 = 384; + public static final int MGFALGORITHM_MGF1_SHA512 = 512; + + public enum MgfAlgorithm { + eMGF1_SHA1, + eMGF1_SHA224, + eMGF1_SHA256, + eMGF1_SHA384, + eMGF1_SHA512 + } + + public static final int DIGESTMETHOD_SHA1 = 160; + public static final int DIGESTMETHOD_SHA256 = 256; + + public enum DigestMethod { + eSHA1, + eSHA256 + } + + public static final int COMPRESSION_NOCOMPRESSION = 0; + public static final int COMPRESSION_DEFLATE = 1; + + public enum Compression { + eNoCompression, + eDeflate + } + + public static class EnumConversion { + public static int convertPropertyTypeToConst (PropertyType value) throws Lib3MFException { + switch (value) { + case eNoPropertyType: return PROPERTYTYPE_NOPROPERTYTYPE; + case eBaseMaterial: return PROPERTYTYPE_BASEMATERIAL; + case eTexCoord: return PROPERTYTYPE_TEXCOORD; + case eColors: return PROPERTYTYPE_COLORS; + case eComposite: return PROPERTYTYPE_COMPOSITE; + case eMulti: return PROPERTYTYPE_MULTI; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static PropertyType convertConstToPropertyType (int value) throws Lib3MFException { + switch (value) { + case PROPERTYTYPE_NOPROPERTYTYPE: return PropertyType.eNoPropertyType; + case PROPERTYTYPE_BASEMATERIAL: return PropertyType.eBaseMaterial; + case PROPERTYTYPE_TEXCOORD: return PropertyType.eTexCoord; + case PROPERTYTYPE_COLORS: return PropertyType.eColors; + case PROPERTYTYPE_COMPOSITE: return PropertyType.eComposite; + case PROPERTYTYPE_MULTI: return PropertyType.eMulti; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertSlicesMeshResolutionToConst (SlicesMeshResolution value) throws Lib3MFException { + switch (value) { + case eFullres: return SLICESMESHRESOLUTION_FULLRES; + case eLowres: return SLICESMESHRESOLUTION_LOWRES; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static SlicesMeshResolution convertConstToSlicesMeshResolution (int value) throws Lib3MFException { + switch (value) { + case SLICESMESHRESOLUTION_FULLRES: return SlicesMeshResolution.eFullres; + case SLICESMESHRESOLUTION_LOWRES: return SlicesMeshResolution.eLowres; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertModelUnitToConst (ModelUnit value) throws Lib3MFException { + switch (value) { + case eMicroMeter: return MODELUNIT_MICROMETER; + case eMilliMeter: return MODELUNIT_MILLIMETER; + case eCentiMeter: return MODELUNIT_CENTIMETER; + case eInch: return MODELUNIT_INCH; + case eFoot: return MODELUNIT_FOOT; + case eMeter: return MODELUNIT_METER; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static ModelUnit convertConstToModelUnit (int value) throws Lib3MFException { + switch (value) { + case MODELUNIT_MICROMETER: return ModelUnit.eMicroMeter; + case MODELUNIT_MILLIMETER: return ModelUnit.eMilliMeter; + case MODELUNIT_CENTIMETER: return ModelUnit.eCentiMeter; + case MODELUNIT_INCH: return ModelUnit.eInch; + case MODELUNIT_FOOT: return ModelUnit.eFoot; + case MODELUNIT_METER: return ModelUnit.eMeter; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertObjectTypeToConst (ObjectType value) throws Lib3MFException { + switch (value) { + case eOther: return OBJECTTYPE_OTHER; + case eModel: return OBJECTTYPE_MODEL; + case eSupport: return OBJECTTYPE_SUPPORT; + case eSolidSupport: return OBJECTTYPE_SOLIDSUPPORT; + case eSurface: return OBJECTTYPE_SURFACE; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static ObjectType convertConstToObjectType (int value) throws Lib3MFException { + switch (value) { + case OBJECTTYPE_OTHER: return ObjectType.eOther; + case OBJECTTYPE_MODEL: return ObjectType.eModel; + case OBJECTTYPE_SUPPORT: return ObjectType.eSupport; + case OBJECTTYPE_SOLIDSUPPORT: return ObjectType.eSolidSupport; + case OBJECTTYPE_SURFACE: return ObjectType.eSurface; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertTextureTypeToConst (TextureType value) throws Lib3MFException { + switch (value) { + case eUnknown: return TEXTURETYPE_UNKNOWN; + case ePNG: return TEXTURETYPE_PNG; + case eJPEG: return TEXTURETYPE_JPEG; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static TextureType convertConstToTextureType (int value) throws Lib3MFException { + switch (value) { + case TEXTURETYPE_UNKNOWN: return TextureType.eUnknown; + case TEXTURETYPE_PNG: return TextureType.ePNG; + case TEXTURETYPE_JPEG: return TextureType.eJPEG; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertTextureTileStyleToConst (TextureTileStyle value) throws Lib3MFException { + switch (value) { + case eWrap: return TEXTURETILESTYLE_WRAP; + case eMirror: return TEXTURETILESTYLE_MIRROR; + case eClamp: return TEXTURETILESTYLE_CLAMP; + case eNoTileStyle: return TEXTURETILESTYLE_NOTILESTYLE; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static TextureTileStyle convertConstToTextureTileStyle (int value) throws Lib3MFException { + switch (value) { + case TEXTURETILESTYLE_WRAP: return TextureTileStyle.eWrap; + case TEXTURETILESTYLE_MIRROR: return TextureTileStyle.eMirror; + case TEXTURETILESTYLE_CLAMP: return TextureTileStyle.eClamp; + case TEXTURETILESTYLE_NOTILESTYLE: return TextureTileStyle.eNoTileStyle; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertTextureFilterToConst (TextureFilter value) throws Lib3MFException { + switch (value) { + case eAuto: return TEXTUREFILTER_AUTO; + case eLinear: return TEXTUREFILTER_LINEAR; + case eNearest: return TEXTUREFILTER_NEAREST; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static TextureFilter convertConstToTextureFilter (int value) throws Lib3MFException { + switch (value) { + case TEXTUREFILTER_AUTO: return TextureFilter.eAuto; + case TEXTUREFILTER_LINEAR: return TextureFilter.eLinear; + case TEXTUREFILTER_NEAREST: return TextureFilter.eNearest; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertBeamLatticeCapModeToConst (BeamLatticeCapMode value) throws Lib3MFException { + switch (value) { + case eSphere: return BEAMLATTICECAPMODE_SPHERE; + case eHemiSphere: return BEAMLATTICECAPMODE_HEMISPHERE; + case eButt: return BEAMLATTICECAPMODE_BUTT; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static BeamLatticeCapMode convertConstToBeamLatticeCapMode (int value) throws Lib3MFException { + switch (value) { + case BEAMLATTICECAPMODE_SPHERE: return BeamLatticeCapMode.eSphere; + case BEAMLATTICECAPMODE_HEMISPHERE: return BeamLatticeCapMode.eHemiSphere; + case BEAMLATTICECAPMODE_BUTT: return BeamLatticeCapMode.eButt; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertBeamLatticeClipModeToConst (BeamLatticeClipMode value) throws Lib3MFException { + switch (value) { + case eNoClipMode: return BEAMLATTICECLIPMODE_NOCLIPMODE; + case eInside: return BEAMLATTICECLIPMODE_INSIDE; + case eOutside: return BEAMLATTICECLIPMODE_OUTSIDE; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static BeamLatticeClipMode convertConstToBeamLatticeClipMode (int value) throws Lib3MFException { + switch (value) { + case BEAMLATTICECLIPMODE_NOCLIPMODE: return BeamLatticeClipMode.eNoClipMode; + case BEAMLATTICECLIPMODE_INSIDE: return BeamLatticeClipMode.eInside; + case BEAMLATTICECLIPMODE_OUTSIDE: return BeamLatticeClipMode.eOutside; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertBeamLatticeBallModeToConst (BeamLatticeBallMode value) throws Lib3MFException { + switch (value) { + case eBeamLatticeBallModeNone: return BEAMLATTICEBALLMODE_BEAMLATTICEBALLMODENONE; + case eMixed: return BEAMLATTICEBALLMODE_MIXED; + case eAll: return BEAMLATTICEBALLMODE_ALL; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static BeamLatticeBallMode convertConstToBeamLatticeBallMode (int value) throws Lib3MFException { + switch (value) { + case BEAMLATTICEBALLMODE_BEAMLATTICEBALLMODENONE: return BeamLatticeBallMode.eBeamLatticeBallModeNone; + case BEAMLATTICEBALLMODE_MIXED: return BeamLatticeBallMode.eMixed; + case BEAMLATTICEBALLMODE_ALL: return BeamLatticeBallMode.eAll; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertProgressIdentifierToConst (ProgressIdentifier value) throws Lib3MFException { + switch (value) { + case eQUERYCANCELED: return PROGRESSIDENTIFIER_QUERYCANCELED; + case eDONE: return PROGRESSIDENTIFIER_DONE; + case eCLEANUP: return PROGRESSIDENTIFIER_CLEANUP; + case eREADSTREAM: return PROGRESSIDENTIFIER_READSTREAM; + case eEXTRACTOPCPACKAGE: return PROGRESSIDENTIFIER_EXTRACTOPCPACKAGE; + case eREADNONROOTMODELS: return PROGRESSIDENTIFIER_READNONROOTMODELS; + case eREADROOTMODEL: return PROGRESSIDENTIFIER_READROOTMODEL; + case eREADRESOURCES: return PROGRESSIDENTIFIER_READRESOURCES; + case eREADMESH: return PROGRESSIDENTIFIER_READMESH; + case eREADSLICES: return PROGRESSIDENTIFIER_READSLICES; + case eREADBUILD: return PROGRESSIDENTIFIER_READBUILD; + case eREADCUSTOMATTACHMENT: return PROGRESSIDENTIFIER_READCUSTOMATTACHMENT; + case eREADTEXTURETACHMENTS: return PROGRESSIDENTIFIER_READTEXTURETACHMENTS; + case eCREATEOPCPACKAGE: return PROGRESSIDENTIFIER_CREATEOPCPACKAGE; + case eWRITEMODELSTOSTREAM: return PROGRESSIDENTIFIER_WRITEMODELSTOSTREAM; + case eWRITEROOTMODEL: return PROGRESSIDENTIFIER_WRITEROOTMODEL; + case eWRITENONROOTMODELS: return PROGRESSIDENTIFIER_WRITENONROOTMODELS; + case eWRITEATTACHMENTS: return PROGRESSIDENTIFIER_WRITEATTACHMENTS; + case eWRITECONTENTTYPES: return PROGRESSIDENTIFIER_WRITECONTENTTYPES; + case eWRITENOBJECTS: return PROGRESSIDENTIFIER_WRITENOBJECTS; + case eWRITENODES: return PROGRESSIDENTIFIER_WRITENODES; + case eWRITETRIANGLES: return PROGRESSIDENTIFIER_WRITETRIANGLES; + case eWRITESLICES: return PROGRESSIDENTIFIER_WRITESLICES; + case eWRITEKEYSTORE: return PROGRESSIDENTIFIER_WRITEKEYSTORE; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static ProgressIdentifier convertConstToProgressIdentifier (int value) throws Lib3MFException { + switch (value) { + case PROGRESSIDENTIFIER_QUERYCANCELED: return ProgressIdentifier.eQUERYCANCELED; + case PROGRESSIDENTIFIER_DONE: return ProgressIdentifier.eDONE; + case PROGRESSIDENTIFIER_CLEANUP: return ProgressIdentifier.eCLEANUP; + case PROGRESSIDENTIFIER_READSTREAM: return ProgressIdentifier.eREADSTREAM; + case PROGRESSIDENTIFIER_EXTRACTOPCPACKAGE: return ProgressIdentifier.eEXTRACTOPCPACKAGE; + case PROGRESSIDENTIFIER_READNONROOTMODELS: return ProgressIdentifier.eREADNONROOTMODELS; + case PROGRESSIDENTIFIER_READROOTMODEL: return ProgressIdentifier.eREADROOTMODEL; + case PROGRESSIDENTIFIER_READRESOURCES: return ProgressIdentifier.eREADRESOURCES; + case PROGRESSIDENTIFIER_READMESH: return ProgressIdentifier.eREADMESH; + case PROGRESSIDENTIFIER_READSLICES: return ProgressIdentifier.eREADSLICES; + case PROGRESSIDENTIFIER_READBUILD: return ProgressIdentifier.eREADBUILD; + case PROGRESSIDENTIFIER_READCUSTOMATTACHMENT: return ProgressIdentifier.eREADCUSTOMATTACHMENT; + case PROGRESSIDENTIFIER_READTEXTURETACHMENTS: return ProgressIdentifier.eREADTEXTURETACHMENTS; + case PROGRESSIDENTIFIER_CREATEOPCPACKAGE: return ProgressIdentifier.eCREATEOPCPACKAGE; + case PROGRESSIDENTIFIER_WRITEMODELSTOSTREAM: return ProgressIdentifier.eWRITEMODELSTOSTREAM; + case PROGRESSIDENTIFIER_WRITEROOTMODEL: return ProgressIdentifier.eWRITEROOTMODEL; + case PROGRESSIDENTIFIER_WRITENONROOTMODELS: return ProgressIdentifier.eWRITENONROOTMODELS; + case PROGRESSIDENTIFIER_WRITEATTACHMENTS: return ProgressIdentifier.eWRITEATTACHMENTS; + case PROGRESSIDENTIFIER_WRITECONTENTTYPES: return ProgressIdentifier.eWRITECONTENTTYPES; + case PROGRESSIDENTIFIER_WRITENOBJECTS: return ProgressIdentifier.eWRITENOBJECTS; + case PROGRESSIDENTIFIER_WRITENODES: return ProgressIdentifier.eWRITENODES; + case PROGRESSIDENTIFIER_WRITETRIANGLES: return ProgressIdentifier.eWRITETRIANGLES; + case PROGRESSIDENTIFIER_WRITESLICES: return ProgressIdentifier.eWRITESLICES; + case PROGRESSIDENTIFIER_WRITEKEYSTORE: return ProgressIdentifier.eWRITEKEYSTORE; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertBlendMethodToConst (BlendMethod value) throws Lib3MFException { + switch (value) { + case eNoBlendMethod: return BLENDMETHOD_NOBLENDMETHOD; + case eMix: return BLENDMETHOD_MIX; + case eMultiply: return BLENDMETHOD_MULTIPLY; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static BlendMethod convertConstToBlendMethod (int value) throws Lib3MFException { + switch (value) { + case BLENDMETHOD_NOBLENDMETHOD: return BlendMethod.eNoBlendMethod; + case BLENDMETHOD_MIX: return BlendMethod.eMix; + case BLENDMETHOD_MULTIPLY: return BlendMethod.eMultiply; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertChannelNameToConst (ChannelName value) throws Lib3MFException { + switch (value) { + case eRed: return CHANNELNAME_RED; + case eGreen: return CHANNELNAME_GREEN; + case eBlue: return CHANNELNAME_BLUE; + case eAlpha: return CHANNELNAME_ALPHA; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static ChannelName convertConstToChannelName (int value) throws Lib3MFException { + switch (value) { + case CHANNELNAME_RED: return ChannelName.eRed; + case CHANNELNAME_GREEN: return ChannelName.eGreen; + case CHANNELNAME_BLUE: return ChannelName.eBlue; + case CHANNELNAME_ALPHA: return ChannelName.eAlpha; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertCompositionMethodToConst (CompositionMethod value) throws Lib3MFException { + switch (value) { + case eWeightedSum: return COMPOSITIONMETHOD_WEIGHTEDSUM; + case eMultiply: return COMPOSITIONMETHOD_MULTIPLY; + case eMin: return COMPOSITIONMETHOD_MIN; + case eMax: return COMPOSITIONMETHOD_MAX; + case eMask: return COMPOSITIONMETHOD_MASK; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static CompositionMethod convertConstToCompositionMethod (int value) throws Lib3MFException { + switch (value) { + case COMPOSITIONMETHOD_WEIGHTEDSUM: return CompositionMethod.eWeightedSum; + case COMPOSITIONMETHOD_MULTIPLY: return CompositionMethod.eMultiply; + case COMPOSITIONMETHOD_MIN: return CompositionMethod.eMin; + case COMPOSITIONMETHOD_MAX: return CompositionMethod.eMax; + case COMPOSITIONMETHOD_MASK: return CompositionMethod.eMask; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertCompositionSpaceToConst (CompositionSpace value) throws Lib3MFException { + switch (value) { + case eRaw: return COMPOSITIONSPACE_RAW; + case eLinearColor: return COMPOSITIONSPACE_LINEARCOLOR; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static CompositionSpace convertConstToCompositionSpace (int value) throws Lib3MFException { + switch (value) { + case COMPOSITIONSPACE_RAW: return CompositionSpace.eRaw; + case COMPOSITIONSPACE_LINEARCOLOR: return CompositionSpace.eLinearColor; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertImplicitNodeTypeToConst (ImplicitNodeType value) throws Lib3MFException { + switch (value) { + case eAddition: return IMPLICITNODETYPE_ADDITION; + case eSubtraction: return IMPLICITNODETYPE_SUBTRACTION; + case eMultiplication: return IMPLICITNODETYPE_MULTIPLICATION; + case eDivision: return IMPLICITNODETYPE_DIVISION; + case eConstant: return IMPLICITNODETYPE_CONSTANT; + case eConstVec: return IMPLICITNODETYPE_CONSTVEC; + case eConstMat: return IMPLICITNODETYPE_CONSTMAT; + case eComposeVector: return IMPLICITNODETYPE_COMPOSEVECTOR; + case eDecomposeVector: return IMPLICITNODETYPE_DECOMPOSEVECTOR; + case eComposeMatrix: return IMPLICITNODETYPE_COMPOSEMATRIX; + case eMatrixFromColumns: return IMPLICITNODETYPE_MATRIXFROMCOLUMNS; + case eMatrixFromRows: return IMPLICITNODETYPE_MATRIXFROMROWS; + case eDot: return IMPLICITNODETYPE_DOT; + case eCross: return IMPLICITNODETYPE_CROSS; + case eMatVecMultiplication: return IMPLICITNODETYPE_MATVECMULTIPLICATION; + case eTranspose: return IMPLICITNODETYPE_TRANSPOSE; + case eInverse: return IMPLICITNODETYPE_INVERSE; + case eSinus: return IMPLICITNODETYPE_SINUS; + case eCosinus: return IMPLICITNODETYPE_COSINUS; + case eTan: return IMPLICITNODETYPE_TAN; + case eArcSin: return IMPLICITNODETYPE_ARCSIN; + case eArcCos: return IMPLICITNODETYPE_ARCCOS; + case eArcTan: return IMPLICITNODETYPE_ARCTAN; + case eArcTan2: return IMPLICITNODETYPE_ARCTAN2; + case eMin: return IMPLICITNODETYPE_MIN; + case eMax: return IMPLICITNODETYPE_MAX; + case eAbs: return IMPLICITNODETYPE_ABS; + case eFmod: return IMPLICITNODETYPE_FMOD; + case ePow: return IMPLICITNODETYPE_POW; + case eSqrt: return IMPLICITNODETYPE_SQRT; + case eExp: return IMPLICITNODETYPE_EXP; + case eLog: return IMPLICITNODETYPE_LOG; + case eLog2: return IMPLICITNODETYPE_LOG2; + case eLog10: return IMPLICITNODETYPE_LOG10; + case eSelect: return IMPLICITNODETYPE_SELECT; + case eClamp: return IMPLICITNODETYPE_CLAMP; + case eSinh: return IMPLICITNODETYPE_SINH; + case eCosh: return IMPLICITNODETYPE_COSH; + case eTanh: return IMPLICITNODETYPE_TANH; + case eRound: return IMPLICITNODETYPE_ROUND; + case eCeil: return IMPLICITNODETYPE_CEIL; + case eFloor: return IMPLICITNODETYPE_FLOOR; + case eSign: return IMPLICITNODETYPE_SIGN; + case eFract: return IMPLICITNODETYPE_FRACT; + case eFunctionCall: return IMPLICITNODETYPE_FUNCTIONCALL; + case eMesh: return IMPLICITNODETYPE_MESH; + case eLength: return IMPLICITNODETYPE_LENGTH; + case eConstResourceID: return IMPLICITNODETYPE_CONSTRESOURCEID; + case eVectorFromScalar: return IMPLICITNODETYPE_VECTORFROMSCALAR; + case eUnsignedMesh: return IMPLICITNODETYPE_UNSIGNEDMESH; + case eMod: return IMPLICITNODETYPE_MOD; + case eBeamLattice: return IMPLICITNODETYPE_BEAMLATTICE; + case eFunctionGradient: return IMPLICITNODETYPE_FUNCTIONGRADIENT; + case eNormalizeDistance: return IMPLICITNODETYPE_NORMALIZEDISTANCE; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static ImplicitNodeType convertConstToImplicitNodeType (int value) throws Lib3MFException { + switch (value) { + case IMPLICITNODETYPE_ADDITION: return ImplicitNodeType.eAddition; + case IMPLICITNODETYPE_SUBTRACTION: return ImplicitNodeType.eSubtraction; + case IMPLICITNODETYPE_MULTIPLICATION: return ImplicitNodeType.eMultiplication; + case IMPLICITNODETYPE_DIVISION: return ImplicitNodeType.eDivision; + case IMPLICITNODETYPE_CONSTANT: return ImplicitNodeType.eConstant; + case IMPLICITNODETYPE_CONSTVEC: return ImplicitNodeType.eConstVec; + case IMPLICITNODETYPE_CONSTMAT: return ImplicitNodeType.eConstMat; + case IMPLICITNODETYPE_COMPOSEVECTOR: return ImplicitNodeType.eComposeVector; + case IMPLICITNODETYPE_DECOMPOSEVECTOR: return ImplicitNodeType.eDecomposeVector; + case IMPLICITNODETYPE_COMPOSEMATRIX: return ImplicitNodeType.eComposeMatrix; + case IMPLICITNODETYPE_MATRIXFROMCOLUMNS: return ImplicitNodeType.eMatrixFromColumns; + case IMPLICITNODETYPE_MATRIXFROMROWS: return ImplicitNodeType.eMatrixFromRows; + case IMPLICITNODETYPE_DOT: return ImplicitNodeType.eDot; + case IMPLICITNODETYPE_CROSS: return ImplicitNodeType.eCross; + case IMPLICITNODETYPE_MATVECMULTIPLICATION: return ImplicitNodeType.eMatVecMultiplication; + case IMPLICITNODETYPE_TRANSPOSE: return ImplicitNodeType.eTranspose; + case IMPLICITNODETYPE_INVERSE: return ImplicitNodeType.eInverse; + case IMPLICITNODETYPE_SINUS: return ImplicitNodeType.eSinus; + case IMPLICITNODETYPE_COSINUS: return ImplicitNodeType.eCosinus; + case IMPLICITNODETYPE_TAN: return ImplicitNodeType.eTan; + case IMPLICITNODETYPE_ARCSIN: return ImplicitNodeType.eArcSin; + case IMPLICITNODETYPE_ARCCOS: return ImplicitNodeType.eArcCos; + case IMPLICITNODETYPE_ARCTAN: return ImplicitNodeType.eArcTan; + case IMPLICITNODETYPE_ARCTAN2: return ImplicitNodeType.eArcTan2; + case IMPLICITNODETYPE_MIN: return ImplicitNodeType.eMin; + case IMPLICITNODETYPE_MAX: return ImplicitNodeType.eMax; + case IMPLICITNODETYPE_ABS: return ImplicitNodeType.eAbs; + case IMPLICITNODETYPE_FMOD: return ImplicitNodeType.eFmod; + case IMPLICITNODETYPE_POW: return ImplicitNodeType.ePow; + case IMPLICITNODETYPE_SQRT: return ImplicitNodeType.eSqrt; + case IMPLICITNODETYPE_EXP: return ImplicitNodeType.eExp; + case IMPLICITNODETYPE_LOG: return ImplicitNodeType.eLog; + case IMPLICITNODETYPE_LOG2: return ImplicitNodeType.eLog2; + case IMPLICITNODETYPE_LOG10: return ImplicitNodeType.eLog10; + case IMPLICITNODETYPE_SELECT: return ImplicitNodeType.eSelect; + case IMPLICITNODETYPE_CLAMP: return ImplicitNodeType.eClamp; + case IMPLICITNODETYPE_SINH: return ImplicitNodeType.eSinh; + case IMPLICITNODETYPE_COSH: return ImplicitNodeType.eCosh; + case IMPLICITNODETYPE_TANH: return ImplicitNodeType.eTanh; + case IMPLICITNODETYPE_ROUND: return ImplicitNodeType.eRound; + case IMPLICITNODETYPE_CEIL: return ImplicitNodeType.eCeil; + case IMPLICITNODETYPE_FLOOR: return ImplicitNodeType.eFloor; + case IMPLICITNODETYPE_SIGN: return ImplicitNodeType.eSign; + case IMPLICITNODETYPE_FRACT: return ImplicitNodeType.eFract; + case IMPLICITNODETYPE_FUNCTIONCALL: return ImplicitNodeType.eFunctionCall; + case IMPLICITNODETYPE_MESH: return ImplicitNodeType.eMesh; + case IMPLICITNODETYPE_LENGTH: return ImplicitNodeType.eLength; + case IMPLICITNODETYPE_CONSTRESOURCEID: return ImplicitNodeType.eConstResourceID; + case IMPLICITNODETYPE_VECTORFROMSCALAR: return ImplicitNodeType.eVectorFromScalar; + case IMPLICITNODETYPE_UNSIGNEDMESH: return ImplicitNodeType.eUnsignedMesh; + case IMPLICITNODETYPE_MOD: return ImplicitNodeType.eMod; + case IMPLICITNODETYPE_BEAMLATTICE: return ImplicitNodeType.eBeamLattice; + case IMPLICITNODETYPE_FUNCTIONGRADIENT: return ImplicitNodeType.eFunctionGradient; + case IMPLICITNODETYPE_NORMALIZEDISTANCE: return ImplicitNodeType.eNormalizeDistance; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertImplicitPortTypeToConst (ImplicitPortType value) throws Lib3MFException { + switch (value) { + case eScalar: return IMPLICITPORTTYPE_SCALAR; + case eVector: return IMPLICITPORTTYPE_VECTOR; + case eMatrix: return IMPLICITPORTTYPE_MATRIX; + case eResourceID: return IMPLICITPORTTYPE_RESOURCEID; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static ImplicitPortType convertConstToImplicitPortType (int value) throws Lib3MFException { + switch (value) { + case IMPLICITPORTTYPE_SCALAR: return ImplicitPortType.eScalar; + case IMPLICITPORTTYPE_VECTOR: return ImplicitPortType.eVector; + case IMPLICITPORTTYPE_MATRIX: return ImplicitPortType.eMatrix; + case IMPLICITPORTTYPE_RESOURCEID: return ImplicitPortType.eResourceID; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertImplicitNodeConfigurationToConst (ImplicitNodeConfiguration value) throws Lib3MFException { + switch (value) { + case eDefault: return IMPLICITNODECONFIGURATION_DEFAULT; + case eScalarToScalar: return IMPLICITNODECONFIGURATION_SCALARTOSCALAR; + case eVectorToVector: return IMPLICITNODECONFIGURATION_VECTORTOVECTOR; + case eMatrixToMatrix: return IMPLICITNODECONFIGURATION_MATRIXTOMATRIX; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static ImplicitNodeConfiguration convertConstToImplicitNodeConfiguration (int value) throws Lib3MFException { + switch (value) { + case IMPLICITNODECONFIGURATION_DEFAULT: return ImplicitNodeConfiguration.eDefault; + case IMPLICITNODECONFIGURATION_SCALARTOSCALAR: return ImplicitNodeConfiguration.eScalarToScalar; + case IMPLICITNODECONFIGURATION_VECTORTOVECTOR: return ImplicitNodeConfiguration.eVectorToVector; + case IMPLICITNODECONFIGURATION_MATRIXTOMATRIX: return ImplicitNodeConfiguration.eMatrixToMatrix; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertEncryptionAlgorithmToConst (EncryptionAlgorithm value) throws Lib3MFException { + switch (value) { + case eAES256_GCM: return ENCRYPTIONALGORITHM_AES256_GCM; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static EncryptionAlgorithm convertConstToEncryptionAlgorithm (int value) throws Lib3MFException { + switch (value) { + case ENCRYPTIONALGORITHM_AES256_GCM: return EncryptionAlgorithm.eAES256_GCM; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertWrappingAlgorithmToConst (WrappingAlgorithm value) throws Lib3MFException { + switch (value) { + case eRSA_OAEP: return WRAPPINGALGORITHM_RSA_OAEP; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static WrappingAlgorithm convertConstToWrappingAlgorithm (int value) throws Lib3MFException { + switch (value) { + case WRAPPINGALGORITHM_RSA_OAEP: return WrappingAlgorithm.eRSA_OAEP; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertMgfAlgorithmToConst (MgfAlgorithm value) throws Lib3MFException { + switch (value) { + case eMGF1_SHA1: return MGFALGORITHM_MGF1_SHA1; + case eMGF1_SHA224: return MGFALGORITHM_MGF1_SHA224; + case eMGF1_SHA256: return MGFALGORITHM_MGF1_SHA256; + case eMGF1_SHA384: return MGFALGORITHM_MGF1_SHA384; + case eMGF1_SHA512: return MGFALGORITHM_MGF1_SHA512; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static MgfAlgorithm convertConstToMgfAlgorithm (int value) throws Lib3MFException { + switch (value) { + case MGFALGORITHM_MGF1_SHA1: return MgfAlgorithm.eMGF1_SHA1; + case MGFALGORITHM_MGF1_SHA224: return MgfAlgorithm.eMGF1_SHA224; + case MGFALGORITHM_MGF1_SHA256: return MgfAlgorithm.eMGF1_SHA256; + case MGFALGORITHM_MGF1_SHA384: return MgfAlgorithm.eMGF1_SHA384; + case MGFALGORITHM_MGF1_SHA512: return MgfAlgorithm.eMGF1_SHA512; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertDigestMethodToConst (DigestMethod value) throws Lib3MFException { + switch (value) { + case eSHA1: return DIGESTMETHOD_SHA1; + case eSHA256: return DIGESTMETHOD_SHA256; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static DigestMethod convertConstToDigestMethod (int value) throws Lib3MFException { + switch (value) { + case DIGESTMETHOD_SHA1: return DigestMethod.eSHA1; + case DIGESTMETHOD_SHA256: return DigestMethod.eSHA256; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + public static int convertCompressionToConst (Compression value) throws Lib3MFException { + switch (value) { + case eNoCompression: return COMPRESSION_NOCOMPRESSION; + case eDeflate: return COMPRESSION_DEFLATE; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum value : " + value); + } + } + + public static Compression convertConstToCompression (int value) throws Lib3MFException { + switch (value) { + case COMPRESSION_NOCOMPRESSION: return Compression.eNoCompression; + case COMPRESSION_DEFLATE: return Compression.eDeflate; + default: throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Unknown enum const : " + value); + } + } + + } + + public interface ProgressCallback extends Callback { + + void progressCallback (Pointer abort, double progressValue, int progressIdentifier, Pointer userData); + + } + + public interface WriteCallback extends Callback { + + void writeCallback (long byteData, long numBytes, Pointer userData); + + } + + public interface ReadCallback extends Callback { + + void readCallback (long byteData, long numBytes, Pointer userData); + + } + + public interface SeekCallback extends Callback { + + void seekCallback (long position, Pointer userData); + + } + + public interface RandomNumberCallback extends Callback { + + void randomNumberCallback (long byteData, long numBytes, Pointer userData, Pointer bytesWritten); + + } + + public interface KeyWrappingCallback extends Callback { + + void keyWrappingCallback (Pointer kEKParams, int inBufferSize, Pointer inBufferBuffer, int outBufferSize, Pointer outBufferNeededSize, Pointer outBufferBuffer, Pointer userData, Pointer status); + + } + + public interface ContentEncryptionCallback extends Callback { + + void contentEncryptionCallback (Pointer cEKParams, int inputSize, Pointer inputBuffer, int outputSize, Pointer outputNeededSize, Pointer outputBuffer, Pointer userData, Pointer status); + + } + + protected com.sun.jna.Function lib3mf_getlibraryversion; + protected com.sun.jna.Function lib3mf_getprereleaseinformation; + protected com.sun.jna.Function lib3mf_getbuildinformation; + protected com.sun.jna.Function lib3mf_getspecificationversion; + protected com.sun.jna.Function lib3mf_createmodel; + protected com.sun.jna.Function lib3mf_release; + protected com.sun.jna.Function lib3mf_acquire; + protected com.sun.jna.Function lib3mf_setjournal; + protected com.sun.jna.Function lib3mf_getlasterror; + protected com.sun.jna.Function lib3mf_getsymbollookupmethod; + protected com.sun.jna.Function lib3mf_retrieveprogressmessage; + protected com.sun.jna.Function lib3mf_rgbatocolor; + protected com.sun.jna.Function lib3mf_floatrgbatocolor; + protected com.sun.jna.Function lib3mf_colortorgba; + protected com.sun.jna.Function lib3mf_colortofloatrgba; + protected com.sun.jna.Function lib3mf_getidentitytransform; + protected com.sun.jna.Function lib3mf_getuniformscaletransform; + protected com.sun.jna.Function lib3mf_getscaletransform; + protected com.sun.jna.Function lib3mf_gettranslationtransform; + protected com.sun.jna.Function lib3mf_base_classtypeid; + protected com.sun.jna.Function lib3mf_writer_writetofile; + protected com.sun.jna.Function lib3mf_writer_getstreamsize; + protected com.sun.jna.Function lib3mf_writer_writetobuffer; + protected com.sun.jna.Function lib3mf_writer_writetocallback; + protected com.sun.jna.Function lib3mf_writer_setprogresscallback; + protected com.sun.jna.Function lib3mf_writer_getdecimalprecision; + protected com.sun.jna.Function lib3mf_writer_setdecimalprecision; + protected com.sun.jna.Function lib3mf_writer_setstrictmodeactive; + protected com.sun.jna.Function lib3mf_writer_getstrictmodeactive; + protected com.sun.jna.Function lib3mf_writer_getwarning; + protected com.sun.jna.Function lib3mf_writer_getwarningcount; + protected com.sun.jna.Function lib3mf_writer_addkeywrappingcallback; + protected com.sun.jna.Function lib3mf_writer_setcontentencryptioncallback; + protected com.sun.jna.Function lib3mf_reader_readfromfile; + protected com.sun.jna.Function lib3mf_reader_readfrombuffer; + protected com.sun.jna.Function lib3mf_reader_readfromcallback; + protected com.sun.jna.Function lib3mf_reader_setprogresscallback; + protected com.sun.jna.Function lib3mf_reader_addrelationtoread; + protected com.sun.jna.Function lib3mf_reader_removerelationtoread; + protected com.sun.jna.Function lib3mf_reader_setstrictmodeactive; + protected com.sun.jna.Function lib3mf_reader_getstrictmodeactive; + protected com.sun.jna.Function lib3mf_reader_getwarning; + protected com.sun.jna.Function lib3mf_reader_getwarningcount; + protected com.sun.jna.Function lib3mf_reader_addkeywrappingcallback; + protected com.sun.jna.Function lib3mf_reader_setcontentencryptioncallback; + protected com.sun.jna.Function lib3mf_packagepart_getpath; + protected com.sun.jna.Function lib3mf_packagepart_setpath; + protected com.sun.jna.Function lib3mf_resource_getresourceid; + protected com.sun.jna.Function lib3mf_resource_getuniqueresourceid; + protected com.sun.jna.Function lib3mf_resource_packagepart; + protected com.sun.jna.Function lib3mf_resource_setpackagepart; + protected com.sun.jna.Function lib3mf_resource_getmodelresourceid; + protected com.sun.jna.Function lib3mf_resourceiterator_movenext; + protected com.sun.jna.Function lib3mf_resourceiterator_moveprevious; + protected com.sun.jna.Function lib3mf_resourceiterator_getcurrent; + protected com.sun.jna.Function lib3mf_resourceiterator_clone; + protected com.sun.jna.Function lib3mf_resourceiterator_count; + protected com.sun.jna.Function lib3mf_slicestackiterator_getcurrentslicestack; + protected com.sun.jna.Function lib3mf_objectiterator_getcurrentobject; + protected com.sun.jna.Function lib3mf_meshobjectiterator_getcurrentmeshobject; + protected com.sun.jna.Function lib3mf_componentsobjectiterator_getcurrentcomponentsobject; + protected com.sun.jna.Function lib3mf_texture2diterator_getcurrenttexture2d; + protected com.sun.jna.Function lib3mf_basematerialgroupiterator_getcurrentbasematerialgroup; + protected com.sun.jna.Function lib3mf_colorgroupiterator_getcurrentcolorgroup; + protected com.sun.jna.Function lib3mf_texture2dgroupiterator_getcurrenttexture2dgroup; + protected com.sun.jna.Function lib3mf_compositematerialsiterator_getcurrentcompositematerials; + protected com.sun.jna.Function lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup; + protected com.sun.jna.Function lib3mf_image3diterator_getcurrentimage3d; + protected com.sun.jna.Function lib3mf_functioniterator_getcurrentfunction; + protected com.sun.jna.Function lib3mf_levelsetiterator_getcurrentlevelset; + protected com.sun.jna.Function lib3mf_metadata_getnamespace; + protected com.sun.jna.Function lib3mf_metadata_setnamespace; + protected com.sun.jna.Function lib3mf_metadata_getname; + protected com.sun.jna.Function lib3mf_metadata_setname; + protected com.sun.jna.Function lib3mf_metadata_getkey; + protected com.sun.jna.Function lib3mf_metadata_getmustpreserve; + protected com.sun.jna.Function lib3mf_metadata_setmustpreserve; + protected com.sun.jna.Function lib3mf_metadata_gettype; + protected com.sun.jna.Function lib3mf_metadata_settype; + protected com.sun.jna.Function lib3mf_metadata_getvalue; + protected com.sun.jna.Function lib3mf_metadata_setvalue; + protected com.sun.jna.Function lib3mf_metadatagroup_getmetadatacount; + protected com.sun.jna.Function lib3mf_metadatagroup_getmetadata; + protected com.sun.jna.Function lib3mf_metadatagroup_getmetadatabykey; + protected com.sun.jna.Function lib3mf_metadatagroup_removemetadatabyindex; + protected com.sun.jna.Function lib3mf_metadatagroup_removemetadata; + protected com.sun.jna.Function lib3mf_metadatagroup_addmetadata; + protected com.sun.jna.Function lib3mf_triangleset_setname; + protected com.sun.jna.Function lib3mf_triangleset_getname; + protected com.sun.jna.Function lib3mf_triangleset_setidentifier; + protected com.sun.jna.Function lib3mf_triangleset_getidentifier; + protected com.sun.jna.Function lib3mf_triangleset_addtriangle; + protected com.sun.jna.Function lib3mf_triangleset_removetriangle; + protected com.sun.jna.Function lib3mf_triangleset_clear; + protected com.sun.jna.Function lib3mf_triangleset_settrianglelist; + protected com.sun.jna.Function lib3mf_triangleset_gettrianglelist; + protected com.sun.jna.Function lib3mf_triangleset_addtrianglelist; + protected com.sun.jna.Function lib3mf_triangleset_merge; + protected com.sun.jna.Function lib3mf_triangleset_deleteset; + protected com.sun.jna.Function lib3mf_triangleset_duplicate; + protected com.sun.jna.Function lib3mf_object_gettype; + protected com.sun.jna.Function lib3mf_object_settype; + protected com.sun.jna.Function lib3mf_object_getname; + protected com.sun.jna.Function lib3mf_object_setname; + protected com.sun.jna.Function lib3mf_object_getpartnumber; + protected com.sun.jna.Function lib3mf_object_setpartnumber; + protected com.sun.jna.Function lib3mf_object_ismeshobject; + protected com.sun.jna.Function lib3mf_object_iscomponentsobject; + protected com.sun.jna.Function lib3mf_object_islevelsetobject; + protected com.sun.jna.Function lib3mf_object_isvalid; + protected com.sun.jna.Function lib3mf_object_setattachmentasthumbnail; + protected com.sun.jna.Function lib3mf_object_getthumbnailattachment; + protected com.sun.jna.Function lib3mf_object_clearthumbnailattachment; + protected com.sun.jna.Function lib3mf_object_getoutbox; + protected com.sun.jna.Function lib3mf_object_getuuid; + protected com.sun.jna.Function lib3mf_object_setuuid; + protected com.sun.jna.Function lib3mf_object_getmetadatagroup; + protected com.sun.jna.Function lib3mf_object_setslicesmeshresolution; + protected com.sun.jna.Function lib3mf_object_getslicesmeshresolution; + protected com.sun.jna.Function lib3mf_object_hasslices; + protected com.sun.jna.Function lib3mf_object_clearslicestack; + protected com.sun.jna.Function lib3mf_object_getslicestack; + protected com.sun.jna.Function lib3mf_object_assignslicestack; + protected com.sun.jna.Function lib3mf_meshobject_getvertexcount; + protected com.sun.jna.Function lib3mf_meshobject_gettrianglecount; + protected com.sun.jna.Function lib3mf_meshobject_getvertex; + protected com.sun.jna.Function lib3mf_meshobject_setvertex; + protected com.sun.jna.Function lib3mf_meshobject_addvertex; + protected com.sun.jna.Function lib3mf_meshobject_getvertices; + protected com.sun.jna.Function lib3mf_meshobject_gettriangle; + protected com.sun.jna.Function lib3mf_meshobject_settriangle; + protected com.sun.jna.Function lib3mf_meshobject_addtriangle; + protected com.sun.jna.Function lib3mf_meshobject_gettriangleindices; + protected com.sun.jna.Function lib3mf_meshobject_setobjectlevelproperty; + protected com.sun.jna.Function lib3mf_meshobject_getobjectlevelproperty; + protected com.sun.jna.Function lib3mf_meshobject_settriangleproperties; + protected com.sun.jna.Function lib3mf_meshobject_gettriangleproperties; + protected com.sun.jna.Function lib3mf_meshobject_setalltriangleproperties; + protected com.sun.jna.Function lib3mf_meshobject_getalltriangleproperties; + protected com.sun.jna.Function lib3mf_meshobject_clearallproperties; + protected com.sun.jna.Function lib3mf_meshobject_setgeometry; + protected com.sun.jna.Function lib3mf_meshobject_ismanifoldandoriented; + protected com.sun.jna.Function lib3mf_meshobject_beamlattice; + protected com.sun.jna.Function lib3mf_meshobject_getvolumedata; + protected com.sun.jna.Function lib3mf_meshobject_setvolumedata; + protected com.sun.jna.Function lib3mf_meshobject_addtriangleset; + protected com.sun.jna.Function lib3mf_meshobject_hastriangleset; + protected com.sun.jna.Function lib3mf_meshobject_findtriangleset; + protected com.sun.jna.Function lib3mf_meshobject_gettrianglesetcount; + protected com.sun.jna.Function lib3mf_meshobject_gettriangleset; + protected com.sun.jna.Function lib3mf_levelset_getfunction; + protected com.sun.jna.Function lib3mf_levelset_setfunction; + protected com.sun.jna.Function lib3mf_levelset_gettransform; + protected com.sun.jna.Function lib3mf_levelset_settransform; + protected com.sun.jna.Function lib3mf_levelset_getchannelname; + protected com.sun.jna.Function lib3mf_levelset_setchannelname; + protected com.sun.jna.Function lib3mf_levelset_setminfeaturesize; + protected com.sun.jna.Function lib3mf_levelset_getminfeaturesize; + protected com.sun.jna.Function lib3mf_levelset_setfallbackvalue; + protected com.sun.jna.Function lib3mf_levelset_getfallbackvalue; + protected com.sun.jna.Function lib3mf_levelset_setmeshbboxonly; + protected com.sun.jna.Function lib3mf_levelset_getmeshbboxonly; + protected com.sun.jna.Function lib3mf_levelset_setmesh; + protected com.sun.jna.Function lib3mf_levelset_getmesh; + protected com.sun.jna.Function lib3mf_levelset_getvolumedata; + protected com.sun.jna.Function lib3mf_levelset_setvolumedata; + protected com.sun.jna.Function lib3mf_beamlattice_getminlength; + protected com.sun.jna.Function lib3mf_beamlattice_setminlength; + protected com.sun.jna.Function lib3mf_beamlattice_getclipping; + protected com.sun.jna.Function lib3mf_beamlattice_setclipping; + protected com.sun.jna.Function lib3mf_beamlattice_getrepresentation; + protected com.sun.jna.Function lib3mf_beamlattice_setrepresentation; + protected com.sun.jna.Function lib3mf_beamlattice_getballoptions; + protected com.sun.jna.Function lib3mf_beamlattice_setballoptions; + protected com.sun.jna.Function lib3mf_beamlattice_getbeamcount; + protected com.sun.jna.Function lib3mf_beamlattice_getbeam; + protected com.sun.jna.Function lib3mf_beamlattice_addbeam; + protected com.sun.jna.Function lib3mf_beamlattice_setbeam; + protected com.sun.jna.Function lib3mf_beamlattice_setbeams; + protected com.sun.jna.Function lib3mf_beamlattice_getbeams; + protected com.sun.jna.Function lib3mf_beamlattice_getballcount; + protected com.sun.jna.Function lib3mf_beamlattice_getball; + protected com.sun.jna.Function lib3mf_beamlattice_addball; + protected com.sun.jna.Function lib3mf_beamlattice_setball; + protected com.sun.jna.Function lib3mf_beamlattice_setballs; + protected com.sun.jna.Function lib3mf_beamlattice_getballs; + protected com.sun.jna.Function lib3mf_beamlattice_getbeamsetcount; + protected com.sun.jna.Function lib3mf_beamlattice_addbeamset; + protected com.sun.jna.Function lib3mf_beamlattice_getbeamset; + protected com.sun.jna.Function lib3mf_functionreference_getfunctionresourceid; + protected com.sun.jna.Function lib3mf_functionreference_setfunctionresourceid; + protected com.sun.jna.Function lib3mf_functionreference_gettransform; + protected com.sun.jna.Function lib3mf_functionreference_settransform; + protected com.sun.jna.Function lib3mf_functionreference_getchannelname; + protected com.sun.jna.Function lib3mf_functionreference_setchannelname; + protected com.sun.jna.Function lib3mf_functionreference_setminfeaturesize; + protected com.sun.jna.Function lib3mf_functionreference_getminfeaturesize; + protected com.sun.jna.Function lib3mf_functionreference_setfallbackvalue; + protected com.sun.jna.Function lib3mf_functionreference_getfallbackvalue; + protected com.sun.jna.Function lib3mf_volumedatacomposite_getbasematerialgroup; + protected com.sun.jna.Function lib3mf_volumedatacomposite_setbasematerialgroup; + protected com.sun.jna.Function lib3mf_volumedatacomposite_getmaterialmappingcount; + protected com.sun.jna.Function lib3mf_volumedatacomposite_getmaterialmapping; + protected com.sun.jna.Function lib3mf_volumedatacomposite_addmaterialmapping; + protected com.sun.jna.Function lib3mf_volumedatacomposite_removematerialmapping; + protected com.sun.jna.Function lib3mf_volumedataproperty_getname; + protected com.sun.jna.Function lib3mf_volumedataproperty_setisrequired; + protected com.sun.jna.Function lib3mf_volumedataproperty_isrequired; + protected com.sun.jna.Function lib3mf_volumedata_getcomposite; + protected com.sun.jna.Function lib3mf_volumedata_createnewcomposite; + protected com.sun.jna.Function lib3mf_volumedata_removecomposite; + protected com.sun.jna.Function lib3mf_volumedata_getcolor; + protected com.sun.jna.Function lib3mf_volumedata_createnewcolor; + protected com.sun.jna.Function lib3mf_volumedata_removecolor; + protected com.sun.jna.Function lib3mf_volumedata_getpropertycount; + protected com.sun.jna.Function lib3mf_volumedata_getproperty; + protected com.sun.jna.Function lib3mf_volumedata_addpropertyfromfunction; + protected com.sun.jna.Function lib3mf_volumedata_removeproperty; + protected com.sun.jna.Function lib3mf_component_getobjectresource; + protected com.sun.jna.Function lib3mf_component_getobjectresourceid; + protected com.sun.jna.Function lib3mf_component_getuuid; + protected com.sun.jna.Function lib3mf_component_setuuid; + protected com.sun.jna.Function lib3mf_component_hastransform; + protected com.sun.jna.Function lib3mf_component_gettransform; + protected com.sun.jna.Function lib3mf_component_settransform; + protected com.sun.jna.Function lib3mf_componentsobject_addcomponent; + protected com.sun.jna.Function lib3mf_componentsobject_getcomponent; + protected com.sun.jna.Function lib3mf_componentsobject_getcomponentcount; + protected com.sun.jna.Function lib3mf_beamset_setname; + protected com.sun.jna.Function lib3mf_beamset_getname; + protected com.sun.jna.Function lib3mf_beamset_setidentifier; + protected com.sun.jna.Function lib3mf_beamset_getidentifier; + protected com.sun.jna.Function lib3mf_beamset_getreferencecount; + protected com.sun.jna.Function lib3mf_beamset_setreferences; + protected com.sun.jna.Function lib3mf_beamset_getreferences; + protected com.sun.jna.Function lib3mf_beamset_getballreferencecount; + protected com.sun.jna.Function lib3mf_beamset_setballreferences; + protected com.sun.jna.Function lib3mf_beamset_getballreferences; + protected com.sun.jna.Function lib3mf_basematerialgroup_getcount; + protected com.sun.jna.Function lib3mf_basematerialgroup_getallpropertyids; + protected com.sun.jna.Function lib3mf_basematerialgroup_addmaterial; + protected com.sun.jna.Function lib3mf_basematerialgroup_removematerial; + protected com.sun.jna.Function lib3mf_basematerialgroup_getname; + protected com.sun.jna.Function lib3mf_basematerialgroup_setname; + protected com.sun.jna.Function lib3mf_basematerialgroup_setdisplaycolor; + protected com.sun.jna.Function lib3mf_basematerialgroup_getdisplaycolor; + protected com.sun.jna.Function lib3mf_colorgroup_getcount; + protected com.sun.jna.Function lib3mf_colorgroup_getallpropertyids; + protected com.sun.jna.Function lib3mf_colorgroup_addcolor; + protected com.sun.jna.Function lib3mf_colorgroup_removecolor; + protected com.sun.jna.Function lib3mf_colorgroup_setcolor; + protected com.sun.jna.Function lib3mf_colorgroup_getcolor; + protected com.sun.jna.Function lib3mf_texture2dgroup_getcount; + protected com.sun.jna.Function lib3mf_texture2dgroup_getallpropertyids; + protected com.sun.jna.Function lib3mf_texture2dgroup_addtex2coord; + protected com.sun.jna.Function lib3mf_texture2dgroup_gettex2coord; + protected com.sun.jna.Function lib3mf_texture2dgroup_removetex2coord; + protected com.sun.jna.Function lib3mf_texture2dgroup_gettexture2d; + protected com.sun.jna.Function lib3mf_compositematerials_getcount; + protected com.sun.jna.Function lib3mf_compositematerials_getallpropertyids; + protected com.sun.jna.Function lib3mf_compositematerials_getbasematerialgroup; + protected com.sun.jna.Function lib3mf_compositematerials_addcomposite; + protected com.sun.jna.Function lib3mf_compositematerials_removecomposite; + protected com.sun.jna.Function lib3mf_compositematerials_getcomposite; + protected com.sun.jna.Function lib3mf_multipropertygroup_getcount; + protected com.sun.jna.Function lib3mf_multipropertygroup_getallpropertyids; + protected com.sun.jna.Function lib3mf_multipropertygroup_addmultiproperty; + protected com.sun.jna.Function lib3mf_multipropertygroup_setmultiproperty; + protected com.sun.jna.Function lib3mf_multipropertygroup_getmultiproperty; + protected com.sun.jna.Function lib3mf_multipropertygroup_removemultiproperty; + protected com.sun.jna.Function lib3mf_multipropertygroup_getlayercount; + protected com.sun.jna.Function lib3mf_multipropertygroup_addlayer; + protected com.sun.jna.Function lib3mf_multipropertygroup_getlayer; + protected com.sun.jna.Function lib3mf_multipropertygroup_removelayer; + protected com.sun.jna.Function lib3mf_image3d_getname; + protected com.sun.jna.Function lib3mf_image3d_setname; + protected com.sun.jna.Function lib3mf_image3d_isimagestack; + protected com.sun.jna.Function lib3mf_imagestack_getrowcount; + protected com.sun.jna.Function lib3mf_imagestack_setrowcount; + protected com.sun.jna.Function lib3mf_imagestack_getcolumncount; + protected com.sun.jna.Function lib3mf_imagestack_setcolumncount; + protected com.sun.jna.Function lib3mf_imagestack_getsheetcount; + protected com.sun.jna.Function lib3mf_imagestack_getsheet; + protected com.sun.jna.Function lib3mf_imagestack_setsheet; + protected com.sun.jna.Function lib3mf_imagestack_createemptysheet; + protected com.sun.jna.Function lib3mf_imagestack_createsheetfrombuffer; + protected com.sun.jna.Function lib3mf_imagestack_createsheetfromfile; + protected com.sun.jna.Function lib3mf_attachment_getpath; + protected com.sun.jna.Function lib3mf_attachment_setpath; + protected com.sun.jna.Function lib3mf_attachment_packagepart; + protected com.sun.jna.Function lib3mf_attachment_getrelationshiptype; + protected com.sun.jna.Function lib3mf_attachment_setrelationshiptype; + protected com.sun.jna.Function lib3mf_attachment_writetofile; + protected com.sun.jna.Function lib3mf_attachment_readfromfile; + protected com.sun.jna.Function lib3mf_attachment_readfromcallback; + protected com.sun.jna.Function lib3mf_attachment_getstreamsize; + protected com.sun.jna.Function lib3mf_attachment_writetobuffer; + protected com.sun.jna.Function lib3mf_attachment_readfrombuffer; + protected com.sun.jna.Function lib3mf_texture2d_getattachment; + protected com.sun.jna.Function lib3mf_texture2d_setattachment; + protected com.sun.jna.Function lib3mf_texture2d_getcontenttype; + protected com.sun.jna.Function lib3mf_texture2d_setcontenttype; + protected com.sun.jna.Function lib3mf_texture2d_gettilestyleuv; + protected com.sun.jna.Function lib3mf_texture2d_settilestyleuv; + protected com.sun.jna.Function lib3mf_texture2d_getfilter; + protected com.sun.jna.Function lib3mf_texture2d_setfilter; + protected com.sun.jna.Function lib3mf_implicitport_getidentifier; + protected com.sun.jna.Function lib3mf_implicitport_setidentifier; + protected com.sun.jna.Function lib3mf_implicitport_getdisplayname; + protected com.sun.jna.Function lib3mf_implicitport_setdisplayname; + protected com.sun.jna.Function lib3mf_implicitport_settype; + protected com.sun.jna.Function lib3mf_implicitport_gettype; + protected com.sun.jna.Function lib3mf_implicitport_getreference; + protected com.sun.jna.Function lib3mf_implicitport_setreference; + protected com.sun.jna.Function lib3mf_iterator_movenext; + protected com.sun.jna.Function lib3mf_iterator_moveprevious; + protected com.sun.jna.Function lib3mf_iterator_count; + protected com.sun.jna.Function lib3mf_implicitportiterator_getcurrent; + protected com.sun.jna.Function lib3mf_implicitnode_getidentifier; + protected com.sun.jna.Function lib3mf_implicitnode_setidentifier; + protected com.sun.jna.Function lib3mf_implicitnode_getdisplayname; + protected com.sun.jna.Function lib3mf_implicitnode_setdisplayname; + protected com.sun.jna.Function lib3mf_implicitnode_gettag; + protected com.sun.jna.Function lib3mf_implicitnode_settag; + protected com.sun.jna.Function lib3mf_implicitnode_getnodetype; + protected com.sun.jna.Function lib3mf_implicitnode_addinput; + protected com.sun.jna.Function lib3mf_implicitnode_getinputs; + protected com.sun.jna.Function lib3mf_implicitnode_addoutput; + protected com.sun.jna.Function lib3mf_implicitnode_getoutputs; + protected com.sun.jna.Function lib3mf_implicitnode_findinput; + protected com.sun.jna.Function lib3mf_implicitnode_findoutput; + protected com.sun.jna.Function lib3mf_implicitnode_aretypesvalid; + protected com.sun.jna.Function lib3mf_oneinputnode_getinputa; + protected com.sun.jna.Function lib3mf_oneinputnode_getoutputresult; + protected com.sun.jna.Function lib3mf_resourceidnode_setresource; + protected com.sun.jna.Function lib3mf_resourceidnode_getresource; + protected com.sun.jna.Function lib3mf_resourceidnode_getoutputvalue; + protected com.sun.jna.Function lib3mf_twoinputnode_getinputb; + protected com.sun.jna.Function lib3mf_selectnode_getinputb; + protected com.sun.jna.Function lib3mf_selectnode_getinputc; + protected com.sun.jna.Function lib3mf_selectnode_getinputd; + protected com.sun.jna.Function lib3mf_clampnode_getinputmin; + protected com.sun.jna.Function lib3mf_clampnode_getinputmax; + protected com.sun.jna.Function lib3mf_composevectornode_getinputx; + protected com.sun.jna.Function lib3mf_composevectornode_getinputy; + protected com.sun.jna.Function lib3mf_composevectornode_getinputz; + protected com.sun.jna.Function lib3mf_composevectornode_getoutputresult; + protected com.sun.jna.Function lib3mf_decomposevectornode_getinputa; + protected com.sun.jna.Function lib3mf_decomposevectornode_getoutputx; + protected com.sun.jna.Function lib3mf_decomposevectornode_getoutputy; + protected com.sun.jna.Function lib3mf_decomposevectornode_getoutputz; + protected com.sun.jna.Function lib3mf_composematrixnode_getinputm00; + protected com.sun.jna.Function lib3mf_composematrixnode_getinputm01; + protected com.sun.jna.Function lib3mf_composematrixnode_getinputm02; + protected com.sun.jna.Function lib3mf_composematrixnode_getinputm03; + protected com.sun.jna.Function lib3mf_composematrixnode_getinputm10; + protected com.sun.jna.Function lib3mf_composematrixnode_getinputm11; + protected com.sun.jna.Function lib3mf_composematrixnode_getinputm12; + protected com.sun.jna.Function lib3mf_composematrixnode_getinputm13; + protected com.sun.jna.Function lib3mf_composematrixnode_getinputm20; + protected com.sun.jna.Function lib3mf_composematrixnode_getinputm21; + protected com.sun.jna.Function lib3mf_composematrixnode_getinputm22; + protected com.sun.jna.Function lib3mf_composematrixnode_getinputm23; + protected com.sun.jna.Function lib3mf_composematrixnode_getinputm30; + protected com.sun.jna.Function lib3mf_composematrixnode_getinputm31; + protected com.sun.jna.Function lib3mf_composematrixnode_getinputm32; + protected com.sun.jna.Function lib3mf_composematrixnode_getinputm33; + protected com.sun.jna.Function lib3mf_composematrixnode_getoutputresult; + protected com.sun.jna.Function lib3mf_matrixfromrowsnode_getinputa; + protected com.sun.jna.Function lib3mf_matrixfromrowsnode_getinputb; + protected com.sun.jna.Function lib3mf_matrixfromrowsnode_getinputc; + protected com.sun.jna.Function lib3mf_matrixfromrowsnode_getinputd; + protected com.sun.jna.Function lib3mf_matrixfromrowsnode_getoutputresult; + protected com.sun.jna.Function lib3mf_matrixfromcolumnsnode_getinputa; + protected com.sun.jna.Function lib3mf_matrixfromcolumnsnode_getinputb; + protected com.sun.jna.Function lib3mf_matrixfromcolumnsnode_getinputc; + protected com.sun.jna.Function lib3mf_matrixfromcolumnsnode_getinputd; + protected com.sun.jna.Function lib3mf_matrixfromcolumnsnode_getoutputresult; + protected com.sun.jna.Function lib3mf_constantnode_setconstant; + protected com.sun.jna.Function lib3mf_constantnode_getconstant; + protected com.sun.jna.Function lib3mf_constantnode_getoutputvalue; + protected com.sun.jna.Function lib3mf_constvecnode_setvector; + protected com.sun.jna.Function lib3mf_constvecnode_getvector; + protected com.sun.jna.Function lib3mf_constvecnode_getoutputvector; + protected com.sun.jna.Function lib3mf_constmatnode_setmatrix; + protected com.sun.jna.Function lib3mf_constmatnode_getmatrix; + protected com.sun.jna.Function lib3mf_constmatnode_getoutputmatrix; + protected com.sun.jna.Function lib3mf_meshnode_getinputmesh; + protected com.sun.jna.Function lib3mf_meshnode_getinputpos; + protected com.sun.jna.Function lib3mf_meshnode_getoutputdistance; + protected com.sun.jna.Function lib3mf_unsignedmeshnode_getinputmesh; + protected com.sun.jna.Function lib3mf_unsignedmeshnode_getinputpos; + protected com.sun.jna.Function lib3mf_unsignedmeshnode_getoutputdistance; + protected com.sun.jna.Function lib3mf_beamlatticenode_getinputbeamlattice; + protected com.sun.jna.Function lib3mf_beamlatticenode_getinputpos; + protected com.sun.jna.Function lib3mf_beamlatticenode_getoutputdistance; + protected com.sun.jna.Function lib3mf_beamlatticenode_setaccuraterange; + protected com.sun.jna.Function lib3mf_beamlatticenode_getaccuraterange; + protected com.sun.jna.Function lib3mf_functiongradientnode_getinputfunctionid; + protected com.sun.jna.Function lib3mf_functiongradientnode_getinputpos; + protected com.sun.jna.Function lib3mf_functiongradientnode_getinputstep; + protected com.sun.jna.Function lib3mf_functiongradientnode_setscalaroutputname; + protected com.sun.jna.Function lib3mf_functiongradientnode_getscalaroutputname; + protected com.sun.jna.Function lib3mf_functiongradientnode_setvectorinputname; + protected com.sun.jna.Function lib3mf_functiongradientnode_getvectorinputname; + protected com.sun.jna.Function lib3mf_functiongradientnode_getoutputvector; + protected com.sun.jna.Function lib3mf_functiongradientnode_getoutputgradient; + protected com.sun.jna.Function lib3mf_functiongradientnode_getoutputmagnitude; + protected com.sun.jna.Function lib3mf_normalizedistancenode_getinputfunctionid; + protected com.sun.jna.Function lib3mf_normalizedistancenode_getinputpos; + protected com.sun.jna.Function lib3mf_normalizedistancenode_getinputstep; + protected com.sun.jna.Function lib3mf_normalizedistancenode_setscalaroutputname; + protected com.sun.jna.Function lib3mf_normalizedistancenode_getscalaroutputname; + protected com.sun.jna.Function lib3mf_normalizedistancenode_setvectorinputname; + protected com.sun.jna.Function lib3mf_normalizedistancenode_getvectorinputname; + protected com.sun.jna.Function lib3mf_normalizedistancenode_getoutputresult; + protected com.sun.jna.Function lib3mf_functioncallnode_getinputfunctionid; + protected com.sun.jna.Function lib3mf_nodeiterator_getcurrent; + protected com.sun.jna.Function lib3mf_function_getdisplayname; + protected com.sun.jna.Function lib3mf_function_setdisplayname; + protected com.sun.jna.Function lib3mf_function_addinput; + protected com.sun.jna.Function lib3mf_function_getinputs; + protected com.sun.jna.Function lib3mf_function_removeinput; + protected com.sun.jna.Function lib3mf_function_addoutput; + protected com.sun.jna.Function lib3mf_function_getoutputs; + protected com.sun.jna.Function lib3mf_function_removeoutput; + protected com.sun.jna.Function lib3mf_function_findinput; + protected com.sun.jna.Function lib3mf_function_findoutput; + protected com.sun.jna.Function lib3mf_implicitfunction_getidentifier; + protected com.sun.jna.Function lib3mf_implicitfunction_setidentifier; + protected com.sun.jna.Function lib3mf_implicitfunction_addnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addsinnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addcosnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addtannode; + protected com.sun.jna.Function lib3mf_implicitfunction_addarcsinnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addarccosnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addarctan2node; + protected com.sun.jna.Function lib3mf_implicitfunction_addsinhnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addcoshnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addtanhnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addroundnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addceilnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addfloornode; + protected com.sun.jna.Function lib3mf_implicitfunction_addsignnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addfractnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addabsnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addexpnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addlognode; + protected com.sun.jna.Function lib3mf_implicitfunction_addlog2node; + protected com.sun.jna.Function lib3mf_implicitfunction_addlog10node; + protected com.sun.jna.Function lib3mf_implicitfunction_addlengthnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addtransposenode; + protected com.sun.jna.Function lib3mf_implicitfunction_addinversenode; + protected com.sun.jna.Function lib3mf_implicitfunction_addsqrtnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addresourceidnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addadditionnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addsubtractionnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addmultiplicationnode; + protected com.sun.jna.Function lib3mf_implicitfunction_adddivisionnode; + protected com.sun.jna.Function lib3mf_implicitfunction_adddotnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addcrossnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addmatvecmultiplicationnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addminnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addmaxnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addfmodnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addpownode; + protected com.sun.jna.Function lib3mf_implicitfunction_addselectnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addclampnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addcomposevectornode; + protected com.sun.jna.Function lib3mf_implicitfunction_addvectorfromscalarnode; + protected com.sun.jna.Function lib3mf_implicitfunction_adddecomposevectornode; + protected com.sun.jna.Function lib3mf_implicitfunction_addcomposematrixnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addmatrixfromrowsnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addmatrixfromcolumnsnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addconstantnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addconstvecnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addconstmatnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addmeshnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addunsignedmeshnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addbeamlatticenode; + protected com.sun.jna.Function lib3mf_implicitfunction_addfunctiongradientnode; + protected com.sun.jna.Function lib3mf_implicitfunction_addnormalizedistancenode; + protected com.sun.jna.Function lib3mf_implicitfunction_addfunctioncallnode; + protected com.sun.jna.Function lib3mf_implicitfunction_getnodes; + protected com.sun.jna.Function lib3mf_implicitfunction_removenode; + protected com.sun.jna.Function lib3mf_implicitfunction_addlink; + protected com.sun.jna.Function lib3mf_implicitfunction_addlinkbynames; + protected com.sun.jna.Function lib3mf_implicitfunction_clear; + protected com.sun.jna.Function lib3mf_implicitfunction_sortnodestopologically; + protected com.sun.jna.Function lib3mf_functionfromimage3d_getimage3d; + protected com.sun.jna.Function lib3mf_functionfromimage3d_setimage3d; + protected com.sun.jna.Function lib3mf_functionfromimage3d_setfilter; + protected com.sun.jna.Function lib3mf_functionfromimage3d_getfilter; + protected com.sun.jna.Function lib3mf_functionfromimage3d_settilestyles; + protected com.sun.jna.Function lib3mf_functionfromimage3d_gettilestyles; + protected com.sun.jna.Function lib3mf_functionfromimage3d_getoffset; + protected com.sun.jna.Function lib3mf_functionfromimage3d_setoffset; + protected com.sun.jna.Function lib3mf_functionfromimage3d_getscale; + protected com.sun.jna.Function lib3mf_functionfromimage3d_setscale; + protected com.sun.jna.Function lib3mf_builditem_getobjectresource; + protected com.sun.jna.Function lib3mf_builditem_getuuid; + protected com.sun.jna.Function lib3mf_builditem_setuuid; + protected com.sun.jna.Function lib3mf_builditem_getobjectresourceid; + protected com.sun.jna.Function lib3mf_builditem_hasobjecttransform; + protected com.sun.jna.Function lib3mf_builditem_getobjecttransform; + protected com.sun.jna.Function lib3mf_builditem_setobjecttransform; + protected com.sun.jna.Function lib3mf_builditem_getpartnumber; + protected com.sun.jna.Function lib3mf_builditem_setpartnumber; + protected com.sun.jna.Function lib3mf_builditem_getmetadatagroup; + protected com.sun.jna.Function lib3mf_builditem_getoutbox; + protected com.sun.jna.Function lib3mf_builditemiterator_movenext; + protected com.sun.jna.Function lib3mf_builditemiterator_moveprevious; + protected com.sun.jna.Function lib3mf_builditemiterator_getcurrent; + protected com.sun.jna.Function lib3mf_builditemiterator_clone; + protected com.sun.jna.Function lib3mf_builditemiterator_count; + protected com.sun.jna.Function lib3mf_slice_setvertices; + protected com.sun.jna.Function lib3mf_slice_getvertices; + protected com.sun.jna.Function lib3mf_slice_getvertexcount; + protected com.sun.jna.Function lib3mf_slice_addpolygon; + protected com.sun.jna.Function lib3mf_slice_getpolygoncount; + protected com.sun.jna.Function lib3mf_slice_setpolygonindices; + protected com.sun.jna.Function lib3mf_slice_getpolygonindices; + protected com.sun.jna.Function lib3mf_slice_getpolygonindexcount; + protected com.sun.jna.Function lib3mf_slice_getztop; + protected com.sun.jna.Function lib3mf_slicestack_getbottomz; + protected com.sun.jna.Function lib3mf_slicestack_getslicecount; + protected com.sun.jna.Function lib3mf_slicestack_getslice; + protected com.sun.jna.Function lib3mf_slicestack_addslice; + protected com.sun.jna.Function lib3mf_slicestack_getslicerefcount; + protected com.sun.jna.Function lib3mf_slicestack_addslicestackreference; + protected com.sun.jna.Function lib3mf_slicestack_getslicestackreference; + protected com.sun.jna.Function lib3mf_slicestack_collapseslicereferences; + protected com.sun.jna.Function lib3mf_slicestack_setownpath; + protected com.sun.jna.Function lib3mf_slicestack_getownpath; + protected com.sun.jna.Function lib3mf_consumer_getconsumerid; + protected com.sun.jna.Function lib3mf_consumer_getkeyid; + protected com.sun.jna.Function lib3mf_consumer_getkeyvalue; + protected com.sun.jna.Function lib3mf_accessright_getconsumer; + protected com.sun.jna.Function lib3mf_accessright_getwrappingalgorithm; + protected com.sun.jna.Function lib3mf_accessright_getmgfalgorithm; + protected com.sun.jna.Function lib3mf_accessright_getdigestmethod; + protected com.sun.jna.Function lib3mf_contentencryptionparams_getencryptionalgorithm; + protected com.sun.jna.Function lib3mf_contentencryptionparams_getkey; + protected com.sun.jna.Function lib3mf_contentencryptionparams_getinitializationvector; + protected com.sun.jna.Function lib3mf_contentencryptionparams_getauthenticationtag; + protected com.sun.jna.Function lib3mf_contentencryptionparams_setauthenticationtag; + protected com.sun.jna.Function lib3mf_contentencryptionparams_getadditionalauthenticationdata; + protected com.sun.jna.Function lib3mf_contentencryptionparams_getdescriptor; + protected com.sun.jna.Function lib3mf_contentencryptionparams_getkeyuuid; + protected com.sun.jna.Function lib3mf_resourcedata_getpath; + protected com.sun.jna.Function lib3mf_resourcedata_getencryptionalgorithm; + protected com.sun.jna.Function lib3mf_resourcedata_getcompression; + protected com.sun.jna.Function lib3mf_resourcedata_getadditionalauthenticationdata; + protected com.sun.jna.Function lib3mf_resourcedatagroup_getkeyuuid; + protected com.sun.jna.Function lib3mf_resourcedatagroup_addaccessright; + protected com.sun.jna.Function lib3mf_resourcedatagroup_findaccessrightbyconsumer; + protected com.sun.jna.Function lib3mf_resourcedatagroup_removeaccessright; + protected com.sun.jna.Function lib3mf_keystore_addconsumer; + protected com.sun.jna.Function lib3mf_keystore_getconsumercount; + protected com.sun.jna.Function lib3mf_keystore_getconsumer; + protected com.sun.jna.Function lib3mf_keystore_removeconsumer; + protected com.sun.jna.Function lib3mf_keystore_findconsumer; + protected com.sun.jna.Function lib3mf_keystore_getresourcedatagroupcount; + protected com.sun.jna.Function lib3mf_keystore_addresourcedatagroup; + protected com.sun.jna.Function lib3mf_keystore_getresourcedatagroup; + protected com.sun.jna.Function lib3mf_keystore_removeresourcedatagroup; + protected com.sun.jna.Function lib3mf_keystore_findresourcedatagroup; + protected com.sun.jna.Function lib3mf_keystore_addresourcedata; + protected com.sun.jna.Function lib3mf_keystore_removeresourcedata; + protected com.sun.jna.Function lib3mf_keystore_findresourcedata; + protected com.sun.jna.Function lib3mf_keystore_getresourcedatacount; + protected com.sun.jna.Function lib3mf_keystore_getresourcedata; + protected com.sun.jna.Function lib3mf_keystore_getuuid; + protected com.sun.jna.Function lib3mf_keystore_setuuid; + protected com.sun.jna.Function lib3mf_model_rootmodelpart; + protected com.sun.jna.Function lib3mf_model_findorcreatepackagepart; + protected com.sun.jna.Function lib3mf_model_setunit; + protected com.sun.jna.Function lib3mf_model_getunit; + protected com.sun.jna.Function lib3mf_model_getlanguage; + protected com.sun.jna.Function lib3mf_model_setlanguage; + protected com.sun.jna.Function lib3mf_model_querywriter; + protected com.sun.jna.Function lib3mf_model_queryreader; + protected com.sun.jna.Function lib3mf_model_getresourcebyid; + protected com.sun.jna.Function lib3mf_model_gettexture2dbyid; + protected com.sun.jna.Function lib3mf_model_getpropertytypebyid; + protected com.sun.jna.Function lib3mf_model_getbasematerialgroupbyid; + protected com.sun.jna.Function lib3mf_model_gettexture2dgroupbyid; + protected com.sun.jna.Function lib3mf_model_getcompositematerialsbyid; + protected com.sun.jna.Function lib3mf_model_getmultipropertygroupbyid; + protected com.sun.jna.Function lib3mf_model_getmeshobjectbyid; + protected com.sun.jna.Function lib3mf_model_getcomponentsobjectbyid; + protected com.sun.jna.Function lib3mf_model_getcolorgroupbyid; + protected com.sun.jna.Function lib3mf_model_getslicestackbyid; + protected com.sun.jna.Function lib3mf_model_getlevelsetbyid; + protected com.sun.jna.Function lib3mf_model_getbuilduuid; + protected com.sun.jna.Function lib3mf_model_setbuilduuid; + protected com.sun.jna.Function lib3mf_model_getbuilditems; + protected com.sun.jna.Function lib3mf_model_getoutbox; + protected com.sun.jna.Function lib3mf_model_getresources; + protected com.sun.jna.Function lib3mf_model_getobjects; + protected com.sun.jna.Function lib3mf_model_getmeshobjects; + protected com.sun.jna.Function lib3mf_model_getcomponentsobjects; + protected com.sun.jna.Function lib3mf_model_gettexture2ds; + protected com.sun.jna.Function lib3mf_model_getbasematerialgroups; + protected com.sun.jna.Function lib3mf_model_getcolorgroups; + protected com.sun.jna.Function lib3mf_model_gettexture2dgroups; + protected com.sun.jna.Function lib3mf_model_getcompositematerials; + protected com.sun.jna.Function lib3mf_model_getmultipropertygroups; + protected com.sun.jna.Function lib3mf_model_getslicestacks; + protected com.sun.jna.Function lib3mf_model_getimage3ds; + protected com.sun.jna.Function lib3mf_model_mergetomodel; + protected com.sun.jna.Function lib3mf_model_mergefrommodel; + protected com.sun.jna.Function lib3mf_model_addmeshobject; + protected com.sun.jna.Function lib3mf_model_addcomponentsobject; + protected com.sun.jna.Function lib3mf_model_addslicestack; + protected com.sun.jna.Function lib3mf_model_addtexture2dfromattachment; + protected com.sun.jna.Function lib3mf_model_addbasematerialgroup; + protected com.sun.jna.Function lib3mf_model_addcolorgroup; + protected com.sun.jna.Function lib3mf_model_addtexture2dgroup; + protected com.sun.jna.Function lib3mf_model_addcompositematerials; + protected com.sun.jna.Function lib3mf_model_addmultipropertygroup; + protected com.sun.jna.Function lib3mf_model_addimagestack; + protected com.sun.jna.Function lib3mf_model_getimagestackbyid; + protected com.sun.jna.Function lib3mf_model_addbuilditem; + protected com.sun.jna.Function lib3mf_model_removebuilditem; + protected com.sun.jna.Function lib3mf_model_getmetadatagroup; + protected com.sun.jna.Function lib3mf_model_addattachment; + protected com.sun.jna.Function lib3mf_model_removeattachment; + protected com.sun.jna.Function lib3mf_model_getattachment; + protected com.sun.jna.Function lib3mf_model_findattachment; + protected com.sun.jna.Function lib3mf_model_getattachmentcount; + protected com.sun.jna.Function lib3mf_model_haspackagethumbnailattachment; + protected com.sun.jna.Function lib3mf_model_createpackagethumbnailattachment; + protected com.sun.jna.Function lib3mf_model_getpackagethumbnailattachment; + protected com.sun.jna.Function lib3mf_model_removepackagethumbnailattachment; + protected com.sun.jna.Function lib3mf_model_addcustomcontenttype; + protected com.sun.jna.Function lib3mf_model_removecustomcontenttype; + protected com.sun.jna.Function lib3mf_model_setrandomnumbercallback; + protected com.sun.jna.Function lib3mf_model_getkeystore; + protected com.sun.jna.Function lib3mf_model_getfunctions; + protected com.sun.jna.Function lib3mf_model_addimplicitfunction; + protected com.sun.jna.Function lib3mf_model_addfunctionfromimage3d; + protected com.sun.jna.Function lib3mf_model_addvolumedata; + protected com.sun.jna.Function lib3mf_model_addlevelset; + protected com.sun.jna.Function lib3mf_model_getlevelsets; + protected com.sun.jna.Function lib3mf_model_removeresource; + + protected NativeLibrary mLibrary; + + public Lib3MFWrapper(String libraryPath) { + mLibrary = NativeLibrary.getInstance(libraryPath); + lib3mf_getlibraryversion = mLibrary.getFunction("lib3mf_getlibraryversion"); + lib3mf_getprereleaseinformation = mLibrary.getFunction("lib3mf_getprereleaseinformation"); + lib3mf_getbuildinformation = mLibrary.getFunction("lib3mf_getbuildinformation"); + lib3mf_getspecificationversion = mLibrary.getFunction("lib3mf_getspecificationversion"); + lib3mf_createmodel = mLibrary.getFunction("lib3mf_createmodel"); + lib3mf_release = mLibrary.getFunction("lib3mf_release"); + lib3mf_acquire = mLibrary.getFunction("lib3mf_acquire"); + lib3mf_setjournal = mLibrary.getFunction("lib3mf_setjournal"); + lib3mf_getlasterror = mLibrary.getFunction("lib3mf_getlasterror"); + lib3mf_getsymbollookupmethod = mLibrary.getFunction("lib3mf_getsymbollookupmethod"); + lib3mf_retrieveprogressmessage = mLibrary.getFunction("lib3mf_retrieveprogressmessage"); + lib3mf_rgbatocolor = mLibrary.getFunction("lib3mf_rgbatocolor"); + lib3mf_floatrgbatocolor = mLibrary.getFunction("lib3mf_floatrgbatocolor"); + lib3mf_colortorgba = mLibrary.getFunction("lib3mf_colortorgba"); + lib3mf_colortofloatrgba = mLibrary.getFunction("lib3mf_colortofloatrgba"); + lib3mf_getidentitytransform = mLibrary.getFunction("lib3mf_getidentitytransform"); + lib3mf_getuniformscaletransform = mLibrary.getFunction("lib3mf_getuniformscaletransform"); + lib3mf_getscaletransform = mLibrary.getFunction("lib3mf_getscaletransform"); + lib3mf_gettranslationtransform = mLibrary.getFunction("lib3mf_gettranslationtransform"); + lib3mf_base_classtypeid = mLibrary.getFunction("lib3mf_base_classtypeid"); + lib3mf_writer_writetofile = mLibrary.getFunction("lib3mf_writer_writetofile"); + lib3mf_writer_getstreamsize = mLibrary.getFunction("lib3mf_writer_getstreamsize"); + lib3mf_writer_writetobuffer = mLibrary.getFunction("lib3mf_writer_writetobuffer"); + lib3mf_writer_writetocallback = mLibrary.getFunction("lib3mf_writer_writetocallback"); + lib3mf_writer_setprogresscallback = mLibrary.getFunction("lib3mf_writer_setprogresscallback"); + lib3mf_writer_getdecimalprecision = mLibrary.getFunction("lib3mf_writer_getdecimalprecision"); + lib3mf_writer_setdecimalprecision = mLibrary.getFunction("lib3mf_writer_setdecimalprecision"); + lib3mf_writer_setstrictmodeactive = mLibrary.getFunction("lib3mf_writer_setstrictmodeactive"); + lib3mf_writer_getstrictmodeactive = mLibrary.getFunction("lib3mf_writer_getstrictmodeactive"); + lib3mf_writer_getwarning = mLibrary.getFunction("lib3mf_writer_getwarning"); + lib3mf_writer_getwarningcount = mLibrary.getFunction("lib3mf_writer_getwarningcount"); + lib3mf_writer_addkeywrappingcallback = mLibrary.getFunction("lib3mf_writer_addkeywrappingcallback"); + lib3mf_writer_setcontentencryptioncallback = mLibrary.getFunction("lib3mf_writer_setcontentencryptioncallback"); + lib3mf_reader_readfromfile = mLibrary.getFunction("lib3mf_reader_readfromfile"); + lib3mf_reader_readfrombuffer = mLibrary.getFunction("lib3mf_reader_readfrombuffer"); + lib3mf_reader_readfromcallback = mLibrary.getFunction("lib3mf_reader_readfromcallback"); + lib3mf_reader_setprogresscallback = mLibrary.getFunction("lib3mf_reader_setprogresscallback"); + lib3mf_reader_addrelationtoread = mLibrary.getFunction("lib3mf_reader_addrelationtoread"); + lib3mf_reader_removerelationtoread = mLibrary.getFunction("lib3mf_reader_removerelationtoread"); + lib3mf_reader_setstrictmodeactive = mLibrary.getFunction("lib3mf_reader_setstrictmodeactive"); + lib3mf_reader_getstrictmodeactive = mLibrary.getFunction("lib3mf_reader_getstrictmodeactive"); + lib3mf_reader_getwarning = mLibrary.getFunction("lib3mf_reader_getwarning"); + lib3mf_reader_getwarningcount = mLibrary.getFunction("lib3mf_reader_getwarningcount"); + lib3mf_reader_addkeywrappingcallback = mLibrary.getFunction("lib3mf_reader_addkeywrappingcallback"); + lib3mf_reader_setcontentencryptioncallback = mLibrary.getFunction("lib3mf_reader_setcontentencryptioncallback"); + lib3mf_packagepart_getpath = mLibrary.getFunction("lib3mf_packagepart_getpath"); + lib3mf_packagepart_setpath = mLibrary.getFunction("lib3mf_packagepart_setpath"); + lib3mf_resource_getresourceid = mLibrary.getFunction("lib3mf_resource_getresourceid"); + lib3mf_resource_getuniqueresourceid = mLibrary.getFunction("lib3mf_resource_getuniqueresourceid"); + lib3mf_resource_packagepart = mLibrary.getFunction("lib3mf_resource_packagepart"); + lib3mf_resource_setpackagepart = mLibrary.getFunction("lib3mf_resource_setpackagepart"); + lib3mf_resource_getmodelresourceid = mLibrary.getFunction("lib3mf_resource_getmodelresourceid"); + lib3mf_resourceiterator_movenext = mLibrary.getFunction("lib3mf_resourceiterator_movenext"); + lib3mf_resourceiterator_moveprevious = mLibrary.getFunction("lib3mf_resourceiterator_moveprevious"); + lib3mf_resourceiterator_getcurrent = mLibrary.getFunction("lib3mf_resourceiterator_getcurrent"); + lib3mf_resourceiterator_clone = mLibrary.getFunction("lib3mf_resourceiterator_clone"); + lib3mf_resourceiterator_count = mLibrary.getFunction("lib3mf_resourceiterator_count"); + lib3mf_slicestackiterator_getcurrentslicestack = mLibrary.getFunction("lib3mf_slicestackiterator_getcurrentslicestack"); + lib3mf_objectiterator_getcurrentobject = mLibrary.getFunction("lib3mf_objectiterator_getcurrentobject"); + lib3mf_meshobjectiterator_getcurrentmeshobject = mLibrary.getFunction("lib3mf_meshobjectiterator_getcurrentmeshobject"); + lib3mf_componentsobjectiterator_getcurrentcomponentsobject = mLibrary.getFunction("lib3mf_componentsobjectiterator_getcurrentcomponentsobject"); + lib3mf_texture2diterator_getcurrenttexture2d = mLibrary.getFunction("lib3mf_texture2diterator_getcurrenttexture2d"); + lib3mf_basematerialgroupiterator_getcurrentbasematerialgroup = mLibrary.getFunction("lib3mf_basematerialgroupiterator_getcurrentbasematerialgroup"); + lib3mf_colorgroupiterator_getcurrentcolorgroup = mLibrary.getFunction("lib3mf_colorgroupiterator_getcurrentcolorgroup"); + lib3mf_texture2dgroupiterator_getcurrenttexture2dgroup = mLibrary.getFunction("lib3mf_texture2dgroupiterator_getcurrenttexture2dgroup"); + lib3mf_compositematerialsiterator_getcurrentcompositematerials = mLibrary.getFunction("lib3mf_compositematerialsiterator_getcurrentcompositematerials"); + lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup = mLibrary.getFunction("lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup"); + lib3mf_image3diterator_getcurrentimage3d = mLibrary.getFunction("lib3mf_image3diterator_getcurrentimage3d"); + lib3mf_functioniterator_getcurrentfunction = mLibrary.getFunction("lib3mf_functioniterator_getcurrentfunction"); + lib3mf_levelsetiterator_getcurrentlevelset = mLibrary.getFunction("lib3mf_levelsetiterator_getcurrentlevelset"); + lib3mf_metadata_getnamespace = mLibrary.getFunction("lib3mf_metadata_getnamespace"); + lib3mf_metadata_setnamespace = mLibrary.getFunction("lib3mf_metadata_setnamespace"); + lib3mf_metadata_getname = mLibrary.getFunction("lib3mf_metadata_getname"); + lib3mf_metadata_setname = mLibrary.getFunction("lib3mf_metadata_setname"); + lib3mf_metadata_getkey = mLibrary.getFunction("lib3mf_metadata_getkey"); + lib3mf_metadata_getmustpreserve = mLibrary.getFunction("lib3mf_metadata_getmustpreserve"); + lib3mf_metadata_setmustpreserve = mLibrary.getFunction("lib3mf_metadata_setmustpreserve"); + lib3mf_metadata_gettype = mLibrary.getFunction("lib3mf_metadata_gettype"); + lib3mf_metadata_settype = mLibrary.getFunction("lib3mf_metadata_settype"); + lib3mf_metadata_getvalue = mLibrary.getFunction("lib3mf_metadata_getvalue"); + lib3mf_metadata_setvalue = mLibrary.getFunction("lib3mf_metadata_setvalue"); + lib3mf_metadatagroup_getmetadatacount = mLibrary.getFunction("lib3mf_metadatagroup_getmetadatacount"); + lib3mf_metadatagroup_getmetadata = mLibrary.getFunction("lib3mf_metadatagroup_getmetadata"); + lib3mf_metadatagroup_getmetadatabykey = mLibrary.getFunction("lib3mf_metadatagroup_getmetadatabykey"); + lib3mf_metadatagroup_removemetadatabyindex = mLibrary.getFunction("lib3mf_metadatagroup_removemetadatabyindex"); + lib3mf_metadatagroup_removemetadata = mLibrary.getFunction("lib3mf_metadatagroup_removemetadata"); + lib3mf_metadatagroup_addmetadata = mLibrary.getFunction("lib3mf_metadatagroup_addmetadata"); + lib3mf_triangleset_setname = mLibrary.getFunction("lib3mf_triangleset_setname"); + lib3mf_triangleset_getname = mLibrary.getFunction("lib3mf_triangleset_getname"); + lib3mf_triangleset_setidentifier = mLibrary.getFunction("lib3mf_triangleset_setidentifier"); + lib3mf_triangleset_getidentifier = mLibrary.getFunction("lib3mf_triangleset_getidentifier"); + lib3mf_triangleset_addtriangle = mLibrary.getFunction("lib3mf_triangleset_addtriangle"); + lib3mf_triangleset_removetriangle = mLibrary.getFunction("lib3mf_triangleset_removetriangle"); + lib3mf_triangleset_clear = mLibrary.getFunction("lib3mf_triangleset_clear"); + lib3mf_triangleset_settrianglelist = mLibrary.getFunction("lib3mf_triangleset_settrianglelist"); + lib3mf_triangleset_gettrianglelist = mLibrary.getFunction("lib3mf_triangleset_gettrianglelist"); + lib3mf_triangleset_addtrianglelist = mLibrary.getFunction("lib3mf_triangleset_addtrianglelist"); + lib3mf_triangleset_merge = mLibrary.getFunction("lib3mf_triangleset_merge"); + lib3mf_triangleset_deleteset = mLibrary.getFunction("lib3mf_triangleset_deleteset"); + lib3mf_triangleset_duplicate = mLibrary.getFunction("lib3mf_triangleset_duplicate"); + lib3mf_object_gettype = mLibrary.getFunction("lib3mf_object_gettype"); + lib3mf_object_settype = mLibrary.getFunction("lib3mf_object_settype"); + lib3mf_object_getname = mLibrary.getFunction("lib3mf_object_getname"); + lib3mf_object_setname = mLibrary.getFunction("lib3mf_object_setname"); + lib3mf_object_getpartnumber = mLibrary.getFunction("lib3mf_object_getpartnumber"); + lib3mf_object_setpartnumber = mLibrary.getFunction("lib3mf_object_setpartnumber"); + lib3mf_object_ismeshobject = mLibrary.getFunction("lib3mf_object_ismeshobject"); + lib3mf_object_iscomponentsobject = mLibrary.getFunction("lib3mf_object_iscomponentsobject"); + lib3mf_object_islevelsetobject = mLibrary.getFunction("lib3mf_object_islevelsetobject"); + lib3mf_object_isvalid = mLibrary.getFunction("lib3mf_object_isvalid"); + lib3mf_object_setattachmentasthumbnail = mLibrary.getFunction("lib3mf_object_setattachmentasthumbnail"); + lib3mf_object_getthumbnailattachment = mLibrary.getFunction("lib3mf_object_getthumbnailattachment"); + lib3mf_object_clearthumbnailattachment = mLibrary.getFunction("lib3mf_object_clearthumbnailattachment"); + lib3mf_object_getoutbox = mLibrary.getFunction("lib3mf_object_getoutbox"); + lib3mf_object_getuuid = mLibrary.getFunction("lib3mf_object_getuuid"); + lib3mf_object_setuuid = mLibrary.getFunction("lib3mf_object_setuuid"); + lib3mf_object_getmetadatagroup = mLibrary.getFunction("lib3mf_object_getmetadatagroup"); + lib3mf_object_setslicesmeshresolution = mLibrary.getFunction("lib3mf_object_setslicesmeshresolution"); + lib3mf_object_getslicesmeshresolution = mLibrary.getFunction("lib3mf_object_getslicesmeshresolution"); + lib3mf_object_hasslices = mLibrary.getFunction("lib3mf_object_hasslices"); + lib3mf_object_clearslicestack = mLibrary.getFunction("lib3mf_object_clearslicestack"); + lib3mf_object_getslicestack = mLibrary.getFunction("lib3mf_object_getslicestack"); + lib3mf_object_assignslicestack = mLibrary.getFunction("lib3mf_object_assignslicestack"); + lib3mf_meshobject_getvertexcount = mLibrary.getFunction("lib3mf_meshobject_getvertexcount"); + lib3mf_meshobject_gettrianglecount = mLibrary.getFunction("lib3mf_meshobject_gettrianglecount"); + lib3mf_meshobject_getvertex = mLibrary.getFunction("lib3mf_meshobject_getvertex"); + lib3mf_meshobject_setvertex = mLibrary.getFunction("lib3mf_meshobject_setvertex"); + lib3mf_meshobject_addvertex = mLibrary.getFunction("lib3mf_meshobject_addvertex"); + lib3mf_meshobject_getvertices = mLibrary.getFunction("lib3mf_meshobject_getvertices"); + lib3mf_meshobject_gettriangle = mLibrary.getFunction("lib3mf_meshobject_gettriangle"); + lib3mf_meshobject_settriangle = mLibrary.getFunction("lib3mf_meshobject_settriangle"); + lib3mf_meshobject_addtriangle = mLibrary.getFunction("lib3mf_meshobject_addtriangle"); + lib3mf_meshobject_gettriangleindices = mLibrary.getFunction("lib3mf_meshobject_gettriangleindices"); + lib3mf_meshobject_setobjectlevelproperty = mLibrary.getFunction("lib3mf_meshobject_setobjectlevelproperty"); + lib3mf_meshobject_getobjectlevelproperty = mLibrary.getFunction("lib3mf_meshobject_getobjectlevelproperty"); + lib3mf_meshobject_settriangleproperties = mLibrary.getFunction("lib3mf_meshobject_settriangleproperties"); + lib3mf_meshobject_gettriangleproperties = mLibrary.getFunction("lib3mf_meshobject_gettriangleproperties"); + lib3mf_meshobject_setalltriangleproperties = mLibrary.getFunction("lib3mf_meshobject_setalltriangleproperties"); + lib3mf_meshobject_getalltriangleproperties = mLibrary.getFunction("lib3mf_meshobject_getalltriangleproperties"); + lib3mf_meshobject_clearallproperties = mLibrary.getFunction("lib3mf_meshobject_clearallproperties"); + lib3mf_meshobject_setgeometry = mLibrary.getFunction("lib3mf_meshobject_setgeometry"); + lib3mf_meshobject_ismanifoldandoriented = mLibrary.getFunction("lib3mf_meshobject_ismanifoldandoriented"); + lib3mf_meshobject_beamlattice = mLibrary.getFunction("lib3mf_meshobject_beamlattice"); + lib3mf_meshobject_getvolumedata = mLibrary.getFunction("lib3mf_meshobject_getvolumedata"); + lib3mf_meshobject_setvolumedata = mLibrary.getFunction("lib3mf_meshobject_setvolumedata"); + lib3mf_meshobject_addtriangleset = mLibrary.getFunction("lib3mf_meshobject_addtriangleset"); + lib3mf_meshobject_hastriangleset = mLibrary.getFunction("lib3mf_meshobject_hastriangleset"); + lib3mf_meshobject_findtriangleset = mLibrary.getFunction("lib3mf_meshobject_findtriangleset"); + lib3mf_meshobject_gettrianglesetcount = mLibrary.getFunction("lib3mf_meshobject_gettrianglesetcount"); + lib3mf_meshobject_gettriangleset = mLibrary.getFunction("lib3mf_meshobject_gettriangleset"); + lib3mf_levelset_getfunction = mLibrary.getFunction("lib3mf_levelset_getfunction"); + lib3mf_levelset_setfunction = mLibrary.getFunction("lib3mf_levelset_setfunction"); + lib3mf_levelset_gettransform = mLibrary.getFunction("lib3mf_levelset_gettransform"); + lib3mf_levelset_settransform = mLibrary.getFunction("lib3mf_levelset_settransform"); + lib3mf_levelset_getchannelname = mLibrary.getFunction("lib3mf_levelset_getchannelname"); + lib3mf_levelset_setchannelname = mLibrary.getFunction("lib3mf_levelset_setchannelname"); + lib3mf_levelset_setminfeaturesize = mLibrary.getFunction("lib3mf_levelset_setminfeaturesize"); + lib3mf_levelset_getminfeaturesize = mLibrary.getFunction("lib3mf_levelset_getminfeaturesize"); + lib3mf_levelset_setfallbackvalue = mLibrary.getFunction("lib3mf_levelset_setfallbackvalue"); + lib3mf_levelset_getfallbackvalue = mLibrary.getFunction("lib3mf_levelset_getfallbackvalue"); + lib3mf_levelset_setmeshbboxonly = mLibrary.getFunction("lib3mf_levelset_setmeshbboxonly"); + lib3mf_levelset_getmeshbboxonly = mLibrary.getFunction("lib3mf_levelset_getmeshbboxonly"); + lib3mf_levelset_setmesh = mLibrary.getFunction("lib3mf_levelset_setmesh"); + lib3mf_levelset_getmesh = mLibrary.getFunction("lib3mf_levelset_getmesh"); + lib3mf_levelset_getvolumedata = mLibrary.getFunction("lib3mf_levelset_getvolumedata"); + lib3mf_levelset_setvolumedata = mLibrary.getFunction("lib3mf_levelset_setvolumedata"); + lib3mf_beamlattice_getminlength = mLibrary.getFunction("lib3mf_beamlattice_getminlength"); + lib3mf_beamlattice_setminlength = mLibrary.getFunction("lib3mf_beamlattice_setminlength"); + lib3mf_beamlattice_getclipping = mLibrary.getFunction("lib3mf_beamlattice_getclipping"); + lib3mf_beamlattice_setclipping = mLibrary.getFunction("lib3mf_beamlattice_setclipping"); + lib3mf_beamlattice_getrepresentation = mLibrary.getFunction("lib3mf_beamlattice_getrepresentation"); + lib3mf_beamlattice_setrepresentation = mLibrary.getFunction("lib3mf_beamlattice_setrepresentation"); + lib3mf_beamlattice_getballoptions = mLibrary.getFunction("lib3mf_beamlattice_getballoptions"); + lib3mf_beamlattice_setballoptions = mLibrary.getFunction("lib3mf_beamlattice_setballoptions"); + lib3mf_beamlattice_getbeamcount = mLibrary.getFunction("lib3mf_beamlattice_getbeamcount"); + lib3mf_beamlattice_getbeam = mLibrary.getFunction("lib3mf_beamlattice_getbeam"); + lib3mf_beamlattice_addbeam = mLibrary.getFunction("lib3mf_beamlattice_addbeam"); + lib3mf_beamlattice_setbeam = mLibrary.getFunction("lib3mf_beamlattice_setbeam"); + lib3mf_beamlattice_setbeams = mLibrary.getFunction("lib3mf_beamlattice_setbeams"); + lib3mf_beamlattice_getbeams = mLibrary.getFunction("lib3mf_beamlattice_getbeams"); + lib3mf_beamlattice_getballcount = mLibrary.getFunction("lib3mf_beamlattice_getballcount"); + lib3mf_beamlattice_getball = mLibrary.getFunction("lib3mf_beamlattice_getball"); + lib3mf_beamlattice_addball = mLibrary.getFunction("lib3mf_beamlattice_addball"); + lib3mf_beamlattice_setball = mLibrary.getFunction("lib3mf_beamlattice_setball"); + lib3mf_beamlattice_setballs = mLibrary.getFunction("lib3mf_beamlattice_setballs"); + lib3mf_beamlattice_getballs = mLibrary.getFunction("lib3mf_beamlattice_getballs"); + lib3mf_beamlattice_getbeamsetcount = mLibrary.getFunction("lib3mf_beamlattice_getbeamsetcount"); + lib3mf_beamlattice_addbeamset = mLibrary.getFunction("lib3mf_beamlattice_addbeamset"); + lib3mf_beamlattice_getbeamset = mLibrary.getFunction("lib3mf_beamlattice_getbeamset"); + lib3mf_functionreference_getfunctionresourceid = mLibrary.getFunction("lib3mf_functionreference_getfunctionresourceid"); + lib3mf_functionreference_setfunctionresourceid = mLibrary.getFunction("lib3mf_functionreference_setfunctionresourceid"); + lib3mf_functionreference_gettransform = mLibrary.getFunction("lib3mf_functionreference_gettransform"); + lib3mf_functionreference_settransform = mLibrary.getFunction("lib3mf_functionreference_settransform"); + lib3mf_functionreference_getchannelname = mLibrary.getFunction("lib3mf_functionreference_getchannelname"); + lib3mf_functionreference_setchannelname = mLibrary.getFunction("lib3mf_functionreference_setchannelname"); + lib3mf_functionreference_setminfeaturesize = mLibrary.getFunction("lib3mf_functionreference_setminfeaturesize"); + lib3mf_functionreference_getminfeaturesize = mLibrary.getFunction("lib3mf_functionreference_getminfeaturesize"); + lib3mf_functionreference_setfallbackvalue = mLibrary.getFunction("lib3mf_functionreference_setfallbackvalue"); + lib3mf_functionreference_getfallbackvalue = mLibrary.getFunction("lib3mf_functionreference_getfallbackvalue"); + lib3mf_volumedatacomposite_getbasematerialgroup = mLibrary.getFunction("lib3mf_volumedatacomposite_getbasematerialgroup"); + lib3mf_volumedatacomposite_setbasematerialgroup = mLibrary.getFunction("lib3mf_volumedatacomposite_setbasematerialgroup"); + lib3mf_volumedatacomposite_getmaterialmappingcount = mLibrary.getFunction("lib3mf_volumedatacomposite_getmaterialmappingcount"); + lib3mf_volumedatacomposite_getmaterialmapping = mLibrary.getFunction("lib3mf_volumedatacomposite_getmaterialmapping"); + lib3mf_volumedatacomposite_addmaterialmapping = mLibrary.getFunction("lib3mf_volumedatacomposite_addmaterialmapping"); + lib3mf_volumedatacomposite_removematerialmapping = mLibrary.getFunction("lib3mf_volumedatacomposite_removematerialmapping"); + lib3mf_volumedataproperty_getname = mLibrary.getFunction("lib3mf_volumedataproperty_getname"); + lib3mf_volumedataproperty_setisrequired = mLibrary.getFunction("lib3mf_volumedataproperty_setisrequired"); + lib3mf_volumedataproperty_isrequired = mLibrary.getFunction("lib3mf_volumedataproperty_isrequired"); + lib3mf_volumedata_getcomposite = mLibrary.getFunction("lib3mf_volumedata_getcomposite"); + lib3mf_volumedata_createnewcomposite = mLibrary.getFunction("lib3mf_volumedata_createnewcomposite"); + lib3mf_volumedata_removecomposite = mLibrary.getFunction("lib3mf_volumedata_removecomposite"); + lib3mf_volumedata_getcolor = mLibrary.getFunction("lib3mf_volumedata_getcolor"); + lib3mf_volumedata_createnewcolor = mLibrary.getFunction("lib3mf_volumedata_createnewcolor"); + lib3mf_volumedata_removecolor = mLibrary.getFunction("lib3mf_volumedata_removecolor"); + lib3mf_volumedata_getpropertycount = mLibrary.getFunction("lib3mf_volumedata_getpropertycount"); + lib3mf_volumedata_getproperty = mLibrary.getFunction("lib3mf_volumedata_getproperty"); + lib3mf_volumedata_addpropertyfromfunction = mLibrary.getFunction("lib3mf_volumedata_addpropertyfromfunction"); + lib3mf_volumedata_removeproperty = mLibrary.getFunction("lib3mf_volumedata_removeproperty"); + lib3mf_component_getobjectresource = mLibrary.getFunction("lib3mf_component_getobjectresource"); + lib3mf_component_getobjectresourceid = mLibrary.getFunction("lib3mf_component_getobjectresourceid"); + lib3mf_component_getuuid = mLibrary.getFunction("lib3mf_component_getuuid"); + lib3mf_component_setuuid = mLibrary.getFunction("lib3mf_component_setuuid"); + lib3mf_component_hastransform = mLibrary.getFunction("lib3mf_component_hastransform"); + lib3mf_component_gettransform = mLibrary.getFunction("lib3mf_component_gettransform"); + lib3mf_component_settransform = mLibrary.getFunction("lib3mf_component_settransform"); + lib3mf_componentsobject_addcomponent = mLibrary.getFunction("lib3mf_componentsobject_addcomponent"); + lib3mf_componentsobject_getcomponent = mLibrary.getFunction("lib3mf_componentsobject_getcomponent"); + lib3mf_componentsobject_getcomponentcount = mLibrary.getFunction("lib3mf_componentsobject_getcomponentcount"); + lib3mf_beamset_setname = mLibrary.getFunction("lib3mf_beamset_setname"); + lib3mf_beamset_getname = mLibrary.getFunction("lib3mf_beamset_getname"); + lib3mf_beamset_setidentifier = mLibrary.getFunction("lib3mf_beamset_setidentifier"); + lib3mf_beamset_getidentifier = mLibrary.getFunction("lib3mf_beamset_getidentifier"); + lib3mf_beamset_getreferencecount = mLibrary.getFunction("lib3mf_beamset_getreferencecount"); + lib3mf_beamset_setreferences = mLibrary.getFunction("lib3mf_beamset_setreferences"); + lib3mf_beamset_getreferences = mLibrary.getFunction("lib3mf_beamset_getreferences"); + lib3mf_beamset_getballreferencecount = mLibrary.getFunction("lib3mf_beamset_getballreferencecount"); + lib3mf_beamset_setballreferences = mLibrary.getFunction("lib3mf_beamset_setballreferences"); + lib3mf_beamset_getballreferences = mLibrary.getFunction("lib3mf_beamset_getballreferences"); + lib3mf_basematerialgroup_getcount = mLibrary.getFunction("lib3mf_basematerialgroup_getcount"); + lib3mf_basematerialgroup_getallpropertyids = mLibrary.getFunction("lib3mf_basematerialgroup_getallpropertyids"); + lib3mf_basematerialgroup_addmaterial = mLibrary.getFunction("lib3mf_basematerialgroup_addmaterial"); + lib3mf_basematerialgroup_removematerial = mLibrary.getFunction("lib3mf_basematerialgroup_removematerial"); + lib3mf_basematerialgroup_getname = mLibrary.getFunction("lib3mf_basematerialgroup_getname"); + lib3mf_basematerialgroup_setname = mLibrary.getFunction("lib3mf_basematerialgroup_setname"); + lib3mf_basematerialgroup_setdisplaycolor = mLibrary.getFunction("lib3mf_basematerialgroup_setdisplaycolor"); + lib3mf_basematerialgroup_getdisplaycolor = mLibrary.getFunction("lib3mf_basematerialgroup_getdisplaycolor"); + lib3mf_colorgroup_getcount = mLibrary.getFunction("lib3mf_colorgroup_getcount"); + lib3mf_colorgroup_getallpropertyids = mLibrary.getFunction("lib3mf_colorgroup_getallpropertyids"); + lib3mf_colorgroup_addcolor = mLibrary.getFunction("lib3mf_colorgroup_addcolor"); + lib3mf_colorgroup_removecolor = mLibrary.getFunction("lib3mf_colorgroup_removecolor"); + lib3mf_colorgroup_setcolor = mLibrary.getFunction("lib3mf_colorgroup_setcolor"); + lib3mf_colorgroup_getcolor = mLibrary.getFunction("lib3mf_colorgroup_getcolor"); + lib3mf_texture2dgroup_getcount = mLibrary.getFunction("lib3mf_texture2dgroup_getcount"); + lib3mf_texture2dgroup_getallpropertyids = mLibrary.getFunction("lib3mf_texture2dgroup_getallpropertyids"); + lib3mf_texture2dgroup_addtex2coord = mLibrary.getFunction("lib3mf_texture2dgroup_addtex2coord"); + lib3mf_texture2dgroup_gettex2coord = mLibrary.getFunction("lib3mf_texture2dgroup_gettex2coord"); + lib3mf_texture2dgroup_removetex2coord = mLibrary.getFunction("lib3mf_texture2dgroup_removetex2coord"); + lib3mf_texture2dgroup_gettexture2d = mLibrary.getFunction("lib3mf_texture2dgroup_gettexture2d"); + lib3mf_compositematerials_getcount = mLibrary.getFunction("lib3mf_compositematerials_getcount"); + lib3mf_compositematerials_getallpropertyids = mLibrary.getFunction("lib3mf_compositematerials_getallpropertyids"); + lib3mf_compositematerials_getbasematerialgroup = mLibrary.getFunction("lib3mf_compositematerials_getbasematerialgroup"); + lib3mf_compositematerials_addcomposite = mLibrary.getFunction("lib3mf_compositematerials_addcomposite"); + lib3mf_compositematerials_removecomposite = mLibrary.getFunction("lib3mf_compositematerials_removecomposite"); + lib3mf_compositematerials_getcomposite = mLibrary.getFunction("lib3mf_compositematerials_getcomposite"); + lib3mf_multipropertygroup_getcount = mLibrary.getFunction("lib3mf_multipropertygroup_getcount"); + lib3mf_multipropertygroup_getallpropertyids = mLibrary.getFunction("lib3mf_multipropertygroup_getallpropertyids"); + lib3mf_multipropertygroup_addmultiproperty = mLibrary.getFunction("lib3mf_multipropertygroup_addmultiproperty"); + lib3mf_multipropertygroup_setmultiproperty = mLibrary.getFunction("lib3mf_multipropertygroup_setmultiproperty"); + lib3mf_multipropertygroup_getmultiproperty = mLibrary.getFunction("lib3mf_multipropertygroup_getmultiproperty"); + lib3mf_multipropertygroup_removemultiproperty = mLibrary.getFunction("lib3mf_multipropertygroup_removemultiproperty"); + lib3mf_multipropertygroup_getlayercount = mLibrary.getFunction("lib3mf_multipropertygroup_getlayercount"); + lib3mf_multipropertygroup_addlayer = mLibrary.getFunction("lib3mf_multipropertygroup_addlayer"); + lib3mf_multipropertygroup_getlayer = mLibrary.getFunction("lib3mf_multipropertygroup_getlayer"); + lib3mf_multipropertygroup_removelayer = mLibrary.getFunction("lib3mf_multipropertygroup_removelayer"); + lib3mf_image3d_getname = mLibrary.getFunction("lib3mf_image3d_getname"); + lib3mf_image3d_setname = mLibrary.getFunction("lib3mf_image3d_setname"); + lib3mf_image3d_isimagestack = mLibrary.getFunction("lib3mf_image3d_isimagestack"); + lib3mf_imagestack_getrowcount = mLibrary.getFunction("lib3mf_imagestack_getrowcount"); + lib3mf_imagestack_setrowcount = mLibrary.getFunction("lib3mf_imagestack_setrowcount"); + lib3mf_imagestack_getcolumncount = mLibrary.getFunction("lib3mf_imagestack_getcolumncount"); + lib3mf_imagestack_setcolumncount = mLibrary.getFunction("lib3mf_imagestack_setcolumncount"); + lib3mf_imagestack_getsheetcount = mLibrary.getFunction("lib3mf_imagestack_getsheetcount"); + lib3mf_imagestack_getsheet = mLibrary.getFunction("lib3mf_imagestack_getsheet"); + lib3mf_imagestack_setsheet = mLibrary.getFunction("lib3mf_imagestack_setsheet"); + lib3mf_imagestack_createemptysheet = mLibrary.getFunction("lib3mf_imagestack_createemptysheet"); + lib3mf_imagestack_createsheetfrombuffer = mLibrary.getFunction("lib3mf_imagestack_createsheetfrombuffer"); + lib3mf_imagestack_createsheetfromfile = mLibrary.getFunction("lib3mf_imagestack_createsheetfromfile"); + lib3mf_attachment_getpath = mLibrary.getFunction("lib3mf_attachment_getpath"); + lib3mf_attachment_setpath = mLibrary.getFunction("lib3mf_attachment_setpath"); + lib3mf_attachment_packagepart = mLibrary.getFunction("lib3mf_attachment_packagepart"); + lib3mf_attachment_getrelationshiptype = mLibrary.getFunction("lib3mf_attachment_getrelationshiptype"); + lib3mf_attachment_setrelationshiptype = mLibrary.getFunction("lib3mf_attachment_setrelationshiptype"); + lib3mf_attachment_writetofile = mLibrary.getFunction("lib3mf_attachment_writetofile"); + lib3mf_attachment_readfromfile = mLibrary.getFunction("lib3mf_attachment_readfromfile"); + lib3mf_attachment_readfromcallback = mLibrary.getFunction("lib3mf_attachment_readfromcallback"); + lib3mf_attachment_getstreamsize = mLibrary.getFunction("lib3mf_attachment_getstreamsize"); + lib3mf_attachment_writetobuffer = mLibrary.getFunction("lib3mf_attachment_writetobuffer"); + lib3mf_attachment_readfrombuffer = mLibrary.getFunction("lib3mf_attachment_readfrombuffer"); + lib3mf_texture2d_getattachment = mLibrary.getFunction("lib3mf_texture2d_getattachment"); + lib3mf_texture2d_setattachment = mLibrary.getFunction("lib3mf_texture2d_setattachment"); + lib3mf_texture2d_getcontenttype = mLibrary.getFunction("lib3mf_texture2d_getcontenttype"); + lib3mf_texture2d_setcontenttype = mLibrary.getFunction("lib3mf_texture2d_setcontenttype"); + lib3mf_texture2d_gettilestyleuv = mLibrary.getFunction("lib3mf_texture2d_gettilestyleuv"); + lib3mf_texture2d_settilestyleuv = mLibrary.getFunction("lib3mf_texture2d_settilestyleuv"); + lib3mf_texture2d_getfilter = mLibrary.getFunction("lib3mf_texture2d_getfilter"); + lib3mf_texture2d_setfilter = mLibrary.getFunction("lib3mf_texture2d_setfilter"); + lib3mf_implicitport_getidentifier = mLibrary.getFunction("lib3mf_implicitport_getidentifier"); + lib3mf_implicitport_setidentifier = mLibrary.getFunction("lib3mf_implicitport_setidentifier"); + lib3mf_implicitport_getdisplayname = mLibrary.getFunction("lib3mf_implicitport_getdisplayname"); + lib3mf_implicitport_setdisplayname = mLibrary.getFunction("lib3mf_implicitport_setdisplayname"); + lib3mf_implicitport_settype = mLibrary.getFunction("lib3mf_implicitport_settype"); + lib3mf_implicitport_gettype = mLibrary.getFunction("lib3mf_implicitport_gettype"); + lib3mf_implicitport_getreference = mLibrary.getFunction("lib3mf_implicitport_getreference"); + lib3mf_implicitport_setreference = mLibrary.getFunction("lib3mf_implicitport_setreference"); + lib3mf_iterator_movenext = mLibrary.getFunction("lib3mf_iterator_movenext"); + lib3mf_iterator_moveprevious = mLibrary.getFunction("lib3mf_iterator_moveprevious"); + lib3mf_iterator_count = mLibrary.getFunction("lib3mf_iterator_count"); + lib3mf_implicitportiterator_getcurrent = mLibrary.getFunction("lib3mf_implicitportiterator_getcurrent"); + lib3mf_implicitnode_getidentifier = mLibrary.getFunction("lib3mf_implicitnode_getidentifier"); + lib3mf_implicitnode_setidentifier = mLibrary.getFunction("lib3mf_implicitnode_setidentifier"); + lib3mf_implicitnode_getdisplayname = mLibrary.getFunction("lib3mf_implicitnode_getdisplayname"); + lib3mf_implicitnode_setdisplayname = mLibrary.getFunction("lib3mf_implicitnode_setdisplayname"); + lib3mf_implicitnode_gettag = mLibrary.getFunction("lib3mf_implicitnode_gettag"); + lib3mf_implicitnode_settag = mLibrary.getFunction("lib3mf_implicitnode_settag"); + lib3mf_implicitnode_getnodetype = mLibrary.getFunction("lib3mf_implicitnode_getnodetype"); + lib3mf_implicitnode_addinput = mLibrary.getFunction("lib3mf_implicitnode_addinput"); + lib3mf_implicitnode_getinputs = mLibrary.getFunction("lib3mf_implicitnode_getinputs"); + lib3mf_implicitnode_addoutput = mLibrary.getFunction("lib3mf_implicitnode_addoutput"); + lib3mf_implicitnode_getoutputs = mLibrary.getFunction("lib3mf_implicitnode_getoutputs"); + lib3mf_implicitnode_findinput = mLibrary.getFunction("lib3mf_implicitnode_findinput"); + lib3mf_implicitnode_findoutput = mLibrary.getFunction("lib3mf_implicitnode_findoutput"); + lib3mf_implicitnode_aretypesvalid = mLibrary.getFunction("lib3mf_implicitnode_aretypesvalid"); + lib3mf_oneinputnode_getinputa = mLibrary.getFunction("lib3mf_oneinputnode_getinputa"); + lib3mf_oneinputnode_getoutputresult = mLibrary.getFunction("lib3mf_oneinputnode_getoutputresult"); + lib3mf_resourceidnode_setresource = mLibrary.getFunction("lib3mf_resourceidnode_setresource"); + lib3mf_resourceidnode_getresource = mLibrary.getFunction("lib3mf_resourceidnode_getresource"); + lib3mf_resourceidnode_getoutputvalue = mLibrary.getFunction("lib3mf_resourceidnode_getoutputvalue"); + lib3mf_twoinputnode_getinputb = mLibrary.getFunction("lib3mf_twoinputnode_getinputb"); + lib3mf_selectnode_getinputb = mLibrary.getFunction("lib3mf_selectnode_getinputb"); + lib3mf_selectnode_getinputc = mLibrary.getFunction("lib3mf_selectnode_getinputc"); + lib3mf_selectnode_getinputd = mLibrary.getFunction("lib3mf_selectnode_getinputd"); + lib3mf_clampnode_getinputmin = mLibrary.getFunction("lib3mf_clampnode_getinputmin"); + lib3mf_clampnode_getinputmax = mLibrary.getFunction("lib3mf_clampnode_getinputmax"); + lib3mf_composevectornode_getinputx = mLibrary.getFunction("lib3mf_composevectornode_getinputx"); + lib3mf_composevectornode_getinputy = mLibrary.getFunction("lib3mf_composevectornode_getinputy"); + lib3mf_composevectornode_getinputz = mLibrary.getFunction("lib3mf_composevectornode_getinputz"); + lib3mf_composevectornode_getoutputresult = mLibrary.getFunction("lib3mf_composevectornode_getoutputresult"); + lib3mf_decomposevectornode_getinputa = mLibrary.getFunction("lib3mf_decomposevectornode_getinputa"); + lib3mf_decomposevectornode_getoutputx = mLibrary.getFunction("lib3mf_decomposevectornode_getoutputx"); + lib3mf_decomposevectornode_getoutputy = mLibrary.getFunction("lib3mf_decomposevectornode_getoutputy"); + lib3mf_decomposevectornode_getoutputz = mLibrary.getFunction("lib3mf_decomposevectornode_getoutputz"); + lib3mf_composematrixnode_getinputm00 = mLibrary.getFunction("lib3mf_composematrixnode_getinputm00"); + lib3mf_composematrixnode_getinputm01 = mLibrary.getFunction("lib3mf_composematrixnode_getinputm01"); + lib3mf_composematrixnode_getinputm02 = mLibrary.getFunction("lib3mf_composematrixnode_getinputm02"); + lib3mf_composematrixnode_getinputm03 = mLibrary.getFunction("lib3mf_composematrixnode_getinputm03"); + lib3mf_composematrixnode_getinputm10 = mLibrary.getFunction("lib3mf_composematrixnode_getinputm10"); + lib3mf_composematrixnode_getinputm11 = mLibrary.getFunction("lib3mf_composematrixnode_getinputm11"); + lib3mf_composematrixnode_getinputm12 = mLibrary.getFunction("lib3mf_composematrixnode_getinputm12"); + lib3mf_composematrixnode_getinputm13 = mLibrary.getFunction("lib3mf_composematrixnode_getinputm13"); + lib3mf_composematrixnode_getinputm20 = mLibrary.getFunction("lib3mf_composematrixnode_getinputm20"); + lib3mf_composematrixnode_getinputm21 = mLibrary.getFunction("lib3mf_composematrixnode_getinputm21"); + lib3mf_composematrixnode_getinputm22 = mLibrary.getFunction("lib3mf_composematrixnode_getinputm22"); + lib3mf_composematrixnode_getinputm23 = mLibrary.getFunction("lib3mf_composematrixnode_getinputm23"); + lib3mf_composematrixnode_getinputm30 = mLibrary.getFunction("lib3mf_composematrixnode_getinputm30"); + lib3mf_composematrixnode_getinputm31 = mLibrary.getFunction("lib3mf_composematrixnode_getinputm31"); + lib3mf_composematrixnode_getinputm32 = mLibrary.getFunction("lib3mf_composematrixnode_getinputm32"); + lib3mf_composematrixnode_getinputm33 = mLibrary.getFunction("lib3mf_composematrixnode_getinputm33"); + lib3mf_composematrixnode_getoutputresult = mLibrary.getFunction("lib3mf_composematrixnode_getoutputresult"); + lib3mf_matrixfromrowsnode_getinputa = mLibrary.getFunction("lib3mf_matrixfromrowsnode_getinputa"); + lib3mf_matrixfromrowsnode_getinputb = mLibrary.getFunction("lib3mf_matrixfromrowsnode_getinputb"); + lib3mf_matrixfromrowsnode_getinputc = mLibrary.getFunction("lib3mf_matrixfromrowsnode_getinputc"); + lib3mf_matrixfromrowsnode_getinputd = mLibrary.getFunction("lib3mf_matrixfromrowsnode_getinputd"); + lib3mf_matrixfromrowsnode_getoutputresult = mLibrary.getFunction("lib3mf_matrixfromrowsnode_getoutputresult"); + lib3mf_matrixfromcolumnsnode_getinputa = mLibrary.getFunction("lib3mf_matrixfromcolumnsnode_getinputa"); + lib3mf_matrixfromcolumnsnode_getinputb = mLibrary.getFunction("lib3mf_matrixfromcolumnsnode_getinputb"); + lib3mf_matrixfromcolumnsnode_getinputc = mLibrary.getFunction("lib3mf_matrixfromcolumnsnode_getinputc"); + lib3mf_matrixfromcolumnsnode_getinputd = mLibrary.getFunction("lib3mf_matrixfromcolumnsnode_getinputd"); + lib3mf_matrixfromcolumnsnode_getoutputresult = mLibrary.getFunction("lib3mf_matrixfromcolumnsnode_getoutputresult"); + lib3mf_constantnode_setconstant = mLibrary.getFunction("lib3mf_constantnode_setconstant"); + lib3mf_constantnode_getconstant = mLibrary.getFunction("lib3mf_constantnode_getconstant"); + lib3mf_constantnode_getoutputvalue = mLibrary.getFunction("lib3mf_constantnode_getoutputvalue"); + lib3mf_constvecnode_setvector = mLibrary.getFunction("lib3mf_constvecnode_setvector"); + lib3mf_constvecnode_getvector = mLibrary.getFunction("lib3mf_constvecnode_getvector"); + lib3mf_constvecnode_getoutputvector = mLibrary.getFunction("lib3mf_constvecnode_getoutputvector"); + lib3mf_constmatnode_setmatrix = mLibrary.getFunction("lib3mf_constmatnode_setmatrix"); + lib3mf_constmatnode_getmatrix = mLibrary.getFunction("lib3mf_constmatnode_getmatrix"); + lib3mf_constmatnode_getoutputmatrix = mLibrary.getFunction("lib3mf_constmatnode_getoutputmatrix"); + lib3mf_meshnode_getinputmesh = mLibrary.getFunction("lib3mf_meshnode_getinputmesh"); + lib3mf_meshnode_getinputpos = mLibrary.getFunction("lib3mf_meshnode_getinputpos"); + lib3mf_meshnode_getoutputdistance = mLibrary.getFunction("lib3mf_meshnode_getoutputdistance"); + lib3mf_unsignedmeshnode_getinputmesh = mLibrary.getFunction("lib3mf_unsignedmeshnode_getinputmesh"); + lib3mf_unsignedmeshnode_getinputpos = mLibrary.getFunction("lib3mf_unsignedmeshnode_getinputpos"); + lib3mf_unsignedmeshnode_getoutputdistance = mLibrary.getFunction("lib3mf_unsignedmeshnode_getoutputdistance"); + lib3mf_beamlatticenode_getinputbeamlattice = mLibrary.getFunction("lib3mf_beamlatticenode_getinputbeamlattice"); + lib3mf_beamlatticenode_getinputpos = mLibrary.getFunction("lib3mf_beamlatticenode_getinputpos"); + lib3mf_beamlatticenode_getoutputdistance = mLibrary.getFunction("lib3mf_beamlatticenode_getoutputdistance"); + lib3mf_beamlatticenode_setaccuraterange = mLibrary.getFunction("lib3mf_beamlatticenode_setaccuraterange"); + lib3mf_beamlatticenode_getaccuraterange = mLibrary.getFunction("lib3mf_beamlatticenode_getaccuraterange"); + lib3mf_functiongradientnode_getinputfunctionid = mLibrary.getFunction("lib3mf_functiongradientnode_getinputfunctionid"); + lib3mf_functiongradientnode_getinputpos = mLibrary.getFunction("lib3mf_functiongradientnode_getinputpos"); + lib3mf_functiongradientnode_getinputstep = mLibrary.getFunction("lib3mf_functiongradientnode_getinputstep"); + lib3mf_functiongradientnode_setscalaroutputname = mLibrary.getFunction("lib3mf_functiongradientnode_setscalaroutputname"); + lib3mf_functiongradientnode_getscalaroutputname = mLibrary.getFunction("lib3mf_functiongradientnode_getscalaroutputname"); + lib3mf_functiongradientnode_setvectorinputname = mLibrary.getFunction("lib3mf_functiongradientnode_setvectorinputname"); + lib3mf_functiongradientnode_getvectorinputname = mLibrary.getFunction("lib3mf_functiongradientnode_getvectorinputname"); + lib3mf_functiongradientnode_getoutputvector = mLibrary.getFunction("lib3mf_functiongradientnode_getoutputvector"); + lib3mf_functiongradientnode_getoutputgradient = mLibrary.getFunction("lib3mf_functiongradientnode_getoutputgradient"); + lib3mf_functiongradientnode_getoutputmagnitude = mLibrary.getFunction("lib3mf_functiongradientnode_getoutputmagnitude"); + lib3mf_normalizedistancenode_getinputfunctionid = mLibrary.getFunction("lib3mf_normalizedistancenode_getinputfunctionid"); + lib3mf_normalizedistancenode_getinputpos = mLibrary.getFunction("lib3mf_normalizedistancenode_getinputpos"); + lib3mf_normalizedistancenode_getinputstep = mLibrary.getFunction("lib3mf_normalizedistancenode_getinputstep"); + lib3mf_normalizedistancenode_setscalaroutputname = mLibrary.getFunction("lib3mf_normalizedistancenode_setscalaroutputname"); + lib3mf_normalizedistancenode_getscalaroutputname = mLibrary.getFunction("lib3mf_normalizedistancenode_getscalaroutputname"); + lib3mf_normalizedistancenode_setvectorinputname = mLibrary.getFunction("lib3mf_normalizedistancenode_setvectorinputname"); + lib3mf_normalizedistancenode_getvectorinputname = mLibrary.getFunction("lib3mf_normalizedistancenode_getvectorinputname"); + lib3mf_normalizedistancenode_getoutputresult = mLibrary.getFunction("lib3mf_normalizedistancenode_getoutputresult"); + lib3mf_functioncallnode_getinputfunctionid = mLibrary.getFunction("lib3mf_functioncallnode_getinputfunctionid"); + lib3mf_nodeiterator_getcurrent = mLibrary.getFunction("lib3mf_nodeiterator_getcurrent"); + lib3mf_function_getdisplayname = mLibrary.getFunction("lib3mf_function_getdisplayname"); + lib3mf_function_setdisplayname = mLibrary.getFunction("lib3mf_function_setdisplayname"); + lib3mf_function_addinput = mLibrary.getFunction("lib3mf_function_addinput"); + lib3mf_function_getinputs = mLibrary.getFunction("lib3mf_function_getinputs"); + lib3mf_function_removeinput = mLibrary.getFunction("lib3mf_function_removeinput"); + lib3mf_function_addoutput = mLibrary.getFunction("lib3mf_function_addoutput"); + lib3mf_function_getoutputs = mLibrary.getFunction("lib3mf_function_getoutputs"); + lib3mf_function_removeoutput = mLibrary.getFunction("lib3mf_function_removeoutput"); + lib3mf_function_findinput = mLibrary.getFunction("lib3mf_function_findinput"); + lib3mf_function_findoutput = mLibrary.getFunction("lib3mf_function_findoutput"); + lib3mf_implicitfunction_getidentifier = mLibrary.getFunction("lib3mf_implicitfunction_getidentifier"); + lib3mf_implicitfunction_setidentifier = mLibrary.getFunction("lib3mf_implicitfunction_setidentifier"); + lib3mf_implicitfunction_addnode = mLibrary.getFunction("lib3mf_implicitfunction_addnode"); + lib3mf_implicitfunction_addsinnode = mLibrary.getFunction("lib3mf_implicitfunction_addsinnode"); + lib3mf_implicitfunction_addcosnode = mLibrary.getFunction("lib3mf_implicitfunction_addcosnode"); + lib3mf_implicitfunction_addtannode = mLibrary.getFunction("lib3mf_implicitfunction_addtannode"); + lib3mf_implicitfunction_addarcsinnode = mLibrary.getFunction("lib3mf_implicitfunction_addarcsinnode"); + lib3mf_implicitfunction_addarccosnode = mLibrary.getFunction("lib3mf_implicitfunction_addarccosnode"); + lib3mf_implicitfunction_addarctan2node = mLibrary.getFunction("lib3mf_implicitfunction_addarctan2node"); + lib3mf_implicitfunction_addsinhnode = mLibrary.getFunction("lib3mf_implicitfunction_addsinhnode"); + lib3mf_implicitfunction_addcoshnode = mLibrary.getFunction("lib3mf_implicitfunction_addcoshnode"); + lib3mf_implicitfunction_addtanhnode = mLibrary.getFunction("lib3mf_implicitfunction_addtanhnode"); + lib3mf_implicitfunction_addroundnode = mLibrary.getFunction("lib3mf_implicitfunction_addroundnode"); + lib3mf_implicitfunction_addceilnode = mLibrary.getFunction("lib3mf_implicitfunction_addceilnode"); + lib3mf_implicitfunction_addfloornode = mLibrary.getFunction("lib3mf_implicitfunction_addfloornode"); + lib3mf_implicitfunction_addsignnode = mLibrary.getFunction("lib3mf_implicitfunction_addsignnode"); + lib3mf_implicitfunction_addfractnode = mLibrary.getFunction("lib3mf_implicitfunction_addfractnode"); + lib3mf_implicitfunction_addabsnode = mLibrary.getFunction("lib3mf_implicitfunction_addabsnode"); + lib3mf_implicitfunction_addexpnode = mLibrary.getFunction("lib3mf_implicitfunction_addexpnode"); + lib3mf_implicitfunction_addlognode = mLibrary.getFunction("lib3mf_implicitfunction_addlognode"); + lib3mf_implicitfunction_addlog2node = mLibrary.getFunction("lib3mf_implicitfunction_addlog2node"); + lib3mf_implicitfunction_addlog10node = mLibrary.getFunction("lib3mf_implicitfunction_addlog10node"); + lib3mf_implicitfunction_addlengthnode = mLibrary.getFunction("lib3mf_implicitfunction_addlengthnode"); + lib3mf_implicitfunction_addtransposenode = mLibrary.getFunction("lib3mf_implicitfunction_addtransposenode"); + lib3mf_implicitfunction_addinversenode = mLibrary.getFunction("lib3mf_implicitfunction_addinversenode"); + lib3mf_implicitfunction_addsqrtnode = mLibrary.getFunction("lib3mf_implicitfunction_addsqrtnode"); + lib3mf_implicitfunction_addresourceidnode = mLibrary.getFunction("lib3mf_implicitfunction_addresourceidnode"); + lib3mf_implicitfunction_addadditionnode = mLibrary.getFunction("lib3mf_implicitfunction_addadditionnode"); + lib3mf_implicitfunction_addsubtractionnode = mLibrary.getFunction("lib3mf_implicitfunction_addsubtractionnode"); + lib3mf_implicitfunction_addmultiplicationnode = mLibrary.getFunction("lib3mf_implicitfunction_addmultiplicationnode"); + lib3mf_implicitfunction_adddivisionnode = mLibrary.getFunction("lib3mf_implicitfunction_adddivisionnode"); + lib3mf_implicitfunction_adddotnode = mLibrary.getFunction("lib3mf_implicitfunction_adddotnode"); + lib3mf_implicitfunction_addcrossnode = mLibrary.getFunction("lib3mf_implicitfunction_addcrossnode"); + lib3mf_implicitfunction_addmatvecmultiplicationnode = mLibrary.getFunction("lib3mf_implicitfunction_addmatvecmultiplicationnode"); + lib3mf_implicitfunction_addminnode = mLibrary.getFunction("lib3mf_implicitfunction_addminnode"); + lib3mf_implicitfunction_addmaxnode = mLibrary.getFunction("lib3mf_implicitfunction_addmaxnode"); + lib3mf_implicitfunction_addfmodnode = mLibrary.getFunction("lib3mf_implicitfunction_addfmodnode"); + lib3mf_implicitfunction_addpownode = mLibrary.getFunction("lib3mf_implicitfunction_addpownode"); + lib3mf_implicitfunction_addselectnode = mLibrary.getFunction("lib3mf_implicitfunction_addselectnode"); + lib3mf_implicitfunction_addclampnode = mLibrary.getFunction("lib3mf_implicitfunction_addclampnode"); + lib3mf_implicitfunction_addcomposevectornode = mLibrary.getFunction("lib3mf_implicitfunction_addcomposevectornode"); + lib3mf_implicitfunction_addvectorfromscalarnode = mLibrary.getFunction("lib3mf_implicitfunction_addvectorfromscalarnode"); + lib3mf_implicitfunction_adddecomposevectornode = mLibrary.getFunction("lib3mf_implicitfunction_adddecomposevectornode"); + lib3mf_implicitfunction_addcomposematrixnode = mLibrary.getFunction("lib3mf_implicitfunction_addcomposematrixnode"); + lib3mf_implicitfunction_addmatrixfromrowsnode = mLibrary.getFunction("lib3mf_implicitfunction_addmatrixfromrowsnode"); + lib3mf_implicitfunction_addmatrixfromcolumnsnode = mLibrary.getFunction("lib3mf_implicitfunction_addmatrixfromcolumnsnode"); + lib3mf_implicitfunction_addconstantnode = mLibrary.getFunction("lib3mf_implicitfunction_addconstantnode"); + lib3mf_implicitfunction_addconstvecnode = mLibrary.getFunction("lib3mf_implicitfunction_addconstvecnode"); + lib3mf_implicitfunction_addconstmatnode = mLibrary.getFunction("lib3mf_implicitfunction_addconstmatnode"); + lib3mf_implicitfunction_addmeshnode = mLibrary.getFunction("lib3mf_implicitfunction_addmeshnode"); + lib3mf_implicitfunction_addunsignedmeshnode = mLibrary.getFunction("lib3mf_implicitfunction_addunsignedmeshnode"); + lib3mf_implicitfunction_addbeamlatticenode = mLibrary.getFunction("lib3mf_implicitfunction_addbeamlatticenode"); + lib3mf_implicitfunction_addfunctiongradientnode = mLibrary.getFunction("lib3mf_implicitfunction_addfunctiongradientnode"); + lib3mf_implicitfunction_addnormalizedistancenode = mLibrary.getFunction("lib3mf_implicitfunction_addnormalizedistancenode"); + lib3mf_implicitfunction_addfunctioncallnode = mLibrary.getFunction("lib3mf_implicitfunction_addfunctioncallnode"); + lib3mf_implicitfunction_getnodes = mLibrary.getFunction("lib3mf_implicitfunction_getnodes"); + lib3mf_implicitfunction_removenode = mLibrary.getFunction("lib3mf_implicitfunction_removenode"); + lib3mf_implicitfunction_addlink = mLibrary.getFunction("lib3mf_implicitfunction_addlink"); + lib3mf_implicitfunction_addlinkbynames = mLibrary.getFunction("lib3mf_implicitfunction_addlinkbynames"); + lib3mf_implicitfunction_clear = mLibrary.getFunction("lib3mf_implicitfunction_clear"); + lib3mf_implicitfunction_sortnodestopologically = mLibrary.getFunction("lib3mf_implicitfunction_sortnodestopologically"); + lib3mf_functionfromimage3d_getimage3d = mLibrary.getFunction("lib3mf_functionfromimage3d_getimage3d"); + lib3mf_functionfromimage3d_setimage3d = mLibrary.getFunction("lib3mf_functionfromimage3d_setimage3d"); + lib3mf_functionfromimage3d_setfilter = mLibrary.getFunction("lib3mf_functionfromimage3d_setfilter"); + lib3mf_functionfromimage3d_getfilter = mLibrary.getFunction("lib3mf_functionfromimage3d_getfilter"); + lib3mf_functionfromimage3d_settilestyles = mLibrary.getFunction("lib3mf_functionfromimage3d_settilestyles"); + lib3mf_functionfromimage3d_gettilestyles = mLibrary.getFunction("lib3mf_functionfromimage3d_gettilestyles"); + lib3mf_functionfromimage3d_getoffset = mLibrary.getFunction("lib3mf_functionfromimage3d_getoffset"); + lib3mf_functionfromimage3d_setoffset = mLibrary.getFunction("lib3mf_functionfromimage3d_setoffset"); + lib3mf_functionfromimage3d_getscale = mLibrary.getFunction("lib3mf_functionfromimage3d_getscale"); + lib3mf_functionfromimage3d_setscale = mLibrary.getFunction("lib3mf_functionfromimage3d_setscale"); + lib3mf_builditem_getobjectresource = mLibrary.getFunction("lib3mf_builditem_getobjectresource"); + lib3mf_builditem_getuuid = mLibrary.getFunction("lib3mf_builditem_getuuid"); + lib3mf_builditem_setuuid = mLibrary.getFunction("lib3mf_builditem_setuuid"); + lib3mf_builditem_getobjectresourceid = mLibrary.getFunction("lib3mf_builditem_getobjectresourceid"); + lib3mf_builditem_hasobjecttransform = mLibrary.getFunction("lib3mf_builditem_hasobjecttransform"); + lib3mf_builditem_getobjecttransform = mLibrary.getFunction("lib3mf_builditem_getobjecttransform"); + lib3mf_builditem_setobjecttransform = mLibrary.getFunction("lib3mf_builditem_setobjecttransform"); + lib3mf_builditem_getpartnumber = mLibrary.getFunction("lib3mf_builditem_getpartnumber"); + lib3mf_builditem_setpartnumber = mLibrary.getFunction("lib3mf_builditem_setpartnumber"); + lib3mf_builditem_getmetadatagroup = mLibrary.getFunction("lib3mf_builditem_getmetadatagroup"); + lib3mf_builditem_getoutbox = mLibrary.getFunction("lib3mf_builditem_getoutbox"); + lib3mf_builditemiterator_movenext = mLibrary.getFunction("lib3mf_builditemiterator_movenext"); + lib3mf_builditemiterator_moveprevious = mLibrary.getFunction("lib3mf_builditemiterator_moveprevious"); + lib3mf_builditemiterator_getcurrent = mLibrary.getFunction("lib3mf_builditemiterator_getcurrent"); + lib3mf_builditemiterator_clone = mLibrary.getFunction("lib3mf_builditemiterator_clone"); + lib3mf_builditemiterator_count = mLibrary.getFunction("lib3mf_builditemiterator_count"); + lib3mf_slice_setvertices = mLibrary.getFunction("lib3mf_slice_setvertices"); + lib3mf_slice_getvertices = mLibrary.getFunction("lib3mf_slice_getvertices"); + lib3mf_slice_getvertexcount = mLibrary.getFunction("lib3mf_slice_getvertexcount"); + lib3mf_slice_addpolygon = mLibrary.getFunction("lib3mf_slice_addpolygon"); + lib3mf_slice_getpolygoncount = mLibrary.getFunction("lib3mf_slice_getpolygoncount"); + lib3mf_slice_setpolygonindices = mLibrary.getFunction("lib3mf_slice_setpolygonindices"); + lib3mf_slice_getpolygonindices = mLibrary.getFunction("lib3mf_slice_getpolygonindices"); + lib3mf_slice_getpolygonindexcount = mLibrary.getFunction("lib3mf_slice_getpolygonindexcount"); + lib3mf_slice_getztop = mLibrary.getFunction("lib3mf_slice_getztop"); + lib3mf_slicestack_getbottomz = mLibrary.getFunction("lib3mf_slicestack_getbottomz"); + lib3mf_slicestack_getslicecount = mLibrary.getFunction("lib3mf_slicestack_getslicecount"); + lib3mf_slicestack_getslice = mLibrary.getFunction("lib3mf_slicestack_getslice"); + lib3mf_slicestack_addslice = mLibrary.getFunction("lib3mf_slicestack_addslice"); + lib3mf_slicestack_getslicerefcount = mLibrary.getFunction("lib3mf_slicestack_getslicerefcount"); + lib3mf_slicestack_addslicestackreference = mLibrary.getFunction("lib3mf_slicestack_addslicestackreference"); + lib3mf_slicestack_getslicestackreference = mLibrary.getFunction("lib3mf_slicestack_getslicestackreference"); + lib3mf_slicestack_collapseslicereferences = mLibrary.getFunction("lib3mf_slicestack_collapseslicereferences"); + lib3mf_slicestack_setownpath = mLibrary.getFunction("lib3mf_slicestack_setownpath"); + lib3mf_slicestack_getownpath = mLibrary.getFunction("lib3mf_slicestack_getownpath"); + lib3mf_consumer_getconsumerid = mLibrary.getFunction("lib3mf_consumer_getconsumerid"); + lib3mf_consumer_getkeyid = mLibrary.getFunction("lib3mf_consumer_getkeyid"); + lib3mf_consumer_getkeyvalue = mLibrary.getFunction("lib3mf_consumer_getkeyvalue"); + lib3mf_accessright_getconsumer = mLibrary.getFunction("lib3mf_accessright_getconsumer"); + lib3mf_accessright_getwrappingalgorithm = mLibrary.getFunction("lib3mf_accessright_getwrappingalgorithm"); + lib3mf_accessright_getmgfalgorithm = mLibrary.getFunction("lib3mf_accessright_getmgfalgorithm"); + lib3mf_accessright_getdigestmethod = mLibrary.getFunction("lib3mf_accessright_getdigestmethod"); + lib3mf_contentencryptionparams_getencryptionalgorithm = mLibrary.getFunction("lib3mf_contentencryptionparams_getencryptionalgorithm"); + lib3mf_contentencryptionparams_getkey = mLibrary.getFunction("lib3mf_contentencryptionparams_getkey"); + lib3mf_contentencryptionparams_getinitializationvector = mLibrary.getFunction("lib3mf_contentencryptionparams_getinitializationvector"); + lib3mf_contentencryptionparams_getauthenticationtag = mLibrary.getFunction("lib3mf_contentencryptionparams_getauthenticationtag"); + lib3mf_contentencryptionparams_setauthenticationtag = mLibrary.getFunction("lib3mf_contentencryptionparams_setauthenticationtag"); + lib3mf_contentencryptionparams_getadditionalauthenticationdata = mLibrary.getFunction("lib3mf_contentencryptionparams_getadditionalauthenticationdata"); + lib3mf_contentencryptionparams_getdescriptor = mLibrary.getFunction("lib3mf_contentencryptionparams_getdescriptor"); + lib3mf_contentencryptionparams_getkeyuuid = mLibrary.getFunction("lib3mf_contentencryptionparams_getkeyuuid"); + lib3mf_resourcedata_getpath = mLibrary.getFunction("lib3mf_resourcedata_getpath"); + lib3mf_resourcedata_getencryptionalgorithm = mLibrary.getFunction("lib3mf_resourcedata_getencryptionalgorithm"); + lib3mf_resourcedata_getcompression = mLibrary.getFunction("lib3mf_resourcedata_getcompression"); + lib3mf_resourcedata_getadditionalauthenticationdata = mLibrary.getFunction("lib3mf_resourcedata_getadditionalauthenticationdata"); + lib3mf_resourcedatagroup_getkeyuuid = mLibrary.getFunction("lib3mf_resourcedatagroup_getkeyuuid"); + lib3mf_resourcedatagroup_addaccessright = mLibrary.getFunction("lib3mf_resourcedatagroup_addaccessright"); + lib3mf_resourcedatagroup_findaccessrightbyconsumer = mLibrary.getFunction("lib3mf_resourcedatagroup_findaccessrightbyconsumer"); + lib3mf_resourcedatagroup_removeaccessright = mLibrary.getFunction("lib3mf_resourcedatagroup_removeaccessright"); + lib3mf_keystore_addconsumer = mLibrary.getFunction("lib3mf_keystore_addconsumer"); + lib3mf_keystore_getconsumercount = mLibrary.getFunction("lib3mf_keystore_getconsumercount"); + lib3mf_keystore_getconsumer = mLibrary.getFunction("lib3mf_keystore_getconsumer"); + lib3mf_keystore_removeconsumer = mLibrary.getFunction("lib3mf_keystore_removeconsumer"); + lib3mf_keystore_findconsumer = mLibrary.getFunction("lib3mf_keystore_findconsumer"); + lib3mf_keystore_getresourcedatagroupcount = mLibrary.getFunction("lib3mf_keystore_getresourcedatagroupcount"); + lib3mf_keystore_addresourcedatagroup = mLibrary.getFunction("lib3mf_keystore_addresourcedatagroup"); + lib3mf_keystore_getresourcedatagroup = mLibrary.getFunction("lib3mf_keystore_getresourcedatagroup"); + lib3mf_keystore_removeresourcedatagroup = mLibrary.getFunction("lib3mf_keystore_removeresourcedatagroup"); + lib3mf_keystore_findresourcedatagroup = mLibrary.getFunction("lib3mf_keystore_findresourcedatagroup"); + lib3mf_keystore_addresourcedata = mLibrary.getFunction("lib3mf_keystore_addresourcedata"); + lib3mf_keystore_removeresourcedata = mLibrary.getFunction("lib3mf_keystore_removeresourcedata"); + lib3mf_keystore_findresourcedata = mLibrary.getFunction("lib3mf_keystore_findresourcedata"); + lib3mf_keystore_getresourcedatacount = mLibrary.getFunction("lib3mf_keystore_getresourcedatacount"); + lib3mf_keystore_getresourcedata = mLibrary.getFunction("lib3mf_keystore_getresourcedata"); + lib3mf_keystore_getuuid = mLibrary.getFunction("lib3mf_keystore_getuuid"); + lib3mf_keystore_setuuid = mLibrary.getFunction("lib3mf_keystore_setuuid"); + lib3mf_model_rootmodelpart = mLibrary.getFunction("lib3mf_model_rootmodelpart"); + lib3mf_model_findorcreatepackagepart = mLibrary.getFunction("lib3mf_model_findorcreatepackagepart"); + lib3mf_model_setunit = mLibrary.getFunction("lib3mf_model_setunit"); + lib3mf_model_getunit = mLibrary.getFunction("lib3mf_model_getunit"); + lib3mf_model_getlanguage = mLibrary.getFunction("lib3mf_model_getlanguage"); + lib3mf_model_setlanguage = mLibrary.getFunction("lib3mf_model_setlanguage"); + lib3mf_model_querywriter = mLibrary.getFunction("lib3mf_model_querywriter"); + lib3mf_model_queryreader = mLibrary.getFunction("lib3mf_model_queryreader"); + lib3mf_model_getresourcebyid = mLibrary.getFunction("lib3mf_model_getresourcebyid"); + lib3mf_model_gettexture2dbyid = mLibrary.getFunction("lib3mf_model_gettexture2dbyid"); + lib3mf_model_getpropertytypebyid = mLibrary.getFunction("lib3mf_model_getpropertytypebyid"); + lib3mf_model_getbasematerialgroupbyid = mLibrary.getFunction("lib3mf_model_getbasematerialgroupbyid"); + lib3mf_model_gettexture2dgroupbyid = mLibrary.getFunction("lib3mf_model_gettexture2dgroupbyid"); + lib3mf_model_getcompositematerialsbyid = mLibrary.getFunction("lib3mf_model_getcompositematerialsbyid"); + lib3mf_model_getmultipropertygroupbyid = mLibrary.getFunction("lib3mf_model_getmultipropertygroupbyid"); + lib3mf_model_getmeshobjectbyid = mLibrary.getFunction("lib3mf_model_getmeshobjectbyid"); + lib3mf_model_getcomponentsobjectbyid = mLibrary.getFunction("lib3mf_model_getcomponentsobjectbyid"); + lib3mf_model_getcolorgroupbyid = mLibrary.getFunction("lib3mf_model_getcolorgroupbyid"); + lib3mf_model_getslicestackbyid = mLibrary.getFunction("lib3mf_model_getslicestackbyid"); + lib3mf_model_getlevelsetbyid = mLibrary.getFunction("lib3mf_model_getlevelsetbyid"); + lib3mf_model_getbuilduuid = mLibrary.getFunction("lib3mf_model_getbuilduuid"); + lib3mf_model_setbuilduuid = mLibrary.getFunction("lib3mf_model_setbuilduuid"); + lib3mf_model_getbuilditems = mLibrary.getFunction("lib3mf_model_getbuilditems"); + lib3mf_model_getoutbox = mLibrary.getFunction("lib3mf_model_getoutbox"); + lib3mf_model_getresources = mLibrary.getFunction("lib3mf_model_getresources"); + lib3mf_model_getobjects = mLibrary.getFunction("lib3mf_model_getobjects"); + lib3mf_model_getmeshobjects = mLibrary.getFunction("lib3mf_model_getmeshobjects"); + lib3mf_model_getcomponentsobjects = mLibrary.getFunction("lib3mf_model_getcomponentsobjects"); + lib3mf_model_gettexture2ds = mLibrary.getFunction("lib3mf_model_gettexture2ds"); + lib3mf_model_getbasematerialgroups = mLibrary.getFunction("lib3mf_model_getbasematerialgroups"); + lib3mf_model_getcolorgroups = mLibrary.getFunction("lib3mf_model_getcolorgroups"); + lib3mf_model_gettexture2dgroups = mLibrary.getFunction("lib3mf_model_gettexture2dgroups"); + lib3mf_model_getcompositematerials = mLibrary.getFunction("lib3mf_model_getcompositematerials"); + lib3mf_model_getmultipropertygroups = mLibrary.getFunction("lib3mf_model_getmultipropertygroups"); + lib3mf_model_getslicestacks = mLibrary.getFunction("lib3mf_model_getslicestacks"); + lib3mf_model_getimage3ds = mLibrary.getFunction("lib3mf_model_getimage3ds"); + lib3mf_model_mergetomodel = mLibrary.getFunction("lib3mf_model_mergetomodel"); + lib3mf_model_mergefrommodel = mLibrary.getFunction("lib3mf_model_mergefrommodel"); + lib3mf_model_addmeshobject = mLibrary.getFunction("lib3mf_model_addmeshobject"); + lib3mf_model_addcomponentsobject = mLibrary.getFunction("lib3mf_model_addcomponentsobject"); + lib3mf_model_addslicestack = mLibrary.getFunction("lib3mf_model_addslicestack"); + lib3mf_model_addtexture2dfromattachment = mLibrary.getFunction("lib3mf_model_addtexture2dfromattachment"); + lib3mf_model_addbasematerialgroup = mLibrary.getFunction("lib3mf_model_addbasematerialgroup"); + lib3mf_model_addcolorgroup = mLibrary.getFunction("lib3mf_model_addcolorgroup"); + lib3mf_model_addtexture2dgroup = mLibrary.getFunction("lib3mf_model_addtexture2dgroup"); + lib3mf_model_addcompositematerials = mLibrary.getFunction("lib3mf_model_addcompositematerials"); + lib3mf_model_addmultipropertygroup = mLibrary.getFunction("lib3mf_model_addmultipropertygroup"); + lib3mf_model_addimagestack = mLibrary.getFunction("lib3mf_model_addimagestack"); + lib3mf_model_getimagestackbyid = mLibrary.getFunction("lib3mf_model_getimagestackbyid"); + lib3mf_model_addbuilditem = mLibrary.getFunction("lib3mf_model_addbuilditem"); + lib3mf_model_removebuilditem = mLibrary.getFunction("lib3mf_model_removebuilditem"); + lib3mf_model_getmetadatagroup = mLibrary.getFunction("lib3mf_model_getmetadatagroup"); + lib3mf_model_addattachment = mLibrary.getFunction("lib3mf_model_addattachment"); + lib3mf_model_removeattachment = mLibrary.getFunction("lib3mf_model_removeattachment"); + lib3mf_model_getattachment = mLibrary.getFunction("lib3mf_model_getattachment"); + lib3mf_model_findattachment = mLibrary.getFunction("lib3mf_model_findattachment"); + lib3mf_model_getattachmentcount = mLibrary.getFunction("lib3mf_model_getattachmentcount"); + lib3mf_model_haspackagethumbnailattachment = mLibrary.getFunction("lib3mf_model_haspackagethumbnailattachment"); + lib3mf_model_createpackagethumbnailattachment = mLibrary.getFunction("lib3mf_model_createpackagethumbnailattachment"); + lib3mf_model_getpackagethumbnailattachment = mLibrary.getFunction("lib3mf_model_getpackagethumbnailattachment"); + lib3mf_model_removepackagethumbnailattachment = mLibrary.getFunction("lib3mf_model_removepackagethumbnailattachment"); + lib3mf_model_addcustomcontenttype = mLibrary.getFunction("lib3mf_model_addcustomcontenttype"); + lib3mf_model_removecustomcontenttype = mLibrary.getFunction("lib3mf_model_removecustomcontenttype"); + lib3mf_model_setrandomnumbercallback = mLibrary.getFunction("lib3mf_model_setrandomnumbercallback"); + lib3mf_model_getkeystore = mLibrary.getFunction("lib3mf_model_getkeystore"); + lib3mf_model_getfunctions = mLibrary.getFunction("lib3mf_model_getfunctions"); + lib3mf_model_addimplicitfunction = mLibrary.getFunction("lib3mf_model_addimplicitfunction"); + lib3mf_model_addfunctionfromimage3d = mLibrary.getFunction("lib3mf_model_addfunctionfromimage3d"); + lib3mf_model_addvolumedata = mLibrary.getFunction("lib3mf_model_addvolumedata"); + lib3mf_model_addlevelset = mLibrary.getFunction("lib3mf_model_addlevelset"); + lib3mf_model_getlevelsets = mLibrary.getFunction("lib3mf_model_getlevelsets"); + lib3mf_model_removeresource = mLibrary.getFunction("lib3mf_model_removeresource"); + } + + public Lib3MFWrapper(Pointer lookupPointer) throws Lib3MFException { + com.sun.jna.Function lookupMethod = com.sun.jna.Function.getFunction(lookupPointer); + lib3mf_getlibraryversion = loadFunctionByLookup(lookupMethod, "lib3mf_getlibraryversion"); + lib3mf_getprereleaseinformation = loadFunctionByLookup(lookupMethod, "lib3mf_getprereleaseinformation"); + lib3mf_getbuildinformation = loadFunctionByLookup(lookupMethod, "lib3mf_getbuildinformation"); + lib3mf_getspecificationversion = loadFunctionByLookup(lookupMethod, "lib3mf_getspecificationversion"); + lib3mf_createmodel = loadFunctionByLookup(lookupMethod, "lib3mf_createmodel"); + lib3mf_release = loadFunctionByLookup(lookupMethod, "lib3mf_release"); + lib3mf_acquire = loadFunctionByLookup(lookupMethod, "lib3mf_acquire"); + lib3mf_setjournal = loadFunctionByLookup(lookupMethod, "lib3mf_setjournal"); + lib3mf_getlasterror = loadFunctionByLookup(lookupMethod, "lib3mf_getlasterror"); + lib3mf_getsymbollookupmethod = loadFunctionByLookup(lookupMethod, "lib3mf_getsymbollookupmethod"); + lib3mf_retrieveprogressmessage = loadFunctionByLookup(lookupMethod, "lib3mf_retrieveprogressmessage"); + lib3mf_rgbatocolor = loadFunctionByLookup(lookupMethod, "lib3mf_rgbatocolor"); + lib3mf_floatrgbatocolor = loadFunctionByLookup(lookupMethod, "lib3mf_floatrgbatocolor"); + lib3mf_colortorgba = loadFunctionByLookup(lookupMethod, "lib3mf_colortorgba"); + lib3mf_colortofloatrgba = loadFunctionByLookup(lookupMethod, "lib3mf_colortofloatrgba"); + lib3mf_getidentitytransform = loadFunctionByLookup(lookupMethod, "lib3mf_getidentitytransform"); + lib3mf_getuniformscaletransform = loadFunctionByLookup(lookupMethod, "lib3mf_getuniformscaletransform"); + lib3mf_getscaletransform = loadFunctionByLookup(lookupMethod, "lib3mf_getscaletransform"); + lib3mf_gettranslationtransform = loadFunctionByLookup(lookupMethod, "lib3mf_gettranslationtransform"); + lib3mf_base_classtypeid = loadFunctionByLookup(lookupMethod, "lib3mf_base_classtypeid"); + lib3mf_writer_writetofile = loadFunctionByLookup(lookupMethod, "lib3mf_writer_writetofile"); + lib3mf_writer_getstreamsize = loadFunctionByLookup(lookupMethod, "lib3mf_writer_getstreamsize"); + lib3mf_writer_writetobuffer = loadFunctionByLookup(lookupMethod, "lib3mf_writer_writetobuffer"); + lib3mf_writer_writetocallback = loadFunctionByLookup(lookupMethod, "lib3mf_writer_writetocallback"); + lib3mf_writer_setprogresscallback = loadFunctionByLookup(lookupMethod, "lib3mf_writer_setprogresscallback"); + lib3mf_writer_getdecimalprecision = loadFunctionByLookup(lookupMethod, "lib3mf_writer_getdecimalprecision"); + lib3mf_writer_setdecimalprecision = loadFunctionByLookup(lookupMethod, "lib3mf_writer_setdecimalprecision"); + lib3mf_writer_setstrictmodeactive = loadFunctionByLookup(lookupMethod, "lib3mf_writer_setstrictmodeactive"); + lib3mf_writer_getstrictmodeactive = loadFunctionByLookup(lookupMethod, "lib3mf_writer_getstrictmodeactive"); + lib3mf_writer_getwarning = loadFunctionByLookup(lookupMethod, "lib3mf_writer_getwarning"); + lib3mf_writer_getwarningcount = loadFunctionByLookup(lookupMethod, "lib3mf_writer_getwarningcount"); + lib3mf_writer_addkeywrappingcallback = loadFunctionByLookup(lookupMethod, "lib3mf_writer_addkeywrappingcallback"); + lib3mf_writer_setcontentencryptioncallback = loadFunctionByLookup(lookupMethod, "lib3mf_writer_setcontentencryptioncallback"); + lib3mf_reader_readfromfile = loadFunctionByLookup(lookupMethod, "lib3mf_reader_readfromfile"); + lib3mf_reader_readfrombuffer = loadFunctionByLookup(lookupMethod, "lib3mf_reader_readfrombuffer"); + lib3mf_reader_readfromcallback = loadFunctionByLookup(lookupMethod, "lib3mf_reader_readfromcallback"); + lib3mf_reader_setprogresscallback = loadFunctionByLookup(lookupMethod, "lib3mf_reader_setprogresscallback"); + lib3mf_reader_addrelationtoread = loadFunctionByLookup(lookupMethod, "lib3mf_reader_addrelationtoread"); + lib3mf_reader_removerelationtoread = loadFunctionByLookup(lookupMethod, "lib3mf_reader_removerelationtoread"); + lib3mf_reader_setstrictmodeactive = loadFunctionByLookup(lookupMethod, "lib3mf_reader_setstrictmodeactive"); + lib3mf_reader_getstrictmodeactive = loadFunctionByLookup(lookupMethod, "lib3mf_reader_getstrictmodeactive"); + lib3mf_reader_getwarning = loadFunctionByLookup(lookupMethod, "lib3mf_reader_getwarning"); + lib3mf_reader_getwarningcount = loadFunctionByLookup(lookupMethod, "lib3mf_reader_getwarningcount"); + lib3mf_reader_addkeywrappingcallback = loadFunctionByLookup(lookupMethod, "lib3mf_reader_addkeywrappingcallback"); + lib3mf_reader_setcontentencryptioncallback = loadFunctionByLookup(lookupMethod, "lib3mf_reader_setcontentencryptioncallback"); + lib3mf_packagepart_getpath = loadFunctionByLookup(lookupMethod, "lib3mf_packagepart_getpath"); + lib3mf_packagepart_setpath = loadFunctionByLookup(lookupMethod, "lib3mf_packagepart_setpath"); + lib3mf_resource_getresourceid = loadFunctionByLookup(lookupMethod, "lib3mf_resource_getresourceid"); + lib3mf_resource_getuniqueresourceid = loadFunctionByLookup(lookupMethod, "lib3mf_resource_getuniqueresourceid"); + lib3mf_resource_packagepart = loadFunctionByLookup(lookupMethod, "lib3mf_resource_packagepart"); + lib3mf_resource_setpackagepart = loadFunctionByLookup(lookupMethod, "lib3mf_resource_setpackagepart"); + lib3mf_resource_getmodelresourceid = loadFunctionByLookup(lookupMethod, "lib3mf_resource_getmodelresourceid"); + lib3mf_resourceiterator_movenext = loadFunctionByLookup(lookupMethod, "lib3mf_resourceiterator_movenext"); + lib3mf_resourceiterator_moveprevious = loadFunctionByLookup(lookupMethod, "lib3mf_resourceiterator_moveprevious"); + lib3mf_resourceiterator_getcurrent = loadFunctionByLookup(lookupMethod, "lib3mf_resourceiterator_getcurrent"); + lib3mf_resourceiterator_clone = loadFunctionByLookup(lookupMethod, "lib3mf_resourceiterator_clone"); + lib3mf_resourceiterator_count = loadFunctionByLookup(lookupMethod, "lib3mf_resourceiterator_count"); + lib3mf_slicestackiterator_getcurrentslicestack = loadFunctionByLookup(lookupMethod, "lib3mf_slicestackiterator_getcurrentslicestack"); + lib3mf_objectiterator_getcurrentobject = loadFunctionByLookup(lookupMethod, "lib3mf_objectiterator_getcurrentobject"); + lib3mf_meshobjectiterator_getcurrentmeshobject = loadFunctionByLookup(lookupMethod, "lib3mf_meshobjectiterator_getcurrentmeshobject"); + lib3mf_componentsobjectiterator_getcurrentcomponentsobject = loadFunctionByLookup(lookupMethod, "lib3mf_componentsobjectiterator_getcurrentcomponentsobject"); + lib3mf_texture2diterator_getcurrenttexture2d = loadFunctionByLookup(lookupMethod, "lib3mf_texture2diterator_getcurrenttexture2d"); + lib3mf_basematerialgroupiterator_getcurrentbasematerialgroup = loadFunctionByLookup(lookupMethod, "lib3mf_basematerialgroupiterator_getcurrentbasematerialgroup"); + lib3mf_colorgroupiterator_getcurrentcolorgroup = loadFunctionByLookup(lookupMethod, "lib3mf_colorgroupiterator_getcurrentcolorgroup"); + lib3mf_texture2dgroupiterator_getcurrenttexture2dgroup = loadFunctionByLookup(lookupMethod, "lib3mf_texture2dgroupiterator_getcurrenttexture2dgroup"); + lib3mf_compositematerialsiterator_getcurrentcompositematerials = loadFunctionByLookup(lookupMethod, "lib3mf_compositematerialsiterator_getcurrentcompositematerials"); + lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup = loadFunctionByLookup(lookupMethod, "lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup"); + lib3mf_image3diterator_getcurrentimage3d = loadFunctionByLookup(lookupMethod, "lib3mf_image3diterator_getcurrentimage3d"); + lib3mf_functioniterator_getcurrentfunction = loadFunctionByLookup(lookupMethod, "lib3mf_functioniterator_getcurrentfunction"); + lib3mf_levelsetiterator_getcurrentlevelset = loadFunctionByLookup(lookupMethod, "lib3mf_levelsetiterator_getcurrentlevelset"); + lib3mf_metadata_getnamespace = loadFunctionByLookup(lookupMethod, "lib3mf_metadata_getnamespace"); + lib3mf_metadata_setnamespace = loadFunctionByLookup(lookupMethod, "lib3mf_metadata_setnamespace"); + lib3mf_metadata_getname = loadFunctionByLookup(lookupMethod, "lib3mf_metadata_getname"); + lib3mf_metadata_setname = loadFunctionByLookup(lookupMethod, "lib3mf_metadata_setname"); + lib3mf_metadata_getkey = loadFunctionByLookup(lookupMethod, "lib3mf_metadata_getkey"); + lib3mf_metadata_getmustpreserve = loadFunctionByLookup(lookupMethod, "lib3mf_metadata_getmustpreserve"); + lib3mf_metadata_setmustpreserve = loadFunctionByLookup(lookupMethod, "lib3mf_metadata_setmustpreserve"); + lib3mf_metadata_gettype = loadFunctionByLookup(lookupMethod, "lib3mf_metadata_gettype"); + lib3mf_metadata_settype = loadFunctionByLookup(lookupMethod, "lib3mf_metadata_settype"); + lib3mf_metadata_getvalue = loadFunctionByLookup(lookupMethod, "lib3mf_metadata_getvalue"); + lib3mf_metadata_setvalue = loadFunctionByLookup(lookupMethod, "lib3mf_metadata_setvalue"); + lib3mf_metadatagroup_getmetadatacount = loadFunctionByLookup(lookupMethod, "lib3mf_metadatagroup_getmetadatacount"); + lib3mf_metadatagroup_getmetadata = loadFunctionByLookup(lookupMethod, "lib3mf_metadatagroup_getmetadata"); + lib3mf_metadatagroup_getmetadatabykey = loadFunctionByLookup(lookupMethod, "lib3mf_metadatagroup_getmetadatabykey"); + lib3mf_metadatagroup_removemetadatabyindex = loadFunctionByLookup(lookupMethod, "lib3mf_metadatagroup_removemetadatabyindex"); + lib3mf_metadatagroup_removemetadata = loadFunctionByLookup(lookupMethod, "lib3mf_metadatagroup_removemetadata"); + lib3mf_metadatagroup_addmetadata = loadFunctionByLookup(lookupMethod, "lib3mf_metadatagroup_addmetadata"); + lib3mf_triangleset_setname = loadFunctionByLookup(lookupMethod, "lib3mf_triangleset_setname"); + lib3mf_triangleset_getname = loadFunctionByLookup(lookupMethod, "lib3mf_triangleset_getname"); + lib3mf_triangleset_setidentifier = loadFunctionByLookup(lookupMethod, "lib3mf_triangleset_setidentifier"); + lib3mf_triangleset_getidentifier = loadFunctionByLookup(lookupMethod, "lib3mf_triangleset_getidentifier"); + lib3mf_triangleset_addtriangle = loadFunctionByLookup(lookupMethod, "lib3mf_triangleset_addtriangle"); + lib3mf_triangleset_removetriangle = loadFunctionByLookup(lookupMethod, "lib3mf_triangleset_removetriangle"); + lib3mf_triangleset_clear = loadFunctionByLookup(lookupMethod, "lib3mf_triangleset_clear"); + lib3mf_triangleset_settrianglelist = loadFunctionByLookup(lookupMethod, "lib3mf_triangleset_settrianglelist"); + lib3mf_triangleset_gettrianglelist = loadFunctionByLookup(lookupMethod, "lib3mf_triangleset_gettrianglelist"); + lib3mf_triangleset_addtrianglelist = loadFunctionByLookup(lookupMethod, "lib3mf_triangleset_addtrianglelist"); + lib3mf_triangleset_merge = loadFunctionByLookup(lookupMethod, "lib3mf_triangleset_merge"); + lib3mf_triangleset_deleteset = loadFunctionByLookup(lookupMethod, "lib3mf_triangleset_deleteset"); + lib3mf_triangleset_duplicate = loadFunctionByLookup(lookupMethod, "lib3mf_triangleset_duplicate"); + lib3mf_object_gettype = loadFunctionByLookup(lookupMethod, "lib3mf_object_gettype"); + lib3mf_object_settype = loadFunctionByLookup(lookupMethod, "lib3mf_object_settype"); + lib3mf_object_getname = loadFunctionByLookup(lookupMethod, "lib3mf_object_getname"); + lib3mf_object_setname = loadFunctionByLookup(lookupMethod, "lib3mf_object_setname"); + lib3mf_object_getpartnumber = loadFunctionByLookup(lookupMethod, "lib3mf_object_getpartnumber"); + lib3mf_object_setpartnumber = loadFunctionByLookup(lookupMethod, "lib3mf_object_setpartnumber"); + lib3mf_object_ismeshobject = loadFunctionByLookup(lookupMethod, "lib3mf_object_ismeshobject"); + lib3mf_object_iscomponentsobject = loadFunctionByLookup(lookupMethod, "lib3mf_object_iscomponentsobject"); + lib3mf_object_islevelsetobject = loadFunctionByLookup(lookupMethod, "lib3mf_object_islevelsetobject"); + lib3mf_object_isvalid = loadFunctionByLookup(lookupMethod, "lib3mf_object_isvalid"); + lib3mf_object_setattachmentasthumbnail = loadFunctionByLookup(lookupMethod, "lib3mf_object_setattachmentasthumbnail"); + lib3mf_object_getthumbnailattachment = loadFunctionByLookup(lookupMethod, "lib3mf_object_getthumbnailattachment"); + lib3mf_object_clearthumbnailattachment = loadFunctionByLookup(lookupMethod, "lib3mf_object_clearthumbnailattachment"); + lib3mf_object_getoutbox = loadFunctionByLookup(lookupMethod, "lib3mf_object_getoutbox"); + lib3mf_object_getuuid = loadFunctionByLookup(lookupMethod, "lib3mf_object_getuuid"); + lib3mf_object_setuuid = loadFunctionByLookup(lookupMethod, "lib3mf_object_setuuid"); + lib3mf_object_getmetadatagroup = loadFunctionByLookup(lookupMethod, "lib3mf_object_getmetadatagroup"); + lib3mf_object_setslicesmeshresolution = loadFunctionByLookup(lookupMethod, "lib3mf_object_setslicesmeshresolution"); + lib3mf_object_getslicesmeshresolution = loadFunctionByLookup(lookupMethod, "lib3mf_object_getslicesmeshresolution"); + lib3mf_object_hasslices = loadFunctionByLookup(lookupMethod, "lib3mf_object_hasslices"); + lib3mf_object_clearslicestack = loadFunctionByLookup(lookupMethod, "lib3mf_object_clearslicestack"); + lib3mf_object_getslicestack = loadFunctionByLookup(lookupMethod, "lib3mf_object_getslicestack"); + lib3mf_object_assignslicestack = loadFunctionByLookup(lookupMethod, "lib3mf_object_assignslicestack"); + lib3mf_meshobject_getvertexcount = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_getvertexcount"); + lib3mf_meshobject_gettrianglecount = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_gettrianglecount"); + lib3mf_meshobject_getvertex = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_getvertex"); + lib3mf_meshobject_setvertex = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_setvertex"); + lib3mf_meshobject_addvertex = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_addvertex"); + lib3mf_meshobject_getvertices = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_getvertices"); + lib3mf_meshobject_gettriangle = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_gettriangle"); + lib3mf_meshobject_settriangle = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_settriangle"); + lib3mf_meshobject_addtriangle = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_addtriangle"); + lib3mf_meshobject_gettriangleindices = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_gettriangleindices"); + lib3mf_meshobject_setobjectlevelproperty = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_setobjectlevelproperty"); + lib3mf_meshobject_getobjectlevelproperty = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_getobjectlevelproperty"); + lib3mf_meshobject_settriangleproperties = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_settriangleproperties"); + lib3mf_meshobject_gettriangleproperties = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_gettriangleproperties"); + lib3mf_meshobject_setalltriangleproperties = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_setalltriangleproperties"); + lib3mf_meshobject_getalltriangleproperties = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_getalltriangleproperties"); + lib3mf_meshobject_clearallproperties = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_clearallproperties"); + lib3mf_meshobject_setgeometry = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_setgeometry"); + lib3mf_meshobject_ismanifoldandoriented = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_ismanifoldandoriented"); + lib3mf_meshobject_beamlattice = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_beamlattice"); + lib3mf_meshobject_getvolumedata = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_getvolumedata"); + lib3mf_meshobject_setvolumedata = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_setvolumedata"); + lib3mf_meshobject_addtriangleset = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_addtriangleset"); + lib3mf_meshobject_hastriangleset = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_hastriangleset"); + lib3mf_meshobject_findtriangleset = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_findtriangleset"); + lib3mf_meshobject_gettrianglesetcount = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_gettrianglesetcount"); + lib3mf_meshobject_gettriangleset = loadFunctionByLookup(lookupMethod, "lib3mf_meshobject_gettriangleset"); + lib3mf_levelset_getfunction = loadFunctionByLookup(lookupMethod, "lib3mf_levelset_getfunction"); + lib3mf_levelset_setfunction = loadFunctionByLookup(lookupMethod, "lib3mf_levelset_setfunction"); + lib3mf_levelset_gettransform = loadFunctionByLookup(lookupMethod, "lib3mf_levelset_gettransform"); + lib3mf_levelset_settransform = loadFunctionByLookup(lookupMethod, "lib3mf_levelset_settransform"); + lib3mf_levelset_getchannelname = loadFunctionByLookup(lookupMethod, "lib3mf_levelset_getchannelname"); + lib3mf_levelset_setchannelname = loadFunctionByLookup(lookupMethod, "lib3mf_levelset_setchannelname"); + lib3mf_levelset_setminfeaturesize = loadFunctionByLookup(lookupMethod, "lib3mf_levelset_setminfeaturesize"); + lib3mf_levelset_getminfeaturesize = loadFunctionByLookup(lookupMethod, "lib3mf_levelset_getminfeaturesize"); + lib3mf_levelset_setfallbackvalue = loadFunctionByLookup(lookupMethod, "lib3mf_levelset_setfallbackvalue"); + lib3mf_levelset_getfallbackvalue = loadFunctionByLookup(lookupMethod, "lib3mf_levelset_getfallbackvalue"); + lib3mf_levelset_setmeshbboxonly = loadFunctionByLookup(lookupMethod, "lib3mf_levelset_setmeshbboxonly"); + lib3mf_levelset_getmeshbboxonly = loadFunctionByLookup(lookupMethod, "lib3mf_levelset_getmeshbboxonly"); + lib3mf_levelset_setmesh = loadFunctionByLookup(lookupMethod, "lib3mf_levelset_setmesh"); + lib3mf_levelset_getmesh = loadFunctionByLookup(lookupMethod, "lib3mf_levelset_getmesh"); + lib3mf_levelset_getvolumedata = loadFunctionByLookup(lookupMethod, "lib3mf_levelset_getvolumedata"); + lib3mf_levelset_setvolumedata = loadFunctionByLookup(lookupMethod, "lib3mf_levelset_setvolumedata"); + lib3mf_beamlattice_getminlength = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_getminlength"); + lib3mf_beamlattice_setminlength = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_setminlength"); + lib3mf_beamlattice_getclipping = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_getclipping"); + lib3mf_beamlattice_setclipping = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_setclipping"); + lib3mf_beamlattice_getrepresentation = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_getrepresentation"); + lib3mf_beamlattice_setrepresentation = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_setrepresentation"); + lib3mf_beamlattice_getballoptions = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_getballoptions"); + lib3mf_beamlattice_setballoptions = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_setballoptions"); + lib3mf_beamlattice_getbeamcount = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_getbeamcount"); + lib3mf_beamlattice_getbeam = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_getbeam"); + lib3mf_beamlattice_addbeam = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_addbeam"); + lib3mf_beamlattice_setbeam = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_setbeam"); + lib3mf_beamlattice_setbeams = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_setbeams"); + lib3mf_beamlattice_getbeams = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_getbeams"); + lib3mf_beamlattice_getballcount = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_getballcount"); + lib3mf_beamlattice_getball = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_getball"); + lib3mf_beamlattice_addball = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_addball"); + lib3mf_beamlattice_setball = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_setball"); + lib3mf_beamlattice_setballs = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_setballs"); + lib3mf_beamlattice_getballs = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_getballs"); + lib3mf_beamlattice_getbeamsetcount = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_getbeamsetcount"); + lib3mf_beamlattice_addbeamset = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_addbeamset"); + lib3mf_beamlattice_getbeamset = loadFunctionByLookup(lookupMethod, "lib3mf_beamlattice_getbeamset"); + lib3mf_functionreference_getfunctionresourceid = loadFunctionByLookup(lookupMethod, "lib3mf_functionreference_getfunctionresourceid"); + lib3mf_functionreference_setfunctionresourceid = loadFunctionByLookup(lookupMethod, "lib3mf_functionreference_setfunctionresourceid"); + lib3mf_functionreference_gettransform = loadFunctionByLookup(lookupMethod, "lib3mf_functionreference_gettransform"); + lib3mf_functionreference_settransform = loadFunctionByLookup(lookupMethod, "lib3mf_functionreference_settransform"); + lib3mf_functionreference_getchannelname = loadFunctionByLookup(lookupMethod, "lib3mf_functionreference_getchannelname"); + lib3mf_functionreference_setchannelname = loadFunctionByLookup(lookupMethod, "lib3mf_functionreference_setchannelname"); + lib3mf_functionreference_setminfeaturesize = loadFunctionByLookup(lookupMethod, "lib3mf_functionreference_setminfeaturesize"); + lib3mf_functionreference_getminfeaturesize = loadFunctionByLookup(lookupMethod, "lib3mf_functionreference_getminfeaturesize"); + lib3mf_functionreference_setfallbackvalue = loadFunctionByLookup(lookupMethod, "lib3mf_functionreference_setfallbackvalue"); + lib3mf_functionreference_getfallbackvalue = loadFunctionByLookup(lookupMethod, "lib3mf_functionreference_getfallbackvalue"); + lib3mf_volumedatacomposite_getbasematerialgroup = loadFunctionByLookup(lookupMethod, "lib3mf_volumedatacomposite_getbasematerialgroup"); + lib3mf_volumedatacomposite_setbasematerialgroup = loadFunctionByLookup(lookupMethod, "lib3mf_volumedatacomposite_setbasematerialgroup"); + lib3mf_volumedatacomposite_getmaterialmappingcount = loadFunctionByLookup(lookupMethod, "lib3mf_volumedatacomposite_getmaterialmappingcount"); + lib3mf_volumedatacomposite_getmaterialmapping = loadFunctionByLookup(lookupMethod, "lib3mf_volumedatacomposite_getmaterialmapping"); + lib3mf_volumedatacomposite_addmaterialmapping = loadFunctionByLookup(lookupMethod, "lib3mf_volumedatacomposite_addmaterialmapping"); + lib3mf_volumedatacomposite_removematerialmapping = loadFunctionByLookup(lookupMethod, "lib3mf_volumedatacomposite_removematerialmapping"); + lib3mf_volumedataproperty_getname = loadFunctionByLookup(lookupMethod, "lib3mf_volumedataproperty_getname"); + lib3mf_volumedataproperty_setisrequired = loadFunctionByLookup(lookupMethod, "lib3mf_volumedataproperty_setisrequired"); + lib3mf_volumedataproperty_isrequired = loadFunctionByLookup(lookupMethod, "lib3mf_volumedataproperty_isrequired"); + lib3mf_volumedata_getcomposite = loadFunctionByLookup(lookupMethod, "lib3mf_volumedata_getcomposite"); + lib3mf_volumedata_createnewcomposite = loadFunctionByLookup(lookupMethod, "lib3mf_volumedata_createnewcomposite"); + lib3mf_volumedata_removecomposite = loadFunctionByLookup(lookupMethod, "lib3mf_volumedata_removecomposite"); + lib3mf_volumedata_getcolor = loadFunctionByLookup(lookupMethod, "lib3mf_volumedata_getcolor"); + lib3mf_volumedata_createnewcolor = loadFunctionByLookup(lookupMethod, "lib3mf_volumedata_createnewcolor"); + lib3mf_volumedata_removecolor = loadFunctionByLookup(lookupMethod, "lib3mf_volumedata_removecolor"); + lib3mf_volumedata_getpropertycount = loadFunctionByLookup(lookupMethod, "lib3mf_volumedata_getpropertycount"); + lib3mf_volumedata_getproperty = loadFunctionByLookup(lookupMethod, "lib3mf_volumedata_getproperty"); + lib3mf_volumedata_addpropertyfromfunction = loadFunctionByLookup(lookupMethod, "lib3mf_volumedata_addpropertyfromfunction"); + lib3mf_volumedata_removeproperty = loadFunctionByLookup(lookupMethod, "lib3mf_volumedata_removeproperty"); + lib3mf_component_getobjectresource = loadFunctionByLookup(lookupMethod, "lib3mf_component_getobjectresource"); + lib3mf_component_getobjectresourceid = loadFunctionByLookup(lookupMethod, "lib3mf_component_getobjectresourceid"); + lib3mf_component_getuuid = loadFunctionByLookup(lookupMethod, "lib3mf_component_getuuid"); + lib3mf_component_setuuid = loadFunctionByLookup(lookupMethod, "lib3mf_component_setuuid"); + lib3mf_component_hastransform = loadFunctionByLookup(lookupMethod, "lib3mf_component_hastransform"); + lib3mf_component_gettransform = loadFunctionByLookup(lookupMethod, "lib3mf_component_gettransform"); + lib3mf_component_settransform = loadFunctionByLookup(lookupMethod, "lib3mf_component_settransform"); + lib3mf_componentsobject_addcomponent = loadFunctionByLookup(lookupMethod, "lib3mf_componentsobject_addcomponent"); + lib3mf_componentsobject_getcomponent = loadFunctionByLookup(lookupMethod, "lib3mf_componentsobject_getcomponent"); + lib3mf_componentsobject_getcomponentcount = loadFunctionByLookup(lookupMethod, "lib3mf_componentsobject_getcomponentcount"); + lib3mf_beamset_setname = loadFunctionByLookup(lookupMethod, "lib3mf_beamset_setname"); + lib3mf_beamset_getname = loadFunctionByLookup(lookupMethod, "lib3mf_beamset_getname"); + lib3mf_beamset_setidentifier = loadFunctionByLookup(lookupMethod, "lib3mf_beamset_setidentifier"); + lib3mf_beamset_getidentifier = loadFunctionByLookup(lookupMethod, "lib3mf_beamset_getidentifier"); + lib3mf_beamset_getreferencecount = loadFunctionByLookup(lookupMethod, "lib3mf_beamset_getreferencecount"); + lib3mf_beamset_setreferences = loadFunctionByLookup(lookupMethod, "lib3mf_beamset_setreferences"); + lib3mf_beamset_getreferences = loadFunctionByLookup(lookupMethod, "lib3mf_beamset_getreferences"); + lib3mf_beamset_getballreferencecount = loadFunctionByLookup(lookupMethod, "lib3mf_beamset_getballreferencecount"); + lib3mf_beamset_setballreferences = loadFunctionByLookup(lookupMethod, "lib3mf_beamset_setballreferences"); + lib3mf_beamset_getballreferences = loadFunctionByLookup(lookupMethod, "lib3mf_beamset_getballreferences"); + lib3mf_basematerialgroup_getcount = loadFunctionByLookup(lookupMethod, "lib3mf_basematerialgroup_getcount"); + lib3mf_basematerialgroup_getallpropertyids = loadFunctionByLookup(lookupMethod, "lib3mf_basematerialgroup_getallpropertyids"); + lib3mf_basematerialgroup_addmaterial = loadFunctionByLookup(lookupMethod, "lib3mf_basematerialgroup_addmaterial"); + lib3mf_basematerialgroup_removematerial = loadFunctionByLookup(lookupMethod, "lib3mf_basematerialgroup_removematerial"); + lib3mf_basematerialgroup_getname = loadFunctionByLookup(lookupMethod, "lib3mf_basematerialgroup_getname"); + lib3mf_basematerialgroup_setname = loadFunctionByLookup(lookupMethod, "lib3mf_basematerialgroup_setname"); + lib3mf_basematerialgroup_setdisplaycolor = loadFunctionByLookup(lookupMethod, "lib3mf_basematerialgroup_setdisplaycolor"); + lib3mf_basematerialgroup_getdisplaycolor = loadFunctionByLookup(lookupMethod, "lib3mf_basematerialgroup_getdisplaycolor"); + lib3mf_colorgroup_getcount = loadFunctionByLookup(lookupMethod, "lib3mf_colorgroup_getcount"); + lib3mf_colorgroup_getallpropertyids = loadFunctionByLookup(lookupMethod, "lib3mf_colorgroup_getallpropertyids"); + lib3mf_colorgroup_addcolor = loadFunctionByLookup(lookupMethod, "lib3mf_colorgroup_addcolor"); + lib3mf_colorgroup_removecolor = loadFunctionByLookup(lookupMethod, "lib3mf_colorgroup_removecolor"); + lib3mf_colorgroup_setcolor = loadFunctionByLookup(lookupMethod, "lib3mf_colorgroup_setcolor"); + lib3mf_colorgroup_getcolor = loadFunctionByLookup(lookupMethod, "lib3mf_colorgroup_getcolor"); + lib3mf_texture2dgroup_getcount = loadFunctionByLookup(lookupMethod, "lib3mf_texture2dgroup_getcount"); + lib3mf_texture2dgroup_getallpropertyids = loadFunctionByLookup(lookupMethod, "lib3mf_texture2dgroup_getallpropertyids"); + lib3mf_texture2dgroup_addtex2coord = loadFunctionByLookup(lookupMethod, "lib3mf_texture2dgroup_addtex2coord"); + lib3mf_texture2dgroup_gettex2coord = loadFunctionByLookup(lookupMethod, "lib3mf_texture2dgroup_gettex2coord"); + lib3mf_texture2dgroup_removetex2coord = loadFunctionByLookup(lookupMethod, "lib3mf_texture2dgroup_removetex2coord"); + lib3mf_texture2dgroup_gettexture2d = loadFunctionByLookup(lookupMethod, "lib3mf_texture2dgroup_gettexture2d"); + lib3mf_compositematerials_getcount = loadFunctionByLookup(lookupMethod, "lib3mf_compositematerials_getcount"); + lib3mf_compositematerials_getallpropertyids = loadFunctionByLookup(lookupMethod, "lib3mf_compositematerials_getallpropertyids"); + lib3mf_compositematerials_getbasematerialgroup = loadFunctionByLookup(lookupMethod, "lib3mf_compositematerials_getbasematerialgroup"); + lib3mf_compositematerials_addcomposite = loadFunctionByLookup(lookupMethod, "lib3mf_compositematerials_addcomposite"); + lib3mf_compositematerials_removecomposite = loadFunctionByLookup(lookupMethod, "lib3mf_compositematerials_removecomposite"); + lib3mf_compositematerials_getcomposite = loadFunctionByLookup(lookupMethod, "lib3mf_compositematerials_getcomposite"); + lib3mf_multipropertygroup_getcount = loadFunctionByLookup(lookupMethod, "lib3mf_multipropertygroup_getcount"); + lib3mf_multipropertygroup_getallpropertyids = loadFunctionByLookup(lookupMethod, "lib3mf_multipropertygroup_getallpropertyids"); + lib3mf_multipropertygroup_addmultiproperty = loadFunctionByLookup(lookupMethod, "lib3mf_multipropertygroup_addmultiproperty"); + lib3mf_multipropertygroup_setmultiproperty = loadFunctionByLookup(lookupMethod, "lib3mf_multipropertygroup_setmultiproperty"); + lib3mf_multipropertygroup_getmultiproperty = loadFunctionByLookup(lookupMethod, "lib3mf_multipropertygroup_getmultiproperty"); + lib3mf_multipropertygroup_removemultiproperty = loadFunctionByLookup(lookupMethod, "lib3mf_multipropertygroup_removemultiproperty"); + lib3mf_multipropertygroup_getlayercount = loadFunctionByLookup(lookupMethod, "lib3mf_multipropertygroup_getlayercount"); + lib3mf_multipropertygroup_addlayer = loadFunctionByLookup(lookupMethod, "lib3mf_multipropertygroup_addlayer"); + lib3mf_multipropertygroup_getlayer = loadFunctionByLookup(lookupMethod, "lib3mf_multipropertygroup_getlayer"); + lib3mf_multipropertygroup_removelayer = loadFunctionByLookup(lookupMethod, "lib3mf_multipropertygroup_removelayer"); + lib3mf_image3d_getname = loadFunctionByLookup(lookupMethod, "lib3mf_image3d_getname"); + lib3mf_image3d_setname = loadFunctionByLookup(lookupMethod, "lib3mf_image3d_setname"); + lib3mf_image3d_isimagestack = loadFunctionByLookup(lookupMethod, "lib3mf_image3d_isimagestack"); + lib3mf_imagestack_getrowcount = loadFunctionByLookup(lookupMethod, "lib3mf_imagestack_getrowcount"); + lib3mf_imagestack_setrowcount = loadFunctionByLookup(lookupMethod, "lib3mf_imagestack_setrowcount"); + lib3mf_imagestack_getcolumncount = loadFunctionByLookup(lookupMethod, "lib3mf_imagestack_getcolumncount"); + lib3mf_imagestack_setcolumncount = loadFunctionByLookup(lookupMethod, "lib3mf_imagestack_setcolumncount"); + lib3mf_imagestack_getsheetcount = loadFunctionByLookup(lookupMethod, "lib3mf_imagestack_getsheetcount"); + lib3mf_imagestack_getsheet = loadFunctionByLookup(lookupMethod, "lib3mf_imagestack_getsheet"); + lib3mf_imagestack_setsheet = loadFunctionByLookup(lookupMethod, "lib3mf_imagestack_setsheet"); + lib3mf_imagestack_createemptysheet = loadFunctionByLookup(lookupMethod, "lib3mf_imagestack_createemptysheet"); + lib3mf_imagestack_createsheetfrombuffer = loadFunctionByLookup(lookupMethod, "lib3mf_imagestack_createsheetfrombuffer"); + lib3mf_imagestack_createsheetfromfile = loadFunctionByLookup(lookupMethod, "lib3mf_imagestack_createsheetfromfile"); + lib3mf_attachment_getpath = loadFunctionByLookup(lookupMethod, "lib3mf_attachment_getpath"); + lib3mf_attachment_setpath = loadFunctionByLookup(lookupMethod, "lib3mf_attachment_setpath"); + lib3mf_attachment_packagepart = loadFunctionByLookup(lookupMethod, "lib3mf_attachment_packagepart"); + lib3mf_attachment_getrelationshiptype = loadFunctionByLookup(lookupMethod, "lib3mf_attachment_getrelationshiptype"); + lib3mf_attachment_setrelationshiptype = loadFunctionByLookup(lookupMethod, "lib3mf_attachment_setrelationshiptype"); + lib3mf_attachment_writetofile = loadFunctionByLookup(lookupMethod, "lib3mf_attachment_writetofile"); + lib3mf_attachment_readfromfile = loadFunctionByLookup(lookupMethod, "lib3mf_attachment_readfromfile"); + lib3mf_attachment_readfromcallback = loadFunctionByLookup(lookupMethod, "lib3mf_attachment_readfromcallback"); + lib3mf_attachment_getstreamsize = loadFunctionByLookup(lookupMethod, "lib3mf_attachment_getstreamsize"); + lib3mf_attachment_writetobuffer = loadFunctionByLookup(lookupMethod, "lib3mf_attachment_writetobuffer"); + lib3mf_attachment_readfrombuffer = loadFunctionByLookup(lookupMethod, "lib3mf_attachment_readfrombuffer"); + lib3mf_texture2d_getattachment = loadFunctionByLookup(lookupMethod, "lib3mf_texture2d_getattachment"); + lib3mf_texture2d_setattachment = loadFunctionByLookup(lookupMethod, "lib3mf_texture2d_setattachment"); + lib3mf_texture2d_getcontenttype = loadFunctionByLookup(lookupMethod, "lib3mf_texture2d_getcontenttype"); + lib3mf_texture2d_setcontenttype = loadFunctionByLookup(lookupMethod, "lib3mf_texture2d_setcontenttype"); + lib3mf_texture2d_gettilestyleuv = loadFunctionByLookup(lookupMethod, "lib3mf_texture2d_gettilestyleuv"); + lib3mf_texture2d_settilestyleuv = loadFunctionByLookup(lookupMethod, "lib3mf_texture2d_settilestyleuv"); + lib3mf_texture2d_getfilter = loadFunctionByLookup(lookupMethod, "lib3mf_texture2d_getfilter"); + lib3mf_texture2d_setfilter = loadFunctionByLookup(lookupMethod, "lib3mf_texture2d_setfilter"); + lib3mf_implicitport_getidentifier = loadFunctionByLookup(lookupMethod, "lib3mf_implicitport_getidentifier"); + lib3mf_implicitport_setidentifier = loadFunctionByLookup(lookupMethod, "lib3mf_implicitport_setidentifier"); + lib3mf_implicitport_getdisplayname = loadFunctionByLookup(lookupMethod, "lib3mf_implicitport_getdisplayname"); + lib3mf_implicitport_setdisplayname = loadFunctionByLookup(lookupMethod, "lib3mf_implicitport_setdisplayname"); + lib3mf_implicitport_settype = loadFunctionByLookup(lookupMethod, "lib3mf_implicitport_settype"); + lib3mf_implicitport_gettype = loadFunctionByLookup(lookupMethod, "lib3mf_implicitport_gettype"); + lib3mf_implicitport_getreference = loadFunctionByLookup(lookupMethod, "lib3mf_implicitport_getreference"); + lib3mf_implicitport_setreference = loadFunctionByLookup(lookupMethod, "lib3mf_implicitport_setreference"); + lib3mf_iterator_movenext = loadFunctionByLookup(lookupMethod, "lib3mf_iterator_movenext"); + lib3mf_iterator_moveprevious = loadFunctionByLookup(lookupMethod, "lib3mf_iterator_moveprevious"); + lib3mf_iterator_count = loadFunctionByLookup(lookupMethod, "lib3mf_iterator_count"); + lib3mf_implicitportiterator_getcurrent = loadFunctionByLookup(lookupMethod, "lib3mf_implicitportiterator_getcurrent"); + lib3mf_implicitnode_getidentifier = loadFunctionByLookup(lookupMethod, "lib3mf_implicitnode_getidentifier"); + lib3mf_implicitnode_setidentifier = loadFunctionByLookup(lookupMethod, "lib3mf_implicitnode_setidentifier"); + lib3mf_implicitnode_getdisplayname = loadFunctionByLookup(lookupMethod, "lib3mf_implicitnode_getdisplayname"); + lib3mf_implicitnode_setdisplayname = loadFunctionByLookup(lookupMethod, "lib3mf_implicitnode_setdisplayname"); + lib3mf_implicitnode_gettag = loadFunctionByLookup(lookupMethod, "lib3mf_implicitnode_gettag"); + lib3mf_implicitnode_settag = loadFunctionByLookup(lookupMethod, "lib3mf_implicitnode_settag"); + lib3mf_implicitnode_getnodetype = loadFunctionByLookup(lookupMethod, "lib3mf_implicitnode_getnodetype"); + lib3mf_implicitnode_addinput = loadFunctionByLookup(lookupMethod, "lib3mf_implicitnode_addinput"); + lib3mf_implicitnode_getinputs = loadFunctionByLookup(lookupMethod, "lib3mf_implicitnode_getinputs"); + lib3mf_implicitnode_addoutput = loadFunctionByLookup(lookupMethod, "lib3mf_implicitnode_addoutput"); + lib3mf_implicitnode_getoutputs = loadFunctionByLookup(lookupMethod, "lib3mf_implicitnode_getoutputs"); + lib3mf_implicitnode_findinput = loadFunctionByLookup(lookupMethod, "lib3mf_implicitnode_findinput"); + lib3mf_implicitnode_findoutput = loadFunctionByLookup(lookupMethod, "lib3mf_implicitnode_findoutput"); + lib3mf_implicitnode_aretypesvalid = loadFunctionByLookup(lookupMethod, "lib3mf_implicitnode_aretypesvalid"); + lib3mf_oneinputnode_getinputa = loadFunctionByLookup(lookupMethod, "lib3mf_oneinputnode_getinputa"); + lib3mf_oneinputnode_getoutputresult = loadFunctionByLookup(lookupMethod, "lib3mf_oneinputnode_getoutputresult"); + lib3mf_resourceidnode_setresource = loadFunctionByLookup(lookupMethod, "lib3mf_resourceidnode_setresource"); + lib3mf_resourceidnode_getresource = loadFunctionByLookup(lookupMethod, "lib3mf_resourceidnode_getresource"); + lib3mf_resourceidnode_getoutputvalue = loadFunctionByLookup(lookupMethod, "lib3mf_resourceidnode_getoutputvalue"); + lib3mf_twoinputnode_getinputb = loadFunctionByLookup(lookupMethod, "lib3mf_twoinputnode_getinputb"); + lib3mf_selectnode_getinputb = loadFunctionByLookup(lookupMethod, "lib3mf_selectnode_getinputb"); + lib3mf_selectnode_getinputc = loadFunctionByLookup(lookupMethod, "lib3mf_selectnode_getinputc"); + lib3mf_selectnode_getinputd = loadFunctionByLookup(lookupMethod, "lib3mf_selectnode_getinputd"); + lib3mf_clampnode_getinputmin = loadFunctionByLookup(lookupMethod, "lib3mf_clampnode_getinputmin"); + lib3mf_clampnode_getinputmax = loadFunctionByLookup(lookupMethod, "lib3mf_clampnode_getinputmax"); + lib3mf_composevectornode_getinputx = loadFunctionByLookup(lookupMethod, "lib3mf_composevectornode_getinputx"); + lib3mf_composevectornode_getinputy = loadFunctionByLookup(lookupMethod, "lib3mf_composevectornode_getinputy"); + lib3mf_composevectornode_getinputz = loadFunctionByLookup(lookupMethod, "lib3mf_composevectornode_getinputz"); + lib3mf_composevectornode_getoutputresult = loadFunctionByLookup(lookupMethod, "lib3mf_composevectornode_getoutputresult"); + lib3mf_decomposevectornode_getinputa = loadFunctionByLookup(lookupMethod, "lib3mf_decomposevectornode_getinputa"); + lib3mf_decomposevectornode_getoutputx = loadFunctionByLookup(lookupMethod, "lib3mf_decomposevectornode_getoutputx"); + lib3mf_decomposevectornode_getoutputy = loadFunctionByLookup(lookupMethod, "lib3mf_decomposevectornode_getoutputy"); + lib3mf_decomposevectornode_getoutputz = loadFunctionByLookup(lookupMethod, "lib3mf_decomposevectornode_getoutputz"); + lib3mf_composematrixnode_getinputm00 = loadFunctionByLookup(lookupMethod, "lib3mf_composematrixnode_getinputm00"); + lib3mf_composematrixnode_getinputm01 = loadFunctionByLookup(lookupMethod, "lib3mf_composematrixnode_getinputm01"); + lib3mf_composematrixnode_getinputm02 = loadFunctionByLookup(lookupMethod, "lib3mf_composematrixnode_getinputm02"); + lib3mf_composematrixnode_getinputm03 = loadFunctionByLookup(lookupMethod, "lib3mf_composematrixnode_getinputm03"); + lib3mf_composematrixnode_getinputm10 = loadFunctionByLookup(lookupMethod, "lib3mf_composematrixnode_getinputm10"); + lib3mf_composematrixnode_getinputm11 = loadFunctionByLookup(lookupMethod, "lib3mf_composematrixnode_getinputm11"); + lib3mf_composematrixnode_getinputm12 = loadFunctionByLookup(lookupMethod, "lib3mf_composematrixnode_getinputm12"); + lib3mf_composematrixnode_getinputm13 = loadFunctionByLookup(lookupMethod, "lib3mf_composematrixnode_getinputm13"); + lib3mf_composematrixnode_getinputm20 = loadFunctionByLookup(lookupMethod, "lib3mf_composematrixnode_getinputm20"); + lib3mf_composematrixnode_getinputm21 = loadFunctionByLookup(lookupMethod, "lib3mf_composematrixnode_getinputm21"); + lib3mf_composematrixnode_getinputm22 = loadFunctionByLookup(lookupMethod, "lib3mf_composematrixnode_getinputm22"); + lib3mf_composematrixnode_getinputm23 = loadFunctionByLookup(lookupMethod, "lib3mf_composematrixnode_getinputm23"); + lib3mf_composematrixnode_getinputm30 = loadFunctionByLookup(lookupMethod, "lib3mf_composematrixnode_getinputm30"); + lib3mf_composematrixnode_getinputm31 = loadFunctionByLookup(lookupMethod, "lib3mf_composematrixnode_getinputm31"); + lib3mf_composematrixnode_getinputm32 = loadFunctionByLookup(lookupMethod, "lib3mf_composematrixnode_getinputm32"); + lib3mf_composematrixnode_getinputm33 = loadFunctionByLookup(lookupMethod, "lib3mf_composematrixnode_getinputm33"); + lib3mf_composematrixnode_getoutputresult = loadFunctionByLookup(lookupMethod, "lib3mf_composematrixnode_getoutputresult"); + lib3mf_matrixfromrowsnode_getinputa = loadFunctionByLookup(lookupMethod, "lib3mf_matrixfromrowsnode_getinputa"); + lib3mf_matrixfromrowsnode_getinputb = loadFunctionByLookup(lookupMethod, "lib3mf_matrixfromrowsnode_getinputb"); + lib3mf_matrixfromrowsnode_getinputc = loadFunctionByLookup(lookupMethod, "lib3mf_matrixfromrowsnode_getinputc"); + lib3mf_matrixfromrowsnode_getinputd = loadFunctionByLookup(lookupMethod, "lib3mf_matrixfromrowsnode_getinputd"); + lib3mf_matrixfromrowsnode_getoutputresult = loadFunctionByLookup(lookupMethod, "lib3mf_matrixfromrowsnode_getoutputresult"); + lib3mf_matrixfromcolumnsnode_getinputa = loadFunctionByLookup(lookupMethod, "lib3mf_matrixfromcolumnsnode_getinputa"); + lib3mf_matrixfromcolumnsnode_getinputb = loadFunctionByLookup(lookupMethod, "lib3mf_matrixfromcolumnsnode_getinputb"); + lib3mf_matrixfromcolumnsnode_getinputc = loadFunctionByLookup(lookupMethod, "lib3mf_matrixfromcolumnsnode_getinputc"); + lib3mf_matrixfromcolumnsnode_getinputd = loadFunctionByLookup(lookupMethod, "lib3mf_matrixfromcolumnsnode_getinputd"); + lib3mf_matrixfromcolumnsnode_getoutputresult = loadFunctionByLookup(lookupMethod, "lib3mf_matrixfromcolumnsnode_getoutputresult"); + lib3mf_constantnode_setconstant = loadFunctionByLookup(lookupMethod, "lib3mf_constantnode_setconstant"); + lib3mf_constantnode_getconstant = loadFunctionByLookup(lookupMethod, "lib3mf_constantnode_getconstant"); + lib3mf_constantnode_getoutputvalue = loadFunctionByLookup(lookupMethod, "lib3mf_constantnode_getoutputvalue"); + lib3mf_constvecnode_setvector = loadFunctionByLookup(lookupMethod, "lib3mf_constvecnode_setvector"); + lib3mf_constvecnode_getvector = loadFunctionByLookup(lookupMethod, "lib3mf_constvecnode_getvector"); + lib3mf_constvecnode_getoutputvector = loadFunctionByLookup(lookupMethod, "lib3mf_constvecnode_getoutputvector"); + lib3mf_constmatnode_setmatrix = loadFunctionByLookup(lookupMethod, "lib3mf_constmatnode_setmatrix"); + lib3mf_constmatnode_getmatrix = loadFunctionByLookup(lookupMethod, "lib3mf_constmatnode_getmatrix"); + lib3mf_constmatnode_getoutputmatrix = loadFunctionByLookup(lookupMethod, "lib3mf_constmatnode_getoutputmatrix"); + lib3mf_meshnode_getinputmesh = loadFunctionByLookup(lookupMethod, "lib3mf_meshnode_getinputmesh"); + lib3mf_meshnode_getinputpos = loadFunctionByLookup(lookupMethod, "lib3mf_meshnode_getinputpos"); + lib3mf_meshnode_getoutputdistance = loadFunctionByLookup(lookupMethod, "lib3mf_meshnode_getoutputdistance"); + lib3mf_unsignedmeshnode_getinputmesh = loadFunctionByLookup(lookupMethod, "lib3mf_unsignedmeshnode_getinputmesh"); + lib3mf_unsignedmeshnode_getinputpos = loadFunctionByLookup(lookupMethod, "lib3mf_unsignedmeshnode_getinputpos"); + lib3mf_unsignedmeshnode_getoutputdistance = loadFunctionByLookup(lookupMethod, "lib3mf_unsignedmeshnode_getoutputdistance"); + lib3mf_beamlatticenode_getinputbeamlattice = loadFunctionByLookup(lookupMethod, "lib3mf_beamlatticenode_getinputbeamlattice"); + lib3mf_beamlatticenode_getinputpos = loadFunctionByLookup(lookupMethod, "lib3mf_beamlatticenode_getinputpos"); + lib3mf_beamlatticenode_getoutputdistance = loadFunctionByLookup(lookupMethod, "lib3mf_beamlatticenode_getoutputdistance"); + lib3mf_beamlatticenode_setaccuraterange = loadFunctionByLookup(lookupMethod, "lib3mf_beamlatticenode_setaccuraterange"); + lib3mf_beamlatticenode_getaccuraterange = loadFunctionByLookup(lookupMethod, "lib3mf_beamlatticenode_getaccuraterange"); + lib3mf_functiongradientnode_getinputfunctionid = loadFunctionByLookup(lookupMethod, "lib3mf_functiongradientnode_getinputfunctionid"); + lib3mf_functiongradientnode_getinputpos = loadFunctionByLookup(lookupMethod, "lib3mf_functiongradientnode_getinputpos"); + lib3mf_functiongradientnode_getinputstep = loadFunctionByLookup(lookupMethod, "lib3mf_functiongradientnode_getinputstep"); + lib3mf_functiongradientnode_setscalaroutputname = loadFunctionByLookup(lookupMethod, "lib3mf_functiongradientnode_setscalaroutputname"); + lib3mf_functiongradientnode_getscalaroutputname = loadFunctionByLookup(lookupMethod, "lib3mf_functiongradientnode_getscalaroutputname"); + lib3mf_functiongradientnode_setvectorinputname = loadFunctionByLookup(lookupMethod, "lib3mf_functiongradientnode_setvectorinputname"); + lib3mf_functiongradientnode_getvectorinputname = loadFunctionByLookup(lookupMethod, "lib3mf_functiongradientnode_getvectorinputname"); + lib3mf_functiongradientnode_getoutputvector = loadFunctionByLookup(lookupMethod, "lib3mf_functiongradientnode_getoutputvector"); + lib3mf_functiongradientnode_getoutputgradient = loadFunctionByLookup(lookupMethod, "lib3mf_functiongradientnode_getoutputgradient"); + lib3mf_functiongradientnode_getoutputmagnitude = loadFunctionByLookup(lookupMethod, "lib3mf_functiongradientnode_getoutputmagnitude"); + lib3mf_normalizedistancenode_getinputfunctionid = loadFunctionByLookup(lookupMethod, "lib3mf_normalizedistancenode_getinputfunctionid"); + lib3mf_normalizedistancenode_getinputpos = loadFunctionByLookup(lookupMethod, "lib3mf_normalizedistancenode_getinputpos"); + lib3mf_normalizedistancenode_getinputstep = loadFunctionByLookup(lookupMethod, "lib3mf_normalizedistancenode_getinputstep"); + lib3mf_normalizedistancenode_setscalaroutputname = loadFunctionByLookup(lookupMethod, "lib3mf_normalizedistancenode_setscalaroutputname"); + lib3mf_normalizedistancenode_getscalaroutputname = loadFunctionByLookup(lookupMethod, "lib3mf_normalizedistancenode_getscalaroutputname"); + lib3mf_normalizedistancenode_setvectorinputname = loadFunctionByLookup(lookupMethod, "lib3mf_normalizedistancenode_setvectorinputname"); + lib3mf_normalizedistancenode_getvectorinputname = loadFunctionByLookup(lookupMethod, "lib3mf_normalizedistancenode_getvectorinputname"); + lib3mf_normalizedistancenode_getoutputresult = loadFunctionByLookup(lookupMethod, "lib3mf_normalizedistancenode_getoutputresult"); + lib3mf_functioncallnode_getinputfunctionid = loadFunctionByLookup(lookupMethod, "lib3mf_functioncallnode_getinputfunctionid"); + lib3mf_nodeiterator_getcurrent = loadFunctionByLookup(lookupMethod, "lib3mf_nodeiterator_getcurrent"); + lib3mf_function_getdisplayname = loadFunctionByLookup(lookupMethod, "lib3mf_function_getdisplayname"); + lib3mf_function_setdisplayname = loadFunctionByLookup(lookupMethod, "lib3mf_function_setdisplayname"); + lib3mf_function_addinput = loadFunctionByLookup(lookupMethod, "lib3mf_function_addinput"); + lib3mf_function_getinputs = loadFunctionByLookup(lookupMethod, "lib3mf_function_getinputs"); + lib3mf_function_removeinput = loadFunctionByLookup(lookupMethod, "lib3mf_function_removeinput"); + lib3mf_function_addoutput = loadFunctionByLookup(lookupMethod, "lib3mf_function_addoutput"); + lib3mf_function_getoutputs = loadFunctionByLookup(lookupMethod, "lib3mf_function_getoutputs"); + lib3mf_function_removeoutput = loadFunctionByLookup(lookupMethod, "lib3mf_function_removeoutput"); + lib3mf_function_findinput = loadFunctionByLookup(lookupMethod, "lib3mf_function_findinput"); + lib3mf_function_findoutput = loadFunctionByLookup(lookupMethod, "lib3mf_function_findoutput"); + lib3mf_implicitfunction_getidentifier = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_getidentifier"); + lib3mf_implicitfunction_setidentifier = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_setidentifier"); + lib3mf_implicitfunction_addnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addnode"); + lib3mf_implicitfunction_addsinnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addsinnode"); + lib3mf_implicitfunction_addcosnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addcosnode"); + lib3mf_implicitfunction_addtannode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addtannode"); + lib3mf_implicitfunction_addarcsinnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addarcsinnode"); + lib3mf_implicitfunction_addarccosnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addarccosnode"); + lib3mf_implicitfunction_addarctan2node = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addarctan2node"); + lib3mf_implicitfunction_addsinhnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addsinhnode"); + lib3mf_implicitfunction_addcoshnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addcoshnode"); + lib3mf_implicitfunction_addtanhnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addtanhnode"); + lib3mf_implicitfunction_addroundnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addroundnode"); + lib3mf_implicitfunction_addceilnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addceilnode"); + lib3mf_implicitfunction_addfloornode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addfloornode"); + lib3mf_implicitfunction_addsignnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addsignnode"); + lib3mf_implicitfunction_addfractnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addfractnode"); + lib3mf_implicitfunction_addabsnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addabsnode"); + lib3mf_implicitfunction_addexpnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addexpnode"); + lib3mf_implicitfunction_addlognode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addlognode"); + lib3mf_implicitfunction_addlog2node = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addlog2node"); + lib3mf_implicitfunction_addlog10node = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addlog10node"); + lib3mf_implicitfunction_addlengthnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addlengthnode"); + lib3mf_implicitfunction_addtransposenode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addtransposenode"); + lib3mf_implicitfunction_addinversenode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addinversenode"); + lib3mf_implicitfunction_addsqrtnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addsqrtnode"); + lib3mf_implicitfunction_addresourceidnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addresourceidnode"); + lib3mf_implicitfunction_addadditionnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addadditionnode"); + lib3mf_implicitfunction_addsubtractionnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addsubtractionnode"); + lib3mf_implicitfunction_addmultiplicationnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addmultiplicationnode"); + lib3mf_implicitfunction_adddivisionnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_adddivisionnode"); + lib3mf_implicitfunction_adddotnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_adddotnode"); + lib3mf_implicitfunction_addcrossnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addcrossnode"); + lib3mf_implicitfunction_addmatvecmultiplicationnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addmatvecmultiplicationnode"); + lib3mf_implicitfunction_addminnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addminnode"); + lib3mf_implicitfunction_addmaxnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addmaxnode"); + lib3mf_implicitfunction_addfmodnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addfmodnode"); + lib3mf_implicitfunction_addpownode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addpownode"); + lib3mf_implicitfunction_addselectnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addselectnode"); + lib3mf_implicitfunction_addclampnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addclampnode"); + lib3mf_implicitfunction_addcomposevectornode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addcomposevectornode"); + lib3mf_implicitfunction_addvectorfromscalarnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addvectorfromscalarnode"); + lib3mf_implicitfunction_adddecomposevectornode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_adddecomposevectornode"); + lib3mf_implicitfunction_addcomposematrixnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addcomposematrixnode"); + lib3mf_implicitfunction_addmatrixfromrowsnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addmatrixfromrowsnode"); + lib3mf_implicitfunction_addmatrixfromcolumnsnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addmatrixfromcolumnsnode"); + lib3mf_implicitfunction_addconstantnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addconstantnode"); + lib3mf_implicitfunction_addconstvecnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addconstvecnode"); + lib3mf_implicitfunction_addconstmatnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addconstmatnode"); + lib3mf_implicitfunction_addmeshnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addmeshnode"); + lib3mf_implicitfunction_addunsignedmeshnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addunsignedmeshnode"); + lib3mf_implicitfunction_addbeamlatticenode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addbeamlatticenode"); + lib3mf_implicitfunction_addfunctiongradientnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addfunctiongradientnode"); + lib3mf_implicitfunction_addnormalizedistancenode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addnormalizedistancenode"); + lib3mf_implicitfunction_addfunctioncallnode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addfunctioncallnode"); + lib3mf_implicitfunction_getnodes = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_getnodes"); + lib3mf_implicitfunction_removenode = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_removenode"); + lib3mf_implicitfunction_addlink = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addlink"); + lib3mf_implicitfunction_addlinkbynames = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_addlinkbynames"); + lib3mf_implicitfunction_clear = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_clear"); + lib3mf_implicitfunction_sortnodestopologically = loadFunctionByLookup(lookupMethod, "lib3mf_implicitfunction_sortnodestopologically"); + lib3mf_functionfromimage3d_getimage3d = loadFunctionByLookup(lookupMethod, "lib3mf_functionfromimage3d_getimage3d"); + lib3mf_functionfromimage3d_setimage3d = loadFunctionByLookup(lookupMethod, "lib3mf_functionfromimage3d_setimage3d"); + lib3mf_functionfromimage3d_setfilter = loadFunctionByLookup(lookupMethod, "lib3mf_functionfromimage3d_setfilter"); + lib3mf_functionfromimage3d_getfilter = loadFunctionByLookup(lookupMethod, "lib3mf_functionfromimage3d_getfilter"); + lib3mf_functionfromimage3d_settilestyles = loadFunctionByLookup(lookupMethod, "lib3mf_functionfromimage3d_settilestyles"); + lib3mf_functionfromimage3d_gettilestyles = loadFunctionByLookup(lookupMethod, "lib3mf_functionfromimage3d_gettilestyles"); + lib3mf_functionfromimage3d_getoffset = loadFunctionByLookup(lookupMethod, "lib3mf_functionfromimage3d_getoffset"); + lib3mf_functionfromimage3d_setoffset = loadFunctionByLookup(lookupMethod, "lib3mf_functionfromimage3d_setoffset"); + lib3mf_functionfromimage3d_getscale = loadFunctionByLookup(lookupMethod, "lib3mf_functionfromimage3d_getscale"); + lib3mf_functionfromimage3d_setscale = loadFunctionByLookup(lookupMethod, "lib3mf_functionfromimage3d_setscale"); + lib3mf_builditem_getobjectresource = loadFunctionByLookup(lookupMethod, "lib3mf_builditem_getobjectresource"); + lib3mf_builditem_getuuid = loadFunctionByLookup(lookupMethod, "lib3mf_builditem_getuuid"); + lib3mf_builditem_setuuid = loadFunctionByLookup(lookupMethod, "lib3mf_builditem_setuuid"); + lib3mf_builditem_getobjectresourceid = loadFunctionByLookup(lookupMethod, "lib3mf_builditem_getobjectresourceid"); + lib3mf_builditem_hasobjecttransform = loadFunctionByLookup(lookupMethod, "lib3mf_builditem_hasobjecttransform"); + lib3mf_builditem_getobjecttransform = loadFunctionByLookup(lookupMethod, "lib3mf_builditem_getobjecttransform"); + lib3mf_builditem_setobjecttransform = loadFunctionByLookup(lookupMethod, "lib3mf_builditem_setobjecttransform"); + lib3mf_builditem_getpartnumber = loadFunctionByLookup(lookupMethod, "lib3mf_builditem_getpartnumber"); + lib3mf_builditem_setpartnumber = loadFunctionByLookup(lookupMethod, "lib3mf_builditem_setpartnumber"); + lib3mf_builditem_getmetadatagroup = loadFunctionByLookup(lookupMethod, "lib3mf_builditem_getmetadatagroup"); + lib3mf_builditem_getoutbox = loadFunctionByLookup(lookupMethod, "lib3mf_builditem_getoutbox"); + lib3mf_builditemiterator_movenext = loadFunctionByLookup(lookupMethod, "lib3mf_builditemiterator_movenext"); + lib3mf_builditemiterator_moveprevious = loadFunctionByLookup(lookupMethod, "lib3mf_builditemiterator_moveprevious"); + lib3mf_builditemiterator_getcurrent = loadFunctionByLookup(lookupMethod, "lib3mf_builditemiterator_getcurrent"); + lib3mf_builditemiterator_clone = loadFunctionByLookup(lookupMethod, "lib3mf_builditemiterator_clone"); + lib3mf_builditemiterator_count = loadFunctionByLookup(lookupMethod, "lib3mf_builditemiterator_count"); + lib3mf_slice_setvertices = loadFunctionByLookup(lookupMethod, "lib3mf_slice_setvertices"); + lib3mf_slice_getvertices = loadFunctionByLookup(lookupMethod, "lib3mf_slice_getvertices"); + lib3mf_slice_getvertexcount = loadFunctionByLookup(lookupMethod, "lib3mf_slice_getvertexcount"); + lib3mf_slice_addpolygon = loadFunctionByLookup(lookupMethod, "lib3mf_slice_addpolygon"); + lib3mf_slice_getpolygoncount = loadFunctionByLookup(lookupMethod, "lib3mf_slice_getpolygoncount"); + lib3mf_slice_setpolygonindices = loadFunctionByLookup(lookupMethod, "lib3mf_slice_setpolygonindices"); + lib3mf_slice_getpolygonindices = loadFunctionByLookup(lookupMethod, "lib3mf_slice_getpolygonindices"); + lib3mf_slice_getpolygonindexcount = loadFunctionByLookup(lookupMethod, "lib3mf_slice_getpolygonindexcount"); + lib3mf_slice_getztop = loadFunctionByLookup(lookupMethod, "lib3mf_slice_getztop"); + lib3mf_slicestack_getbottomz = loadFunctionByLookup(lookupMethod, "lib3mf_slicestack_getbottomz"); + lib3mf_slicestack_getslicecount = loadFunctionByLookup(lookupMethod, "lib3mf_slicestack_getslicecount"); + lib3mf_slicestack_getslice = loadFunctionByLookup(lookupMethod, "lib3mf_slicestack_getslice"); + lib3mf_slicestack_addslice = loadFunctionByLookup(lookupMethod, "lib3mf_slicestack_addslice"); + lib3mf_slicestack_getslicerefcount = loadFunctionByLookup(lookupMethod, "lib3mf_slicestack_getslicerefcount"); + lib3mf_slicestack_addslicestackreference = loadFunctionByLookup(lookupMethod, "lib3mf_slicestack_addslicestackreference"); + lib3mf_slicestack_getslicestackreference = loadFunctionByLookup(lookupMethod, "lib3mf_slicestack_getslicestackreference"); + lib3mf_slicestack_collapseslicereferences = loadFunctionByLookup(lookupMethod, "lib3mf_slicestack_collapseslicereferences"); + lib3mf_slicestack_setownpath = loadFunctionByLookup(lookupMethod, "lib3mf_slicestack_setownpath"); + lib3mf_slicestack_getownpath = loadFunctionByLookup(lookupMethod, "lib3mf_slicestack_getownpath"); + lib3mf_consumer_getconsumerid = loadFunctionByLookup(lookupMethod, "lib3mf_consumer_getconsumerid"); + lib3mf_consumer_getkeyid = loadFunctionByLookup(lookupMethod, "lib3mf_consumer_getkeyid"); + lib3mf_consumer_getkeyvalue = loadFunctionByLookup(lookupMethod, "lib3mf_consumer_getkeyvalue"); + lib3mf_accessright_getconsumer = loadFunctionByLookup(lookupMethod, "lib3mf_accessright_getconsumer"); + lib3mf_accessright_getwrappingalgorithm = loadFunctionByLookup(lookupMethod, "lib3mf_accessright_getwrappingalgorithm"); + lib3mf_accessright_getmgfalgorithm = loadFunctionByLookup(lookupMethod, "lib3mf_accessright_getmgfalgorithm"); + lib3mf_accessright_getdigestmethod = loadFunctionByLookup(lookupMethod, "lib3mf_accessright_getdigestmethod"); + lib3mf_contentencryptionparams_getencryptionalgorithm = loadFunctionByLookup(lookupMethod, "lib3mf_contentencryptionparams_getencryptionalgorithm"); + lib3mf_contentencryptionparams_getkey = loadFunctionByLookup(lookupMethod, "lib3mf_contentencryptionparams_getkey"); + lib3mf_contentencryptionparams_getinitializationvector = loadFunctionByLookup(lookupMethod, "lib3mf_contentencryptionparams_getinitializationvector"); + lib3mf_contentencryptionparams_getauthenticationtag = loadFunctionByLookup(lookupMethod, "lib3mf_contentencryptionparams_getauthenticationtag"); + lib3mf_contentencryptionparams_setauthenticationtag = loadFunctionByLookup(lookupMethod, "lib3mf_contentencryptionparams_setauthenticationtag"); + lib3mf_contentencryptionparams_getadditionalauthenticationdata = loadFunctionByLookup(lookupMethod, "lib3mf_contentencryptionparams_getadditionalauthenticationdata"); + lib3mf_contentencryptionparams_getdescriptor = loadFunctionByLookup(lookupMethod, "lib3mf_contentencryptionparams_getdescriptor"); + lib3mf_contentencryptionparams_getkeyuuid = loadFunctionByLookup(lookupMethod, "lib3mf_contentencryptionparams_getkeyuuid"); + lib3mf_resourcedata_getpath = loadFunctionByLookup(lookupMethod, "lib3mf_resourcedata_getpath"); + lib3mf_resourcedata_getencryptionalgorithm = loadFunctionByLookup(lookupMethod, "lib3mf_resourcedata_getencryptionalgorithm"); + lib3mf_resourcedata_getcompression = loadFunctionByLookup(lookupMethod, "lib3mf_resourcedata_getcompression"); + lib3mf_resourcedata_getadditionalauthenticationdata = loadFunctionByLookup(lookupMethod, "lib3mf_resourcedata_getadditionalauthenticationdata"); + lib3mf_resourcedatagroup_getkeyuuid = loadFunctionByLookup(lookupMethod, "lib3mf_resourcedatagroup_getkeyuuid"); + lib3mf_resourcedatagroup_addaccessright = loadFunctionByLookup(lookupMethod, "lib3mf_resourcedatagroup_addaccessright"); + lib3mf_resourcedatagroup_findaccessrightbyconsumer = loadFunctionByLookup(lookupMethod, "lib3mf_resourcedatagroup_findaccessrightbyconsumer"); + lib3mf_resourcedatagroup_removeaccessright = loadFunctionByLookup(lookupMethod, "lib3mf_resourcedatagroup_removeaccessright"); + lib3mf_keystore_addconsumer = loadFunctionByLookup(lookupMethod, "lib3mf_keystore_addconsumer"); + lib3mf_keystore_getconsumercount = loadFunctionByLookup(lookupMethod, "lib3mf_keystore_getconsumercount"); + lib3mf_keystore_getconsumer = loadFunctionByLookup(lookupMethod, "lib3mf_keystore_getconsumer"); + lib3mf_keystore_removeconsumer = loadFunctionByLookup(lookupMethod, "lib3mf_keystore_removeconsumer"); + lib3mf_keystore_findconsumer = loadFunctionByLookup(lookupMethod, "lib3mf_keystore_findconsumer"); + lib3mf_keystore_getresourcedatagroupcount = loadFunctionByLookup(lookupMethod, "lib3mf_keystore_getresourcedatagroupcount"); + lib3mf_keystore_addresourcedatagroup = loadFunctionByLookup(lookupMethod, "lib3mf_keystore_addresourcedatagroup"); + lib3mf_keystore_getresourcedatagroup = loadFunctionByLookup(lookupMethod, "lib3mf_keystore_getresourcedatagroup"); + lib3mf_keystore_removeresourcedatagroup = loadFunctionByLookup(lookupMethod, "lib3mf_keystore_removeresourcedatagroup"); + lib3mf_keystore_findresourcedatagroup = loadFunctionByLookup(lookupMethod, "lib3mf_keystore_findresourcedatagroup"); + lib3mf_keystore_addresourcedata = loadFunctionByLookup(lookupMethod, "lib3mf_keystore_addresourcedata"); + lib3mf_keystore_removeresourcedata = loadFunctionByLookup(lookupMethod, "lib3mf_keystore_removeresourcedata"); + lib3mf_keystore_findresourcedata = loadFunctionByLookup(lookupMethod, "lib3mf_keystore_findresourcedata"); + lib3mf_keystore_getresourcedatacount = loadFunctionByLookup(lookupMethod, "lib3mf_keystore_getresourcedatacount"); + lib3mf_keystore_getresourcedata = loadFunctionByLookup(lookupMethod, "lib3mf_keystore_getresourcedata"); + lib3mf_keystore_getuuid = loadFunctionByLookup(lookupMethod, "lib3mf_keystore_getuuid"); + lib3mf_keystore_setuuid = loadFunctionByLookup(lookupMethod, "lib3mf_keystore_setuuid"); + lib3mf_model_rootmodelpart = loadFunctionByLookup(lookupMethod, "lib3mf_model_rootmodelpart"); + lib3mf_model_findorcreatepackagepart = loadFunctionByLookup(lookupMethod, "lib3mf_model_findorcreatepackagepart"); + lib3mf_model_setunit = loadFunctionByLookup(lookupMethod, "lib3mf_model_setunit"); + lib3mf_model_getunit = loadFunctionByLookup(lookupMethod, "lib3mf_model_getunit"); + lib3mf_model_getlanguage = loadFunctionByLookup(lookupMethod, "lib3mf_model_getlanguage"); + lib3mf_model_setlanguage = loadFunctionByLookup(lookupMethod, "lib3mf_model_setlanguage"); + lib3mf_model_querywriter = loadFunctionByLookup(lookupMethod, "lib3mf_model_querywriter"); + lib3mf_model_queryreader = loadFunctionByLookup(lookupMethod, "lib3mf_model_queryreader"); + lib3mf_model_getresourcebyid = loadFunctionByLookup(lookupMethod, "lib3mf_model_getresourcebyid"); + lib3mf_model_gettexture2dbyid = loadFunctionByLookup(lookupMethod, "lib3mf_model_gettexture2dbyid"); + lib3mf_model_getpropertytypebyid = loadFunctionByLookup(lookupMethod, "lib3mf_model_getpropertytypebyid"); + lib3mf_model_getbasematerialgroupbyid = loadFunctionByLookup(lookupMethod, "lib3mf_model_getbasematerialgroupbyid"); + lib3mf_model_gettexture2dgroupbyid = loadFunctionByLookup(lookupMethod, "lib3mf_model_gettexture2dgroupbyid"); + lib3mf_model_getcompositematerialsbyid = loadFunctionByLookup(lookupMethod, "lib3mf_model_getcompositematerialsbyid"); + lib3mf_model_getmultipropertygroupbyid = loadFunctionByLookup(lookupMethod, "lib3mf_model_getmultipropertygroupbyid"); + lib3mf_model_getmeshobjectbyid = loadFunctionByLookup(lookupMethod, "lib3mf_model_getmeshobjectbyid"); + lib3mf_model_getcomponentsobjectbyid = loadFunctionByLookup(lookupMethod, "lib3mf_model_getcomponentsobjectbyid"); + lib3mf_model_getcolorgroupbyid = loadFunctionByLookup(lookupMethod, "lib3mf_model_getcolorgroupbyid"); + lib3mf_model_getslicestackbyid = loadFunctionByLookup(lookupMethod, "lib3mf_model_getslicestackbyid"); + lib3mf_model_getlevelsetbyid = loadFunctionByLookup(lookupMethod, "lib3mf_model_getlevelsetbyid"); + lib3mf_model_getbuilduuid = loadFunctionByLookup(lookupMethod, "lib3mf_model_getbuilduuid"); + lib3mf_model_setbuilduuid = loadFunctionByLookup(lookupMethod, "lib3mf_model_setbuilduuid"); + lib3mf_model_getbuilditems = loadFunctionByLookup(lookupMethod, "lib3mf_model_getbuilditems"); + lib3mf_model_getoutbox = loadFunctionByLookup(lookupMethod, "lib3mf_model_getoutbox"); + lib3mf_model_getresources = loadFunctionByLookup(lookupMethod, "lib3mf_model_getresources"); + lib3mf_model_getobjects = loadFunctionByLookup(lookupMethod, "lib3mf_model_getobjects"); + lib3mf_model_getmeshobjects = loadFunctionByLookup(lookupMethod, "lib3mf_model_getmeshobjects"); + lib3mf_model_getcomponentsobjects = loadFunctionByLookup(lookupMethod, "lib3mf_model_getcomponentsobjects"); + lib3mf_model_gettexture2ds = loadFunctionByLookup(lookupMethod, "lib3mf_model_gettexture2ds"); + lib3mf_model_getbasematerialgroups = loadFunctionByLookup(lookupMethod, "lib3mf_model_getbasematerialgroups"); + lib3mf_model_getcolorgroups = loadFunctionByLookup(lookupMethod, "lib3mf_model_getcolorgroups"); + lib3mf_model_gettexture2dgroups = loadFunctionByLookup(lookupMethod, "lib3mf_model_gettexture2dgroups"); + lib3mf_model_getcompositematerials = loadFunctionByLookup(lookupMethod, "lib3mf_model_getcompositematerials"); + lib3mf_model_getmultipropertygroups = loadFunctionByLookup(lookupMethod, "lib3mf_model_getmultipropertygroups"); + lib3mf_model_getslicestacks = loadFunctionByLookup(lookupMethod, "lib3mf_model_getslicestacks"); + lib3mf_model_getimage3ds = loadFunctionByLookup(lookupMethod, "lib3mf_model_getimage3ds"); + lib3mf_model_mergetomodel = loadFunctionByLookup(lookupMethod, "lib3mf_model_mergetomodel"); + lib3mf_model_mergefrommodel = loadFunctionByLookup(lookupMethod, "lib3mf_model_mergefrommodel"); + lib3mf_model_addmeshobject = loadFunctionByLookup(lookupMethod, "lib3mf_model_addmeshobject"); + lib3mf_model_addcomponentsobject = loadFunctionByLookup(lookupMethod, "lib3mf_model_addcomponentsobject"); + lib3mf_model_addslicestack = loadFunctionByLookup(lookupMethod, "lib3mf_model_addslicestack"); + lib3mf_model_addtexture2dfromattachment = loadFunctionByLookup(lookupMethod, "lib3mf_model_addtexture2dfromattachment"); + lib3mf_model_addbasematerialgroup = loadFunctionByLookup(lookupMethod, "lib3mf_model_addbasematerialgroup"); + lib3mf_model_addcolorgroup = loadFunctionByLookup(lookupMethod, "lib3mf_model_addcolorgroup"); + lib3mf_model_addtexture2dgroup = loadFunctionByLookup(lookupMethod, "lib3mf_model_addtexture2dgroup"); + lib3mf_model_addcompositematerials = loadFunctionByLookup(lookupMethod, "lib3mf_model_addcompositematerials"); + lib3mf_model_addmultipropertygroup = loadFunctionByLookup(lookupMethod, "lib3mf_model_addmultipropertygroup"); + lib3mf_model_addimagestack = loadFunctionByLookup(lookupMethod, "lib3mf_model_addimagestack"); + lib3mf_model_getimagestackbyid = loadFunctionByLookup(lookupMethod, "lib3mf_model_getimagestackbyid"); + lib3mf_model_addbuilditem = loadFunctionByLookup(lookupMethod, "lib3mf_model_addbuilditem"); + lib3mf_model_removebuilditem = loadFunctionByLookup(lookupMethod, "lib3mf_model_removebuilditem"); + lib3mf_model_getmetadatagroup = loadFunctionByLookup(lookupMethod, "lib3mf_model_getmetadatagroup"); + lib3mf_model_addattachment = loadFunctionByLookup(lookupMethod, "lib3mf_model_addattachment"); + lib3mf_model_removeattachment = loadFunctionByLookup(lookupMethod, "lib3mf_model_removeattachment"); + lib3mf_model_getattachment = loadFunctionByLookup(lookupMethod, "lib3mf_model_getattachment"); + lib3mf_model_findattachment = loadFunctionByLookup(lookupMethod, "lib3mf_model_findattachment"); + lib3mf_model_getattachmentcount = loadFunctionByLookup(lookupMethod, "lib3mf_model_getattachmentcount"); + lib3mf_model_haspackagethumbnailattachment = loadFunctionByLookup(lookupMethod, "lib3mf_model_haspackagethumbnailattachment"); + lib3mf_model_createpackagethumbnailattachment = loadFunctionByLookup(lookupMethod, "lib3mf_model_createpackagethumbnailattachment"); + lib3mf_model_getpackagethumbnailattachment = loadFunctionByLookup(lookupMethod, "lib3mf_model_getpackagethumbnailattachment"); + lib3mf_model_removepackagethumbnailattachment = loadFunctionByLookup(lookupMethod, "lib3mf_model_removepackagethumbnailattachment"); + lib3mf_model_addcustomcontenttype = loadFunctionByLookup(lookupMethod, "lib3mf_model_addcustomcontenttype"); + lib3mf_model_removecustomcontenttype = loadFunctionByLookup(lookupMethod, "lib3mf_model_removecustomcontenttype"); + lib3mf_model_setrandomnumbercallback = loadFunctionByLookup(lookupMethod, "lib3mf_model_setrandomnumbercallback"); + lib3mf_model_getkeystore = loadFunctionByLookup(lookupMethod, "lib3mf_model_getkeystore"); + lib3mf_model_getfunctions = loadFunctionByLookup(lookupMethod, "lib3mf_model_getfunctions"); + lib3mf_model_addimplicitfunction = loadFunctionByLookup(lookupMethod, "lib3mf_model_addimplicitfunction"); + lib3mf_model_addfunctionfromimage3d = loadFunctionByLookup(lookupMethod, "lib3mf_model_addfunctionfromimage3d"); + lib3mf_model_addvolumedata = loadFunctionByLookup(lookupMethod, "lib3mf_model_addvolumedata"); + lib3mf_model_addlevelset = loadFunctionByLookup(lookupMethod, "lib3mf_model_addlevelset"); + lib3mf_model_getlevelsets = loadFunctionByLookup(lookupMethod, "lib3mf_model_getlevelsets"); + lib3mf_model_removeresource = loadFunctionByLookup(lookupMethod, "lib3mf_model_removeresource"); + } + + protected void checkError(Base instance, int errorCode) throws Lib3MFException { + if (instance != null && instance.mWrapper != this) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDCAST, "invalid wrapper call"); + } + if (errorCode != Lib3MFException.LIB3MF_SUCCESS) { + if (instance != null) { + GetLastErrorResult result = getLastError(instance); + throw new Lib3MFException(errorCode, result.LastErrorString); + } else { + throw new Lib3MFException(errorCode, ""); + } + } + } + + private com.sun.jna.Function loadFunctionByLookup(com.sun.jna.Function lookupMethod, String functionName) throws Lib3MFException { + byte[] bytes = functionName.getBytes(StandardCharsets.UTF_8); + Memory name = new Memory(bytes.length+1); + name.write(0, bytes, 0, bytes.length); + name.setByte(bytes.length, (byte)0); + Pointer address = new Memory(8); + java.lang.Object[] addressParam = new java.lang.Object[]{name, address}; + checkError(null, lookupMethod.invokeInt(addressParam)); + return com.sun.jna.Function.getFunction(address.getPointer(0)); + } + + /** + * retrieves the binary version of this library. + * + * @return GetLibraryVersion Result Tuple + * @throws Lib3MFException + */ + public GetLibraryVersionResult getLibraryVersion() throws Lib3MFException { + Pointer bufferMajor = new Memory(4); + Pointer bufferMinor = new Memory(4); + Pointer bufferMicro = new Memory(4); + checkError(null, lib3mf_getlibraryversion.invokeInt(new java.lang.Object[]{bufferMajor, bufferMinor, bufferMicro})); + GetLibraryVersionResult returnTuple = new GetLibraryVersionResult(); + returnTuple.Major = bufferMajor.getInt(0); + returnTuple.Minor = bufferMinor.getInt(0); + returnTuple.Micro = bufferMicro.getInt(0); + return returnTuple; + } + + public static class GetLibraryVersionResult { + /** + * returns the major version of this library + */ + public int Major; + + /** + * returns the minor version of this library + */ + public int Minor; + + /** + * returns the micro version of this library + */ + public int Micro; + + } + /** + * retrieves prerelease information of this library. + * + * @return GetPrereleaseInformation Result Tuple + * @throws Lib3MFException + */ + public GetPrereleaseInformationResult getPrereleaseInformation() throws Lib3MFException { + Pointer bufferHasPrereleaseInfo = new Memory(1); + Pointer bytesNeededPrereleaseInfo = new Memory(4); + checkError(null, lib3mf_getprereleaseinformation.invokeInt(new java.lang.Object[]{bufferHasPrereleaseInfo, 0, bytesNeededPrereleaseInfo, null})); + int sizePrereleaseInfo = bytesNeededPrereleaseInfo.getInt(0); + Pointer bufferPrereleaseInfo = new Memory(sizePrereleaseInfo); + checkError(null, lib3mf_getprereleaseinformation.invokeInt(new java.lang.Object[]{bufferHasPrereleaseInfo, sizePrereleaseInfo, bytesNeededPrereleaseInfo, bufferPrereleaseInfo})); + GetPrereleaseInformationResult returnTuple = new GetPrereleaseInformationResult(); + returnTuple.HasPrereleaseInfo = bufferHasPrereleaseInfo.getByte(0) != 0; + returnTuple.PrereleaseInfo = new String(bufferPrereleaseInfo.getByteArray(0, sizePrereleaseInfo - 1), StandardCharsets.UTF_8); + return returnTuple; + } + + public static class GetPrereleaseInformationResult { + /** + * Does the library provide prerelease version? + */ + public boolean HasPrereleaseInfo; + + /** + * retrieves prerelease information of this library. + */ + public String PrereleaseInfo; + + } + /** + * retrieves build information of this library. + * + * @return GetBuildInformation Result Tuple + * @throws Lib3MFException + */ + public GetBuildInformationResult getBuildInformation() throws Lib3MFException { + Pointer bufferHasBuildInfo = new Memory(1); + Pointer bytesNeededBuildInformation = new Memory(4); + checkError(null, lib3mf_getbuildinformation.invokeInt(new java.lang.Object[]{bufferHasBuildInfo, 0, bytesNeededBuildInformation, null})); + int sizeBuildInformation = bytesNeededBuildInformation.getInt(0); + Pointer bufferBuildInformation = new Memory(sizeBuildInformation); + checkError(null, lib3mf_getbuildinformation.invokeInt(new java.lang.Object[]{bufferHasBuildInfo, sizeBuildInformation, bytesNeededBuildInformation, bufferBuildInformation})); + GetBuildInformationResult returnTuple = new GetBuildInformationResult(); + returnTuple.HasBuildInfo = bufferHasBuildInfo.getByte(0) != 0; + returnTuple.BuildInformation = new String(bufferBuildInformation.getByteArray(0, sizeBuildInformation - 1), StandardCharsets.UTF_8); + return returnTuple; + } + + public static class GetBuildInformationResult { + /** + * Does the library provide build version? + */ + public boolean HasBuildInfo; + + /** + * retrieves build information of this library. + */ + public String BuildInformation; + + } + /** + * retrieves whether a specification is supported, and if so, which version. + * + * @param specificationURL URL of extension to check + * @return GetSpecificationVersion Result Tuple + * @throws Lib3MFException + */ + public GetSpecificationVersionResult getSpecificationVersion(String specificationURL) throws Lib3MFException { + byte[] bytesSpecificationURL = specificationURL.getBytes(StandardCharsets.UTF_8); + Memory bufferSpecificationURL = new Memory(bytesSpecificationURL.length + 1); + bufferSpecificationURL.write(0, bytesSpecificationURL, 0, bytesSpecificationURL.length); + bufferSpecificationURL.setByte(bytesSpecificationURL.length, (byte)0); + Pointer bufferIsSupported = new Memory(1); + Pointer bufferMajor = new Memory(4); + Pointer bufferMinor = new Memory(4); + Pointer bufferMicro = new Memory(4); + checkError(null, lib3mf_getspecificationversion.invokeInt(new java.lang.Object[]{bufferSpecificationURL, bufferIsSupported, bufferMajor, bufferMinor, bufferMicro})); + GetSpecificationVersionResult returnTuple = new GetSpecificationVersionResult(); + returnTuple.IsSupported = bufferIsSupported.getByte(0) != 0; + returnTuple.Major = bufferMajor.getInt(0); + returnTuple.Minor = bufferMinor.getInt(0); + returnTuple.Micro = bufferMicro.getInt(0); + return returnTuple; + } + + public static class GetSpecificationVersionResult { + /** + * returns whether this specification is supported + */ + public boolean IsSupported; + + /** + * returns the major version of the extension (if IsSupported) + */ + public int Major; + + /** + * returns the minor version of the extension (if IsSupported) + */ + public int Minor; + + /** + * returns the micro version of the extension (if IsSupported) + */ + public int Micro; + + } + /** + * creates an empty model instance. + * + * @return returns an empty model instance + * @throws Lib3MFException + */ + public Model createModel() throws Lib3MFException { + Pointer bufferModel = new Memory(8); + checkError(null, lib3mf_createmodel.invokeInt(new java.lang.Object[]{bufferModel})); + Pointer valueModel = bufferModel.getPointer(0); + Model model = null; + if (valueModel == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Model was a null pointer"); + } + model = this.PolymorphicFactory(valueModel, Model.class); + return model; + } + + /** + * releases shared ownership of an object instance + * + * @param instance the object instance to release + * @throws Lib3MFException + */ + public void release(Base instance) throws Lib3MFException { + Pointer instanceHandle = null; + if (instance != null) { + instanceHandle = instance.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Instance is a null value."); + } + checkError(null, lib3mf_release.invokeInt(new java.lang.Object[]{instanceHandle})); + } + + /** + * acquires shared ownership of an object instance + * + * @param instance the object instance to acquire + * @throws Lib3MFException + */ + public void acquire(Base instance) throws Lib3MFException { + Pointer instanceHandle = null; + if (instance != null) { + instanceHandle = instance.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Instance is a null value."); + } + checkError(null, lib3mf_acquire.invokeInt(new java.lang.Object[]{instanceHandle})); + } + + /** + * Sets the journal file path + * + * @param journalPath File name of the journal file + * @throws Lib3MFException + */ + public void setJournal(String journalPath) throws Lib3MFException { + byte[] bytesJournalPath = journalPath.getBytes(StandardCharsets.UTF_8); + Memory bufferJournalPath = new Memory(bytesJournalPath.length + 1); + bufferJournalPath.write(0, bytesJournalPath, 0, bytesJournalPath.length); + bufferJournalPath.setByte(bytesJournalPath.length, (byte)0); + checkError(null, lib3mf_setjournal.invokeInt(new java.lang.Object[]{bufferJournalPath})); + } + + /** + * Retrieves the last error string of an instance + * + * @param instance Object where the error occured. + * @return GetLastError Result Tuple + * @throws Lib3MFException + */ + public GetLastErrorResult getLastError(Base instance) throws Lib3MFException { + Pointer instanceHandle = null; + if (instance != null) { + instanceHandle = instance.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Instance is a null value."); + } + Pointer bytesNeededLastErrorString = new Memory(4); + Pointer bufferHasLastError = new Memory(1); + checkError(null, lib3mf_getlasterror.invokeInt(new java.lang.Object[]{instanceHandle, 0, bytesNeededLastErrorString, null, bufferHasLastError})); + int sizeLastErrorString = bytesNeededLastErrorString.getInt(0); + Pointer bufferLastErrorString = new Memory(sizeLastErrorString); + checkError(null, lib3mf_getlasterror.invokeInt(new java.lang.Object[]{instanceHandle, sizeLastErrorString, bytesNeededLastErrorString, bufferLastErrorString, bufferHasLastError})); + GetLastErrorResult returnTuple = new GetLastErrorResult(); + returnTuple.LastErrorString = new String(bufferLastErrorString.getByteArray(0, sizeLastErrorString - 1), StandardCharsets.UTF_8); + returnTuple.HasLastError = bufferHasLastError.getByte(0) != 0; + return returnTuple; + } + + public static class GetLastErrorResult { + /** + * Last Error String + */ + public String LastErrorString; + + /** + * Returns if the instance has a last error. + */ + public boolean HasLastError; + + } + /** + * Returns the address of the SymbolLookupMethod + * + * @return Address of the SymbolAddressMethod + * @throws Lib3MFException + */ + public Pointer getSymbolLookupMethod() throws Lib3MFException { + Pointer bufferSymbolLookupMethod = new Memory(8); + checkError(null, lib3mf_getsymbollookupmethod.invokeInt(new java.lang.Object[]{bufferSymbolLookupMethod})); + return bufferSymbolLookupMethod.getPointer(0); + } + + /** + * Return an English text for a progress identifier.|Note: this is the only function you can call from your callback function. + * + * @param theProgressIdentifier the progress identifier that is passed to the callback function + * @return English text for the progress identifier + * @throws Lib3MFException + */ + public String retrieveProgressMessage(Lib3MFWrapper.ProgressIdentifier theProgressIdentifier) throws Lib3MFException { + Pointer bytesNeededProgressMessage = new Memory(4); + checkError(null, lib3mf_retrieveprogressmessage.invokeInt(new java.lang.Object[]{Lib3MFWrapper.EnumConversion.convertProgressIdentifierToConst(theProgressIdentifier), 0, bytesNeededProgressMessage, null})); + int sizeProgressMessage = bytesNeededProgressMessage.getInt(0); + Pointer bufferProgressMessage = new Memory(sizeProgressMessage); + checkError(null, lib3mf_retrieveprogressmessage.invokeInt(new java.lang.Object[]{Lib3MFWrapper.EnumConversion.convertProgressIdentifierToConst(theProgressIdentifier), sizeProgressMessage, bytesNeededProgressMessage, bufferProgressMessage})); + return new String(bufferProgressMessage.getByteArray(0, sizeProgressMessage - 1), StandardCharsets.UTF_8); + } + + /** + * Creates a Color from uint8 RGBA values + * + * @param red Red value of color (0-255) + * @param green Green value of color (0-255) + * @param blue Blue value of color (0-255) + * @param alpha Alpha value of color (0-255) + * @return Assembled color + * @throws Lib3MFException + */ + public Color rGBAToColor(byte red, byte green, byte blue, byte alpha) throws Lib3MFException { + Pointer bufferTheColor = new Memory(Color.SIZE); + checkError(null, lib3mf_rgbatocolor.invokeInt(new java.lang.Object[]{red, green, blue, alpha, bufferTheColor})); + Color theColor = new Color(); + theColor.readFromPointer(bufferTheColor, 0); + return theColor; + } + + /** + * Creates a Color from uint8 RGBA values + * + * @param red Red value of color (0-1) + * @param green Green value of color (0-1) + * @param blue Blue value of color (0-1) + * @param alpha Alpha value of color (0-1) + * @return Assembled color + * @throws Lib3MFException + */ + public Color floatRGBAToColor(float red, float green, float blue, float alpha) throws Lib3MFException { + Pointer bufferTheColor = new Memory(Color.SIZE); + checkError(null, lib3mf_floatrgbatocolor.invokeInt(new java.lang.Object[]{red, green, blue, alpha, bufferTheColor})); + Color theColor = new Color(); + theColor.readFromPointer(bufferTheColor, 0); + return theColor; + } + + /** + * Calculates uint8-RGBA-values from a Color + * + * @param theColor Color to handle + * @return ColorToRGBA Result Tuple + * @throws Lib3MFException + */ + public ColorToRGBAResult colorToRGBA(Color theColor) throws Lib3MFException { + Pointer bufferTheColor = new Memory(Color.SIZE); + theColor.writeToPointer(bufferTheColor, 0); + Pointer bufferRed = new Memory(1); + Pointer bufferGreen = new Memory(1); + Pointer bufferBlue = new Memory(1); + Pointer bufferAlpha = new Memory(1); + checkError(null, lib3mf_colortorgba.invokeInt(new java.lang.Object[]{bufferTheColor, bufferRed, bufferGreen, bufferBlue, bufferAlpha})); + ColorToRGBAResult returnTuple = new ColorToRGBAResult(); + returnTuple.Red = bufferRed.getByte(0); + returnTuple.Green = bufferGreen.getByte(0); + returnTuple.Blue = bufferBlue.getByte(0); + returnTuple.Alpha = bufferAlpha.getByte(0); + return returnTuple; + } + + public static class ColorToRGBAResult { + /** + * Red value of color (0-255) + */ + public byte Red; + + /** + * Green value of color (0-255) + */ + public byte Green; + + /** + * Blue value of color (0-255) + */ + public byte Blue; + + /** + * Alpha value of color (0-255) + */ + public byte Alpha; + + } + /** + * Calculates float-RGBA-values from a Color + * + * @param theColor Color to handle + * @return ColorToFloatRGBA Result Tuple + * @throws Lib3MFException + */ + public ColorToFloatRGBAResult colorToFloatRGBA(Color theColor) throws Lib3MFException { + Pointer bufferTheColor = new Memory(Color.SIZE); + theColor.writeToPointer(bufferTheColor, 0); + Pointer bufferRed = new Memory(4); + Pointer bufferGreen = new Memory(4); + Pointer bufferBlue = new Memory(4); + Pointer bufferAlpha = new Memory(4); + checkError(null, lib3mf_colortofloatrgba.invokeInt(new java.lang.Object[]{bufferTheColor, bufferRed, bufferGreen, bufferBlue, bufferAlpha})); + ColorToFloatRGBAResult returnTuple = new ColorToFloatRGBAResult(); + returnTuple.Red = bufferRed.getFloat(0); + returnTuple.Green = bufferGreen.getFloat(0); + returnTuple.Blue = bufferBlue.getFloat(0); + returnTuple.Alpha = bufferAlpha.getFloat(0); + return returnTuple; + } + + public static class ColorToFloatRGBAResult { + /** + * Red value of color (0-1) + */ + public float Red; + + /** + * Green value of color (0-1) + */ + public float Green; + + /** + * Blue value of color (0-1) + */ + public float Blue; + + /** + * Alpha value of color (0-1) + */ + public float Alpha; + + } + /** + * Creates an identity transform + * + * @return Transformation matrix. + * @throws Lib3MFException + */ + public Transform getIdentityTransform() throws Lib3MFException { + Pointer bufferTransform = new Memory(Transform.SIZE); + checkError(null, lib3mf_getidentitytransform.invokeInt(new java.lang.Object[]{bufferTransform})); + Transform transform = new Transform(); + transform.readFromPointer(bufferTransform, 0); + return transform; + } + + /** + * Creates a uniform scale transform + * + * @param factor Factor in X, Y and Z + * @return Transformation matrix. + * @throws Lib3MFException + */ + public Transform getUniformScaleTransform(float factor) throws Lib3MFException { + Pointer bufferTransform = new Memory(Transform.SIZE); + checkError(null, lib3mf_getuniformscaletransform.invokeInt(new java.lang.Object[]{factor, bufferTransform})); + Transform transform = new Transform(); + transform.readFromPointer(bufferTransform, 0); + return transform; + } + + /** + * Creates a scale transform + * + * @param factorX Factor in X + * @param factorY Factor in Y + * @param factorZ Factor in Z + * @return Transformation matrix. + * @throws Lib3MFException + */ + public Transform getScaleTransform(float factorX, float factorY, float factorZ) throws Lib3MFException { + Pointer bufferTransform = new Memory(Transform.SIZE); + checkError(null, lib3mf_getscaletransform.invokeInt(new java.lang.Object[]{factorX, factorY, factorZ, bufferTransform})); + Transform transform = new Transform(); + transform.readFromPointer(bufferTransform, 0); + return transform; + } + + /** + * Creates an translation transform + * + * @param vectorX Translation in X + * @param vectorY Translation in Y + * @param vectorZ Translation in Z + * @return Transformation matrix. + * @throws Lib3MFException + */ + public Transform getTranslationTransform(float vectorX, float vectorY, float vectorZ) throws Lib3MFException { + Pointer bufferTransform = new Memory(Transform.SIZE); + checkError(null, lib3mf_gettranslationtransform.invokeInt(new java.lang.Object[]{vectorX, vectorY, vectorZ, bufferTransform})); + Transform transform = new Transform(); + transform.readFromPointer(bufferTransform, 0); + return transform; + } + + /** + * IMPORTANT: PolymorphicFactory method should not be used by application directly. + * It's designed to be used on Lib3MFHandle object only once. + * If it's used on any existing object as a form of dynamic cast then + * Lib3MFWrapper::acquireInstance(Base object) must be called after instantiating new object. + * This is important to keep reference count matching between application and library sides. + */ + public T PolymorphicFactory(Pointer handle, Class cls) { + if (handle == Pointer.NULL) + return null; + Class[] cArg = new Class[2]; + cArg[0] = Lib3MFWrapper.class; + cArg[1] = Pointer.class; + + try { + T obj = null; + Pointer bufferClassTypeId = new Memory(8); + checkError(null, lib3mf_base_classtypeid.invokeInt(new java.lang.Object[]{handle, bufferClassTypeId})); + long classTypeId = bufferClassTypeId.getLong(0); + + int msbId = (int)(classTypeId >> 32); + int lsbId = (int)classTypeId; + switch(msbId) { + case 0x0070021D: + switch(lsbId) { + case 0x73AA89FD: obj = (T)(new LogNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::LogNode" + } + break; + case 0x0437E27A: + switch(lsbId) { + case 0xEF740121: obj = (T)(new FunctionGradientNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionGradientNode" + } + break; + case 0x073F9103: + switch(lsbId) { + case 0x81BF250D: obj = (T)(new MaxNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::MaxNode" + } + break; + case 0x0765C17C: + switch(lsbId) { + case 0x952F24E3: obj = (T)(new FunctionCallNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionCallNode" + } + break; + case 0x0C3B8536: + switch(lsbId) { + case 0x9E9B25D3: obj = (T)(new MetaDataGroup(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::MetaDataGroup" + } + break; + case 0x0DCBEAFC: + switch(lsbId) { + case 0xF83F3AAC: obj = (T)(new MatrixFromColumnsNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::MatrixFromColumnsNode" + } + break; + case 0x0E55A826: + switch(lsbId) { + case 0xD377483E: obj = (T)(new PackagePart(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::PackagePart" + } + break; + case 0x0F3A4EE9: + switch(lsbId) { + case 0x8F7FEC0C: obj = (T)(new BeamLatticeNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::BeamLatticeNode" + } + break; + case 0x10274A17: + switch(lsbId) { + case 0x57C729C0: obj = (T)(new ColorGroupIterator(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ColorGroupIterator" + } + break; + case 0x106182D3: + switch(lsbId) { + case 0x8CA5CFE3: obj = (T)(new CrossNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::CrossNode" + } + break; + case 0x1127ED71: + switch(lsbId) { + case 0xE05A9BD4: obj = (T)(new SelectNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::SelectNode" + } + break; + case 0x13A2561F: + switch(lsbId) { + case 0x0CFB712A: obj = (T)(new ImageStack(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ImageStack" + } + break; + case 0x1A47A5E2: + switch(lsbId) { + case 0x58E22EF9: obj = (T)(new ResourceData(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ResourceData" + } + break; + case 0x1CC9E0CC: + switch(lsbId) { + case 0x082253C6: obj = (T)(new KeyStore(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::KeyStore" + } + break; + case 0x1EF703D2: + switch(lsbId) { + case 0x98223F2A: obj = (T)(new FmodNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::FmodNode" + } + break; + case 0x2198BCF4: + switch(lsbId) { + case 0xD8DF9C40: obj = (T)(new Slice(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Slice" + } + break; + case 0x241FE6B4: + switch(lsbId) { + case 0x817C3FE4: obj = (T)(new MaterialMapping(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::MaterialMapping" + } + break; + case 0x2614CC57: + switch(lsbId) { + case 0x2AF350B7: obj = (T)(new TanNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::TanNode" + } + break; + case 0x29985A62: + switch(lsbId) { + case 0x8251A9CD: obj = (T)(new UnsignedMeshNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::UnsignedMeshNode" + } + break; + case 0x2D86831D: + switch(lsbId) { + case 0xA59FBE72: obj = (T)(new Reader(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Reader" + } + break; + case 0x2DA2136F: + switch(lsbId) { + case 0x577A779C: obj = (T)(new Object(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Object" + } + break; + case 0x2E417B93: + switch(lsbId) { + case 0x351375E2: obj = (T)(new VectorFromScalarNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::VectorFromScalarNode" + } + break; + case 0x30CCDBE9: + switch(lsbId) { + case 0x0E00B55B: obj = (T)(new BeamSet(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::BeamSet" + } + break; + case 0x30D55F4D: + switch(lsbId) { + case 0xB88FE0CA: obj = (T)(new Texture2DGroupIterator(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2DGroupIterator" + } + break; + case 0x3390243A: + switch(lsbId) { + case 0x8E2410F3: obj = (T)(new ExpNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ExpNode" + } + break; + case 0x385C42FC: + switch(lsbId) { + case 0x5609498A: obj = (T)(new AccessRight(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::AccessRight" + } + break; + case 0x392A0F4C: + switch(lsbId) { + case 0x041D249C: obj = (T)(new FloorNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::FloorNode" + } + break; + case 0x3B3A6DC6: + switch(lsbId) { + case 0xEC610497: obj = (T)(new MeshObject(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::MeshObject" + } + break; + case 0x3C7756A4: + switch(lsbId) { + case 0x56F2D089: obj = (T)(new SinhNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::SinhNode" + } + break; + case 0x3F8E5D08: + switch(lsbId) { + case 0x2F966B1B: obj = (T)(new ConstantNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ConstantNode" + } + break; + case 0x40E90353: + switch(lsbId) { + case 0x63ACE65E: obj = (T)(new FunctionIterator(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionIterator" + } + break; + case 0x460F3515: + switch(lsbId) { + case 0xE2621DBE: obj = (T)(new ResourceIterator(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ResourceIterator" + } + break; + case 0x46F1DAC4: + switch(lsbId) { + case 0x0581B304: obj = (T)(new VolumeDataComposite(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::VolumeDataComposite" + } + break; + case 0x49C24B88: + switch(lsbId) { + case 0x40C01F7E: obj = (T)(new ComposeVectorNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ComposeVectorNode" + } + break; + case 0x4A993F91: + switch(lsbId) { + case 0xE1DE256D: obj = (T)(new CoshNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::CoshNode" + } + break; + case 0x4BD32B48: + switch(lsbId) { + case 0x70FFC03B: obj = (T)(new Texture2DIterator(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2DIterator" + } + break; + case 0x4DF17E76: + switch(lsbId) { + case 0x926221C2: obj = (T)(new FunctionReference(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionReference" + } + break; + case 0x4ECDB6A6: + switch(lsbId) { + case 0xF69F2BEB: obj = (T)(new Component(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Component" + } + break; + case 0x52F06268: + switch(lsbId) { + case 0xCD098EFE: obj = (T)(new Iterator(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Iterator" + } + break; + case 0x53601FD4: + switch(lsbId) { + case 0x32E3DEF4: obj = (T)(new MeshNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::MeshNode" + } + break; + case 0x53E62FD6: + switch(lsbId) { + case 0x7F4D9A65: obj = (T)(new FractNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::FractNode" + } + break; + case 0x564DE421: + switch(lsbId) { + case 0x7ED7614A: obj = (T)(new ComponentsObjectIterator(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ComponentsObjectIterator" + } + break; + case 0x57A22369: + switch(lsbId) { + case 0x98DF5248: obj = (T)(new AdditionNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::AdditionNode" + } + break; + case 0x5950BB3E: + switch(lsbId) { + case 0xE8A82090: obj = (T)(new TriangleSet(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::TriangleSet" + } + break; + case 0x59BC328F: + switch(lsbId) { + case 0x6FB5C5FF: obj = (T)(new CosNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::CosNode" + } + break; + case 0x5A8164EC: + switch(lsbId) { + case 0xEDB03F09: obj = (T)(new Model(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Model" + } + break; + case 0x6079B12F: + switch(lsbId) { + case 0xFF345D02: obj = (T)(new SubtractionNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::SubtractionNode" + } + break; + case 0x627E2116: + switch(lsbId) { + case 0x53E11D93: obj = (T)(new CeilNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::CeilNode" + } + break; + case 0x63B3B461: + switch(lsbId) { + case 0xB30B4BA5: obj = (T)(new BeamLattice(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::BeamLattice" + } + break; + case 0x6522CF04: + switch(lsbId) { + case 0xEB283FED: obj = (T)(new ComponentsObject(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ComponentsObject" + } + break; + case 0x6594B031: + switch(lsbId) { + case 0xB6096238: obj = (T)(new SliceStack(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::SliceStack" + } + break; + case 0x65E6EDD9: + switch(lsbId) { + case 0x362C79CB: obj = (T)(new BaseMaterialGroupIterator(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::BaseMaterialGroupIterator" + } + break; + case 0x68FB2D5F: + switch(lsbId) { + case 0xFC4BA12A: obj = (T)(new BuildItem(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::BuildItem" + } + break; + case 0x69684DB9: + switch(lsbId) { + case 0x9FA813F6: obj = (T)(new SliceStackIterator(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::SliceStackIterator" + } + break; + case 0x6B641C70: + switch(lsbId) { + case 0x60040BE3: obj = (T)(new AbsNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::AbsNode" + } + break; + case 0x6CE54469: + switch(lsbId) { + case 0xEEA83BC1: obj = (T)(new ImplicitFunction(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ImplicitFunction" + } + break; + case 0x7570C43B: + switch(lsbId) { + case 0x9721D0C0: obj = (T)(new MatVecMultiplicationNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::MatVecMultiplicationNode" + } + break; + case 0x7700AA17: + switch(lsbId) { + case 0xCA1AC0F8: obj = (T)(new PowNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::PowNode" + } + break; + case 0x77AF68C9: + switch(lsbId) { + case 0x71B1485F: obj = (T)(new ClampNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ClampNode" + } + break; + case 0x7DE3951B: + switch(lsbId) { + case 0xA4C1064C: obj = (T)(new TwoInputNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::TwoInputNode" + } + break; + case 0x7FB36B91: + switch(lsbId) { + case 0xD4CE4671: obj = (T)(new ContentEncryptionParams(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ContentEncryptionParams" + } + break; + case 0x817D2E56: + switch(lsbId) { + case 0x6E73AA8F: obj = (T)(new NormalizeDistanceNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::NormalizeDistanceNode" + } + break; + case 0x846AFDE9: + switch(lsbId) { + case 0xA091E997: obj = (T)(new MinNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::MinNode" + } + break; + case 0x856632D0: + switch(lsbId) { + case 0xBAF1D8B7: obj = (T)(new Base(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Base" + } + break; + case 0x87740AD5: + switch(lsbId) { + case 0x3454E0DF: obj = (T)(new Log10Node(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Log10Node" + } + break; + case 0x8A45165E: + switch(lsbId) { + case 0x6C9646D7: obj = (T)(new SignNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::SignNode" + } + break; + case 0x8CE7A119: + switch(lsbId) { + case 0x1A63A35D: obj = (T)(new Attachment(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Attachment" + } + break; + case 0x9200586F: + switch(lsbId) { + case 0xB91587A7: obj = (T)(new VolumeData(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::VolumeData" + } + break; + case 0x943AF6AE: + switch(lsbId) { + case 0x0EFD2B8A: obj = (T)(new ArcCosNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ArcCosNode" + } + break; + case 0x9BD7D3C2: + switch(lsbId) { + case 0x026B8CE8: obj = (T)(new FunctionFromImage3D(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionFromImage3D" + } + break; + case 0x9C9363B3: + switch(lsbId) { + case 0xF708D556: obj = (T)(new ConstVecNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ConstVecNode" + } + break; + case 0x9EF9EB54: + switch(lsbId) { + case 0xA53AA40D: obj = (T)(new ComposeMatrixNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ComposeMatrixNode" + } + break; + case 0x9EFB2757: + switch(lsbId) { + case 0xCA1A5231: obj = (T)(new Function(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Function" + } + break; + case 0x9F831944: + switch(lsbId) { + case 0xA3DE31DA: obj = (T)(new SqrtNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::SqrtNode" + } + break; + case 0xA0C005C0: + switch(lsbId) { + case 0x35D5371D: obj = (T)(new LevelSetIterator(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::LevelSetIterator" + } + break; + case 0xA3C27CF5: + switch(lsbId) { + case 0x4C2AA76C: obj = (T)(new MultiplicationNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::MultiplicationNode" + } + break; + case 0xA7D21BD3: + switch(lsbId) { + case 0x64910860: obj = (T)(new BuildItemIterator(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::BuildItemIterator" + } + break; + case 0xA808B759: + switch(lsbId) { + case 0x9C158CE6: obj = (T)(new TransposeNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::TransposeNode" + } + break; + case 0xA99CC6C3: + switch(lsbId) { + case 0xF70FB6F9: obj = (T)(new CompositeMaterialsIterator(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::CompositeMaterialsIterator" + } + break; + case 0xB19B9FDA: + switch(lsbId) { + case 0x94B0A5E7: obj = (T)(new OneInputNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::OneInputNode" + } + break; + case 0xB27D4656: + switch(lsbId) { + case 0xE16609FA: obj = (T)(new BaseMaterialGroup(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::BaseMaterialGroup" + } + break; + case 0xB6153EF5: + switch(lsbId) { + case 0xDE7E5E11: obj = (T)(new ArcTan2Node(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ArcTan2Node" + } + break; + case 0xB896B641: + switch(lsbId) { + case 0x3C08CF39: obj = (T)(new DivisionNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::DivisionNode" + } + break; + case 0xB989E02E: + switch(lsbId) { + case 0x43158FE6: obj = (T)(new MultiPropertyGroup(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::MultiPropertyGroup" + } + break; + case 0xBC120839: + switch(lsbId) { + case 0x7E37055D: obj = (T)(new Texture2DGroup(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2DGroup" + } + break; + case 0xBD938FF2: + switch(lsbId) { + case 0xD2663D61: obj = (T)(new Image3D(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Image3D" + } + break; + case 0xC2BDF5D8: + switch(lsbId) { + case 0xCBBDB1F0: obj = (T)(new MultiPropertyGroupIterator(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::MultiPropertyGroupIterator" + } + break; + case 0xC4B8EC00: + switch(lsbId) { + case 0xA82BF336: obj = (T)(new Image3DIterator(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Image3DIterator" + } + break; + case 0xC62268F2: + switch(lsbId) { + case 0xD7C7012C: obj = (T)(new ImplicitPortIterator(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ImplicitPortIterator" + } + break; + case 0xCA86A77C: + switch(lsbId) { + case 0x71CD3FAE: obj = (T)(new ResourceIdNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ResourceIdNode" + } + break; + case 0xCC4F8D56: + switch(lsbId) { + case 0x1CCE35D4: obj = (T)(new DecomposeVectorNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::DecomposeVectorNode" + } + break; + case 0xCE16224D: + switch(lsbId) { + case 0x688B86F2: obj = (T)(new CompositeMaterials(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::CompositeMaterials" + } + break; + case 0xCF077B19: + switch(lsbId) { + case 0xB0B78E9D: obj = (T)(new TanhNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::TanhNode" + } + break; + case 0xD085FB2E: + switch(lsbId) { + case 0x49CDB5B1: obj = (T)(new ColorGroup(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ColorGroup" + } + break; + case 0xD17716D0: + switch(lsbId) { + case 0x63DE2C22: obj = (T)(new MetaData(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::MetaData" + } + break; + case 0xD5906722: + switch(lsbId) { + case 0x7E428AA4: obj = (T)(new ResourceDataGroup(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ResourceDataGroup" + } + break; + case 0xD5AEA50A: + switch(lsbId) { + case 0x56306722: obj = (T)(new SinNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::SinNode" + } + break; + case 0xD5C49B04: + switch(lsbId) { + case 0xAF1963CD: obj = (T)(new ImplicitPort(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ImplicitPort" + } + break; + case 0xD6DFD0A7: + switch(lsbId) { + case 0xEB64AC33: obj = (T)(new MatrixFromRowsNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::MatrixFromRowsNode" + } + break; + case 0xD85889E2: + switch(lsbId) { + case 0x739A74B1: obj = (T)(new LengthNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::LengthNode" + } + break; + case 0xD85B5B61: + switch(lsbId) { + case 0x43E787E3: obj = (T)(new VolumeDataColor(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::VolumeDataColor" + } + break; + case 0xD9E46D5E: + switch(lsbId) { + case 0x6D8118EE: obj = (T)(new Consumer(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Consumer" + } + break; + case 0xD9F5A53C: + switch(lsbId) { + case 0x657765AE: obj = (T)(new RoundNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::RoundNode" + } + break; + case 0xDE92510B: + switch(lsbId) { + case 0xD2112288: obj = (T)(new ObjectIterator(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ObjectIterator" + } + break; + case 0xDFE3889D: + switch(lsbId) { + case 0x1B269CBB: obj = (T)(new Resource(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Resource" + } + break; + case 0xE0441CF9: + switch(lsbId) { + case 0x76B36319: obj = (T)(new Texture2D(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2D" + } + break; + case 0xE47D5476: + switch(lsbId) { + case 0x15816BAD: obj = (T)(new ArcTanNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ArcTanNode" + } + break; + case 0xE554C8A7: + switch(lsbId) { + case 0xE72AAF4D: obj = (T)(new ArcSinNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ArcSinNode" + } + break; + case 0xE72592A7: + switch(lsbId) { + case 0x725AB29B: obj = (T)(new ImplicitNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ImplicitNode" + } + break; + case 0xE76F642F: + switch(lsbId) { + case 0x363FD7E9: obj = (T)(new Writer(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Writer" + } + break; + case 0xE8601F66: + switch(lsbId) { + case 0xA23A0540: obj = (T)(new InverseNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::InverseNode" + } + break; + case 0xE8A7D9C1: + switch(lsbId) { + case 0x92EFD0E2: obj = (T)(new LevelSet(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::LevelSet" + } + break; + case 0xE8C0ABF7: + switch(lsbId) { + case 0xC5DC7068: obj = (T)(new Log2Node(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::Log2Node" + } + break; + case 0xEA573358: + switch(lsbId) { + case 0x49379F22: obj = (T)(new ModNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ModNode" + } + break; + case 0xF4196034: + switch(lsbId) { + case 0xE2B9FDE6: obj = (T)(new MeshObjectIterator(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::MeshObjectIterator" + } + break; + case 0xF85C90ED: + switch(lsbId) { + case 0xCE6F90A4: obj = (T)(new ConstMatNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::ConstMatNode" + } + break; + case 0xFC006BC8: + switch(lsbId) { + case 0x88CAB4D0: obj = (T)(new NodeIterator(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::NodeIterator" + } + break; + case 0xFC368AA4: + switch(lsbId) { + case 0x4ACE42DA: obj = (T)(new VolumeDataProperty(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::VolumeDataProperty" + } + break; + case 0xFE60932A: + switch(lsbId) { + case 0x66375FAD: obj = (T)(new DotNode(this, handle)); break; // First 64 bits of SHA1 of a string: "Lib3MF::DotNode" + } + break; + default: obj = cls.getDeclaredConstructor(cArg).newInstance(this, handle); break; + } + return obj; + } + catch(Exception e) { + return null; + } + } +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/Log10Node.java b/Autogenerated/Bindings/Java9/lib3mf/Log10Node.java new file mode 100644 index 000000000..8c051ae41 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/Log10Node.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Log10Node extends OneInputNode { + + public Log10Node(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/Log2Node.java b/Autogenerated/Bindings/Java9/lib3mf/Log2Node.java new file mode 100644 index 000000000..a940b14ba --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/Log2Node.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Log2Node extends OneInputNode { + + public Log2Node(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/LogNode.java b/Autogenerated/Bindings/Java9/lib3mf/LogNode.java new file mode 100644 index 000000000..dd1e84757 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/LogNode.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class LogNode extends OneInputNode { + + public LogNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/MatVecMultiplicationNode.java b/Autogenerated/Bindings/Java9/lib3mf/MatVecMultiplicationNode.java new file mode 100644 index 000000000..dc0ae5de2 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/MatVecMultiplicationNode.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class MatVecMultiplicationNode extends TwoInputNode { + + public MatVecMultiplicationNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/MaterialMapping.java b/Autogenerated/Bindings/Java9/lib3mf/MaterialMapping.java new file mode 100644 index 000000000..c7a1c135e --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/MaterialMapping.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class MaterialMapping extends FunctionReference { + + public MaterialMapping(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/Matrix4x4.java b/Autogenerated/Bindings/Java9/lib3mf/Matrix4x4.java new file mode 100644 index 000000000..f2edb51bb --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/Matrix4x4.java @@ -0,0 +1,89 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Memory; +import com.sun.jna.Pointer; + +import java.util.Arrays; +import java.util.List; + +public class Matrix4x4 { + + public double[][] Field = new double[4][4]; + + public static final int SIZE = 128; + + public void readFromPointer(Pointer p, long offset) { + Field[0][0] = p.getDouble(offset + 0); + Field[0][1] = p.getDouble(offset + 8); + Field[0][2] = p.getDouble(offset + 16); + Field[0][3] = p.getDouble(offset + 24); + Field[1][0] = p.getDouble(offset + 32); + Field[1][1] = p.getDouble(offset + 40); + Field[1][2] = p.getDouble(offset + 48); + Field[1][3] = p.getDouble(offset + 56); + Field[2][0] = p.getDouble(offset + 64); + Field[2][1] = p.getDouble(offset + 72); + Field[2][2] = p.getDouble(offset + 80); + Field[2][3] = p.getDouble(offset + 88); + Field[3][0] = p.getDouble(offset + 96); + Field[3][1] = p.getDouble(offset + 104); + Field[3][2] = p.getDouble(offset + 112); + Field[3][3] = p.getDouble(offset + 120); + } + + public void writeToPointer(Pointer p, long offset) { + p.setDouble(offset + 0, Field[0][0]); + p.setDouble(offset + 8, Field[0][1]); + p.setDouble(offset + 16, Field[0][2]); + p.setDouble(offset + 24, Field[0][3]); + p.setDouble(offset + 32, Field[1][0]); + p.setDouble(offset + 40, Field[1][1]); + p.setDouble(offset + 48, Field[1][2]); + p.setDouble(offset + 56, Field[1][3]); + p.setDouble(offset + 64, Field[2][0]); + p.setDouble(offset + 72, Field[2][1]); + p.setDouble(offset + 80, Field[2][2]); + p.setDouble(offset + 88, Field[2][3]); + p.setDouble(offset + 96, Field[3][0]); + p.setDouble(offset + 104, Field[3][1]); + p.setDouble(offset + 112, Field[3][2]); + p.setDouble(offset + 120, Field[3][3]); + } + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/MatrixFromColumnsNode.java b/Autogenerated/Bindings/Java9/lib3mf/MatrixFromColumnsNode.java new file mode 100644 index 000000000..176632286 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/MatrixFromColumnsNode.java @@ -0,0 +1,147 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class MatrixFromColumnsNode extends ImplicitNode { + + public MatrixFromColumnsNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the input for the first column + * + * @return the input for the first column + * @throws Lib3MFException + */ + public ImplicitPort getInputA() throws Lib3MFException { + Pointer bufferColumn0 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_matrixfromcolumnsnode_getinputa.invokeInt(new java.lang.Object[]{mHandle, bufferColumn0})); + Pointer valueColumn0 = bufferColumn0.getPointer(0); + ImplicitPort column0 = null; + if (valueColumn0 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Column0 was a null pointer"); + } + column0 = mWrapper.PolymorphicFactory(valueColumn0, ImplicitPort.class); + return column0; + } + + /** + * Retrieves the input for the second column + * + * @return the input for the second column + * @throws Lib3MFException + */ + public ImplicitPort getInputB() throws Lib3MFException { + Pointer bufferColumn1 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_matrixfromcolumnsnode_getinputb.invokeInt(new java.lang.Object[]{mHandle, bufferColumn1})); + Pointer valueColumn1 = bufferColumn1.getPointer(0); + ImplicitPort column1 = null; + if (valueColumn1 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Column1 was a null pointer"); + } + column1 = mWrapper.PolymorphicFactory(valueColumn1, ImplicitPort.class); + return column1; + } + + /** + * Retrieves the input for the third column + * + * @return the input for the third column + * @throws Lib3MFException + */ + public ImplicitPort getInputC() throws Lib3MFException { + Pointer bufferColumn2 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_matrixfromcolumnsnode_getinputc.invokeInt(new java.lang.Object[]{mHandle, bufferColumn2})); + Pointer valueColumn2 = bufferColumn2.getPointer(0); + ImplicitPort column2 = null; + if (valueColumn2 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Column2 was a null pointer"); + } + column2 = mWrapper.PolymorphicFactory(valueColumn2, ImplicitPort.class); + return column2; + } + + /** + * Retrieves the input for the fourth column + * + * @return the input for the fourth column + * @throws Lib3MFException + */ + public ImplicitPort getInputD() throws Lib3MFException { + Pointer bufferColumn3 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_matrixfromcolumnsnode_getinputd.invokeInt(new java.lang.Object[]{mHandle, bufferColumn3})); + Pointer valueColumn3 = bufferColumn3.getPointer(0); + ImplicitPort column3 = null; + if (valueColumn3 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Column3 was a null pointer"); + } + column3 = mWrapper.PolymorphicFactory(valueColumn3, ImplicitPort.class); + return column3; + } + + /** + * Retrieves the output + * + * @return the output + * @throws Lib3MFException + */ + public ImplicitPort getOutputResult() throws Lib3MFException { + Pointer bufferResult = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_matrixfromcolumnsnode_getoutputresult.invokeInt(new java.lang.Object[]{mHandle, bufferResult})); + Pointer valueResult = bufferResult.getPointer(0); + ImplicitPort result = null; + if (valueResult == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Result was a null pointer"); + } + result = mWrapper.PolymorphicFactory(valueResult, ImplicitPort.class); + return result; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/MatrixFromRowsNode.java b/Autogenerated/Bindings/Java9/lib3mf/MatrixFromRowsNode.java new file mode 100644 index 000000000..ea205e31b --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/MatrixFromRowsNode.java @@ -0,0 +1,147 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class MatrixFromRowsNode extends ImplicitNode { + + public MatrixFromRowsNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the input for the first row + * + * @return the input for the first row + * @throws Lib3MFException + */ + public ImplicitPort getInputA() throws Lib3MFException { + Pointer bufferRow0 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_matrixfromrowsnode_getinputa.invokeInt(new java.lang.Object[]{mHandle, bufferRow0})); + Pointer valueRow0 = bufferRow0.getPointer(0); + ImplicitPort row0 = null; + if (valueRow0 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Row0 was a null pointer"); + } + row0 = mWrapper.PolymorphicFactory(valueRow0, ImplicitPort.class); + return row0; + } + + /** + * Retrieves the input for the second row + * + * @return the input for the second row + * @throws Lib3MFException + */ + public ImplicitPort getInputB() throws Lib3MFException { + Pointer bufferRow1 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_matrixfromrowsnode_getinputb.invokeInt(new java.lang.Object[]{mHandle, bufferRow1})); + Pointer valueRow1 = bufferRow1.getPointer(0); + ImplicitPort row1 = null; + if (valueRow1 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Row1 was a null pointer"); + } + row1 = mWrapper.PolymorphicFactory(valueRow1, ImplicitPort.class); + return row1; + } + + /** + * Retrieves the input for the third row + * + * @return the input for the third row + * @throws Lib3MFException + */ + public ImplicitPort getInputC() throws Lib3MFException { + Pointer bufferRow2 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_matrixfromrowsnode_getinputc.invokeInt(new java.lang.Object[]{mHandle, bufferRow2})); + Pointer valueRow2 = bufferRow2.getPointer(0); + ImplicitPort row2 = null; + if (valueRow2 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Row2 was a null pointer"); + } + row2 = mWrapper.PolymorphicFactory(valueRow2, ImplicitPort.class); + return row2; + } + + /** + * Retrieves the input for the fourth row + * + * @return the input for the fourth row + * @throws Lib3MFException + */ + public ImplicitPort getInputD() throws Lib3MFException { + Pointer bufferRow3 = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_matrixfromrowsnode_getinputd.invokeInt(new java.lang.Object[]{mHandle, bufferRow3})); + Pointer valueRow3 = bufferRow3.getPointer(0); + ImplicitPort row3 = null; + if (valueRow3 == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Row3 was a null pointer"); + } + row3 = mWrapper.PolymorphicFactory(valueRow3, ImplicitPort.class); + return row3; + } + + /** + * Retrieves the output + * + * @return the output + * @throws Lib3MFException + */ + public ImplicitPort getOutputResult() throws Lib3MFException { + Pointer bufferResult = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_matrixfromrowsnode_getoutputresult.invokeInt(new java.lang.Object[]{mHandle, bufferResult})); + Pointer valueResult = bufferResult.getPointer(0); + ImplicitPort result = null; + if (valueResult == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Result was a null pointer"); + } + result = mWrapper.PolymorphicFactory(valueResult, ImplicitPort.class); + return result; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/MaxNode.java b/Autogenerated/Bindings/Java9/lib3mf/MaxNode.java new file mode 100644 index 000000000..8466a0c53 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/MaxNode.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class MaxNode extends TwoInputNode { + + public MaxNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/MeshNode.java b/Autogenerated/Bindings/Java9/lib3mf/MeshNode.java new file mode 100644 index 000000000..45304bdb5 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/MeshNode.java @@ -0,0 +1,111 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class MeshNode extends ImplicitNode { + + public MeshNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the input for the model resource id of the mesh + * + * @return the input port for the model resource id of the mesh + * @throws Lib3MFException + */ + public ImplicitPort getInputMesh() throws Lib3MFException { + Pointer bufferMesh = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_meshnode_getinputmesh.invokeInt(new java.lang.Object[]{mHandle, bufferMesh})); + Pointer valueMesh = bufferMesh.getPointer(0); + ImplicitPort mesh = null; + if (valueMesh == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Mesh was a null pointer"); + } + mesh = mWrapper.PolymorphicFactory(valueMesh, ImplicitPort.class); + return mesh; + } + + /** + * Retrieves the input for the position + * + * @return the input port for the position + * @throws Lib3MFException + */ + public ImplicitPort getInputPos() throws Lib3MFException { + Pointer bufferPos = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_meshnode_getinputpos.invokeInt(new java.lang.Object[]{mHandle, bufferPos})); + Pointer valuePos = bufferPos.getPointer(0); + ImplicitPort pos = null; + if (valuePos == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Pos was a null pointer"); + } + pos = mWrapper.PolymorphicFactory(valuePos, ImplicitPort.class); + return pos; + } + + /** + * Retrieves the output + * + * @return the output port for the signed distance to the mesh + * @throws Lib3MFException + */ + public ImplicitPort getOutputDistance() throws Lib3MFException { + Pointer bufferDistance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_meshnode_getoutputdistance.invokeInt(new java.lang.Object[]{mHandle, bufferDistance})); + Pointer valueDistance = bufferDistance.getPointer(0); + ImplicitPort distance = null; + if (valueDistance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Distance was a null pointer"); + } + distance = mWrapper.PolymorphicFactory(valueDistance, ImplicitPort.class); + return distance; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/MeshObject.java b/Autogenerated/Bindings/Java9/lib3mf/MeshObject.java new file mode 100644 index 000000000..5eb159be5 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/MeshObject.java @@ -0,0 +1,505 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class MeshObject extends Object { + + public MeshObject(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the vertex count of a mesh object. + * + * @return filled with the vertex count. + * @throws Lib3MFException + */ + public int getVertexCount() throws Lib3MFException { + Pointer bufferVertexCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_getvertexcount.invokeInt(new java.lang.Object[]{mHandle, bufferVertexCount})); + return bufferVertexCount.getInt(0); + } + + /** + * Returns the triangle count of a mesh object. + * + * @return filled with the triangle count. + * @throws Lib3MFException + */ + public int getTriangleCount() throws Lib3MFException { + Pointer bufferVertexCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_gettrianglecount.invokeInt(new java.lang.Object[]{mHandle, bufferVertexCount})); + return bufferVertexCount.getInt(0); + } + + /** + * Returns the vertex count of a mesh object. + * + * @param index Index of the vertex (0 to vertexcount - 1) + * @return filled with the vertex coordinates. + * @throws Lib3MFException + */ + public Position getVertex(int index) throws Lib3MFException { + Pointer bufferCoordinates = new Memory(Position.SIZE); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_getvertex.invokeInt(new java.lang.Object[]{mHandle, index, bufferCoordinates})); + Position coordinates = new Position(); + coordinates.readFromPointer(bufferCoordinates, 0); + return coordinates; + } + + /** + * Sets the coordinates of a single vertex of a mesh object + * + * @param index Index of the vertex (0 to vertexcount - 1) + * @param coordinates contains the vertex coordinates. + * @throws Lib3MFException + */ + public void setVertex(int index, Position coordinates) throws Lib3MFException { + Pointer bufferCoordinates = new Memory(Position.SIZE); + coordinates.writeToPointer(bufferCoordinates, 0); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_setvertex.invokeInt(new java.lang.Object[]{mHandle, index, bufferCoordinates})); + } + + /** + * Adds a single vertex to a mesh object + * + * @param coordinates contains the vertex coordinates. + * @return Index of the new vertex + * @throws Lib3MFException + */ + public int addVertex(Position coordinates) throws Lib3MFException { + Pointer bufferCoordinates = new Memory(Position.SIZE); + coordinates.writeToPointer(bufferCoordinates, 0); + Pointer bufferNewIndex = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_addvertex.invokeInt(new java.lang.Object[]{mHandle, bufferCoordinates, bufferNewIndex})); + return bufferNewIndex.getInt(0); + } + + /** + * Obtains all vertex positions of a mesh object + * + * @return contains the vertex coordinates. + * @throws Lib3MFException + */ + public Position[] getVertices() throws Lib3MFException { + Pointer countNeededVertices = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_getvertices.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededVertices, null})); + long countVertices = countNeededVertices.getLong(0); + Pointer bufferVertices = new Memory(Math.max(1, countVertices * Position.SIZE)); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_getvertices.invokeInt(new java.lang.Object[]{mHandle, countVertices, countNeededVertices, bufferVertices})); + Position vertices[] = new Position[(int)countVertices]; + for (int i = 0; i < (int)countVertices; i++) { + vertices[i] = new Position(); + vertices[i].readFromPointer(bufferVertices, i * Position.SIZE); + } + return vertices; + } + + /** + * Returns indices of a single triangle of a mesh object. + * + * @param index Index of the triangle (0 to trianglecount - 1) + * @return filled with the triangle indices. + * @throws Lib3MFException + */ + public Triangle getTriangle(int index) throws Lib3MFException { + Pointer bufferIndices = new Memory(Triangle.SIZE); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_gettriangle.invokeInt(new java.lang.Object[]{mHandle, index, bufferIndices})); + Triangle indices = new Triangle(); + indices.readFromPointer(bufferIndices, 0); + return indices; + } + + /** + * Sets the indices of a single triangle of a mesh object. + * + * @param index Index of the triangle (0 to trianglecount - 1) + * @param indices contains the triangle indices. + * @throws Lib3MFException + */ + public void setTriangle(int index, Triangle indices) throws Lib3MFException { + Pointer bufferIndices = new Memory(Triangle.SIZE); + indices.writeToPointer(bufferIndices, 0); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_settriangle.invokeInt(new java.lang.Object[]{mHandle, index, bufferIndices})); + } + + /** + * Adds a single triangle to a mesh object + * + * @param indices contains the triangle indices. + * @return Index of the new triangle + * @throws Lib3MFException + */ + public int addTriangle(Triangle indices) throws Lib3MFException { + Pointer bufferIndices = new Memory(Triangle.SIZE); + indices.writeToPointer(bufferIndices, 0); + Pointer bufferNewIndex = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_addtriangle.invokeInt(new java.lang.Object[]{mHandle, bufferIndices, bufferNewIndex})); + return bufferNewIndex.getInt(0); + } + + /** + * Get all triangles of a mesh object + * + * @return contains the triangle indices. + * @throws Lib3MFException + */ + public Triangle[] getTriangleIndices() throws Lib3MFException { + Pointer countNeededIndices = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_gettriangleindices.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededIndices, null})); + long countIndices = countNeededIndices.getLong(0); + Pointer bufferIndices = new Memory(Math.max(1, countIndices * Triangle.SIZE)); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_gettriangleindices.invokeInt(new java.lang.Object[]{mHandle, countIndices, countNeededIndices, bufferIndices})); + Triangle indices[] = new Triangle[(int)countIndices]; + for (int i = 0; i < (int)countIndices; i++) { + indices[i] = new Triangle(); + indices[i].readFromPointer(bufferIndices, i * Triangle.SIZE); + } + return indices; + } + + /** + * Sets the property at the object-level of the mesh object. + * + * @param uniqueResourceID the object-level Property UniqueResourceID. + * @param propertyID the object-level PropertyID. + * @throws Lib3MFException + */ + public void setObjectLevelProperty(int uniqueResourceID, int propertyID) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_setobjectlevelproperty.invokeInt(new java.lang.Object[]{mHandle, uniqueResourceID, propertyID})); + } + + /** + * Gets the property at the object-level of the mesh object. + * + * @return GetObjectLevelProperty Result Tuple + * @throws Lib3MFException + */ + public GetObjectLevelPropertyResult getObjectLevelProperty() throws Lib3MFException { + Pointer bufferUniqueResourceID = new Memory(4); + Pointer bufferPropertyID = new Memory(4); + Pointer bufferHasObjectLevelProperty = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_getobjectlevelproperty.invokeInt(new java.lang.Object[]{mHandle, bufferUniqueResourceID, bufferPropertyID, bufferHasObjectLevelProperty})); + GetObjectLevelPropertyResult returnTuple = new GetObjectLevelPropertyResult(); + returnTuple.UniqueResourceID = bufferUniqueResourceID.getInt(0); + returnTuple.PropertyID = bufferPropertyID.getInt(0); + returnTuple.HasObjectLevelProperty = bufferHasObjectLevelProperty.getByte(0) != 0; + return returnTuple; + } + + public static class GetObjectLevelPropertyResult { + /** + * the object-level Property UniqueResourceID. + */ + public int UniqueResourceID; + + /** + * the object-level PropertyID. + */ + public int PropertyID; + + /** + * Has an object-level property been specified? + */ + public boolean HasObjectLevelProperty; + + } + /** + * Sets the properties of a single triangle of a mesh object. + * + * @param index Index of the triangle (0 to trianglecount - 1) + * @param properties contains the triangle properties. + * @throws Lib3MFException + */ + public void setTriangleProperties(int index, TriangleProperties properties) throws Lib3MFException { + Pointer bufferProperties = new Memory(TriangleProperties.SIZE); + properties.writeToPointer(bufferProperties, 0); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_settriangleproperties.invokeInt(new java.lang.Object[]{mHandle, index, bufferProperties})); + } + + /** + * Gets the properties of a single triangle of a mesh object. + * + * @param index Index of the triangle (0 to trianglecount - 1) + * @return returns the triangle properties. + * @throws Lib3MFException + */ + public TriangleProperties getTriangleProperties(int index) throws Lib3MFException { + Pointer bufferProperty = new Memory(TriangleProperties.SIZE); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_gettriangleproperties.invokeInt(new java.lang.Object[]{mHandle, index, bufferProperty})); + TriangleProperties property = new TriangleProperties(); + property.readFromPointer(bufferProperty, 0); + return property; + } + + /** + * Sets the properties of all triangles of a mesh object. Sets the object level property to the first entry of the passed triangle properties, if not yet specified. + * + * @param propertiesArray contains the triangle properties array. Must have trianglecount elements. + * @throws Lib3MFException + */ + public void setAllTriangleProperties(TriangleProperties[] propertiesArray) throws Lib3MFException { + Pointer bufferPropertiesArray = new Memory(Math.max(1, TriangleProperties.SIZE * propertiesArray.length)); + for (int i = 0; i < propertiesArray.length; i++) { + propertiesArray[i].writeToPointer(bufferPropertiesArray, i * TriangleProperties.SIZE); + } + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_setalltriangleproperties.invokeInt(new java.lang.Object[]{mHandle, (long) propertiesArray.length, bufferPropertiesArray})); + } + + /** + * Gets the properties of all triangles of a mesh object. + * + * @return returns the triangle properties array. Must have trianglecount elements. + * @throws Lib3MFException + */ + public TriangleProperties[] getAllTriangleProperties() throws Lib3MFException { + Pointer countNeededPropertiesArray = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_getalltriangleproperties.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededPropertiesArray, null})); + long countPropertiesArray = countNeededPropertiesArray.getLong(0); + Pointer bufferPropertiesArray = new Memory(Math.max(1, countPropertiesArray * TriangleProperties.SIZE)); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_getalltriangleproperties.invokeInt(new java.lang.Object[]{mHandle, countPropertiesArray, countNeededPropertiesArray, bufferPropertiesArray})); + TriangleProperties propertiesArray[] = new TriangleProperties[(int)countPropertiesArray]; + for (int i = 0; i < (int)countPropertiesArray; i++) { + propertiesArray[i] = new TriangleProperties(); + propertiesArray[i].readFromPointer(bufferPropertiesArray, i * TriangleProperties.SIZE); + } + return propertiesArray; + } + + /** + * Clears all properties of this mesh object (triangle and object-level). + * + * @throws Lib3MFException + */ + public void clearAllProperties() throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_clearallproperties.invokeInt(new java.lang.Object[]{mHandle})); + } + + /** + * Set all triangles of a mesh object + * + * @param vertices contains the positions. + * @param indices contains the triangle indices. + * @throws Lib3MFException + */ + public void setGeometry(Position[] vertices, Triangle[] indices) throws Lib3MFException { + Pointer bufferVertices = new Memory(Math.max(1, Position.SIZE * vertices.length)); + for (int i = 0; i < vertices.length; i++) { + vertices[i].writeToPointer(bufferVertices, i * Position.SIZE); + } + Pointer bufferIndices = new Memory(Math.max(1, Triangle.SIZE * indices.length)); + for (int i = 0; i < indices.length; i++) { + indices[i].writeToPointer(bufferIndices, i * Triangle.SIZE); + } + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_setgeometry.invokeInt(new java.lang.Object[]{mHandle, (long) vertices.length, bufferVertices, (long) indices.length, bufferIndices})); + } + + /** + * Retrieves, if an object describes a topologically oriented and manifold mesh, according to the core spec. + * + * @return returns, if the object is oriented and manifold. + * @throws Lib3MFException + */ + public boolean isManifoldAndOriented() throws Lib3MFException { + Pointer bufferIsManifoldAndOriented = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_ismanifoldandoriented.invokeInt(new java.lang.Object[]{mHandle, bufferIsManifoldAndOriented})); + return bufferIsManifoldAndOriented.getByte(0) != 0; + } + + /** + * Retrieves the BeamLattice within this MeshObject. + * + * @return the BeamLattice within this MeshObject + * @throws Lib3MFException + */ + public BeamLattice beamLattice() throws Lib3MFException { + Pointer bufferTheBeamLattice = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_beamlattice.invokeInt(new java.lang.Object[]{mHandle, bufferTheBeamLattice})); + Pointer valueTheBeamLattice = bufferTheBeamLattice.getPointer(0); + BeamLattice theBeamLattice = null; + if (valueTheBeamLattice == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheBeamLattice was a null pointer"); + } + theBeamLattice = mWrapper.PolymorphicFactory(valueTheBeamLattice, BeamLattice.class); + return theBeamLattice; + } + + /** + * Retrieves the VolumeData of this MeshObject. + * + * @return the VolumeData of this MeshObject + * @throws Lib3MFException + */ + public VolumeData getVolumeData() throws Lib3MFException { + Pointer bufferTheVolumeData = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_getvolumedata.invokeInt(new java.lang.Object[]{mHandle, bufferTheVolumeData})); + Pointer valueTheVolumeData = bufferTheVolumeData.getPointer(0); + VolumeData theVolumeData = null; + if (valueTheVolumeData != Pointer.NULL) { + theVolumeData = mWrapper.PolymorphicFactory(valueTheVolumeData, VolumeData.class); + } + return theVolumeData; + } + + /** + * Sets the VolumeData of this MeshObject. + * + * @param theVolumeData the VolumeData of this MeshObject + * @throws Lib3MFException + */ + public void setVolumeData(VolumeData theVolumeData) throws Lib3MFException { + Pointer theVolumeDataHandle = null; + if (theVolumeData != null) { + theVolumeDataHandle = theVolumeData.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheVolumeData is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_setvolumedata.invokeInt(new java.lang.Object[]{mHandle, theVolumeDataHandle})); + } + + /** + * Adds a new triangle set. + * + * @param identifier the new identifier. MUST be unique within the mesh. MUST NOT be an empty string + * @param name the human readable name. MUST NOT be an empty string + * @return the new Triangle Set Instance. + * @throws Lib3MFException + */ + public TriangleSet addTriangleSet(String identifier, String name) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + byte[] bytesName = name.getBytes(StandardCharsets.UTF_8); + Memory bufferName = new Memory(bytesName.length + 1); + bufferName.write(0, bytesName, 0, bytesName.length); + bufferName.setByte(bytesName.length, (byte)0); + Pointer bufferTheTriangleSet = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_addtriangleset.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferName, bufferTheTriangleSet})); + Pointer valueTheTriangleSet = bufferTheTriangleSet.getPointer(0); + TriangleSet theTriangleSet = null; + if (valueTheTriangleSet == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheTriangleSet was a null pointer"); + } + theTriangleSet = mWrapper.PolymorphicFactory(valueTheTriangleSet, TriangleSet.class); + return theTriangleSet; + } + + /** + * Checks if a triangle set exists. + * + * @param identifier the identifier to be found. + * @return flag if the triangles set exists. + * @throws Lib3MFException + */ + public boolean hasTriangleSet(String identifier) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + Pointer bufferTriangleSetExists = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_hastriangleset.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferTriangleSetExists})); + return bufferTriangleSetExists.getByte(0) != 0; + } + + /** + * Finds a new triangle set by identifier. Fails if not existing. + * + * @param identifier the identifier to be found. + * @return the triangle Set Instance. + * @throws Lib3MFException + */ + public TriangleSet findTriangleSet(String identifier) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + Pointer bufferTheTriangleSet = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_findtriangleset.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferTheTriangleSet})); + Pointer valueTheTriangleSet = bufferTheTriangleSet.getPointer(0); + TriangleSet theTriangleSet = null; + if (valueTheTriangleSet == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheTriangleSet was a null pointer"); + } + theTriangleSet = mWrapper.PolymorphicFactory(valueTheTriangleSet, TriangleSet.class); + return theTriangleSet; + } + + /** + * Returns number of triangle sets. + * + * @return the number of triangle sets of this mesh. + * @throws Lib3MFException + */ + public int getTriangleSetCount() throws Lib3MFException { + Pointer bufferCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_gettrianglesetcount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getInt(0); + } + + /** + * Returns a specific triangle set by index. + * + * @param index the index of the triangle set. + * @return the triangle Set Instance. + * @throws Lib3MFException + */ + public TriangleSet getTriangleSet(int index) throws Lib3MFException { + Pointer bufferTheTriangleSet = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_meshobject_gettriangleset.invokeInt(new java.lang.Object[]{mHandle, index, bufferTheTriangleSet})); + Pointer valueTheTriangleSet = bufferTheTriangleSet.getPointer(0); + TriangleSet theTriangleSet = null; + if (valueTheTriangleSet == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheTriangleSet was a null pointer"); + } + theTriangleSet = mWrapper.PolymorphicFactory(valueTheTriangleSet, TriangleSet.class); + return theTriangleSet; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/MeshObjectIterator.java b/Autogenerated/Bindings/Java9/lib3mf/MeshObjectIterator.java new file mode 100644 index 000000000..27da63207 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/MeshObjectIterator.java @@ -0,0 +1,75 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class MeshObjectIterator extends ResourceIterator { + + public MeshObjectIterator(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the MeshObject the iterator points at. + * + * @return returns the MeshObject instance. + * @throws Lib3MFException + */ + public MeshObject getCurrentMeshObject() throws Lib3MFException { + Pointer bufferResource = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_meshobjectiterator_getcurrentmeshobject.invokeInt(new java.lang.Object[]{mHandle, bufferResource})); + Pointer valueResource = bufferResource.getPointer(0); + MeshObject resource = null; + if (valueResource == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Resource was a null pointer"); + } + resource = mWrapper.PolymorphicFactory(valueResource, MeshObject.class); + return resource; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/MetaData.java b/Autogenerated/Bindings/Java9/lib3mf/MetaData.java new file mode 100644 index 000000000..8dd99d573 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/MetaData.java @@ -0,0 +1,210 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class MetaData extends Base { + + public MetaData(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * returns the namespace URL of the metadata + * + * @return the namespace URL of the metadata + * @throws Lib3MFException + */ + public String getNameSpace() throws Lib3MFException { + Pointer bytesNeededNameSpace = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_metadata_getnamespace.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededNameSpace, null})); + int sizeNameSpace = bytesNeededNameSpace.getInt(0); + Pointer bufferNameSpace = new Memory(sizeNameSpace); + mWrapper.checkError(this, mWrapper.lib3mf_metadata_getnamespace.invokeInt(new java.lang.Object[]{mHandle, sizeNameSpace, bytesNeededNameSpace, bufferNameSpace})); + return new String(bufferNameSpace.getByteArray(0, sizeNameSpace - 1), StandardCharsets.UTF_8); + } + + /** + * sets a new namespace URL of the metadata + * + * @param nameSpace the new namespace URL of the metadata + * @throws Lib3MFException + */ + public void setNameSpace(String nameSpace) throws Lib3MFException { + byte[] bytesNameSpace = nameSpace.getBytes(StandardCharsets.UTF_8); + Memory bufferNameSpace = new Memory(bytesNameSpace.length + 1); + bufferNameSpace.write(0, bytesNameSpace, 0, bytesNameSpace.length); + bufferNameSpace.setByte(bytesNameSpace.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_metadata_setnamespace.invokeInt(new java.lang.Object[]{mHandle, bufferNameSpace})); + } + + /** + * returns the name of a metadata + * + * @return the name of the metadata + * @throws Lib3MFException + */ + public String getName() throws Lib3MFException { + Pointer bytesNeededName = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_metadata_getname.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededName, null})); + int sizeName = bytesNeededName.getInt(0); + Pointer bufferName = new Memory(sizeName); + mWrapper.checkError(this, mWrapper.lib3mf_metadata_getname.invokeInt(new java.lang.Object[]{mHandle, sizeName, bytesNeededName, bufferName})); + return new String(bufferName.getByteArray(0, sizeName - 1), StandardCharsets.UTF_8); + } + + /** + * sets a new name of a metadata + * + * @param name the new name of the metadata + * @throws Lib3MFException + */ + public void setName(String name) throws Lib3MFException { + byte[] bytesName = name.getBytes(StandardCharsets.UTF_8); + Memory bufferName = new Memory(bytesName.length + 1); + bufferName.write(0, bytesName, 0, bytesName.length); + bufferName.setByte(bytesName.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_metadata_setname.invokeInt(new java.lang.Object[]{mHandle, bufferName})); + } + + /** + * returns the (namespace+name) of a metadata + * + * @return the key (namespace+name) of the metadata + * @throws Lib3MFException + */ + public String getKey() throws Lib3MFException { + Pointer bytesNeededKey = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_metadata_getkey.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededKey, null})); + int sizeKey = bytesNeededKey.getInt(0); + Pointer bufferKey = new Memory(sizeKey); + mWrapper.checkError(this, mWrapper.lib3mf_metadata_getkey.invokeInt(new java.lang.Object[]{mHandle, sizeKey, bytesNeededKey, bufferKey})); + return new String(bufferKey.getByteArray(0, sizeKey - 1), StandardCharsets.UTF_8); + } + + /** + * returns, whether a metadata must be preserved + * + * @return returns, whether a metadata must be preserved + * @throws Lib3MFException + */ + public boolean getMustPreserve() throws Lib3MFException { + Pointer bufferMustPreserve = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_metadata_getmustpreserve.invokeInt(new java.lang.Object[]{mHandle, bufferMustPreserve})); + return bufferMustPreserve.getByte(0) != 0; + } + + /** + * sets whether a metadata must be preserved + * + * @param mustPreserve a new value whether a metadata must be preserved + * @throws Lib3MFException + */ + public void setMustPreserve(boolean mustPreserve) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_metadata_setmustpreserve.invokeInt(new java.lang.Object[]{mHandle, mustPreserve})); + } + + /** + * returns the type of a metadata + * + * @return the type of the metadata + * @throws Lib3MFException + */ + public String getType() throws Lib3MFException { + Pointer bytesNeededType = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_metadata_gettype.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededType, null})); + int sizeType = bytesNeededType.getInt(0); + Pointer bufferType = new Memory(sizeType); + mWrapper.checkError(this, mWrapper.lib3mf_metadata_gettype.invokeInt(new java.lang.Object[]{mHandle, sizeType, bytesNeededType, bufferType})); + return new String(bufferType.getByteArray(0, sizeType - 1), StandardCharsets.UTF_8); + } + + /** + * sets a new type of a metadata. This must be a simple XML type + * + * @param type a new type of the metadata + * @throws Lib3MFException + */ + public void setType(String type) throws Lib3MFException { + byte[] bytesType = type.getBytes(StandardCharsets.UTF_8); + Memory bufferType = new Memory(bytesType.length + 1); + bufferType.write(0, bytesType, 0, bytesType.length); + bufferType.setByte(bytesType.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_metadata_settype.invokeInt(new java.lang.Object[]{mHandle, bufferType})); + } + + /** + * returns the value of the metadata + * + * @return the value of the metadata + * @throws Lib3MFException + */ + public String getValue() throws Lib3MFException { + Pointer bytesNeededValue = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_metadata_getvalue.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededValue, null})); + int sizeValue = bytesNeededValue.getInt(0); + Pointer bufferValue = new Memory(sizeValue); + mWrapper.checkError(this, mWrapper.lib3mf_metadata_getvalue.invokeInt(new java.lang.Object[]{mHandle, sizeValue, bytesNeededValue, bufferValue})); + return new String(bufferValue.getByteArray(0, sizeValue - 1), StandardCharsets.UTF_8); + } + + /** + * sets a new value of the metadata + * + * @param value a new value of the metadata + * @throws Lib3MFException + */ + public void setValue(String value) throws Lib3MFException { + byte[] bytesValue = value.getBytes(StandardCharsets.UTF_8); + Memory bufferValue = new Memory(bytesValue.length + 1); + bufferValue.write(0, bytesValue, 0, bytesValue.length); + bufferValue.setByte(bytesValue.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_metadata_setvalue.invokeInt(new java.lang.Object[]{mHandle, bufferValue})); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/MetaDataGroup.java b/Autogenerated/Bindings/Java9/lib3mf/MetaDataGroup.java new file mode 100644 index 000000000..4b7618326 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/MetaDataGroup.java @@ -0,0 +1,181 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class MetaDataGroup extends Base { + + public MetaDataGroup(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * returns the number of metadata in this metadatagroup + * + * @return returns the number metadata + * @throws Lib3MFException + */ + public int getMetaDataCount() throws Lib3MFException { + Pointer bufferCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_metadatagroup_getmetadatacount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getInt(0); + } + + /** + * returns a metadata value within this metadatagroup + * + * @param index Index of the Metadata. + * @return an instance of the metadata + * @throws Lib3MFException + */ + public MetaData getMetaData(int index) throws Lib3MFException { + Pointer bufferMetaData = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_metadatagroup_getmetadata.invokeInt(new java.lang.Object[]{mHandle, index, bufferMetaData})); + Pointer valueMetaData = bufferMetaData.getPointer(0); + MetaData metaData = null; + if (valueMetaData == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "MetaData was a null pointer"); + } + metaData = mWrapper.PolymorphicFactory(valueMetaData, MetaData.class); + return metaData; + } + + /** + * returns a metadata value within this metadatagroup + * + * @param nameSpace the namespace of the metadata + * @param name the name of the Metadata + * @return an instance of the metadata + * @throws Lib3MFException + */ + public MetaData getMetaDataByKey(String nameSpace, String name) throws Lib3MFException { + byte[] bytesNameSpace = nameSpace.getBytes(StandardCharsets.UTF_8); + Memory bufferNameSpace = new Memory(bytesNameSpace.length + 1); + bufferNameSpace.write(0, bytesNameSpace, 0, bytesNameSpace.length); + bufferNameSpace.setByte(bytesNameSpace.length, (byte)0); + byte[] bytesName = name.getBytes(StandardCharsets.UTF_8); + Memory bufferName = new Memory(bytesName.length + 1); + bufferName.write(0, bytesName, 0, bytesName.length); + bufferName.setByte(bytesName.length, (byte)0); + Pointer bufferMetaData = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_metadatagroup_getmetadatabykey.invokeInt(new java.lang.Object[]{mHandle, bufferNameSpace, bufferName, bufferMetaData})); + Pointer valueMetaData = bufferMetaData.getPointer(0); + MetaData metaData = null; + if (valueMetaData == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "MetaData was a null pointer"); + } + metaData = mWrapper.PolymorphicFactory(valueMetaData, MetaData.class); + return metaData; + } + + /** + * removes metadata by index from the model. + * + * @param index Index of the metadata to remove + * @throws Lib3MFException + */ + public void removeMetaDataByIndex(int index) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_metadatagroup_removemetadatabyindex.invokeInt(new java.lang.Object[]{mHandle, index})); + } + + /** + * removes metadata from the model. + * + * @param theMetaData The metadata to remove + * @throws Lib3MFException + */ + public void removeMetaData(MetaData theMetaData) throws Lib3MFException { + Pointer theMetaDataHandle = null; + if (theMetaData != null) { + theMetaDataHandle = theMetaData.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheMetaData is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_metadatagroup_removemetadata.invokeInt(new java.lang.Object[]{mHandle, theMetaDataHandle})); + } + + /** + * adds a new metadata to this metadatagroup + * + * @param nameSpace the namespace of the metadata + * @param name the name of the metadata + * @param value the value of the metadata + * @param type the type of the metadata + * @param mustPreserve should the metadata be preserved + * @return a new instance of the metadata + * @throws Lib3MFException + */ + public MetaData addMetaData(String nameSpace, String name, String value, String type, boolean mustPreserve) throws Lib3MFException { + byte[] bytesNameSpace = nameSpace.getBytes(StandardCharsets.UTF_8); + Memory bufferNameSpace = new Memory(bytesNameSpace.length + 1); + bufferNameSpace.write(0, bytesNameSpace, 0, bytesNameSpace.length); + bufferNameSpace.setByte(bytesNameSpace.length, (byte)0); + byte[] bytesName = name.getBytes(StandardCharsets.UTF_8); + Memory bufferName = new Memory(bytesName.length + 1); + bufferName.write(0, bytesName, 0, bytesName.length); + bufferName.setByte(bytesName.length, (byte)0); + byte[] bytesValue = value.getBytes(StandardCharsets.UTF_8); + Memory bufferValue = new Memory(bytesValue.length + 1); + bufferValue.write(0, bytesValue, 0, bytesValue.length); + bufferValue.setByte(bytesValue.length, (byte)0); + byte[] bytesType = type.getBytes(StandardCharsets.UTF_8); + Memory bufferType = new Memory(bytesType.length + 1); + bufferType.write(0, bytesType, 0, bytesType.length); + bufferType.setByte(bytesType.length, (byte)0); + Pointer bufferMetaData = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_metadatagroup_addmetadata.invokeInt(new java.lang.Object[]{mHandle, bufferNameSpace, bufferName, bufferValue, bufferType, mustPreserve, bufferMetaData})); + Pointer valueMetaData = bufferMetaData.getPointer(0); + MetaData metaData = null; + if (valueMetaData == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "MetaData was a null pointer"); + } + metaData = mWrapper.PolymorphicFactory(valueMetaData, MetaData.class); + return metaData; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/MinNode.java b/Autogenerated/Bindings/Java9/lib3mf/MinNode.java new file mode 100644 index 000000000..5cf44fa24 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/MinNode.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class MinNode extends TwoInputNode { + + public MinNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/ModNode.java b/Autogenerated/Bindings/Java9/lib3mf/ModNode.java new file mode 100644 index 000000000..608b38a8a --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/ModNode.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ModNode extends TwoInputNode { + + public ModNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/Model.java b/Autogenerated/Bindings/Java9/lib3mf/Model.java new file mode 100644 index 000000000..5e4cc26bb --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/Model.java @@ -0,0 +1,1377 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Model extends Base { + + public Model(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the PackagePart within the OPC package that holds the root model. + * + * @return the PackagePart within the OPC package that holds the model-file + * @throws Lib3MFException + */ + public PackagePart rootModelPart() throws Lib3MFException { + Pointer bufferRootModelPart = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_rootmodelpart.invokeInt(new java.lang.Object[]{mHandle, bufferRootModelPart})); + Pointer valueRootModelPart = bufferRootModelPart.getPointer(0); + PackagePart rootModelPart = null; + if (valueRootModelPart == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "RootModelPart was a null pointer"); + } + rootModelPart = mWrapper.PolymorphicFactory(valueRootModelPart, PackagePart.class); + return rootModelPart; + } + + /** + * Returns a new PackagePart for use within the OPC package. + * + * @param absolutePath the absolute Path (physical location) within the OPC package + * @return the new PackagePart within the OPC package + * @throws Lib3MFException + */ + public PackagePart findOrCreatePackagePart(String absolutePath) throws Lib3MFException { + byte[] bytesAbsolutePath = absolutePath.getBytes(StandardCharsets.UTF_8); + Memory bufferAbsolutePath = new Memory(bytesAbsolutePath.length + 1); + bufferAbsolutePath.write(0, bytesAbsolutePath, 0, bytesAbsolutePath.length); + bufferAbsolutePath.setByte(bytesAbsolutePath.length, (byte)0); + Pointer bufferModelPart = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_findorcreatepackagepart.invokeInt(new java.lang.Object[]{mHandle, bufferAbsolutePath, bufferModelPart})); + Pointer valueModelPart = bufferModelPart.getPointer(0); + PackagePart modelPart = null; + if (valueModelPart == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ModelPart was a null pointer"); + } + modelPart = mWrapper.PolymorphicFactory(valueModelPart, PackagePart.class); + return modelPart; + } + + /** + * sets the units of a model. + * + * @param unit Unit enum value for the model unit + * @throws Lib3MFException + */ + public void setUnit(Lib3MFWrapper.ModelUnit unit) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_model_setunit.invokeInt(new java.lang.Object[]{mHandle, Lib3MFWrapper.EnumConversion.convertModelUnitToConst(unit)})); + } + + /** + * returns the units of a model. + * + * @return Unit enum value for the model unit + * @throws Lib3MFException + */ + public Lib3MFWrapper.ModelUnit getUnit() throws Lib3MFException { + Pointer bufferUnit = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_model_getunit.invokeInt(new java.lang.Object[]{mHandle, bufferUnit})); + return Lib3MFWrapper.EnumConversion.convertConstToModelUnit(bufferUnit.getInt(0)); + } + + /** + * retrieves the language of a model + * + * @return language identifier + * @throws Lib3MFException + */ + public String getLanguage() throws Lib3MFException { + Pointer bytesNeededLanguage = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_model_getlanguage.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededLanguage, null})); + int sizeLanguage = bytesNeededLanguage.getInt(0); + Pointer bufferLanguage = new Memory(sizeLanguage); + mWrapper.checkError(this, mWrapper.lib3mf_model_getlanguage.invokeInt(new java.lang.Object[]{mHandle, sizeLanguage, bytesNeededLanguage, bufferLanguage})); + return new String(bufferLanguage.getByteArray(0, sizeLanguage - 1), StandardCharsets.UTF_8); + } + + /** + * sets the language of a model + * + * @param language language identifier + * @throws Lib3MFException + */ + public void setLanguage(String language) throws Lib3MFException { + byte[] bytesLanguage = language.getBytes(StandardCharsets.UTF_8); + Memory bufferLanguage = new Memory(bytesLanguage.length + 1); + bufferLanguage.write(0, bytesLanguage, 0, bytesLanguage.length); + bufferLanguage.setByte(bytesLanguage.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_model_setlanguage.invokeInt(new java.lang.Object[]{mHandle, bufferLanguage})); + } + + /** + * creates a model writer instance for a specific file type + * + * @param writerClass string identifier for the file type + * @return string identifier for the file type + * @throws Lib3MFException + */ + public Writer queryWriter(String writerClass) throws Lib3MFException { + byte[] bytesWriterClass = writerClass.getBytes(StandardCharsets.UTF_8); + Memory bufferWriterClass = new Memory(bytesWriterClass.length + 1); + bufferWriterClass.write(0, bytesWriterClass, 0, bytesWriterClass.length); + bufferWriterClass.setByte(bytesWriterClass.length, (byte)0); + Pointer bufferWriterInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_querywriter.invokeInt(new java.lang.Object[]{mHandle, bufferWriterClass, bufferWriterInstance})); + Pointer valueWriterInstance = bufferWriterInstance.getPointer(0); + Writer writerInstance = null; + if (valueWriterInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "WriterInstance was a null pointer"); + } + writerInstance = mWrapper.PolymorphicFactory(valueWriterInstance, Writer.class); + return writerInstance; + } + + /** + * creates a model reader instance for a specific file type + * + * @param readerClass string identifier for the file type + * @return string identifier for the file type + * @throws Lib3MFException + */ + public Reader queryReader(String readerClass) throws Lib3MFException { + byte[] bytesReaderClass = readerClass.getBytes(StandardCharsets.UTF_8); + Memory bufferReaderClass = new Memory(bytesReaderClass.length + 1); + bufferReaderClass.write(0, bytesReaderClass, 0, bytesReaderClass.length); + bufferReaderClass.setByte(bytesReaderClass.length, (byte)0); + Pointer bufferReaderInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_queryreader.invokeInt(new java.lang.Object[]{mHandle, bufferReaderClass, bufferReaderInstance})); + Pointer valueReaderInstance = bufferReaderInstance.getPointer(0); + Reader readerInstance = null; + if (valueReaderInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ReaderInstance was a null pointer"); + } + readerInstance = mWrapper.PolymorphicFactory(valueReaderInstance, Reader.class); + return readerInstance; + } + + /** + * finds a model resource by its UniqueResourceID + * + * @param uniqueResourceID UniqueResourceID + * @return returns the resource instance + * @throws Lib3MFException + */ + public Resource getResourceByID(int uniqueResourceID) throws Lib3MFException { + Pointer bufferResource = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getresourcebyid.invokeInt(new java.lang.Object[]{mHandle, uniqueResourceID, bufferResource})); + Pointer valueResource = bufferResource.getPointer(0); + Resource resource = null; + if (valueResource == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Resource was a null pointer"); + } + resource = mWrapper.PolymorphicFactory(valueResource, Resource.class); + return resource; + } + + /** + * finds a model texture by its UniqueResourceID + * + * @param uniqueResourceID UniqueResourceID + * @return returns the texture2d instance + * @throws Lib3MFException + */ + public Texture2D getTexture2DByID(int uniqueResourceID) throws Lib3MFException { + Pointer bufferTextureInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_gettexture2dbyid.invokeInt(new java.lang.Object[]{mHandle, uniqueResourceID, bufferTextureInstance})); + Pointer valueTextureInstance = bufferTextureInstance.getPointer(0); + Texture2D textureInstance = null; + if (valueTextureInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TextureInstance was a null pointer"); + } + textureInstance = mWrapper.PolymorphicFactory(valueTextureInstance, Texture2D.class); + return textureInstance; + } + + /** + * returns a Property's type + * + * @param uniqueResourceID Resource ID of the Property to Query + * @return returns a Property's type + * @throws Lib3MFException + */ + public Lib3MFWrapper.PropertyType getPropertyTypeByID(int uniqueResourceID) throws Lib3MFException { + Pointer bufferThePropertyType = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_model_getpropertytypebyid.invokeInt(new java.lang.Object[]{mHandle, uniqueResourceID, bufferThePropertyType})); + return Lib3MFWrapper.EnumConversion.convertConstToPropertyType(bufferThePropertyType.getInt(0)); + } + + /** + * finds a model base material group by its UniqueResourceID + * + * @param uniqueResourceID UniqueResourceID + * @return returns the BaseMaterialGroup instance + * @throws Lib3MFException + */ + public BaseMaterialGroup getBaseMaterialGroupByID(int uniqueResourceID) throws Lib3MFException { + Pointer bufferBaseMaterialGroupInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getbasematerialgroupbyid.invokeInt(new java.lang.Object[]{mHandle, uniqueResourceID, bufferBaseMaterialGroupInstance})); + Pointer valueBaseMaterialGroupInstance = bufferBaseMaterialGroupInstance.getPointer(0); + BaseMaterialGroup baseMaterialGroupInstance = null; + if (valueBaseMaterialGroupInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "BaseMaterialGroupInstance was a null pointer"); + } + baseMaterialGroupInstance = mWrapper.PolymorphicFactory(valueBaseMaterialGroupInstance, BaseMaterialGroup.class); + return baseMaterialGroupInstance; + } + + /** + * finds a model texture2d group by its UniqueResourceID + * + * @param uniqueResourceID UniqueResourceID + * @return returns the Texture2DGroup instance + * @throws Lib3MFException + */ + public Texture2DGroup getTexture2DGroupByID(int uniqueResourceID) throws Lib3MFException { + Pointer bufferTexture2DGroupInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_gettexture2dgroupbyid.invokeInt(new java.lang.Object[]{mHandle, uniqueResourceID, bufferTexture2DGroupInstance})); + Pointer valueTexture2DGroupInstance = bufferTexture2DGroupInstance.getPointer(0); + Texture2DGroup texture2DGroupInstance = null; + if (valueTexture2DGroupInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Texture2DGroupInstance was a null pointer"); + } + texture2DGroupInstance = mWrapper.PolymorphicFactory(valueTexture2DGroupInstance, Texture2DGroup.class); + return texture2DGroupInstance; + } + + /** + * finds a model CompositeMaterials by its UniqueResourceID + * + * @param uniqueResourceID UniqueResourceID + * @return returns the CompositeMaterials instance + * @throws Lib3MFException + */ + public CompositeMaterials getCompositeMaterialsByID(int uniqueResourceID) throws Lib3MFException { + Pointer bufferCompositeMaterialsInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getcompositematerialsbyid.invokeInt(new java.lang.Object[]{mHandle, uniqueResourceID, bufferCompositeMaterialsInstance})); + Pointer valueCompositeMaterialsInstance = bufferCompositeMaterialsInstance.getPointer(0); + CompositeMaterials compositeMaterialsInstance = null; + if (valueCompositeMaterialsInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "CompositeMaterialsInstance was a null pointer"); + } + compositeMaterialsInstance = mWrapper.PolymorphicFactory(valueCompositeMaterialsInstance, CompositeMaterials.class); + return compositeMaterialsInstance; + } + + /** + * finds a model MultiPropertyGroup by its UniqueResourceID + * + * @param uniqueResourceID UniqueResourceID + * @return returns the MultiPropertyGroup instance + * @throws Lib3MFException + */ + public MultiPropertyGroup getMultiPropertyGroupByID(int uniqueResourceID) throws Lib3MFException { + Pointer bufferMultiPropertyGroupInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getmultipropertygroupbyid.invokeInt(new java.lang.Object[]{mHandle, uniqueResourceID, bufferMultiPropertyGroupInstance})); + Pointer valueMultiPropertyGroupInstance = bufferMultiPropertyGroupInstance.getPointer(0); + MultiPropertyGroup multiPropertyGroupInstance = null; + if (valueMultiPropertyGroupInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "MultiPropertyGroupInstance was a null pointer"); + } + multiPropertyGroupInstance = mWrapper.PolymorphicFactory(valueMultiPropertyGroupInstance, MultiPropertyGroup.class); + return multiPropertyGroupInstance; + } + + /** + * finds a mesh object by its UniqueResourceID + * + * @param uniqueResourceID UniqueResourceID + * @return returns the mesh object instance + * @throws Lib3MFException + */ + public MeshObject getMeshObjectByID(int uniqueResourceID) throws Lib3MFException { + Pointer bufferMeshObjectInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getmeshobjectbyid.invokeInt(new java.lang.Object[]{mHandle, uniqueResourceID, bufferMeshObjectInstance})); + Pointer valueMeshObjectInstance = bufferMeshObjectInstance.getPointer(0); + MeshObject meshObjectInstance = null; + if (valueMeshObjectInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "MeshObjectInstance was a null pointer"); + } + meshObjectInstance = mWrapper.PolymorphicFactory(valueMeshObjectInstance, MeshObject.class); + return meshObjectInstance; + } + + /** + * finds a components object by its UniqueResourceID + * + * @param uniqueResourceID UniqueResourceID + * @return returns the components object instance + * @throws Lib3MFException + */ + public ComponentsObject getComponentsObjectByID(int uniqueResourceID) throws Lib3MFException { + Pointer bufferComponentsObjectInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getcomponentsobjectbyid.invokeInt(new java.lang.Object[]{mHandle, uniqueResourceID, bufferComponentsObjectInstance})); + Pointer valueComponentsObjectInstance = bufferComponentsObjectInstance.getPointer(0); + ComponentsObject componentsObjectInstance = null; + if (valueComponentsObjectInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ComponentsObjectInstance was a null pointer"); + } + componentsObjectInstance = mWrapper.PolymorphicFactory(valueComponentsObjectInstance, ComponentsObject.class); + return componentsObjectInstance; + } + + /** + * finds a model color group by its UniqueResourceID + * + * @param uniqueResourceID UniqueResourceID + * @return returns the ColorGroup instance + * @throws Lib3MFException + */ + public ColorGroup getColorGroupByID(int uniqueResourceID) throws Lib3MFException { + Pointer bufferColorGroupInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getcolorgroupbyid.invokeInt(new java.lang.Object[]{mHandle, uniqueResourceID, bufferColorGroupInstance})); + Pointer valueColorGroupInstance = bufferColorGroupInstance.getPointer(0); + ColorGroup colorGroupInstance = null; + if (valueColorGroupInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ColorGroupInstance was a null pointer"); + } + colorGroupInstance = mWrapper.PolymorphicFactory(valueColorGroupInstance, ColorGroup.class); + return colorGroupInstance; + } + + /** + * finds a model slicestack by its UniqueResourceID + * + * @param uniqueResourceID UniqueResourceID + * @return returns the slicestack instance + * @throws Lib3MFException + */ + public SliceStack getSliceStackByID(int uniqueResourceID) throws Lib3MFException { + Pointer bufferSliceStacInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getslicestackbyid.invokeInt(new java.lang.Object[]{mHandle, uniqueResourceID, bufferSliceStacInstance})); + Pointer valueSliceStacInstance = bufferSliceStacInstance.getPointer(0); + SliceStack sliceStacInstance = null; + if (valueSliceStacInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "SliceStacInstance was a null pointer"); + } + sliceStacInstance = mWrapper.PolymorphicFactory(valueSliceStacInstance, SliceStack.class); + return sliceStacInstance; + } + + /** + * finds a level set object by its UniqueResourceID + * + * @param uniqueResourceID UniqueResourceID + * @return returns the level set object instance + * @throws Lib3MFException + */ + public LevelSet getLevelSetByID(int uniqueResourceID) throws Lib3MFException { + Pointer bufferLevelSetObjectInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getlevelsetbyid.invokeInt(new java.lang.Object[]{mHandle, uniqueResourceID, bufferLevelSetObjectInstance})); + Pointer valueLevelSetObjectInstance = bufferLevelSetObjectInstance.getPointer(0); + LevelSet levelSetObjectInstance = null; + if (valueLevelSetObjectInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "LevelSetObjectInstance was a null pointer"); + } + levelSetObjectInstance = mWrapper.PolymorphicFactory(valueLevelSetObjectInstance, LevelSet.class); + return levelSetObjectInstance; + } + + /** + * returns, whether a build has a UUID and, if true, the build's UUID + * + * @return GetBuildUUID Result Tuple + * @throws Lib3MFException + */ + public GetBuildUUIDResult getBuildUUID() throws Lib3MFException { + Pointer bufferHasUUID = new Memory(1); + Pointer bytesNeededUUID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_model_getbuilduuid.invokeInt(new java.lang.Object[]{mHandle, bufferHasUUID, 0, bytesNeededUUID, null})); + int sizeUUID = bytesNeededUUID.getInt(0); + Pointer bufferUUID = new Memory(sizeUUID); + mWrapper.checkError(this, mWrapper.lib3mf_model_getbuilduuid.invokeInt(new java.lang.Object[]{mHandle, bufferHasUUID, sizeUUID, bytesNeededUUID, bufferUUID})); + GetBuildUUIDResult returnTuple = new GetBuildUUIDResult(); + returnTuple.HasUUID = bufferHasUUID.getByte(0) != 0; + returnTuple.UUID = new String(bufferUUID.getByteArray(0, sizeUUID - 1), StandardCharsets.UTF_8); + return returnTuple; + } + + public static class GetBuildUUIDResult { + /** + * flag whether the build has a UUID + */ + public boolean HasUUID; + + /** + * the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' + */ + public String UUID; + + } + /** + * sets the build's UUID + * + * @param uUID the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' + * @throws Lib3MFException + */ + public void setBuildUUID(String uUID) throws Lib3MFException { + byte[] bytesUUID = uUID.getBytes(StandardCharsets.UTF_8); + Memory bufferUUID = new Memory(bytesUUID.length + 1); + bufferUUID.write(0, bytesUUID, 0, bytesUUID.length); + bufferUUID.setByte(bytesUUID.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_model_setbuilduuid.invokeInt(new java.lang.Object[]{mHandle, bufferUUID})); + } + + /** + * creates a build item iterator instance with all build items. + * + * @return returns the iterator instance. + * @throws Lib3MFException + */ + public BuildItemIterator getBuildItems() throws Lib3MFException { + Pointer bufferBuildItemIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getbuilditems.invokeInt(new java.lang.Object[]{mHandle, bufferBuildItemIterator})); + Pointer valueBuildItemIterator = bufferBuildItemIterator.getPointer(0); + BuildItemIterator buildItemIterator = null; + if (valueBuildItemIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "BuildItemIterator was a null pointer"); + } + buildItemIterator = mWrapper.PolymorphicFactory(valueBuildItemIterator, BuildItemIterator.class); + return buildItemIterator; + } + + /** + * Returns the outbox of a Model + * + * @return Outbox of this Model + * @throws Lib3MFException + */ + public Box getOutbox() throws Lib3MFException { + Pointer bufferOutbox = new Memory(Box.SIZE); + mWrapper.checkError(this, mWrapper.lib3mf_model_getoutbox.invokeInt(new java.lang.Object[]{mHandle, bufferOutbox})); + Box outbox = new Box(); + outbox.readFromPointer(bufferOutbox, 0); + return outbox; + } + + /** + * creates a resource iterator instance with all resources. + * + * @return returns the iterator instance. + * @throws Lib3MFException + */ + public ResourceIterator getResources() throws Lib3MFException { + Pointer bufferResourceIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getresources.invokeInt(new java.lang.Object[]{mHandle, bufferResourceIterator})); + Pointer valueResourceIterator = bufferResourceIterator.getPointer(0); + ResourceIterator resourceIterator = null; + if (valueResourceIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceIterator was a null pointer"); + } + resourceIterator = mWrapper.PolymorphicFactory(valueResourceIterator, ResourceIterator.class); + return resourceIterator; + } + + /** + * creates a resource iterator instance with all object resources. + * + * @return returns the iterator instance. + * @throws Lib3MFException + */ + public ObjectIterator getObjects() throws Lib3MFException { + Pointer bufferResourceIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getobjects.invokeInt(new java.lang.Object[]{mHandle, bufferResourceIterator})); + Pointer valueResourceIterator = bufferResourceIterator.getPointer(0); + ObjectIterator resourceIterator = null; + if (valueResourceIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceIterator was a null pointer"); + } + resourceIterator = mWrapper.PolymorphicFactory(valueResourceIterator, ObjectIterator.class); + return resourceIterator; + } + + /** + * creates a resource iterator instance with all mesh object resources. + * + * @return returns the iterator instance. + * @throws Lib3MFException + */ + public MeshObjectIterator getMeshObjects() throws Lib3MFException { + Pointer bufferResourceIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getmeshobjects.invokeInt(new java.lang.Object[]{mHandle, bufferResourceIterator})); + Pointer valueResourceIterator = bufferResourceIterator.getPointer(0); + MeshObjectIterator resourceIterator = null; + if (valueResourceIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceIterator was a null pointer"); + } + resourceIterator = mWrapper.PolymorphicFactory(valueResourceIterator, MeshObjectIterator.class); + return resourceIterator; + } + + /** + * creates a resource iterator instance with all components object resources. + * + * @return returns the iterator instance. + * @throws Lib3MFException + */ + public ComponentsObjectIterator getComponentsObjects() throws Lib3MFException { + Pointer bufferResourceIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getcomponentsobjects.invokeInt(new java.lang.Object[]{mHandle, bufferResourceIterator})); + Pointer valueResourceIterator = bufferResourceIterator.getPointer(0); + ComponentsObjectIterator resourceIterator = null; + if (valueResourceIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceIterator was a null pointer"); + } + resourceIterator = mWrapper.PolymorphicFactory(valueResourceIterator, ComponentsObjectIterator.class); + return resourceIterator; + } + + /** + * creates a Texture2DIterator instance with all texture2d resources. + * + * @return returns the iterator instance. + * @throws Lib3MFException + */ + public Texture2DIterator getTexture2Ds() throws Lib3MFException { + Pointer bufferResourceIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_gettexture2ds.invokeInt(new java.lang.Object[]{mHandle, bufferResourceIterator})); + Pointer valueResourceIterator = bufferResourceIterator.getPointer(0); + Texture2DIterator resourceIterator = null; + if (valueResourceIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceIterator was a null pointer"); + } + resourceIterator = mWrapper.PolymorphicFactory(valueResourceIterator, Texture2DIterator.class); + return resourceIterator; + } + + /** + * creates a BaseMaterialGroupIterator instance with all base material resources. + * + * @return returns the iterator instance. + * @throws Lib3MFException + */ + public BaseMaterialGroupIterator getBaseMaterialGroups() throws Lib3MFException { + Pointer bufferResourceIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getbasematerialgroups.invokeInt(new java.lang.Object[]{mHandle, bufferResourceIterator})); + Pointer valueResourceIterator = bufferResourceIterator.getPointer(0); + BaseMaterialGroupIterator resourceIterator = null; + if (valueResourceIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceIterator was a null pointer"); + } + resourceIterator = mWrapper.PolymorphicFactory(valueResourceIterator, BaseMaterialGroupIterator.class); + return resourceIterator; + } + + /** + * creates a ColorGroupIterator instance with all ColorGroup resources. + * + * @return returns the iterator instance. + * @throws Lib3MFException + */ + public ColorGroupIterator getColorGroups() throws Lib3MFException { + Pointer bufferResourceIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getcolorgroups.invokeInt(new java.lang.Object[]{mHandle, bufferResourceIterator})); + Pointer valueResourceIterator = bufferResourceIterator.getPointer(0); + ColorGroupIterator resourceIterator = null; + if (valueResourceIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceIterator was a null pointer"); + } + resourceIterator = mWrapper.PolymorphicFactory(valueResourceIterator, ColorGroupIterator.class); + return resourceIterator; + } + + /** + * creates a Texture2DGroupIterator instance with all base material resources. + * + * @return returns the iterator instance. + * @throws Lib3MFException + */ + public Texture2DGroupIterator getTexture2DGroups() throws Lib3MFException { + Pointer bufferResourceIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_gettexture2dgroups.invokeInt(new java.lang.Object[]{mHandle, bufferResourceIterator})); + Pointer valueResourceIterator = bufferResourceIterator.getPointer(0); + Texture2DGroupIterator resourceIterator = null; + if (valueResourceIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceIterator was a null pointer"); + } + resourceIterator = mWrapper.PolymorphicFactory(valueResourceIterator, Texture2DGroupIterator.class); + return resourceIterator; + } + + /** + * creates a CompositeMaterialsIterator instance with all CompositeMaterials resources. + * + * @return returns the iterator instance. + * @throws Lib3MFException + */ + public CompositeMaterialsIterator getCompositeMaterials() throws Lib3MFException { + Pointer bufferResourceIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getcompositematerials.invokeInt(new java.lang.Object[]{mHandle, bufferResourceIterator})); + Pointer valueResourceIterator = bufferResourceIterator.getPointer(0); + CompositeMaterialsIterator resourceIterator = null; + if (valueResourceIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceIterator was a null pointer"); + } + resourceIterator = mWrapper.PolymorphicFactory(valueResourceIterator, CompositeMaterialsIterator.class); + return resourceIterator; + } + + /** + * creates a MultiPropertyGroupsIterator instance with all MultiPropertyGroup resources. + * + * @return returns the iterator instance. + * @throws Lib3MFException + */ + public MultiPropertyGroupIterator getMultiPropertyGroups() throws Lib3MFException { + Pointer bufferResourceIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getmultipropertygroups.invokeInt(new java.lang.Object[]{mHandle, bufferResourceIterator})); + Pointer valueResourceIterator = bufferResourceIterator.getPointer(0); + MultiPropertyGroupIterator resourceIterator = null; + if (valueResourceIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceIterator was a null pointer"); + } + resourceIterator = mWrapper.PolymorphicFactory(valueResourceIterator, MultiPropertyGroupIterator.class); + return resourceIterator; + } + + /** + * creates a resource iterator instance with all slice stack resources. + * + * @return returns the iterator instance. + * @throws Lib3MFException + */ + public SliceStackIterator getSliceStacks() throws Lib3MFException { + Pointer bufferResourceIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getslicestacks.invokeInt(new java.lang.Object[]{mHandle, bufferResourceIterator})); + Pointer valueResourceIterator = bufferResourceIterator.getPointer(0); + SliceStackIterator resourceIterator = null; + if (valueResourceIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceIterator was a null pointer"); + } + resourceIterator = mWrapper.PolymorphicFactory(valueResourceIterator, SliceStackIterator.class); + return resourceIterator; + } + + /** + * creates a resource iterator instance with all image3d resources. + * + * @return returns the iterator instance. + * @throws Lib3MFException + */ + public Image3DIterator getImage3Ds() throws Lib3MFException { + Pointer bufferResourceIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getimage3ds.invokeInt(new java.lang.Object[]{mHandle, bufferResourceIterator})); + Pointer valueResourceIterator = bufferResourceIterator.getPointer(0); + Image3DIterator resourceIterator = null; + if (valueResourceIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceIterator was a null pointer"); + } + resourceIterator = mWrapper.PolymorphicFactory(valueResourceIterator, Image3DIterator.class); + return resourceIterator; + } + + /** + * Merges all components and objects which are referenced by a build item into a mesh. The memory is duplicated and a new model is created. + * + * @return returns the merged model instance + * @throws Lib3MFException + */ + public Model mergeToModel() throws Lib3MFException { + Pointer bufferMergedModelInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_mergetomodel.invokeInt(new java.lang.Object[]{mHandle, bufferMergedModelInstance})); + Pointer valueMergedModelInstance = bufferMergedModelInstance.getPointer(0); + Model mergedModelInstance = null; + if (valueMergedModelInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "MergedModelInstance was a null pointer"); + } + mergedModelInstance = mWrapper.PolymorphicFactory(valueMergedModelInstance, Model.class); + return mergedModelInstance; + } + + /** + * Merges the given model into this model. + * + * @param modelInstance model to be merged + * @throws Lib3MFException + */ + public void mergeFromModel(Model modelInstance) throws Lib3MFException { + Pointer modelInstanceHandle = null; + if (modelInstance != null) { + modelInstanceHandle = modelInstance.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ModelInstance is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_model_mergefrommodel.invokeInt(new java.lang.Object[]{mHandle, modelInstanceHandle})); + } + + /** + * adds an empty mesh object to the model. + * + * @return returns the mesh object instance + * @throws Lib3MFException + */ + public MeshObject addMeshObject() throws Lib3MFException { + Pointer bufferMeshObjectInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_addmeshobject.invokeInt(new java.lang.Object[]{mHandle, bufferMeshObjectInstance})); + Pointer valueMeshObjectInstance = bufferMeshObjectInstance.getPointer(0); + MeshObject meshObjectInstance = null; + if (valueMeshObjectInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "MeshObjectInstance was a null pointer"); + } + meshObjectInstance = mWrapper.PolymorphicFactory(valueMeshObjectInstance, MeshObject.class); + return meshObjectInstance; + } + + /** + * adds an empty component object to the model. + * + * @return returns the components object instance + * @throws Lib3MFException + */ + public ComponentsObject addComponentsObject() throws Lib3MFException { + Pointer bufferComponentsObjectInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_addcomponentsobject.invokeInt(new java.lang.Object[]{mHandle, bufferComponentsObjectInstance})); + Pointer valueComponentsObjectInstance = bufferComponentsObjectInstance.getPointer(0); + ComponentsObject componentsObjectInstance = null; + if (valueComponentsObjectInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ComponentsObjectInstance was a null pointer"); + } + componentsObjectInstance = mWrapper.PolymorphicFactory(valueComponentsObjectInstance, ComponentsObject.class); + return componentsObjectInstance; + } + + /** + * creates a new model slicestack by its id + * + * @param zBottom Bottom Z value of the slicestack + * @return returns the new slicestack instance + * @throws Lib3MFException + */ + public SliceStack addSliceStack(double zBottom) throws Lib3MFException { + Pointer bufferSliceStackInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_addslicestack.invokeInt(new java.lang.Object[]{mHandle, zBottom, bufferSliceStackInstance})); + Pointer valueSliceStackInstance = bufferSliceStackInstance.getPointer(0); + SliceStack sliceStackInstance = null; + if (valueSliceStackInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "SliceStackInstance was a null pointer"); + } + sliceStackInstance = mWrapper.PolymorphicFactory(valueSliceStackInstance, SliceStack.class); + return sliceStackInstance; + } + + /** + * adds a texture2d resource to the model. Its path is given by that of an existing attachment. + * + * @param textureAttachment attachment containing the image data. + * @return returns the new texture instance. + * @throws Lib3MFException + */ + public Texture2D addTexture2DFromAttachment(Attachment textureAttachment) throws Lib3MFException { + Pointer textureAttachmentHandle = null; + if (textureAttachment != null) { + textureAttachmentHandle = textureAttachment.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TextureAttachment is a null value."); + } + Pointer bufferTexture2DInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_addtexture2dfromattachment.invokeInt(new java.lang.Object[]{mHandle, textureAttachmentHandle, bufferTexture2DInstance})); + Pointer valueTexture2DInstance = bufferTexture2DInstance.getPointer(0); + Texture2D texture2DInstance = null; + if (valueTexture2DInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Texture2DInstance was a null pointer"); + } + texture2DInstance = mWrapper.PolymorphicFactory(valueTexture2DInstance, Texture2D.class); + return texture2DInstance; + } + + /** + * adds an empty BaseMaterialGroup resource to the model. + * + * @return returns the new base material instance. + * @throws Lib3MFException + */ + public BaseMaterialGroup addBaseMaterialGroup() throws Lib3MFException { + Pointer bufferBaseMaterialGroupInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_addbasematerialgroup.invokeInt(new java.lang.Object[]{mHandle, bufferBaseMaterialGroupInstance})); + Pointer valueBaseMaterialGroupInstance = bufferBaseMaterialGroupInstance.getPointer(0); + BaseMaterialGroup baseMaterialGroupInstance = null; + if (valueBaseMaterialGroupInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "BaseMaterialGroupInstance was a null pointer"); + } + baseMaterialGroupInstance = mWrapper.PolymorphicFactory(valueBaseMaterialGroupInstance, BaseMaterialGroup.class); + return baseMaterialGroupInstance; + } + + /** + * adds an empty ColorGroup resource to the model. + * + * @return returns the new ColorGroup instance. + * @throws Lib3MFException + */ + public ColorGroup addColorGroup() throws Lib3MFException { + Pointer bufferColorGroupInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_addcolorgroup.invokeInt(new java.lang.Object[]{mHandle, bufferColorGroupInstance})); + Pointer valueColorGroupInstance = bufferColorGroupInstance.getPointer(0); + ColorGroup colorGroupInstance = null; + if (valueColorGroupInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ColorGroupInstance was a null pointer"); + } + colorGroupInstance = mWrapper.PolymorphicFactory(valueColorGroupInstance, ColorGroup.class); + return colorGroupInstance; + } + + /** + * adds an empty Texture2DGroup resource to the model. + * + * @param texture2DInstance The texture2D instance of the created Texture2DGroup. + * @return returns the new Texture2DGroup instance. + * @throws Lib3MFException + */ + public Texture2DGroup addTexture2DGroup(Texture2D texture2DInstance) throws Lib3MFException { + Pointer texture2DInstanceHandle = null; + if (texture2DInstance != null) { + texture2DInstanceHandle = texture2DInstance.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Texture2DInstance is a null value."); + } + Pointer bufferTexture2DGroupInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_addtexture2dgroup.invokeInt(new java.lang.Object[]{mHandle, texture2DInstanceHandle, bufferTexture2DGroupInstance})); + Pointer valueTexture2DGroupInstance = bufferTexture2DGroupInstance.getPointer(0); + Texture2DGroup texture2DGroupInstance = null; + if (valueTexture2DGroupInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Texture2DGroupInstance was a null pointer"); + } + texture2DGroupInstance = mWrapper.PolymorphicFactory(valueTexture2DGroupInstance, Texture2DGroup.class); + return texture2DGroupInstance; + } + + /** + * adds an empty CompositeMaterials resource to the model. + * + * @param baseMaterialGroupInstance The BaseMaterialGroup instance of the created CompositeMaterials. + * @return returns the new CompositeMaterials instance. + * @throws Lib3MFException + */ + public CompositeMaterials addCompositeMaterials(BaseMaterialGroup baseMaterialGroupInstance) throws Lib3MFException { + Pointer baseMaterialGroupInstanceHandle = null; + if (baseMaterialGroupInstance != null) { + baseMaterialGroupInstanceHandle = baseMaterialGroupInstance.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "BaseMaterialGroupInstance is a null value."); + } + Pointer bufferCompositeMaterialsInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_addcompositematerials.invokeInt(new java.lang.Object[]{mHandle, baseMaterialGroupInstanceHandle, bufferCompositeMaterialsInstance})); + Pointer valueCompositeMaterialsInstance = bufferCompositeMaterialsInstance.getPointer(0); + CompositeMaterials compositeMaterialsInstance = null; + if (valueCompositeMaterialsInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "CompositeMaterialsInstance was a null pointer"); + } + compositeMaterialsInstance = mWrapper.PolymorphicFactory(valueCompositeMaterialsInstance, CompositeMaterials.class); + return compositeMaterialsInstance; + } + + /** + * adds an empty MultiPropertyGroup resource to the model. + * + * @return returns the new MultiPropertyGroup instance. + * @throws Lib3MFException + */ + public MultiPropertyGroup addMultiPropertyGroup() throws Lib3MFException { + Pointer bufferMultiPropertyGroupInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_addmultipropertygroup.invokeInt(new java.lang.Object[]{mHandle, bufferMultiPropertyGroupInstance})); + Pointer valueMultiPropertyGroupInstance = bufferMultiPropertyGroupInstance.getPointer(0); + MultiPropertyGroup multiPropertyGroupInstance = null; + if (valueMultiPropertyGroupInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "MultiPropertyGroupInstance was a null pointer"); + } + multiPropertyGroupInstance = mWrapper.PolymorphicFactory(valueMultiPropertyGroupInstance, MultiPropertyGroup.class); + return multiPropertyGroupInstance; + } + + /** + * creates a new 3D Image Resource + * + * @param columnCount the number of columns in each sheet. + * @param rowCount the number of rows in each sheet. + * @param sheetCount the number of sheets in the image stack. + * @return returns the new ImageStack instance + * @throws Lib3MFException + */ + public ImageStack addImageStack(int columnCount, int rowCount, int sheetCount) throws Lib3MFException { + Pointer bufferInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_addimagestack.invokeInt(new java.lang.Object[]{mHandle, columnCount, rowCount, sheetCount, bufferInstance})); + Pointer valueInstance = bufferInstance.getPointer(0); + ImageStack instance = null; + if (valueInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Instance was a null pointer"); + } + instance = mWrapper.PolymorphicFactory(valueInstance, ImageStack.class); + return instance; + } + + /** + * finds an ImageStack object by its UniqueResourceID + * + * @param uniqueResourceID UniqueResourceID + * @return returns the image stack instance + * @throws Lib3MFException + */ + public ImageStack getImageStackByID(int uniqueResourceID) throws Lib3MFException { + Pointer bufferImageStackInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getimagestackbyid.invokeInt(new java.lang.Object[]{mHandle, uniqueResourceID, bufferImageStackInstance})); + Pointer valueImageStackInstance = bufferImageStackInstance.getPointer(0); + ImageStack imageStackInstance = null; + if (valueImageStackInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ImageStackInstance was a null pointer"); + } + imageStackInstance = mWrapper.PolymorphicFactory(valueImageStackInstance, ImageStack.class); + return imageStackInstance; + } + + /** + * adds a build item to the model. + * + * @param object Object instance. + * @param transform Transformation matrix. + * @return returns the build item instance. + * @throws Lib3MFException + */ + public BuildItem addBuildItem(Object object, Transform transform) throws Lib3MFException { + Pointer objectHandle = null; + if (object != null) { + objectHandle = object.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Object is a null value."); + } + Pointer bufferTransform = new Memory(Transform.SIZE); + transform.writeToPointer(bufferTransform, 0); + Pointer bufferBuildItemInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_addbuilditem.invokeInt(new java.lang.Object[]{mHandle, objectHandle, bufferTransform, bufferBuildItemInstance})); + Pointer valueBuildItemInstance = bufferBuildItemInstance.getPointer(0); + BuildItem buildItemInstance = null; + if (valueBuildItemInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "BuildItemInstance was a null pointer"); + } + buildItemInstance = mWrapper.PolymorphicFactory(valueBuildItemInstance, BuildItem.class); + return buildItemInstance; + } + + /** + * removes a build item from the model + * + * @param buildItemInstance Build item to remove. + * @throws Lib3MFException + */ + public void removeBuildItem(BuildItem buildItemInstance) throws Lib3MFException { + Pointer buildItemInstanceHandle = null; + if (buildItemInstance != null) { + buildItemInstanceHandle = buildItemInstance.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "BuildItemInstance is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_model_removebuilditem.invokeInt(new java.lang.Object[]{mHandle, buildItemInstanceHandle})); + } + + /** + * Returns the metadata of the model as MetaDataGroup + * + * @return returns an Instance of the metadatagroup of the model + * @throws Lib3MFException + */ + public MetaDataGroup getMetaDataGroup() throws Lib3MFException { + Pointer bufferTheMetaDataGroup = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getmetadatagroup.invokeInt(new java.lang.Object[]{mHandle, bufferTheMetaDataGroup})); + Pointer valueTheMetaDataGroup = bufferTheMetaDataGroup.getPointer(0); + MetaDataGroup theMetaDataGroup = null; + if (valueTheMetaDataGroup == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheMetaDataGroup was a null pointer"); + } + theMetaDataGroup = mWrapper.PolymorphicFactory(valueTheMetaDataGroup, MetaDataGroup.class); + return theMetaDataGroup; + } + + /** + * adds an attachment stream to the model. The OPC part will be related to the model stream with a certain relationship type. + * + * @param uRI Path of the attachment + * @param relationShipType Relationship type of the attachment + * @return Instance of the attachment object + * @throws Lib3MFException + */ + public Attachment addAttachment(String uRI, String relationShipType) throws Lib3MFException { + byte[] bytesURI = uRI.getBytes(StandardCharsets.UTF_8); + Memory bufferURI = new Memory(bytesURI.length + 1); + bufferURI.write(0, bytesURI, 0, bytesURI.length); + bufferURI.setByte(bytesURI.length, (byte)0); + byte[] bytesRelationShipType = relationShipType.getBytes(StandardCharsets.UTF_8); + Memory bufferRelationShipType = new Memory(bytesRelationShipType.length + 1); + bufferRelationShipType.write(0, bytesRelationShipType, 0, bytesRelationShipType.length); + bufferRelationShipType.setByte(bytesRelationShipType.length, (byte)0); + Pointer bufferAttachmentInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_addattachment.invokeInt(new java.lang.Object[]{mHandle, bufferURI, bufferRelationShipType, bufferAttachmentInstance})); + Pointer valueAttachmentInstance = bufferAttachmentInstance.getPointer(0); + Attachment attachmentInstance = null; + if (valueAttachmentInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "AttachmentInstance was a null pointer"); + } + attachmentInstance = mWrapper.PolymorphicFactory(valueAttachmentInstance, Attachment.class); + return attachmentInstance; + } + + /** + * Removes attachment from the model. + * + * @param attachmentInstance Attachment instance to remove + * @throws Lib3MFException + */ + public void removeAttachment(Attachment attachmentInstance) throws Lib3MFException { + Pointer attachmentInstanceHandle = null; + if (attachmentInstance != null) { + attachmentInstanceHandle = attachmentInstance.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "AttachmentInstance is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_model_removeattachment.invokeInt(new java.lang.Object[]{mHandle, attachmentInstanceHandle})); + } + + /** + * retrieves an attachment stream object from the model.. + * + * @param index Index of the attachment stream + * @return Instance of the attachment object + * @throws Lib3MFException + */ + public Attachment getAttachment(int index) throws Lib3MFException { + Pointer bufferAttachmentInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getattachment.invokeInt(new java.lang.Object[]{mHandle, index, bufferAttachmentInstance})); + Pointer valueAttachmentInstance = bufferAttachmentInstance.getPointer(0); + Attachment attachmentInstance = null; + if (valueAttachmentInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "AttachmentInstance was a null pointer"); + } + attachmentInstance = mWrapper.PolymorphicFactory(valueAttachmentInstance, Attachment.class); + return attachmentInstance; + } + + /** + * retrieves an attachment stream object from the model. + * + * @param uRI Path URI in the package + * @return Instance of the attachment object + * @throws Lib3MFException + */ + public Attachment findAttachment(String uRI) throws Lib3MFException { + byte[] bytesURI = uRI.getBytes(StandardCharsets.UTF_8); + Memory bufferURI = new Memory(bytesURI.length + 1); + bufferURI.write(0, bytesURI, 0, bytesURI.length); + bufferURI.setByte(bytesURI.length, (byte)0); + Pointer bufferAttachmentInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_findattachment.invokeInt(new java.lang.Object[]{mHandle, bufferURI, bufferAttachmentInstance})); + Pointer valueAttachmentInstance = bufferAttachmentInstance.getPointer(0); + Attachment attachmentInstance = null; + if (valueAttachmentInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "AttachmentInstance was a null pointer"); + } + attachmentInstance = mWrapper.PolymorphicFactory(valueAttachmentInstance, Attachment.class); + return attachmentInstance; + } + + /** + * retrieves the number of attachments of the model. + * + * @return Returns the number of attachments. + * @throws Lib3MFException + */ + public int getAttachmentCount() throws Lib3MFException { + Pointer bufferAttachmentCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_model_getattachmentcount.invokeInt(new java.lang.Object[]{mHandle, bufferAttachmentCount})); + return bufferAttachmentCount.getInt(0); + } + + /** + * Retrieve whether the OPC package contains a package thumbnail. + * + * @return returns whether the OPC package contains a package thumbnail + * @throws Lib3MFException + */ + public boolean hasPackageThumbnailAttachment() throws Lib3MFException { + Pointer bufferHasThumbnail = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_model_haspackagethumbnailattachment.invokeInt(new java.lang.Object[]{mHandle, bufferHasThumbnail})); + return bufferHasThumbnail.getByte(0) != 0; + } + + /** + * Create a new or the existing package thumbnail for the OPC package. + * + * @return Instance of a new or the existing thumbnailattachment object. + * @throws Lib3MFException + */ + public Attachment createPackageThumbnailAttachment() throws Lib3MFException { + Pointer bufferAttachment = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_createpackagethumbnailattachment.invokeInt(new java.lang.Object[]{mHandle, bufferAttachment})); + Pointer valueAttachment = bufferAttachment.getPointer(0); + Attachment attachment = null; + if (valueAttachment == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Attachment was a null pointer"); + } + attachment = mWrapper.PolymorphicFactory(valueAttachment, Attachment.class); + return attachment; + } + + /** + * Get the attachment to the OPC package containing the package thumbnail. + * + * @return Instance of the thumbnailattachment object or NULL. + * @throws Lib3MFException + */ + public Attachment getPackageThumbnailAttachment() throws Lib3MFException { + Pointer bufferAttachment = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getpackagethumbnailattachment.invokeInt(new java.lang.Object[]{mHandle, bufferAttachment})); + Pointer valueAttachment = bufferAttachment.getPointer(0); + Attachment attachment = null; + if (valueAttachment != Pointer.NULL) { + attachment = mWrapper.PolymorphicFactory(valueAttachment, Attachment.class); + } + return attachment; + } + + /** + * Remove the attachment to the OPC package containing the package thumbnail. + * + * @throws Lib3MFException + */ + public void removePackageThumbnailAttachment() throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_model_removepackagethumbnailattachment.invokeInt(new java.lang.Object[]{mHandle})); + } + + /** + * Adds a new Content Type to the model. + * + * @param extension File Extension + * @param contentType Content Type Identifier + * @throws Lib3MFException + */ + public void addCustomContentType(String extension, String contentType) throws Lib3MFException { + byte[] bytesExtension = extension.getBytes(StandardCharsets.UTF_8); + Memory bufferExtension = new Memory(bytesExtension.length + 1); + bufferExtension.write(0, bytesExtension, 0, bytesExtension.length); + bufferExtension.setByte(bytesExtension.length, (byte)0); + byte[] bytesContentType = contentType.getBytes(StandardCharsets.UTF_8); + Memory bufferContentType = new Memory(bytesContentType.length + 1); + bufferContentType.write(0, bytesContentType, 0, bytesContentType.length); + bufferContentType.setByte(bytesContentType.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_model_addcustomcontenttype.invokeInt(new java.lang.Object[]{mHandle, bufferExtension, bufferContentType})); + } + + /** + * Removes a custom Content Type from the model (UTF8 version). + * + * @param extension File Extension + * @throws Lib3MFException + */ + public void removeCustomContentType(String extension) throws Lib3MFException { + byte[] bytesExtension = extension.getBytes(StandardCharsets.UTF_8); + Memory bufferExtension = new Memory(bytesExtension.length + 1); + bufferExtension.write(0, bytesExtension, 0, bytesExtension.length); + bufferExtension.setByte(bytesExtension.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_model_removecustomcontenttype.invokeInt(new java.lang.Object[]{mHandle, bufferExtension})); + } + + /** + * Sets the random number generator callback for use in the library + * + * @param theCallback The callback used to generate random numbers + * @param userData Userdata to be passed to the callback function + * @throws Lib3MFException + */ + public void setRandomNumberCallback(Lib3MFWrapper.RandomNumberCallback theCallback, Pointer userData) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_model_setrandomnumbercallback.invokeInt(new java.lang.Object[]{mHandle, theCallback, userData})); + } + + /** + * Gets the keystore associated with this model + * + * @return The package keystore + * @throws Lib3MFException + */ + public KeyStore getKeyStore() throws Lib3MFException { + Pointer bufferKeyStore = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getkeystore.invokeInt(new java.lang.Object[]{mHandle, bufferKeyStore})); + Pointer valueKeyStore = bufferKeyStore.getPointer(0); + KeyStore keyStore = null; + if (valueKeyStore == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "KeyStore was a null pointer"); + } + keyStore = mWrapper.PolymorphicFactory(valueKeyStore, KeyStore.class); + return keyStore; + } + + /** + * creates a resource iterator for all functions + * + * @return returns the resource iterator + * @throws Lib3MFException + */ + public FunctionIterator getFunctions() throws Lib3MFException { + Pointer bufferTheResourceIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getfunctions.invokeInt(new java.lang.Object[]{mHandle, bufferTheResourceIterator})); + Pointer valueTheResourceIterator = bufferTheResourceIterator.getPointer(0); + FunctionIterator theResourceIterator = null; + if (valueTheResourceIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheResourceIterator was a null pointer"); + } + theResourceIterator = mWrapper.PolymorphicFactory(valueTheResourceIterator, FunctionIterator.class); + return theResourceIterator; + } + + /** + * adds a function described by nodes to the model + * + * @return returns the function instance + * @throws Lib3MFException + */ + public ImplicitFunction addImplicitFunction() throws Lib3MFException { + Pointer bufferFunctionInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_addimplicitfunction.invokeInt(new java.lang.Object[]{mHandle, bufferFunctionInstance})); + Pointer valueFunctionInstance = bufferFunctionInstance.getPointer(0); + ImplicitFunction functionInstance = null; + if (valueFunctionInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "FunctionInstance was a null pointer"); + } + functionInstance = mWrapper.PolymorphicFactory(valueFunctionInstance, ImplicitFunction.class); + return functionInstance; + } + + /** + * adds a function defined by an image3d to the model + * + * @param image3DInstance the Image3D-instance used for this function + * @return returns the function instance + * @throws Lib3MFException + */ + public FunctionFromImage3D addFunctionFromImage3D(Image3D image3DInstance) throws Lib3MFException { + Pointer image3DInstanceHandle = null; + if (image3DInstance != null) { + image3DInstanceHandle = image3DInstance.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Image3DInstance is a null value."); + } + Pointer bufferFunctionInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_addfunctionfromimage3d.invokeInt(new java.lang.Object[]{mHandle, image3DInstanceHandle, bufferFunctionInstance})); + Pointer valueFunctionInstance = bufferFunctionInstance.getPointer(0); + FunctionFromImage3D functionInstance = null; + if (valueFunctionInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "FunctionInstance was a null pointer"); + } + functionInstance = mWrapper.PolymorphicFactory(valueFunctionInstance, FunctionFromImage3D.class); + return functionInstance; + } + + /** + * adds a volume data resource to the model. + * + * @return returns the new volume data instance. + * @throws Lib3MFException + */ + public VolumeData addVolumeData() throws Lib3MFException { + Pointer bufferVolumeDataInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_addvolumedata.invokeInt(new java.lang.Object[]{mHandle, bufferVolumeDataInstance})); + Pointer valueVolumeDataInstance = bufferVolumeDataInstance.getPointer(0); + VolumeData volumeDataInstance = null; + if (valueVolumeDataInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "VolumeDataInstance was a null pointer"); + } + volumeDataInstance = mWrapper.PolymorphicFactory(valueVolumeDataInstance, VolumeData.class); + return volumeDataInstance; + } + + /** + * adds an empty boundary shape object to the model. + * + * @return returns the mesh object instance + * @throws Lib3MFException + */ + public LevelSet addLevelSet() throws Lib3MFException { + Pointer bufferLevelSetInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_addlevelset.invokeInt(new java.lang.Object[]{mHandle, bufferLevelSetInstance})); + Pointer valueLevelSetInstance = bufferLevelSetInstance.getPointer(0); + LevelSet levelSetInstance = null; + if (valueLevelSetInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "LevelSetInstance was a null pointer"); + } + levelSetInstance = mWrapper.PolymorphicFactory(valueLevelSetInstance, LevelSet.class); + return levelSetInstance; + } + + /** + * creates a resource iterator instance with all boundary shape resources. + * + * @return returns the iterator instance. + * @throws Lib3MFException + */ + public LevelSetIterator getLevelSets() throws Lib3MFException { + Pointer bufferResourceIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_model_getlevelsets.invokeInt(new java.lang.Object[]{mHandle, bufferResourceIterator})); + Pointer valueResourceIterator = bufferResourceIterator.getPointer(0); + LevelSetIterator resourceIterator = null; + if (valueResourceIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "ResourceIterator was a null pointer"); + } + resourceIterator = mWrapper.PolymorphicFactory(valueResourceIterator, LevelSetIterator.class); + return resourceIterator; + } + + /** + * Removes a resource from the model + * + * @param resource The resource to remove + * @throws Lib3MFException + */ + public void removeResource(Resource resource) throws Lib3MFException { + Pointer resourceHandle = null; + if (resource != null) { + resourceHandle = resource.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Resource is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_model_removeresource.invokeInt(new java.lang.Object[]{mHandle, resourceHandle})); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/MultiPropertyGroup.java b/Autogenerated/Bindings/Java9/lib3mf/MultiPropertyGroup.java new file mode 100644 index 000000000..b32a8b8d9 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/MultiPropertyGroup.java @@ -0,0 +1,194 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class MultiPropertyGroup extends Resource { + + public MultiPropertyGroup(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the count of MultiProperty-s in the MultiPropertyGroup. + * + * @return returns the count of MultiProperty-s + * @throws Lib3MFException + */ + public int getCount() throws Lib3MFException { + Pointer bufferCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_multipropertygroup_getcount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getInt(0); + } + + /** + * returns all the PropertyIDs of all MultiProperty-s in this MultiPropertyGroup + * + * @return PropertyID of the MultiProperty-s in the MultiPropertyGroup. + * @throws Lib3MFException + */ + public int[] getAllPropertyIDs() throws Lib3MFException { + Pointer countNeededPropertyIDs = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_multipropertygroup_getallpropertyids.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededPropertyIDs, Pointer.NULL})); + long countPropertyIDs = countNeededPropertyIDs.getLong(0); + Pointer bufferPropertyIDs = new Memory(Math.max(1, 4 * countPropertyIDs)); + mWrapper.checkError(this, mWrapper.lib3mf_multipropertygroup_getallpropertyids.invokeInt(new java.lang.Object[]{mHandle, countPropertyIDs, countNeededPropertyIDs, bufferPropertyIDs})); + return bufferPropertyIDs.getIntArray(0, (int)countPropertyIDs); + } + + /** + * Adds a new MultiProperty to the MultiPropertyGroup. + * + * @param propertyIDs The PropertyIDs of the new MultiProperty. + * @return returns the PropertyID of the new MultiProperty in the MultiPropertyGroup. + * @throws Lib3MFException + */ + public int addMultiProperty(int[] propertyIDs) throws Lib3MFException { + Pointer bufferPropertyIDs = new Memory(Math.max(1, 4 * propertyIDs.length)); + for (int i = 0; i < propertyIDs.length; i++) { + bufferPropertyIDs.setInt(4 * i, propertyIDs[i]); + } + Pointer bufferPropertyID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_multipropertygroup_addmultiproperty.invokeInt(new java.lang.Object[]{mHandle, (long) propertyIDs.length, bufferPropertyIDs, bufferPropertyID})); + return bufferPropertyID.getInt(0); + } + + /** + * Sets the PropertyIDs of a MultiProperty. + * + * @param propertyID the PropertyID of the MultiProperty to be changed. + * @param propertyIDs The new PropertyIDs of the MultiProperty + * @throws Lib3MFException + */ + public void setMultiProperty(int propertyID, int[] propertyIDs) throws Lib3MFException { + Pointer bufferPropertyIDs = new Memory(Math.max(1, 4 * propertyIDs.length)); + for (int i = 0; i < propertyIDs.length; i++) { + bufferPropertyIDs.setInt(4 * i, propertyIDs[i]); + } + mWrapper.checkError(this, mWrapper.lib3mf_multipropertygroup_setmultiproperty.invokeInt(new java.lang.Object[]{mHandle, propertyID, (long) propertyIDs.length, bufferPropertyIDs})); + } + + /** + * Obtains the PropertyIDs of a MultiProperty. + * + * @param propertyID the PropertyID of the MultiProperty to be queried. + * @return The PropertyIDs of the MultiProperty + * @throws Lib3MFException + */ + public int[] getMultiProperty(int propertyID) throws Lib3MFException { + Pointer countNeededPropertyIDs = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_multipropertygroup_getmultiproperty.invokeInt(new java.lang.Object[]{mHandle, propertyID, 0L, countNeededPropertyIDs, Pointer.NULL})); + long countPropertyIDs = countNeededPropertyIDs.getLong(0); + Pointer bufferPropertyIDs = new Memory(Math.max(1, 4 * countPropertyIDs)); + mWrapper.checkError(this, mWrapper.lib3mf_multipropertygroup_getmultiproperty.invokeInt(new java.lang.Object[]{mHandle, propertyID, countPropertyIDs, countNeededPropertyIDs, bufferPropertyIDs})); + return bufferPropertyIDs.getIntArray(0, (int)countPropertyIDs); + } + + /** + * Removes a MultiProperty from this MultiPropertyGroup. + * + * @param propertyID the PropertyID of the MultiProperty to be removed. + * @throws Lib3MFException + */ + public void removeMultiProperty(int propertyID) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_multipropertygroup_removemultiproperty.invokeInt(new java.lang.Object[]{mHandle, propertyID})); + } + + /** + * Retrieves the number of layers of this MultiPropertyGroup. + * + * @return returns the number of layers + * @throws Lib3MFException + */ + public int getLayerCount() throws Lib3MFException { + Pointer bufferCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_multipropertygroup_getlayercount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getInt(0); + } + + /** + * Adds a MultiPropertyLayer to this MultiPropertyGroup. + * + * @param theLayer The MultiPropertyLayer to add to this MultiPropertyGroup + * @return returns the index of this MultiPropertyLayer + * @throws Lib3MFException + */ + public int addLayer(MultiPropertyLayer theLayer) throws Lib3MFException { + Pointer bufferTheLayer = new Memory(MultiPropertyLayer.SIZE); + theLayer.writeToPointer(bufferTheLayer, 0); + Pointer bufferLayerIndex = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_multipropertygroup_addlayer.invokeInt(new java.lang.Object[]{mHandle, bufferTheLayer, bufferLayerIndex})); + return bufferLayerIndex.getInt(0); + } + + /** + * Obtains a MultiPropertyLayer of this MultiPropertyGroup. + * + * @param layerIndex The Index of the MultiPropertyLayer queried + * @return The MultiPropertyLayer with index LayerIndex within MultiPropertyGroup + * @throws Lib3MFException + */ + public MultiPropertyLayer getLayer(int layerIndex) throws Lib3MFException { + Pointer bufferTheLayer = new Memory(MultiPropertyLayer.SIZE); + mWrapper.checkError(this, mWrapper.lib3mf_multipropertygroup_getlayer.invokeInt(new java.lang.Object[]{mHandle, layerIndex, bufferTheLayer})); + MultiPropertyLayer theLayer = new MultiPropertyLayer(); + theLayer.readFromPointer(bufferTheLayer, 0); + return theLayer; + } + + /** + * Removes a MultiPropertyLayer from this MultiPropertyGroup. + * + * @param layerIndex The Index of the MultiPropertyLayer to be removed + * @throws Lib3MFException + */ + public void removeLayer(int layerIndex) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_multipropertygroup_removelayer.invokeInt(new java.lang.Object[]{mHandle, layerIndex})); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/MultiPropertyGroupIterator.java b/Autogenerated/Bindings/Java9/lib3mf/MultiPropertyGroupIterator.java new file mode 100644 index 000000000..3dc4d0f93 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/MultiPropertyGroupIterator.java @@ -0,0 +1,75 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class MultiPropertyGroupIterator extends ResourceIterator { + + public MultiPropertyGroupIterator(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the MultiPropertyGroup the iterator points at. + * + * @return returns the MultiPropertyGroup instance. + * @throws Lib3MFException + */ + public MultiPropertyGroup getCurrentMultiPropertyGroup() throws Lib3MFException { + Pointer bufferResource = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup.invokeInt(new java.lang.Object[]{mHandle, bufferResource})); + Pointer valueResource = bufferResource.getPointer(0); + MultiPropertyGroup resource = null; + if (valueResource == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Resource was a null pointer"); + } + resource = mWrapper.PolymorphicFactory(valueResource, MultiPropertyGroup.class); + return resource; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/MultiPropertyLayer.java b/Autogenerated/Bindings/Java9/lib3mf/MultiPropertyLayer.java new file mode 100644 index 000000000..cc349b19a --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/MultiPropertyLayer.java @@ -0,0 +1,63 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Memory; +import com.sun.jna.Pointer; + +import java.util.Arrays; +import java.util.List; + +public class MultiPropertyLayer { + + public int ResourceID; + + public int TheBlendMethod; + + public static final int SIZE = 8; + + public void readFromPointer(Pointer p, long offset) { + ResourceID = p.getInt(offset + 0); + TheBlendMethod = p.getInt(offset + 4); + } + + public void writeToPointer(Pointer p, long offset) { + p.setInt(offset + 0, ResourceID); + p.setInt(offset + 4, TheBlendMethod); + } + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/MultiplicationNode.java b/Autogenerated/Bindings/Java9/lib3mf/MultiplicationNode.java new file mode 100644 index 000000000..eeba2a29f --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/MultiplicationNode.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class MultiplicationNode extends TwoInputNode { + + public MultiplicationNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/NodeIterator.java b/Autogenerated/Bindings/Java9/lib3mf/NodeIterator.java new file mode 100644 index 000000000..6cefef57c --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/NodeIterator.java @@ -0,0 +1,75 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class NodeIterator extends Iterator { + + public NodeIterator(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the current element + * + * @return The current element + * @throws Lib3MFException + */ + public ImplicitNode getCurrent() throws Lib3MFException { + Pointer bufferNode = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_nodeiterator_getcurrent.invokeInt(new java.lang.Object[]{mHandle, bufferNode})); + Pointer valueNode = bufferNode.getPointer(0); + ImplicitNode node = null; + if (valueNode == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Node was a null pointer"); + } + node = mWrapper.PolymorphicFactory(valueNode, ImplicitNode.class); + return node; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/NormalizeDistanceNode.java b/Autogenerated/Bindings/Java9/lib3mf/NormalizeDistanceNode.java new file mode 100644 index 000000000..8ba115a9f --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/NormalizeDistanceNode.java @@ -0,0 +1,187 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class NormalizeDistanceNode extends ImplicitNode { + + public NormalizeDistanceNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the input for the function id + * + * @return the input port for the function + * @throws Lib3MFException + */ + public ImplicitPort getInputFunctionID() throws Lib3MFException { + Pointer bufferFunction = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_normalizedistancenode_getinputfunctionid.invokeInt(new java.lang.Object[]{mHandle, bufferFunction})); + Pointer valueFunction = bufferFunction.getPointer(0); + ImplicitPort function = null; + if (valueFunction == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Function was a null pointer"); + } + function = mWrapper.PolymorphicFactory(valueFunction, ImplicitPort.class); + return function; + } + + /** + * Retrieves the input for the position + * + * @return the input port for the position (vector) + * @throws Lib3MFException + */ + public ImplicitPort getInputPos() throws Lib3MFException { + Pointer bufferPos = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_normalizedistancenode_getinputpos.invokeInt(new java.lang.Object[]{mHandle, bufferPos})); + Pointer valuePos = bufferPos.getPointer(0); + ImplicitPort pos = null; + if (valuePos == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Pos was a null pointer"); + } + pos = mWrapper.PolymorphicFactory(valuePos, ImplicitPort.class); + return pos; + } + + /** + * Retrieves the input for the finite difference step + * + * @return the input port for the finite difference step + * @throws Lib3MFException + */ + public ImplicitPort getInputStep() throws Lib3MFException { + Pointer bufferStep = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_normalizedistancenode_getinputstep.invokeInt(new java.lang.Object[]{mHandle, bufferStep})); + Pointer valueStep = bufferStep.getPointer(0); + ImplicitPort step = null; + if (valueStep == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Step was a null pointer"); + } + step = mWrapper.PolymorphicFactory(valueStep, ImplicitPort.class); + return step; + } + + /** + * Sets the name of the referenced scalar output + * + * @param scalarOutputName the name of the scalar output of the referenced function + * @throws Lib3MFException + */ + public void setScalarOutputName(String scalarOutputName) throws Lib3MFException { + byte[] bytesScalarOutputName = scalarOutputName.getBytes(StandardCharsets.UTF_8); + Memory bufferScalarOutputName = new Memory(bytesScalarOutputName.length + 1); + bufferScalarOutputName.write(0, bytesScalarOutputName, 0, bytesScalarOutputName.length); + bufferScalarOutputName.setByte(bytesScalarOutputName.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_normalizedistancenode_setscalaroutputname.invokeInt(new java.lang.Object[]{mHandle, bufferScalarOutputName})); + } + + /** + * Retrieves the name of the referenced scalar output + * + * @return the name of the scalar output of the referenced function + * @throws Lib3MFException + */ + public String getScalarOutputName() throws Lib3MFException { + Pointer bytesNeededScalarOutputName = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_normalizedistancenode_getscalaroutputname.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededScalarOutputName, null})); + int sizeScalarOutputName = bytesNeededScalarOutputName.getInt(0); + Pointer bufferScalarOutputName = new Memory(sizeScalarOutputName); + mWrapper.checkError(this, mWrapper.lib3mf_normalizedistancenode_getscalaroutputname.invokeInt(new java.lang.Object[]{mHandle, sizeScalarOutputName, bytesNeededScalarOutputName, bufferScalarOutputName})); + return new String(bufferScalarOutputName.getByteArray(0, sizeScalarOutputName - 1), StandardCharsets.UTF_8); + } + + /** + * Sets the name of the referenced vector input + * + * @param vectorInputName the name of the vector input (float3) of the referenced function + * @throws Lib3MFException + */ + public void setVectorInputName(String vectorInputName) throws Lib3MFException { + byte[] bytesVectorInputName = vectorInputName.getBytes(StandardCharsets.UTF_8); + Memory bufferVectorInputName = new Memory(bytesVectorInputName.length + 1); + bufferVectorInputName.write(0, bytesVectorInputName, 0, bytesVectorInputName.length); + bufferVectorInputName.setByte(bytesVectorInputName.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_normalizedistancenode_setvectorinputname.invokeInt(new java.lang.Object[]{mHandle, bufferVectorInputName})); + } + + /** + * Retrieves the name of the referenced vector input + * + * @return the name of the vector input (float3) of the referenced function + * @throws Lib3MFException + */ + public String getVectorInputName() throws Lib3MFException { + Pointer bytesNeededVectorInputName = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_normalizedistancenode_getvectorinputname.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededVectorInputName, null})); + int sizeVectorInputName = bytesNeededVectorInputName.getInt(0); + Pointer bufferVectorInputName = new Memory(sizeVectorInputName); + mWrapper.checkError(this, mWrapper.lib3mf_normalizedistancenode_getvectorinputname.invokeInt(new java.lang.Object[]{mHandle, sizeVectorInputName, bytesNeededVectorInputName, bufferVectorInputName})); + return new String(bufferVectorInputName.getByteArray(0, sizeVectorInputName - 1), StandardCharsets.UTF_8); + } + + /** + * Retrieves the normalized result output + * + * @return the output port for the normalized distance + * @throws Lib3MFException + */ + public ImplicitPort getOutputResult() throws Lib3MFException { + Pointer bufferResult = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_normalizedistancenode_getoutputresult.invokeInt(new java.lang.Object[]{mHandle, bufferResult})); + Pointer valueResult = bufferResult.getPointer(0); + ImplicitPort result = null; + if (valueResult == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Result was a null pointer"); + } + result = mWrapper.PolymorphicFactory(valueResult, ImplicitPort.class); + return result; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/Object.java b/Autogenerated/Bindings/Java9/lib3mf/Object.java new file mode 100644 index 000000000..10a187e85 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/Object.java @@ -0,0 +1,382 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Object extends Resource { + + public Object(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves an object's type + * + * @return returns object type enum. + * @throws Lib3MFException + */ + public Lib3MFWrapper.ObjectType getType() throws Lib3MFException { + Pointer bufferObjectType = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_object_gettype.invokeInt(new java.lang.Object[]{mHandle, bufferObjectType})); + return Lib3MFWrapper.EnumConversion.convertConstToObjectType(bufferObjectType.getInt(0)); + } + + /** + * Sets an object's type + * + * @param objectType object type enum. + * @throws Lib3MFException + */ + public void setType(Lib3MFWrapper.ObjectType objectType) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_object_settype.invokeInt(new java.lang.Object[]{mHandle, Lib3MFWrapper.EnumConversion.convertObjectTypeToConst(objectType)})); + } + + /** + * Retrieves an object's name + * + * @return returns object name. + * @throws Lib3MFException + */ + public String getName() throws Lib3MFException { + Pointer bytesNeededName = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_object_getname.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededName, null})); + int sizeName = bytesNeededName.getInt(0); + Pointer bufferName = new Memory(sizeName); + mWrapper.checkError(this, mWrapper.lib3mf_object_getname.invokeInt(new java.lang.Object[]{mHandle, sizeName, bytesNeededName, bufferName})); + return new String(bufferName.getByteArray(0, sizeName - 1), StandardCharsets.UTF_8); + } + + /** + * Sets an object's name string + * + * @param name new object name. + * @throws Lib3MFException + */ + public void setName(String name) throws Lib3MFException { + byte[] bytesName = name.getBytes(StandardCharsets.UTF_8); + Memory bufferName = new Memory(bytesName.length + 1); + bufferName.write(0, bytesName, 0, bytesName.length); + bufferName.setByte(bytesName.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_object_setname.invokeInt(new java.lang.Object[]{mHandle, bufferName})); + } + + /** + * Retrieves an object's part number + * + * @return returns object part number. + * @throws Lib3MFException + */ + public String getPartNumber() throws Lib3MFException { + Pointer bytesNeededPartNumber = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_object_getpartnumber.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededPartNumber, null})); + int sizePartNumber = bytesNeededPartNumber.getInt(0); + Pointer bufferPartNumber = new Memory(sizePartNumber); + mWrapper.checkError(this, mWrapper.lib3mf_object_getpartnumber.invokeInt(new java.lang.Object[]{mHandle, sizePartNumber, bytesNeededPartNumber, bufferPartNumber})); + return new String(bufferPartNumber.getByteArray(0, sizePartNumber - 1), StandardCharsets.UTF_8); + } + + /** + * Sets an objects partnumber string + * + * @param partNumber new object part number. + * @throws Lib3MFException + */ + public void setPartNumber(String partNumber) throws Lib3MFException { + byte[] bytesPartNumber = partNumber.getBytes(StandardCharsets.UTF_8); + Memory bufferPartNumber = new Memory(bytesPartNumber.length + 1); + bufferPartNumber.write(0, bytesPartNumber, 0, bytesPartNumber.length); + bufferPartNumber.setByte(bytesPartNumber.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_object_setpartnumber.invokeInt(new java.lang.Object[]{mHandle, bufferPartNumber})); + } + + /** + * Retrieves, if an object is a mesh object + * + * @return returns, whether the object is a mesh object + * @throws Lib3MFException + */ + public boolean isMeshObject() throws Lib3MFException { + Pointer bufferIsMeshObject = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_object_ismeshobject.invokeInt(new java.lang.Object[]{mHandle, bufferIsMeshObject})); + return bufferIsMeshObject.getByte(0) != 0; + } + + /** + * Retrieves, if an object is a components object + * + * @return returns, whether the object is a components object + * @throws Lib3MFException + */ + public boolean isComponentsObject() throws Lib3MFException { + Pointer bufferIsComponentsObject = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_object_iscomponentsobject.invokeInt(new java.lang.Object[]{mHandle, bufferIsComponentsObject})); + return bufferIsComponentsObject.getByte(0) != 0; + } + + /** + * Retrieves, if an object is a level set object + * + * @return returns, whether the object is a level set object + * @throws Lib3MFException + */ + public boolean isLevelSetObject() throws Lib3MFException { + Pointer bufferIsLevelSetObject = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_object_islevelsetobject.invokeInt(new java.lang.Object[]{mHandle, bufferIsLevelSetObject})); + return bufferIsLevelSetObject.getByte(0) != 0; + } + + /** + * Retrieves, if the object is valid according to the core spec. For mesh objects, we distinguish between the type attribute of the object:In case of object type other, this always means false.In case of object type model or solidsupport, this means, if the mesh suffices all requirements of the core spec chapter 4.1.In case of object type support or surface, this always means true.A component objects is valid if and only if it contains at least one component and all child components are valid objects. + * + * @return returns whether the object is a valid object description + * @throws Lib3MFException + */ + public boolean isValid() throws Lib3MFException { + Pointer bufferIsValid = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_object_isvalid.invokeInt(new java.lang.Object[]{mHandle, bufferIsValid})); + return bufferIsValid.getByte(0) != 0; + } + + /** + * Use an existing attachment as thumbnail for this object + * + * @param attachment Instance of a new or the existing thumbnailattachment object. + * @throws Lib3MFException + */ + public void setAttachmentAsThumbnail(Attachment attachment) throws Lib3MFException { + Pointer attachmentHandle = null; + if (attachment != null) { + attachmentHandle = attachment.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Attachment is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_object_setattachmentasthumbnail.invokeInt(new java.lang.Object[]{mHandle, attachmentHandle})); + } + + /** + * Get the attachment containing the object thumbnail. + * + * @return Instance of the thumbnailattachment object or NULL. + * @throws Lib3MFException + */ + public Attachment getThumbnailAttachment() throws Lib3MFException { + Pointer bufferAttachment = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_object_getthumbnailattachment.invokeInt(new java.lang.Object[]{mHandle, bufferAttachment})); + Pointer valueAttachment = bufferAttachment.getPointer(0); + Attachment attachment = null; + if (valueAttachment != Pointer.NULL) { + attachment = mWrapper.PolymorphicFactory(valueAttachment, Attachment.class); + } + return attachment; + } + + /** + * Clears the attachment. The attachment instance is not removed from the package. + * + * @throws Lib3MFException + */ + public void clearThumbnailAttachment() throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_object_clearthumbnailattachment.invokeInt(new java.lang.Object[]{mHandle})); + } + + /** + * Returns the outbox of a build item + * + * @return Outbox of this build item + * @throws Lib3MFException + */ + public Box getOutbox() throws Lib3MFException { + Pointer bufferOutbox = new Memory(Box.SIZE); + mWrapper.checkError(this, mWrapper.lib3mf_object_getoutbox.invokeInt(new java.lang.Object[]{mHandle, bufferOutbox})); + Box outbox = new Box(); + outbox.readFromPointer(bufferOutbox, 0); + return outbox; + } + + /** + * Retrieves an object's uuid string (see production extension specification) + * + * @return GetUUID Result Tuple + * @throws Lib3MFException + */ + public GetUUIDResult getUUID() throws Lib3MFException { + Pointer bufferHasUUID = new Memory(1); + Pointer bytesNeededUUID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_object_getuuid.invokeInt(new java.lang.Object[]{mHandle, bufferHasUUID, 0, bytesNeededUUID, null})); + int sizeUUID = bytesNeededUUID.getInt(0); + Pointer bufferUUID = new Memory(sizeUUID); + mWrapper.checkError(this, mWrapper.lib3mf_object_getuuid.invokeInt(new java.lang.Object[]{mHandle, bufferHasUUID, sizeUUID, bytesNeededUUID, bufferUUID})); + GetUUIDResult returnTuple = new GetUUIDResult(); + returnTuple.HasUUID = bufferHasUUID.getByte(0) != 0; + returnTuple.UUID = new String(bufferUUID.getByteArray(0, sizeUUID - 1), StandardCharsets.UTF_8); + return returnTuple; + } + + public static class GetUUIDResult { + /** + * flag whether the build item has a UUID + */ + public boolean HasUUID; + + /** + * returns object uuid. + */ + public String UUID; + + } + /** + * Sets a build object's uuid string (see production extension specification) + * + * @param uUID new object uuid string. + * @throws Lib3MFException + */ + public void setUUID(String uUID) throws Lib3MFException { + byte[] bytesUUID = uUID.getBytes(StandardCharsets.UTF_8); + Memory bufferUUID = new Memory(bytesUUID.length + 1); + bufferUUID.write(0, bytesUUID, 0, bytesUUID.length); + bufferUUID.setByte(bytesUUID.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_object_setuuid.invokeInt(new java.lang.Object[]{mHandle, bufferUUID})); + } + + /** + * Returns the metadatagroup of this object + * + * @return returns an Instance of the metadatagroup of this object + * @throws Lib3MFException + */ + public MetaDataGroup getMetaDataGroup() throws Lib3MFException { + Pointer bufferMetaDataGroup = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_object_getmetadatagroup.invokeInt(new java.lang.Object[]{mHandle, bufferMetaDataGroup})); + Pointer valueMetaDataGroup = bufferMetaDataGroup.getPointer(0); + MetaDataGroup metaDataGroup = null; + if (valueMetaDataGroup == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "MetaDataGroup was a null pointer"); + } + metaDataGroup = mWrapper.PolymorphicFactory(valueMetaDataGroup, MetaDataGroup.class); + return metaDataGroup; + } + + /** + * set the meshresolution of the mesh object + * + * @param meshResolution meshresolution of this object + * @throws Lib3MFException + */ + public void setSlicesMeshResolution(Lib3MFWrapper.SlicesMeshResolution meshResolution) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_object_setslicesmeshresolution.invokeInt(new java.lang.Object[]{mHandle, Lib3MFWrapper.EnumConversion.convertSlicesMeshResolutionToConst(meshResolution)})); + } + + /** + * get the meshresolution of the mesh object + * + * @return meshresolution of this object + * @throws Lib3MFException + */ + public Lib3MFWrapper.SlicesMeshResolution getSlicesMeshResolution() throws Lib3MFException { + Pointer bufferMeshResolution = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_object_getslicesmeshresolution.invokeInt(new java.lang.Object[]{mHandle, bufferMeshResolution})); + return Lib3MFWrapper.EnumConversion.convertConstToSlicesMeshResolution(bufferMeshResolution.getInt(0)); + } + + /** + * returns whether the Object has a slice stack. If Recursive is true, also checks whether any references object has a slice stack + * + * @param recursive check also all referenced objects? + * @return does the object have a slice stack? + * @throws Lib3MFException + */ + public boolean hasSlices(boolean recursive) throws Lib3MFException { + Pointer bufferHasSlices = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_object_hasslices.invokeInt(new java.lang.Object[]{mHandle, recursive, bufferHasSlices})); + return bufferHasSlices.getByte(0) != 0; + } + + /** + * unlinks the attached slicestack from this object. If no slice stack is attached, do noting. + * + * @throws Lib3MFException + */ + public void clearSliceStack() throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_object_clearslicestack.invokeInt(new java.lang.Object[]{mHandle})); + } + + /** + * get the Slicestack attached to the object + * + * @return returns the slicestack instance + * @throws Lib3MFException + */ + public SliceStack getSliceStack() throws Lib3MFException { + Pointer bufferSliceStackInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_object_getslicestack.invokeInt(new java.lang.Object[]{mHandle, bufferSliceStackInstance})); + Pointer valueSliceStackInstance = bufferSliceStackInstance.getPointer(0); + SliceStack sliceStackInstance = null; + if (valueSliceStackInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "SliceStackInstance was a null pointer"); + } + sliceStackInstance = mWrapper.PolymorphicFactory(valueSliceStackInstance, SliceStack.class); + return sliceStackInstance; + } + + /** + * assigns a slicestack to the object + * + * @param sliceStackInstance the new slice stack of this Object + * @throws Lib3MFException + */ + public void assignSliceStack(SliceStack sliceStackInstance) throws Lib3MFException { + Pointer sliceStackInstanceHandle = null; + if (sliceStackInstance != null) { + sliceStackInstanceHandle = sliceStackInstance.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "SliceStackInstance is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_object_assignslicestack.invokeInt(new java.lang.Object[]{mHandle, sliceStackInstanceHandle})); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/ObjectIterator.java b/Autogenerated/Bindings/Java9/lib3mf/ObjectIterator.java new file mode 100644 index 000000000..e9ee4dbc4 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/ObjectIterator.java @@ -0,0 +1,75 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ObjectIterator extends ResourceIterator { + + public ObjectIterator(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the Object the iterator points at. + * + * @return returns the Object instance. + * @throws Lib3MFException + */ + public Object getCurrentObject() throws Lib3MFException { + Pointer bufferResource = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_objectiterator_getcurrentobject.invokeInt(new java.lang.Object[]{mHandle, bufferResource})); + Pointer valueResource = bufferResource.getPointer(0); + Object resource = null; + if (valueResource == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Resource was a null pointer"); + } + resource = mWrapper.PolymorphicFactory(valueResource, Object.class); + return resource; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/OneInputNode.java b/Autogenerated/Bindings/Java9/lib3mf/OneInputNode.java new file mode 100644 index 000000000..3cd0f8f66 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/OneInputNode.java @@ -0,0 +1,93 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class OneInputNode extends ImplicitNode { + + public OneInputNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the input + * + * @return the input + * @throws Lib3MFException + */ + public ImplicitPort getInputA() throws Lib3MFException { + Pointer bufferInput = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_oneinputnode_getinputa.invokeInt(new java.lang.Object[]{mHandle, bufferInput})); + Pointer valueInput = bufferInput.getPointer(0); + ImplicitPort input = null; + if (valueInput == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Input was a null pointer"); + } + input = mWrapper.PolymorphicFactory(valueInput, ImplicitPort.class); + return input; + } + + /** + * Retrieves the output + * + * @return the output + * @throws Lib3MFException + */ + public ImplicitPort getOutputResult() throws Lib3MFException { + Pointer bufferResult = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_oneinputnode_getoutputresult.invokeInt(new java.lang.Object[]{mHandle, bufferResult})); + Pointer valueResult = bufferResult.getPointer(0); + ImplicitPort result = null; + if (valueResult == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Result was a null pointer"); + } + result = mWrapper.PolymorphicFactory(valueResult, ImplicitPort.class); + return result; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/PackagePart.java b/Autogenerated/Bindings/Java9/lib3mf/PackagePart.java new file mode 100644 index 000000000..c22d4ae95 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/PackagePart.java @@ -0,0 +1,86 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class PackagePart extends Base { + + public PackagePart(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the absolute path of this PackagePart. + * + * @return Returns the absolute path of this PackagePart + * @throws Lib3MFException + */ + public String getPath() throws Lib3MFException { + Pointer bytesNeededPath = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_packagepart_getpath.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededPath, null})); + int sizePath = bytesNeededPath.getInt(0); + Pointer bufferPath = new Memory(sizePath); + mWrapper.checkError(this, mWrapper.lib3mf_packagepart_getpath.invokeInt(new java.lang.Object[]{mHandle, sizePath, bytesNeededPath, bufferPath})); + return new String(bufferPath.getByteArray(0, sizePath - 1), StandardCharsets.UTF_8); + } + + /** + * Sets the absolute path of this PackagePart. + * + * @param path Sets the absolute path of this PackagePart. + * @throws Lib3MFException + */ + public void setPath(String path) throws Lib3MFException { + byte[] bytesPath = path.getBytes(StandardCharsets.UTF_8); + Memory bufferPath = new Memory(bytesPath.length + 1); + bufferPath.write(0, bytesPath, 0, bytesPath.length); + bufferPath.setByte(bytesPath.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_packagepart_setpath.invokeInt(new java.lang.Object[]{mHandle, bufferPath})); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/Position.java b/Autogenerated/Bindings/Java9/lib3mf/Position.java new file mode 100644 index 000000000..8ca7b7f64 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/Position.java @@ -0,0 +1,63 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Memory; +import com.sun.jna.Pointer; + +import java.util.Arrays; +import java.util.List; + +public class Position { + + public float[] Coordinates = new float[3]; + + public static final int SIZE = 12; + + public void readFromPointer(Pointer p, long offset) { + Coordinates[0] = p.getFloat(offset + 0); + Coordinates[1] = p.getFloat(offset + 4); + Coordinates[2] = p.getFloat(offset + 8); + } + + public void writeToPointer(Pointer p, long offset) { + p.setFloat(offset + 0, Coordinates[0]); + p.setFloat(offset + 4, Coordinates[1]); + p.setFloat(offset + 8, Coordinates[2]); + } + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/Position2D.java b/Autogenerated/Bindings/Java9/lib3mf/Position2D.java new file mode 100644 index 000000000..65c9cab65 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/Position2D.java @@ -0,0 +1,61 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Memory; +import com.sun.jna.Pointer; + +import java.util.Arrays; +import java.util.List; + +public class Position2D { + + public float[] Coordinates = new float[2]; + + public static final int SIZE = 8; + + public void readFromPointer(Pointer p, long offset) { + Coordinates[0] = p.getFloat(offset + 0); + Coordinates[1] = p.getFloat(offset + 4); + } + + public void writeToPointer(Pointer p, long offset) { + p.setFloat(offset + 0, Coordinates[0]); + p.setFloat(offset + 4, Coordinates[1]); + } + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/PowNode.java b/Autogenerated/Bindings/Java9/lib3mf/PowNode.java new file mode 100644 index 000000000..640300644 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/PowNode.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class PowNode extends TwoInputNode { + + public PowNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/Reader.java b/Autogenerated/Bindings/Java9/lib3mf/Reader.java new file mode 100644 index 000000000..6ecbc20c7 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/Reader.java @@ -0,0 +1,230 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Reader extends Base { + + public Reader(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Reads a model from a file. The file type is specified by the Model Reader class + * + * @param filename Filename to read from + * @throws Lib3MFException + */ + public void readFromFile(String filename) throws Lib3MFException { + byte[] bytesFilename = filename.getBytes(StandardCharsets.UTF_8); + Memory bufferFilename = new Memory(bytesFilename.length + 1); + bufferFilename.write(0, bytesFilename, 0, bytesFilename.length); + bufferFilename.setByte(bytesFilename.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_reader_readfromfile.invokeInt(new java.lang.Object[]{mHandle, bufferFilename})); + } + + /** + * Reads a model from a memory buffer. + * + * @param buffer Buffer to read from + * @throws Lib3MFException + */ + public void readFromBuffer(byte[] buffer) throws Lib3MFException { + Pointer bufferBuffer = new Memory(Math.max(1, 1 * buffer.length)); + for (int i = 0; i < buffer.length; i++) { + bufferBuffer.setByte(1 * i, buffer[i]); + } + mWrapper.checkError(this, mWrapper.lib3mf_reader_readfrombuffer.invokeInt(new java.lang.Object[]{mHandle, (long) buffer.length, bufferBuffer})); + } + + /** + * Reads a model and from the data provided by a callback function + * + * @param theReadCallback Callback to call for reading a data chunk + * @param streamSize number of bytes the callback returns + * @param theSeekCallback Callback to call for seeking in the stream. + * @param userData Userdata that is passed to the callback function + * @throws Lib3MFException + */ + public void readFromCallback(Lib3MFWrapper.ReadCallback theReadCallback, long streamSize, Lib3MFWrapper.SeekCallback theSeekCallback, Pointer userData) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_reader_readfromcallback.invokeInt(new java.lang.Object[]{mHandle, theReadCallback, streamSize, theSeekCallback, userData})); + } + + /** + * Set the progress callback for calls to this writer + * + * @param progressCallback pointer to the callback function. + * @param userData pointer to arbitrary user data that is passed without modification to the callback. + * @throws Lib3MFException + */ + public void setProgressCallback(Lib3MFWrapper.ProgressCallback progressCallback, Pointer userData) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_reader_setprogresscallback.invokeInt(new java.lang.Object[]{mHandle, progressCallback, userData})); + } + + /** + * Adds a relationship type which shall be read as attachment in memory while loading + * + * @param relationShipType String of the relationship type + * @throws Lib3MFException + */ + public void addRelationToRead(String relationShipType) throws Lib3MFException { + byte[] bytesRelationShipType = relationShipType.getBytes(StandardCharsets.UTF_8); + Memory bufferRelationShipType = new Memory(bytesRelationShipType.length + 1); + bufferRelationShipType.write(0, bytesRelationShipType, 0, bytesRelationShipType.length); + bufferRelationShipType.setByte(bytesRelationShipType.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_reader_addrelationtoread.invokeInt(new java.lang.Object[]{mHandle, bufferRelationShipType})); + } + + /** + * Removes a relationship type which shall be read as attachment in memory while loading + * + * @param relationShipType String of the relationship type + * @throws Lib3MFException + */ + public void removeRelationToRead(String relationShipType) throws Lib3MFException { + byte[] bytesRelationShipType = relationShipType.getBytes(StandardCharsets.UTF_8); + Memory bufferRelationShipType = new Memory(bytesRelationShipType.length + 1); + bufferRelationShipType.write(0, bytesRelationShipType, 0, bytesRelationShipType.length); + bufferRelationShipType.setByte(bytesRelationShipType.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_reader_removerelationtoread.invokeInt(new java.lang.Object[]{mHandle, bufferRelationShipType})); + } + + /** + * Activates (deactivates) the strict mode of the reader. + * + * @param strictModeActive flag whether strict mode is active or not. + * @throws Lib3MFException + */ + public void setStrictModeActive(boolean strictModeActive) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_reader_setstrictmodeactive.invokeInt(new java.lang.Object[]{mHandle, strictModeActive})); + } + + /** + * Queries whether the strict mode of the reader is active or not + * + * @return returns flag whether strict mode is active or not. + * @throws Lib3MFException + */ + public boolean getStrictModeActive() throws Lib3MFException { + Pointer bufferStrictModeActive = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_reader_getstrictmodeactive.invokeInt(new java.lang.Object[]{mHandle, bufferStrictModeActive})); + return bufferStrictModeActive.getByte(0) != 0; + } + + /** + * Returns Warning and Error Information of the read process + * + * @param index Index of the Warning. Valid values are 0 to WarningCount - 1 + * @return GetWarning Result Tuple + * @throws Lib3MFException + */ + public GetWarningResult getWarning(int index) throws Lib3MFException { + Pointer bufferErrorCode = new Memory(4); + Pointer bytesNeededWarning = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_reader_getwarning.invokeInt(new java.lang.Object[]{mHandle, index, bufferErrorCode, 0, bytesNeededWarning, null})); + int sizeWarning = bytesNeededWarning.getInt(0); + Pointer bufferWarning = new Memory(sizeWarning); + mWrapper.checkError(this, mWrapper.lib3mf_reader_getwarning.invokeInt(new java.lang.Object[]{mHandle, index, bufferErrorCode, sizeWarning, bytesNeededWarning, bufferWarning})); + GetWarningResult returnTuple = new GetWarningResult(); + returnTuple.ErrorCode = bufferErrorCode.getInt(0); + returnTuple.Warning = new String(bufferWarning.getByteArray(0, sizeWarning - 1), StandardCharsets.UTF_8); + return returnTuple; + } + + public static class GetWarningResult { + /** + * filled with the error code of the warning + */ + public int ErrorCode; + + /** + * the message of the warning + */ + public String Warning; + + } + /** + * Returns Warning and Error Count of the read process + * + * @return filled with the count of the occurred warnings. + * @throws Lib3MFException + */ + public int getWarningCount() throws Lib3MFException { + Pointer bufferCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_reader_getwarningcount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getInt(0); + } + + /** + * Registers a callback to deal with key wrapping mechanism from keystore + * + * @param consumerID The ConsumerID to register for + * @param theCallback The callback used to decrypt data key + * @param userData Userdata that is passed to the callback function + * @throws Lib3MFException + */ + public void addKeyWrappingCallback(String consumerID, Lib3MFWrapper.KeyWrappingCallback theCallback, Pointer userData) throws Lib3MFException { + byte[] bytesConsumerID = consumerID.getBytes(StandardCharsets.UTF_8); + Memory bufferConsumerID = new Memory(bytesConsumerID.length + 1); + bufferConsumerID.write(0, bytesConsumerID, 0, bytesConsumerID.length); + bufferConsumerID.setByte(bytesConsumerID.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_reader_addkeywrappingcallback.invokeInt(new java.lang.Object[]{mHandle, bufferConsumerID, theCallback, userData})); + } + + /** + * Registers a callback to deal with encryption of content + * + * @param theCallback The callback used to encrypt content + * @param userData Userdata that is passed to the callback function + * @throws Lib3MFException + */ + public void setContentEncryptionCallback(Lib3MFWrapper.ContentEncryptionCallback theCallback, Pointer userData) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_reader_setcontentencryptioncallback.invokeInt(new java.lang.Object[]{mHandle, theCallback, userData})); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/Resource.java b/Autogenerated/Bindings/Java9/lib3mf/Resource.java new file mode 100644 index 000000000..0c889bbd5 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/Resource.java @@ -0,0 +1,127 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Resource extends Base { + + public Resource(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the unique id of this resource within a package. This function will be removed in a later release in favor of GetUniqueResourceID + * + * @return Retrieves the unique id of this resource within a package. + * @throws Lib3MFException + */ + public int getResourceID() throws Lib3MFException { + Pointer bufferUniqueResourceID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_resource_getresourceid.invokeInt(new java.lang.Object[]{mHandle, bufferUniqueResourceID})); + return bufferUniqueResourceID.getInt(0); + } + + /** + * Retrieves the unique id of this resource within a package. + * + * @return Retrieves the unique id of this resource within a package. + * @throws Lib3MFException + */ + public int getUniqueResourceID() throws Lib3MFException { + Pointer bufferUniqueResourceID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_resource_getuniqueresourceid.invokeInt(new java.lang.Object[]{mHandle, bufferUniqueResourceID})); + return bufferUniqueResourceID.getInt(0); + } + + /** + * Returns the PackagePart within which this resource resides + * + * @return the PackagePart within which this resource resides. + * @throws Lib3MFException + */ + public PackagePart packagePart() throws Lib3MFException { + Pointer bufferPackagePart = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_resource_packagepart.invokeInt(new java.lang.Object[]{mHandle, bufferPackagePart})); + Pointer valuePackagePart = bufferPackagePart.getPointer(0); + PackagePart packagePart = null; + if (valuePackagePart == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "PackagePart was a null pointer"); + } + packagePart = mWrapper.PolymorphicFactory(valuePackagePart, PackagePart.class); + return packagePart; + } + + /** + * Sets the new PackagePart within which this resource resides + * + * @param packagePart the new PackagePart within which this resource resides. + * @throws Lib3MFException + */ + public void setPackagePart(PackagePart packagePart) throws Lib3MFException { + Pointer packagePartHandle = null; + if (packagePart != null) { + packagePartHandle = packagePart.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "PackagePart is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_resource_setpackagepart.invokeInt(new java.lang.Object[]{mHandle, packagePartHandle})); + } + + /** + * Retrieves the id of this resource within a model. + * + * @return Retrieves the id of this resource within a model. + * @throws Lib3MFException + */ + public int getModelResourceID() throws Lib3MFException { + Pointer bufferModelResourceId = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_resource_getmodelresourceid.invokeInt(new java.lang.Object[]{mHandle, bufferModelResourceId})); + return bufferModelResourceId.getInt(0); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/ResourceData.java b/Autogenerated/Bindings/Java9/lib3mf/ResourceData.java new file mode 100644 index 000000000..8e0fc54dd --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/ResourceData.java @@ -0,0 +1,114 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ResourceData extends Base { + + public ResourceData(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Gets the encrypted part path + * + * @return The part path + * @throws Lib3MFException + */ + public PackagePart getPath() throws Lib3MFException { + Pointer bufferPath = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_resourcedata_getpath.invokeInt(new java.lang.Object[]{mHandle, bufferPath})); + Pointer valuePath = bufferPath.getPointer(0); + PackagePart path = null; + if (valuePath == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Path was a null pointer"); + } + path = mWrapper.PolymorphicFactory(valuePath, PackagePart.class); + return path; + } + + /** + * Gets the encryption algorithm used to encrypt this ResourceData + * + * @return The encryption algorithm + * @throws Lib3MFException + */ + public Lib3MFWrapper.EncryptionAlgorithm getEncryptionAlgorithm() throws Lib3MFException { + Pointer bufferEncryptionAlgorithm = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_resourcedata_getencryptionalgorithm.invokeInt(new java.lang.Object[]{mHandle, bufferEncryptionAlgorithm})); + return Lib3MFWrapper.EnumConversion.convertConstToEncryptionAlgorithm(bufferEncryptionAlgorithm.getInt(0)); + } + + /** + * Tells whether this ResourceData is compressed or not + * + * @return The compression method + * @throws Lib3MFException + */ + public Lib3MFWrapper.Compression getCompression() throws Lib3MFException { + Pointer bufferCompression = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_resourcedata_getcompression.invokeInt(new java.lang.Object[]{mHandle, bufferCompression})); + return Lib3MFWrapper.EnumConversion.convertConstToCompression(bufferCompression.getInt(0)); + } + + /** + * Tells whether this ResourceData is compressed or not + * + * @return The compression method + * @throws Lib3MFException + */ + public byte[] getAdditionalAuthenticationData() throws Lib3MFException { + Pointer countNeededByteData = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_resourcedata_getadditionalauthenticationdata.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededByteData, Pointer.NULL})); + long countByteData = countNeededByteData.getLong(0); + Pointer bufferByteData = new Memory(Math.max(1, 1 * countByteData)); + mWrapper.checkError(this, mWrapper.lib3mf_resourcedata_getadditionalauthenticationdata.invokeInt(new java.lang.Object[]{mHandle, countByteData, countNeededByteData, bufferByteData})); + return bufferByteData.getByteArray(0, (int)countByteData); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/ResourceDataGroup.java b/Autogenerated/Bindings/Java9/lib3mf/ResourceDataGroup.java new file mode 100644 index 000000000..4f13266bc --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/ResourceDataGroup.java @@ -0,0 +1,140 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ResourceDataGroup extends Base { + + public ResourceDataGroup(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Sets the resourcedatagroup keyuuid + * + * @return The new resourcedatagroup keyuuid. + * @throws Lib3MFException + */ + public String getKeyUUID() throws Lib3MFException { + Pointer bytesNeededUUID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_resourcedatagroup_getkeyuuid.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededUUID, null})); + int sizeUUID = bytesNeededUUID.getInt(0); + Pointer bufferUUID = new Memory(sizeUUID); + mWrapper.checkError(this, mWrapper.lib3mf_resourcedatagroup_getkeyuuid.invokeInt(new java.lang.Object[]{mHandle, sizeUUID, bytesNeededUUID, bufferUUID})); + return new String(bufferUUID.getByteArray(0, sizeUUID - 1), StandardCharsets.UTF_8); + } + + /** + * Add accessright to resourcedatagroup element + * + * @param consumer The Consumer reference + * @param wrappingAlgorithm The key wrapping algorithm to be used + * @param mgfAlgorithm The mask generation function to be used + * @param digestMethod The digest mechanism to be used + * @return The acess right instance + * @throws Lib3MFException + */ + public AccessRight addAccessRight(Consumer consumer, Lib3MFWrapper.WrappingAlgorithm wrappingAlgorithm, Lib3MFWrapper.MgfAlgorithm mgfAlgorithm, Lib3MFWrapper.DigestMethod digestMethod) throws Lib3MFException { + Pointer consumerHandle = null; + if (consumer != null) { + consumerHandle = consumer.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Consumer is a null value."); + } + Pointer bufferTheAccessRight = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_resourcedatagroup_addaccessright.invokeInt(new java.lang.Object[]{mHandle, consumerHandle, Lib3MFWrapper.EnumConversion.convertWrappingAlgorithmToConst(wrappingAlgorithm), Lib3MFWrapper.EnumConversion.convertMgfAlgorithmToConst(mgfAlgorithm), Lib3MFWrapper.EnumConversion.convertDigestMethodToConst(digestMethod), bufferTheAccessRight})); + Pointer valueTheAccessRight = bufferTheAccessRight.getPointer(0); + AccessRight theAccessRight = null; + if (valueTheAccessRight == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheAccessRight was a null pointer"); + } + theAccessRight = mWrapper.PolymorphicFactory(valueTheAccessRight, AccessRight.class); + return theAccessRight; + } + + /** + * Finds the AccessRight associated with a Consumer + * + * @param consumer The Consumer instance + * @return The AcessRight instance + * @throws Lib3MFException + */ + public AccessRight findAccessRightByConsumer(Consumer consumer) throws Lib3MFException { + Pointer consumerHandle = null; + if (consumer != null) { + consumerHandle = consumer.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Consumer is a null value."); + } + Pointer bufferTheAccessRight = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_resourcedatagroup_findaccessrightbyconsumer.invokeInt(new java.lang.Object[]{mHandle, consumerHandle, bufferTheAccessRight})); + Pointer valueTheAccessRight = bufferTheAccessRight.getPointer(0); + AccessRight theAccessRight = null; + if (valueTheAccessRight != Pointer.NULL) { + theAccessRight = mWrapper.PolymorphicFactory(valueTheAccessRight, AccessRight.class); + } + return theAccessRight; + } + + /** + * Removes access from a Consumer on this resource data group + * + * @param consumer The Consumer instance + * @throws Lib3MFException + */ + public void removeAccessRight(Consumer consumer) throws Lib3MFException { + Pointer consumerHandle = null; + if (consumer != null) { + consumerHandle = consumer.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Consumer is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_resourcedatagroup_removeaccessright.invokeInt(new java.lang.Object[]{mHandle, consumerHandle})); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/ResourceIdNode.java b/Autogenerated/Bindings/Java9/lib3mf/ResourceIdNode.java new file mode 100644 index 000000000..32dde6ea5 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/ResourceIdNode.java @@ -0,0 +1,109 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ResourceIdNode extends ImplicitNode { + + public ResourceIdNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Sets the Resource that the resourceid attribute of the node will point to + * + * @param resource the resource + * @throws Lib3MFException + */ + public void setResource(Resource resource) throws Lib3MFException { + Pointer resourceHandle = null; + if (resource != null) { + resourceHandle = resource.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Resource is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_resourceidnode_setresource.invokeInt(new java.lang.Object[]{mHandle, resourceHandle})); + } + + /** + * Retrieves the resource of the node + * + * @return the resource + * @throws Lib3MFException + */ + public Resource getResource() throws Lib3MFException { + Pointer bufferResource = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_resourceidnode_getresource.invokeInt(new java.lang.Object[]{mHandle, bufferResource})); + Pointer valueResource = bufferResource.getPointer(0); + Resource resource = null; + if (valueResource == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Resource was a null pointer"); + } + resource = mWrapper.PolymorphicFactory(valueResource, Resource.class); + return resource; + } + + /** + * Retrieves the output + * + * @return the output + * @throws Lib3MFException + */ + public ImplicitPort getOutputValue() throws Lib3MFException { + Pointer bufferValue = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_resourceidnode_getoutputvalue.invokeInt(new java.lang.Object[]{mHandle, bufferValue})); + Pointer valueValue = bufferValue.getPointer(0); + ImplicitPort value = null; + if (valueValue == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Value was a null pointer"); + } + value = mWrapper.PolymorphicFactory(valueValue, ImplicitPort.class); + return value; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/ResourceIterator.java b/Autogenerated/Bindings/Java9/lib3mf/ResourceIterator.java new file mode 100644 index 000000000..d1d847a2e --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/ResourceIterator.java @@ -0,0 +1,129 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class ResourceIterator extends Base { + + public ResourceIterator(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Iterates to the next resource in the list. + * + * @return Iterates to the next resource in the list. + * @throws Lib3MFException + */ + public boolean moveNext() throws Lib3MFException { + Pointer bufferHasNext = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_resourceiterator_movenext.invokeInt(new java.lang.Object[]{mHandle, bufferHasNext})); + return bufferHasNext.getByte(0) != 0; + } + + /** + * Iterates to the previous resource in the list. + * + * @return Iterates to the previous resource in the list. + * @throws Lib3MFException + */ + public boolean movePrevious() throws Lib3MFException { + Pointer bufferHasPrevious = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_resourceiterator_moveprevious.invokeInt(new java.lang.Object[]{mHandle, bufferHasPrevious})); + return bufferHasPrevious.getByte(0) != 0; + } + + /** + * Returns the resource the iterator points at. + * + * @return returns the resource instance. + * @throws Lib3MFException + */ + public Resource getCurrent() throws Lib3MFException { + Pointer bufferResource = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_resourceiterator_getcurrent.invokeInt(new java.lang.Object[]{mHandle, bufferResource})); + Pointer valueResource = bufferResource.getPointer(0); + Resource resource = null; + if (valueResource == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Resource was a null pointer"); + } + resource = mWrapper.PolymorphicFactory(valueResource, Resource.class); + return resource; + } + + /** + * Creates a new resource iterator with the same resource list. + * + * @return returns the cloned Iterator instance + * @throws Lib3MFException + */ + public ResourceIterator clone_() throws Lib3MFException { + Pointer bufferOutResourceIterator = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_resourceiterator_clone.invokeInt(new java.lang.Object[]{mHandle, bufferOutResourceIterator})); + Pointer valueOutResourceIterator = bufferOutResourceIterator.getPointer(0); + ResourceIterator outResourceIterator = null; + if (valueOutResourceIterator == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "OutResourceIterator was a null pointer"); + } + outResourceIterator = mWrapper.PolymorphicFactory(valueOutResourceIterator, ResourceIterator.class); + return outResourceIterator; + } + + /** + * Returns the number of resoucres the iterator captures. + * + * @return returns the number of resoucres the iterator captures. + * @throws Lib3MFException + */ + public long count() throws Lib3MFException { + Pointer bufferCount = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_resourceiterator_count.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getLong(0); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/RoundNode.java b/Autogenerated/Bindings/Java9/lib3mf/RoundNode.java new file mode 100644 index 000000000..0351d5512 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/RoundNode.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class RoundNode extends OneInputNode { + + public RoundNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/SelectNode.java b/Autogenerated/Bindings/Java9/lib3mf/SelectNode.java new file mode 100644 index 000000000..d9fe99006 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/SelectNode.java @@ -0,0 +1,111 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class SelectNode extends OneInputNode { + + public SelectNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the second input + * + * @return the second input + * @throws Lib3MFException + */ + public ImplicitPort getInputB() throws Lib3MFException { + Pointer bufferB = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_selectnode_getinputb.invokeInt(new java.lang.Object[]{mHandle, bufferB})); + Pointer valueB = bufferB.getPointer(0); + ImplicitPort b = null; + if (valueB == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "B was a null pointer"); + } + b = mWrapper.PolymorphicFactory(valueB, ImplicitPort.class); + return b; + } + + /** + * Retrieves the third input + * + * @return the third input + * @throws Lib3MFException + */ + public ImplicitPort getInputC() throws Lib3MFException { + Pointer bufferC = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_selectnode_getinputc.invokeInt(new java.lang.Object[]{mHandle, bufferC})); + Pointer valueC = bufferC.getPointer(0); + ImplicitPort c = null; + if (valueC == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "C was a null pointer"); + } + c = mWrapper.PolymorphicFactory(valueC, ImplicitPort.class); + return c; + } + + /** + * Retrieves the fourth input + * + * @return the fourth input + * @throws Lib3MFException + */ + public ImplicitPort getInputD() throws Lib3MFException { + Pointer bufferD = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_selectnode_getinputd.invokeInt(new java.lang.Object[]{mHandle, bufferD})); + Pointer valueD = bufferD.getPointer(0); + ImplicitPort d = null; + if (valueD == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "D was a null pointer"); + } + d = mWrapper.PolymorphicFactory(valueD, ImplicitPort.class); + return d; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/SignNode.java b/Autogenerated/Bindings/Java9/lib3mf/SignNode.java new file mode 100644 index 000000000..d796d736e --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/SignNode.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class SignNode extends OneInputNode { + + public SignNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/SinNode.java b/Autogenerated/Bindings/Java9/lib3mf/SinNode.java new file mode 100644 index 000000000..674eee2bd --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/SinNode.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class SinNode extends OneInputNode { + + public SinNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/SinhNode.java b/Autogenerated/Bindings/Java9/lib3mf/SinhNode.java new file mode 100644 index 000000000..767541bc9 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/SinhNode.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class SinhNode extends OneInputNode { + + public SinhNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/Slice.java b/Autogenerated/Bindings/Java9/lib3mf/Slice.java new file mode 100644 index 000000000..0d8a6d037 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/Slice.java @@ -0,0 +1,188 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Slice extends Base { + + public Slice(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Set all vertices of a slice. All polygons will be cleared. + * + * @param vertices contains the positions. + * @throws Lib3MFException + */ + public void setVertices(Position2D[] vertices) throws Lib3MFException { + Pointer bufferVertices = new Memory(Math.max(1, Position2D.SIZE * vertices.length)); + for (int i = 0; i < vertices.length; i++) { + vertices[i].writeToPointer(bufferVertices, i * Position2D.SIZE); + } + mWrapper.checkError(this, mWrapper.lib3mf_slice_setvertices.invokeInt(new java.lang.Object[]{mHandle, (long) vertices.length, bufferVertices})); + } + + /** + * Get all vertices of a slice + * + * @return contains the positions. + * @throws Lib3MFException + */ + public Position2D[] getVertices() throws Lib3MFException { + Pointer countNeededVertices = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_slice_getvertices.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededVertices, null})); + long countVertices = countNeededVertices.getLong(0); + Pointer bufferVertices = new Memory(Math.max(1, countVertices * Position2D.SIZE)); + mWrapper.checkError(this, mWrapper.lib3mf_slice_getvertices.invokeInt(new java.lang.Object[]{mHandle, countVertices, countNeededVertices, bufferVertices})); + Position2D vertices[] = new Position2D[(int)countVertices]; + for (int i = 0; i < (int)countVertices; i++) { + vertices[i] = new Position2D(); + vertices[i].readFromPointer(bufferVertices, i * Position2D.SIZE); + } + return vertices; + } + + /** + * Get the number of vertices in a slice + * + * @return the number of vertices in the slice + * @throws Lib3MFException + */ + public long getVertexCount() throws Lib3MFException { + Pointer bufferCount = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_slice_getvertexcount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getLong(0); + } + + /** + * Add a new polygon to this slice + * + * @param indices the new indices of the new polygon + * @return the index of the new polygon + * @throws Lib3MFException + */ + public long addPolygon(int[] indices) throws Lib3MFException { + Pointer bufferIndices = new Memory(Math.max(1, 4 * indices.length)); + for (int i = 0; i < indices.length; i++) { + bufferIndices.setInt(4 * i, indices[i]); + } + Pointer bufferIndex = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_slice_addpolygon.invokeInt(new java.lang.Object[]{mHandle, (long) indices.length, bufferIndices, bufferIndex})); + return bufferIndex.getLong(0); + } + + /** + * Get the number of polygons in the slice + * + * @return the number of polygons in the slice + * @throws Lib3MFException + */ + public long getPolygonCount() throws Lib3MFException { + Pointer bufferCount = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_slice_getpolygoncount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getLong(0); + } + + /** + * Set all indices of a polygon + * + * @param index the index of the polygon to manipulate + * @param indices the new indices of the index-th polygon + * @throws Lib3MFException + */ + public void setPolygonIndices(long index, int[] indices) throws Lib3MFException { + Pointer bufferIndices = new Memory(Math.max(1, 4 * indices.length)); + for (int i = 0; i < indices.length; i++) { + bufferIndices.setInt(4 * i, indices[i]); + } + mWrapper.checkError(this, mWrapper.lib3mf_slice_setpolygonindices.invokeInt(new java.lang.Object[]{mHandle, index, (long) indices.length, bufferIndices})); + } + + /** + * Get all vertices of a slice + * + * @param index the index of the polygon to manipulate + * @return the indices of the index-th polygon + * @throws Lib3MFException + */ + public int[] getPolygonIndices(long index) throws Lib3MFException { + Pointer countNeededIndices = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_slice_getpolygonindices.invokeInt(new java.lang.Object[]{mHandle, index, 0L, countNeededIndices, Pointer.NULL})); + long countIndices = countNeededIndices.getLong(0); + Pointer bufferIndices = new Memory(Math.max(1, 4 * countIndices)); + mWrapper.checkError(this, mWrapper.lib3mf_slice_getpolygonindices.invokeInt(new java.lang.Object[]{mHandle, index, countIndices, countNeededIndices, bufferIndices})); + return bufferIndices.getIntArray(0, (int)countIndices); + } + + /** + * Get the number of vertices in a slice + * + * @param index the index of the polygon to manipulate + * @return the number of indices of the index-th polygon + * @throws Lib3MFException + */ + public long getPolygonIndexCount(long index) throws Lib3MFException { + Pointer bufferCount = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_slice_getpolygonindexcount.invokeInt(new java.lang.Object[]{mHandle, index, bufferCount})); + return bufferCount.getLong(0); + } + + /** + * Get the upper Z-Coordinate of this slice. + * + * @return the upper Z-Coordinate of this slice + * @throws Lib3MFException + */ + public double getZTop() throws Lib3MFException { + Pointer bufferZTop = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_slice_getztop.invokeInt(new java.lang.Object[]{mHandle, bufferZTop})); + return bufferZTop.getDouble(0); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/SliceStack.java b/Autogenerated/Bindings/Java9/lib3mf/SliceStack.java new file mode 100644 index 000000000..aafb46703 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/SliceStack.java @@ -0,0 +1,204 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class SliceStack extends Resource { + + public SliceStack(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Get the lower Z-Coordinate of the slice stack. + * + * @return the lower Z-Coordinate the slice stack + * @throws Lib3MFException + */ + public double getBottomZ() throws Lib3MFException { + Pointer bufferZBottom = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_slicestack_getbottomz.invokeInt(new java.lang.Object[]{mHandle, bufferZBottom})); + return bufferZBottom.getDouble(0); + } + + /** + * Returns the number of slices + * + * @return the number of slices + * @throws Lib3MFException + */ + public long getSliceCount() throws Lib3MFException { + Pointer bufferCount = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_slicestack_getslicecount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getLong(0); + } + + /** + * Query a slice from the slice stack + * + * @param sliceIndex the index of the slice + * @return the Slice instance + * @throws Lib3MFException + */ + public Slice getSlice(long sliceIndex) throws Lib3MFException { + Pointer bufferTheSlice = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_slicestack_getslice.invokeInt(new java.lang.Object[]{mHandle, sliceIndex, bufferTheSlice})); + Pointer valueTheSlice = bufferTheSlice.getPointer(0); + Slice theSlice = null; + if (valueTheSlice == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheSlice was a null pointer"); + } + theSlice = mWrapper.PolymorphicFactory(valueTheSlice, Slice.class); + return theSlice; + } + + /** + * Returns the number of slices + * + * @param zTop upper Z coordinate of the slice + * @return a new Slice instance + * @throws Lib3MFException + */ + public Slice addSlice(double zTop) throws Lib3MFException { + Pointer bufferTheSlice = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_slicestack_addslice.invokeInt(new java.lang.Object[]{mHandle, zTop, bufferTheSlice})); + Pointer valueTheSlice = bufferTheSlice.getPointer(0); + Slice theSlice = null; + if (valueTheSlice == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheSlice was a null pointer"); + } + theSlice = mWrapper.PolymorphicFactory(valueTheSlice, Slice.class); + return theSlice; + } + + /** + * Returns the number of slice refs + * + * @return the number of slicereferences + * @throws Lib3MFException + */ + public long getSliceRefCount() throws Lib3MFException { + Pointer bufferCount = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_slicestack_getslicerefcount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getLong(0); + } + + /** + * Adds another existing slicestack as sliceref in this slicestack + * + * @param theSliceStack the slicestack to use as sliceref + * @throws Lib3MFException + */ + public void addSliceStackReference(SliceStack theSliceStack) throws Lib3MFException { + Pointer theSliceStackHandle = null; + if (theSliceStack != null) { + theSliceStackHandle = theSliceStack.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheSliceStack is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_slicestack_addslicestackreference.invokeInt(new java.lang.Object[]{mHandle, theSliceStackHandle})); + } + + /** + * Adds another existing slicestack as sliceref in this slicestack + * + * @param sliceRefIndex the index of the slice ref + * @return the slicestack that is used as sliceref + * @throws Lib3MFException + */ + public SliceStack getSliceStackReference(long sliceRefIndex) throws Lib3MFException { + Pointer bufferTheSliceStack = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_slicestack_getslicestackreference.invokeInt(new java.lang.Object[]{mHandle, sliceRefIndex, bufferTheSliceStack})); + Pointer valueTheSliceStack = bufferTheSliceStack.getPointer(0); + SliceStack theSliceStack = null; + if (valueTheSliceStack == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheSliceStack was a null pointer"); + } + theSliceStack = mWrapper.PolymorphicFactory(valueTheSliceStack, SliceStack.class); + return theSliceStack; + } + + /** + * Removes the indirection of slices via slice-refs, i.e. creates the slices of all slice refs of this SliceStack as actual slices of this SliceStack. All previously existing slices or slicerefs will be removed. + * + * @throws Lib3MFException + */ + public void collapseSliceReferences() throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_slicestack_collapseslicereferences.invokeInt(new java.lang.Object[]{mHandle})); + } + + /** + * Sets the package path where this Slice should be stored. Input an empty string to reset the path + * + * @param path the package path where this Slice should be stored + * @throws Lib3MFException + */ + public void setOwnPath(String path) throws Lib3MFException { + byte[] bytesPath = path.getBytes(StandardCharsets.UTF_8); + Memory bufferPath = new Memory(bytesPath.length + 1); + bufferPath.write(0, bytesPath, 0, bytesPath.length); + bufferPath.setByte(bytesPath.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_slicestack_setownpath.invokeInt(new java.lang.Object[]{mHandle, bufferPath})); + } + + /** + * Obtains the package path where this Slice should be stored. Returns an empty string if the slicestack is stored within the root model. + * + * @return the package path where this Slice will be stored + * @throws Lib3MFException + */ + public String getOwnPath() throws Lib3MFException { + Pointer bytesNeededPath = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_slicestack_getownpath.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededPath, null})); + int sizePath = bytesNeededPath.getInt(0); + Pointer bufferPath = new Memory(sizePath); + mWrapper.checkError(this, mWrapper.lib3mf_slicestack_getownpath.invokeInt(new java.lang.Object[]{mHandle, sizePath, bytesNeededPath, bufferPath})); + return new String(bufferPath.getByteArray(0, sizePath - 1), StandardCharsets.UTF_8); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/SliceStackIterator.java b/Autogenerated/Bindings/Java9/lib3mf/SliceStackIterator.java new file mode 100644 index 000000000..ce6e6a026 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/SliceStackIterator.java @@ -0,0 +1,75 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class SliceStackIterator extends ResourceIterator { + + public SliceStackIterator(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the SliceStack the iterator points at. + * + * @return returns the SliceStack instance. + * @throws Lib3MFException + */ + public SliceStack getCurrentSliceStack() throws Lib3MFException { + Pointer bufferResource = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_slicestackiterator_getcurrentslicestack.invokeInt(new java.lang.Object[]{mHandle, bufferResource})); + Pointer valueResource = bufferResource.getPointer(0); + SliceStack resource = null; + if (valueResource == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Resource was a null pointer"); + } + resource = mWrapper.PolymorphicFactory(valueResource, SliceStack.class); + return resource; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/SqrtNode.java b/Autogenerated/Bindings/Java9/lib3mf/SqrtNode.java new file mode 100644 index 000000000..df7dcabfb --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/SqrtNode.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class SqrtNode extends OneInputNode { + + public SqrtNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/SubtractionNode.java b/Autogenerated/Bindings/Java9/lib3mf/SubtractionNode.java new file mode 100644 index 000000000..808defec7 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/SubtractionNode.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class SubtractionNode extends TwoInputNode { + + public SubtractionNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/TanNode.java b/Autogenerated/Bindings/Java9/lib3mf/TanNode.java new file mode 100644 index 000000000..1d40332fc --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/TanNode.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class TanNode extends OneInputNode { + + public TanNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/TanhNode.java b/Autogenerated/Bindings/Java9/lib3mf/TanhNode.java new file mode 100644 index 000000000..94562e998 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/TanhNode.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class TanhNode extends OneInputNode { + + public TanhNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/Tex2Coord.java b/Autogenerated/Bindings/Java9/lib3mf/Tex2Coord.java new file mode 100644 index 000000000..183717a5d --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/Tex2Coord.java @@ -0,0 +1,63 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Memory; +import com.sun.jna.Pointer; + +import java.util.Arrays; +import java.util.List; + +public class Tex2Coord { + + public double U; + + public double V; + + public static final int SIZE = 16; + + public void readFromPointer(Pointer p, long offset) { + U = p.getDouble(offset + 0); + V = p.getDouble(offset + 8); + } + + public void writeToPointer(Pointer p, long offset) { + p.setDouble(offset + 0, U); + p.setDouble(offset + 8, V); + } + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/Texture2D.java b/Autogenerated/Bindings/Java9/lib3mf/Texture2D.java new file mode 100644 index 000000000..24a9c523e --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/Texture2D.java @@ -0,0 +1,174 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Texture2D extends Resource { + + public Texture2D(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the attachment located at the path of the texture. + * + * @return attachment that holds the texture's image information. + * @throws Lib3MFException + */ + public Attachment getAttachment() throws Lib3MFException { + Pointer bufferAttachment = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_texture2d_getattachment.invokeInt(new java.lang.Object[]{mHandle, bufferAttachment})); + Pointer valueAttachment = bufferAttachment.getPointer(0); + Attachment attachment = null; + if (valueAttachment == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Attachment was a null pointer"); + } + attachment = mWrapper.PolymorphicFactory(valueAttachment, Attachment.class); + return attachment; + } + + /** + * Sets the texture's package path to the path of the attachment. + * + * @param attachment attachment that holds the texture's image information. + * @throws Lib3MFException + */ + public void setAttachment(Attachment attachment) throws Lib3MFException { + Pointer attachmentHandle = null; + if (attachment != null) { + attachmentHandle = attachment.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Attachment is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_texture2d_setattachment.invokeInt(new java.lang.Object[]{mHandle, attachmentHandle})); + } + + /** + * Retrieves a texture's content type. + * + * @return returns content type enum. + * @throws Lib3MFException + */ + public Lib3MFWrapper.TextureType getContentType() throws Lib3MFException { + Pointer bufferContentType = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_texture2d_getcontenttype.invokeInt(new java.lang.Object[]{mHandle, bufferContentType})); + return Lib3MFWrapper.EnumConversion.convertConstToTextureType(bufferContentType.getInt(0)); + } + + /** + * Retrieves a texture's content type. + * + * @param contentType new Content Type + * @throws Lib3MFException + */ + public void setContentType(Lib3MFWrapper.TextureType contentType) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_texture2d_setcontenttype.invokeInt(new java.lang.Object[]{mHandle, Lib3MFWrapper.EnumConversion.convertTextureTypeToConst(contentType)})); + } + + /** + * Retrieves a texture's tilestyle type. + * + * @return GetTileStyleUV Result Tuple + * @throws Lib3MFException + */ + public GetTileStyleUVResult getTileStyleUV() throws Lib3MFException { + Pointer bufferTileStyleU = new Memory(4); + Pointer bufferTileStyleV = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_texture2d_gettilestyleuv.invokeInt(new java.lang.Object[]{mHandle, bufferTileStyleU, bufferTileStyleV})); + GetTileStyleUVResult returnTuple = new GetTileStyleUVResult(); + returnTuple.TileStyleU = Lib3MFWrapper.EnumConversion.convertConstToTextureTileStyle(bufferTileStyleU.getInt(0)); + returnTuple.TileStyleV = Lib3MFWrapper.EnumConversion.convertConstToTextureTileStyle(bufferTileStyleV.getInt(0)); + return returnTuple; + } + + public static class GetTileStyleUVResult { + /** + * returns tilestyle type enum. + */ + public Lib3MFWrapper.TextureTileStyle TileStyleU; + + /** + * returns tilestyle type enum. + */ + public Lib3MFWrapper.TextureTileStyle TileStyleV; + + } + /** + * Sets a texture's tilestyle type. + * + * @param tileStyleU new tilestyle type enum. + * @param tileStyleV new tilestyle type enum. + * @throws Lib3MFException + */ + public void setTileStyleUV(Lib3MFWrapper.TextureTileStyle tileStyleU, Lib3MFWrapper.TextureTileStyle tileStyleV) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_texture2d_settilestyleuv.invokeInt(new java.lang.Object[]{mHandle, Lib3MFWrapper.EnumConversion.convertTextureTileStyleToConst(tileStyleU), Lib3MFWrapper.EnumConversion.convertTextureTileStyleToConst(tileStyleV)})); + } + + /** + * Retrieves a texture's filter type. + * + * @return returns filter type enum. + * @throws Lib3MFException + */ + public Lib3MFWrapper.TextureFilter getFilter() throws Lib3MFException { + Pointer bufferFilter = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_texture2d_getfilter.invokeInt(new java.lang.Object[]{mHandle, bufferFilter})); + return Lib3MFWrapper.EnumConversion.convertConstToTextureFilter(bufferFilter.getInt(0)); + } + + /** + * Sets a texture's filter type. + * + * @param filter sets new filter type enum. + * @throws Lib3MFException + */ + public void setFilter(Lib3MFWrapper.TextureFilter filter) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_texture2d_setfilter.invokeInt(new java.lang.Object[]{mHandle, Lib3MFWrapper.EnumConversion.convertTextureFilterToConst(filter)})); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/Texture2DGroup.java b/Autogenerated/Bindings/Java9/lib3mf/Texture2DGroup.java new file mode 100644 index 000000000..e80a5907e --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/Texture2DGroup.java @@ -0,0 +1,142 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Texture2DGroup extends Resource { + + public Texture2DGroup(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the count of tex2coords in the Texture2DGroup. + * + * @return returns the count of tex2coords. + * @throws Lib3MFException + */ + public int getCount() throws Lib3MFException { + Pointer bufferCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_texture2dgroup_getcount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getInt(0); + } + + /** + * returns all the PropertyIDs of all tex2coords in this Texture2DGroup + * + * @return PropertyID of the tex2coords in the Texture2DGroup. + * @throws Lib3MFException + */ + public int[] getAllPropertyIDs() throws Lib3MFException { + Pointer countNeededPropertyIDs = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_texture2dgroup_getallpropertyids.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededPropertyIDs, Pointer.NULL})); + long countPropertyIDs = countNeededPropertyIDs.getLong(0); + Pointer bufferPropertyIDs = new Memory(Math.max(1, 4 * countPropertyIDs)); + mWrapper.checkError(this, mWrapper.lib3mf_texture2dgroup_getallpropertyids.invokeInt(new java.lang.Object[]{mHandle, countPropertyIDs, countNeededPropertyIDs, bufferPropertyIDs})); + return bufferPropertyIDs.getIntArray(0, (int)countPropertyIDs); + } + + /** + * Adds a new tex2coord to the Texture2DGroup + * + * @param uVCoordinate The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. + * @return returns new PropertyID of the new tex2coord in the Texture2DGroup. + * @throws Lib3MFException + */ + public int addTex2Coord(Tex2Coord uVCoordinate) throws Lib3MFException { + Pointer bufferUVCoordinate = new Memory(Tex2Coord.SIZE); + uVCoordinate.writeToPointer(bufferUVCoordinate, 0); + Pointer bufferPropertyID = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_texture2dgroup_addtex2coord.invokeInt(new java.lang.Object[]{mHandle, bufferUVCoordinate, bufferPropertyID})); + return bufferPropertyID.getInt(0); + } + + /** + * Obtains a tex2coord to the Texture2DGroup + * + * @param propertyID the PropertyID of the tex2coord in the Texture2DGroup. + * @return The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. + * @throws Lib3MFException + */ + public Tex2Coord getTex2Coord(int propertyID) throws Lib3MFException { + Pointer bufferUVCoordinate = new Memory(Tex2Coord.SIZE); + mWrapper.checkError(this, mWrapper.lib3mf_texture2dgroup_gettex2coord.invokeInt(new java.lang.Object[]{mHandle, propertyID, bufferUVCoordinate})); + Tex2Coord uVCoordinate = new Tex2Coord(); + uVCoordinate.readFromPointer(bufferUVCoordinate, 0); + return uVCoordinate; + } + + /** + * Removes a tex2coords from the Texture2DGroup. + * + * @param propertyID PropertyID of the tex2coords in the Texture2DGroup. + * @throws Lib3MFException + */ + public void removeTex2Coord(int propertyID) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_texture2dgroup_removetex2coord.invokeInt(new java.lang.Object[]{mHandle, propertyID})); + } + + /** + * Obtains the texture2D instance of this group. + * + * @return the texture2D instance of this group. + * @throws Lib3MFException + */ + public Texture2D getTexture2D() throws Lib3MFException { + Pointer bufferTexture2DInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_texture2dgroup_gettexture2d.invokeInt(new java.lang.Object[]{mHandle, bufferTexture2DInstance})); + Pointer valueTexture2DInstance = bufferTexture2DInstance.getPointer(0); + Texture2D texture2DInstance = null; + if (valueTexture2DInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Texture2DInstance was a null pointer"); + } + texture2DInstance = mWrapper.PolymorphicFactory(valueTexture2DInstance, Texture2D.class); + return texture2DInstance; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/Texture2DGroupIterator.java b/Autogenerated/Bindings/Java9/lib3mf/Texture2DGroupIterator.java new file mode 100644 index 000000000..185f318be --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/Texture2DGroupIterator.java @@ -0,0 +1,75 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Texture2DGroupIterator extends ResourceIterator { + + public Texture2DGroupIterator(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the Texture2DGroup the iterator points at. + * + * @return returns the Texture2DGroup instance. + * @throws Lib3MFException + */ + public Texture2DGroup getCurrentTexture2DGroup() throws Lib3MFException { + Pointer bufferResource = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_texture2dgroupiterator_getcurrenttexture2dgroup.invokeInt(new java.lang.Object[]{mHandle, bufferResource})); + Pointer valueResource = bufferResource.getPointer(0); + Texture2DGroup resource = null; + if (valueResource == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Resource was a null pointer"); + } + resource = mWrapper.PolymorphicFactory(valueResource, Texture2DGroup.class); + return resource; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/Texture2DIterator.java b/Autogenerated/Bindings/Java9/lib3mf/Texture2DIterator.java new file mode 100644 index 000000000..85789f6a4 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/Texture2DIterator.java @@ -0,0 +1,75 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Texture2DIterator extends ResourceIterator { + + public Texture2DIterator(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the Texture2D the iterator points at. + * + * @return returns the Texture2D instance. + * @throws Lib3MFException + */ + public Texture2D getCurrentTexture2D() throws Lib3MFException { + Pointer bufferResource = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_texture2diterator_getcurrenttexture2d.invokeInt(new java.lang.Object[]{mHandle, bufferResource})); + Pointer valueResource = bufferResource.getPointer(0); + Texture2D resource = null; + if (valueResource == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Resource was a null pointer"); + } + resource = mWrapper.PolymorphicFactory(valueResource, Texture2D.class); + return resource; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/Transform.java b/Autogenerated/Bindings/Java9/lib3mf/Transform.java new file mode 100644 index 000000000..ed02ea877 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/Transform.java @@ -0,0 +1,81 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Memory; +import com.sun.jna.Pointer; + +import java.util.Arrays; +import java.util.List; + +public class Transform { + + public float[][] Fields = new float[3][4]; + + public static final int SIZE = 48; + + public void readFromPointer(Pointer p, long offset) { + Fields[0][0] = p.getFloat(offset + 0); + Fields[0][1] = p.getFloat(offset + 4); + Fields[0][2] = p.getFloat(offset + 8); + Fields[0][3] = p.getFloat(offset + 12); + Fields[1][0] = p.getFloat(offset + 16); + Fields[1][1] = p.getFloat(offset + 20); + Fields[1][2] = p.getFloat(offset + 24); + Fields[1][3] = p.getFloat(offset + 28); + Fields[2][0] = p.getFloat(offset + 32); + Fields[2][1] = p.getFloat(offset + 36); + Fields[2][2] = p.getFloat(offset + 40); + Fields[2][3] = p.getFloat(offset + 44); + } + + public void writeToPointer(Pointer p, long offset) { + p.setFloat(offset + 0, Fields[0][0]); + p.setFloat(offset + 4, Fields[0][1]); + p.setFloat(offset + 8, Fields[0][2]); + p.setFloat(offset + 12, Fields[0][3]); + p.setFloat(offset + 16, Fields[1][0]); + p.setFloat(offset + 20, Fields[1][1]); + p.setFloat(offset + 24, Fields[1][2]); + p.setFloat(offset + 28, Fields[1][3]); + p.setFloat(offset + 32, Fields[2][0]); + p.setFloat(offset + 36, Fields[2][1]); + p.setFloat(offset + 40, Fields[2][2]); + p.setFloat(offset + 44, Fields[2][3]); + } + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/TransposeNode.java b/Autogenerated/Bindings/Java9/lib3mf/TransposeNode.java new file mode 100644 index 000000000..2dfd32153 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/TransposeNode.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class TransposeNode extends OneInputNode { + + public TransposeNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/Triangle.java b/Autogenerated/Bindings/Java9/lib3mf/Triangle.java new file mode 100644 index 000000000..c561cd299 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/Triangle.java @@ -0,0 +1,63 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Memory; +import com.sun.jna.Pointer; + +import java.util.Arrays; +import java.util.List; + +public class Triangle { + + public int[] Indices = new int[3]; + + public static final int SIZE = 12; + + public void readFromPointer(Pointer p, long offset) { + Indices[0] = p.getInt(offset + 0); + Indices[1] = p.getInt(offset + 4); + Indices[2] = p.getInt(offset + 8); + } + + public void writeToPointer(Pointer p, long offset) { + p.setInt(offset + 0, Indices[0]); + p.setInt(offset + 4, Indices[1]); + p.setInt(offset + 8, Indices[2]); + } + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/TriangleProperties.java b/Autogenerated/Bindings/Java9/lib3mf/TriangleProperties.java new file mode 100644 index 000000000..7328dc17f --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/TriangleProperties.java @@ -0,0 +1,67 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Memory; +import com.sun.jna.Pointer; + +import java.util.Arrays; +import java.util.List; + +public class TriangleProperties { + + public int ResourceID; + + public int[] PropertyIDs = new int[3]; + + public static final int SIZE = 16; + + public void readFromPointer(Pointer p, long offset) { + ResourceID = p.getInt(offset + 0); + PropertyIDs[0] = p.getInt(offset + 4); + PropertyIDs[1] = p.getInt(offset + 8); + PropertyIDs[2] = p.getInt(offset + 12); + } + + public void writeToPointer(Pointer p, long offset) { + p.setInt(offset + 0, ResourceID); + p.setInt(offset + 4, PropertyIDs[0]); + p.setInt(offset + 8, PropertyIDs[1]); + p.setInt(offset + 12, PropertyIDs[2]); + } + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/TriangleSet.java b/Autogenerated/Bindings/Java9/lib3mf/TriangleSet.java new file mode 100644 index 000000000..7d41ac48e --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/TriangleSet.java @@ -0,0 +1,236 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class TriangleSet extends Base { + + public TriangleSet(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * sets the name of the triangle set + * + * @param name the new name + * @throws Lib3MFException + */ + public void setName(String name) throws Lib3MFException { + byte[] bytesName = name.getBytes(StandardCharsets.UTF_8); + Memory bufferName = new Memory(bytesName.length + 1); + bufferName.write(0, bytesName, 0, bytesName.length); + bufferName.setByte(bytesName.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_triangleset_setname.invokeInt(new java.lang.Object[]{mHandle, bufferName})); + } + + /** + * returns the name of the triangle set + * + * @return returns the name + * @throws Lib3MFException + */ + public String getName() throws Lib3MFException { + Pointer bytesNeededName = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_triangleset_getname.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededName, null})); + int sizeName = bytesNeededName.getInt(0); + Pointer bufferName = new Memory(sizeName); + mWrapper.checkError(this, mWrapper.lib3mf_triangleset_getname.invokeInt(new java.lang.Object[]{mHandle, sizeName, bytesNeededName, bufferName})); + return new String(bufferName.getByteArray(0, sizeName - 1), StandardCharsets.UTF_8); + } + + /** + * sets the identifier of the triangle set. + * + * @param identifier the new identifier. MUST be unique within the mesh. MUST NOT be an empty string + * @throws Lib3MFException + */ + public void setIdentifier(String identifier) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_triangleset_setidentifier.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier})); + } + + /** + * returns the identifier of the triangle set + * + * @return returns the identifier + * @throws Lib3MFException + */ + public String getIdentifier() throws Lib3MFException { + Pointer bytesNeededIdentifier = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_triangleset_getidentifier.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededIdentifier, null})); + int sizeIdentifier = bytesNeededIdentifier.getInt(0); + Pointer bufferIdentifier = new Memory(sizeIdentifier); + mWrapper.checkError(this, mWrapper.lib3mf_triangleset_getidentifier.invokeInt(new java.lang.Object[]{mHandle, sizeIdentifier, bytesNeededIdentifier, bufferIdentifier})); + return new String(bufferIdentifier.getByteArray(0, sizeIdentifier - 1), StandardCharsets.UTF_8); + } + + /** + * adds a triangle to the set. Does nothing if triangle is already in the set. + * + * @param triangleIndex Triangle index to add. MUST be between 0 and TriangleCount - 1. + * @throws Lib3MFException + */ + public void addTriangle(int triangleIndex) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_triangleset_addtriangle.invokeInt(new java.lang.Object[]{mHandle, triangleIndex})); + } + + /** + * removes a triangle from the set + * + * @param triangleIndex Triangle index to remove. MUST be between 0 and TriangleCount - 1. + * @throws Lib3MFException + */ + public void removeTriangle(int triangleIndex) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_triangleset_removetriangle.invokeInt(new java.lang.Object[]{mHandle, triangleIndex})); + } + + /** + * clears all triangles from the list + * + * @throws Lib3MFException + */ + public void clear() throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_triangleset_clear.invokeInt(new java.lang.Object[]{mHandle})); + } + + /** + * Sets all triangles in the list, while clearing old values. Duplicates will be merged. + * + * @param triangleIndices Triangle indices to add. Every element MUST be between 0 and TriangleCount - 1. + * @throws Lib3MFException + */ + public void setTriangleList(int[] triangleIndices) throws Lib3MFException { + Pointer bufferTriangleIndices = new Memory(Math.max(1, 4 * triangleIndices.length)); + for (int i = 0; i < triangleIndices.length; i++) { + bufferTriangleIndices.setInt(4 * i, triangleIndices[i]); + } + mWrapper.checkError(this, mWrapper.lib3mf_triangleset_settrianglelist.invokeInt(new java.lang.Object[]{mHandle, (long) triangleIndices.length, bufferTriangleIndices})); + } + + /** + * Retrieves all the triangles in the TriangleSet + * + * @return retrieves the indices of the triangles in this TriangleSet + * @throws Lib3MFException + */ + public int[] getTriangleList() throws Lib3MFException { + Pointer countNeededTriangleIndices = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_triangleset_gettrianglelist.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededTriangleIndices, Pointer.NULL})); + long countTriangleIndices = countNeededTriangleIndices.getLong(0); + Pointer bufferTriangleIndices = new Memory(Math.max(1, 4 * countTriangleIndices)); + mWrapper.checkError(this, mWrapper.lib3mf_triangleset_gettrianglelist.invokeInt(new java.lang.Object[]{mHandle, countTriangleIndices, countNeededTriangleIndices, bufferTriangleIndices})); + return bufferTriangleIndices.getIntArray(0, (int)countTriangleIndices); + } + + /** + * Adds multiple triangles in the list. Duplicates will be merged. + * + * @param triangleIndices Triangle indices to add. Every element MUST be between 0 and TriangleCount - 1. + * @throws Lib3MFException + */ + public void addTriangleList(int[] triangleIndices) throws Lib3MFException { + Pointer bufferTriangleIndices = new Memory(Math.max(1, 4 * triangleIndices.length)); + for (int i = 0; i < triangleIndices.length; i++) { + bufferTriangleIndices.setInt(4 * i, triangleIndices[i]); + } + mWrapper.checkError(this, mWrapper.lib3mf_triangleset_addtrianglelist.invokeInt(new java.lang.Object[]{mHandle, (long) triangleIndices.length, bufferTriangleIndices})); + } + + /** + * Merges another Triangle set. + * + * @param otherTriangleSet Other triangle set to merge. + * @param deleteOther Flag if other triangle set is getting removed. + * @throws Lib3MFException + */ + public void merge(TriangleSet otherTriangleSet, boolean deleteOther) throws Lib3MFException { + Pointer otherTriangleSetHandle = null; + if (otherTriangleSet != null) { + otherTriangleSetHandle = otherTriangleSet.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "OtherTriangleSet is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_triangleset_merge.invokeInt(new java.lang.Object[]{mHandle, otherTriangleSetHandle, deleteOther})); + } + + /** + * Deletes the whole set from the mesh. + * + * @throws Lib3MFException + */ + public void deleteSet() throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_triangleset_deleteset.invokeInt(new java.lang.Object[]{mHandle})); + } + + /** + * Duplicates the set in the mesh. + * + * @param identifier the new identifier. MUST be unique within the mesh. MUST NOT be an empty string + * @return Copy of the triangle set. + * @throws Lib3MFException + */ + public TriangleSet duplicate(String identifier) throws Lib3MFException { + byte[] bytesIdentifier = identifier.getBytes(StandardCharsets.UTF_8); + Memory bufferIdentifier = new Memory(bytesIdentifier.length + 1); + bufferIdentifier.write(0, bytesIdentifier, 0, bytesIdentifier.length); + bufferIdentifier.setByte(bytesIdentifier.length, (byte)0); + Pointer bufferNewSet = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_triangleset_duplicate.invokeInt(new java.lang.Object[]{mHandle, bufferIdentifier, bufferNewSet})); + Pointer valueNewSet = bufferNewSet.getPointer(0); + TriangleSet newSet = null; + if (valueNewSet == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "NewSet was a null pointer"); + } + newSet = mWrapper.PolymorphicFactory(valueNewSet, TriangleSet.class); + return newSet; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/TwoInputNode.java b/Autogenerated/Bindings/Java9/lib3mf/TwoInputNode.java new file mode 100644 index 000000000..c3ff0d9af --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/TwoInputNode.java @@ -0,0 +1,75 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class TwoInputNode extends OneInputNode { + + public TwoInputNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the second input + * + * @return the second input + * @throws Lib3MFException + */ + public ImplicitPort getInputB() throws Lib3MFException { + Pointer bufferB = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_twoinputnode_getinputb.invokeInt(new java.lang.Object[]{mHandle, bufferB})); + Pointer valueB = bufferB.getPointer(0); + ImplicitPort b = null; + if (valueB == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "B was a null pointer"); + } + b = mWrapper.PolymorphicFactory(valueB, ImplicitPort.class); + return b; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/UnsignedMeshNode.java b/Autogenerated/Bindings/Java9/lib3mf/UnsignedMeshNode.java new file mode 100644 index 000000000..95ccdadce --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/UnsignedMeshNode.java @@ -0,0 +1,111 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class UnsignedMeshNode extends ImplicitNode { + + public UnsignedMeshNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Retrieves the input for the model resource id of the mesh + * + * @return the input port for the model resource id of the mesh + * @throws Lib3MFException + */ + public ImplicitPort getInputMesh() throws Lib3MFException { + Pointer bufferMesh = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_unsignedmeshnode_getinputmesh.invokeInt(new java.lang.Object[]{mHandle, bufferMesh})); + Pointer valueMesh = bufferMesh.getPointer(0); + ImplicitPort mesh = null; + if (valueMesh == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Mesh was a null pointer"); + } + mesh = mWrapper.PolymorphicFactory(valueMesh, ImplicitPort.class); + return mesh; + } + + /** + * Retrieves the input for the position + * + * @return the input port for the position + * @throws Lib3MFException + */ + public ImplicitPort getInputPos() throws Lib3MFException { + Pointer bufferPos = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_unsignedmeshnode_getinputpos.invokeInt(new java.lang.Object[]{mHandle, bufferPos})); + Pointer valuePos = bufferPos.getPointer(0); + ImplicitPort pos = null; + if (valuePos == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Pos was a null pointer"); + } + pos = mWrapper.PolymorphicFactory(valuePos, ImplicitPort.class); + return pos; + } + + /** + * Retrieves the output + * + * @return the output port for the unsigned distance to the mesh + * @throws Lib3MFException + */ + public ImplicitPort getOutputDistance() throws Lib3MFException { + Pointer bufferDistance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_unsignedmeshnode_getoutputdistance.invokeInt(new java.lang.Object[]{mHandle, bufferDistance})); + Pointer valueDistance = bufferDistance.getPointer(0); + ImplicitPort distance = null; + if (valueDistance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "Distance was a null pointer"); + } + distance = mWrapper.PolymorphicFactory(valueDistance, ImplicitPort.class); + return distance; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/Vector.java b/Autogenerated/Bindings/Java9/lib3mf/Vector.java new file mode 100644 index 000000000..ab8e4f415 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/Vector.java @@ -0,0 +1,63 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Memory; +import com.sun.jna.Pointer; + +import java.util.Arrays; +import java.util.List; + +public class Vector { + + public double[] Coordinates = new double[3]; + + public static final int SIZE = 24; + + public void readFromPointer(Pointer p, long offset) { + Coordinates[0] = p.getDouble(offset + 0); + Coordinates[1] = p.getDouble(offset + 8); + Coordinates[2] = p.getDouble(offset + 16); + } + + public void writeToPointer(Pointer p, long offset) { + p.setDouble(offset + 0, Coordinates[0]); + p.setDouble(offset + 8, Coordinates[1]); + p.setDouble(offset + 16, Coordinates[2]); + } + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/VectorFromScalarNode.java b/Autogenerated/Bindings/Java9/lib3mf/VectorFromScalarNode.java new file mode 100644 index 000000000..69e2e8bef --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/VectorFromScalarNode.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class VectorFromScalarNode extends OneInputNode { + + public VectorFromScalarNode(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/VolumeData.java b/Autogenerated/Bindings/Java9/lib3mf/VolumeData.java new file mode 100644 index 000000000..87153b0ab --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/VolumeData.java @@ -0,0 +1,223 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class VolumeData extends Resource { + + public VolumeData(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the VolumeDataComposite of this VolumeData instance + * + * @return filled with the VolumeDataComposite of this VolumeData instance. + * @throws Lib3MFException + */ + public VolumeDataComposite getComposite() throws Lib3MFException { + Pointer bufferTheCompositeData = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_volumedata_getcomposite.invokeInt(new java.lang.Object[]{mHandle, bufferTheCompositeData})); + Pointer valueTheCompositeData = bufferTheCompositeData.getPointer(0); + VolumeDataComposite theCompositeData = null; + if (valueTheCompositeData != Pointer.NULL) { + theCompositeData = mWrapper.PolymorphicFactory(valueTheCompositeData, VolumeDataComposite.class); + } + return theCompositeData; + } + + /** + * Creates a new VolumeDataComposite for this VolumeData instance + * + * @return The new VolumeDataComposite of this VolumeData instance. + * @throws Lib3MFException + */ + public VolumeDataComposite createNewComposite() throws Lib3MFException { + Pointer bufferTheCompositeData = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_volumedata_createnewcomposite.invokeInt(new java.lang.Object[]{mHandle, bufferTheCompositeData})); + Pointer valueTheCompositeData = bufferTheCompositeData.getPointer(0); + VolumeDataComposite theCompositeData = null; + if (valueTheCompositeData == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheCompositeData was a null pointer"); + } + theCompositeData = mWrapper.PolymorphicFactory(valueTheCompositeData, VolumeDataComposite.class); + return theCompositeData; + } + + /** + * Removes the VolumeDataComposite of this VolumeData instance + * + * @throws Lib3MFException + */ + public void removeComposite() throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_volumedata_removecomposite.invokeInt(new java.lang.Object[]{mHandle})); + } + + /** + * Returns the VolumeDataColor of this VolumeData instance + * + * @return filled with the VolumeDataColor of this VolumeData instance. + * @throws Lib3MFException + */ + public VolumeDataColor getColor() throws Lib3MFException { + Pointer bufferTheColorData = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_volumedata_getcolor.invokeInt(new java.lang.Object[]{mHandle, bufferTheColorData})); + Pointer valueTheColorData = bufferTheColorData.getPointer(0); + VolumeDataColor theColorData = null; + if (valueTheColorData != Pointer.NULL) { + theColorData = mWrapper.PolymorphicFactory(valueTheColorData, VolumeDataColor.class); + } + return theColorData; + } + + /** + * Creates a new VolumeDataColor for this VolumeData instance + * + * @param theFunction Function used in this element + * @return The new VolumeDataColor of this VolumeData instance. + * @throws Lib3MFException + */ + public VolumeDataColor createNewColor(Function theFunction) throws Lib3MFException { + Pointer theFunctionHandle = null; + if (theFunction != null) { + theFunctionHandle = theFunction.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheFunction is a null value."); + } + Pointer bufferTheColorData = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_volumedata_createnewcolor.invokeInt(new java.lang.Object[]{mHandle, theFunctionHandle, bufferTheColorData})); + Pointer valueTheColorData = bufferTheColorData.getPointer(0); + VolumeDataColor theColorData = null; + if (valueTheColorData == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheColorData was a null pointer"); + } + theColorData = mWrapper.PolymorphicFactory(valueTheColorData, VolumeDataColor.class); + return theColorData; + } + + /** + * Removes the VolumeDataColor of this VolumeData instance + * + * @throws Lib3MFException + */ + public void removeColor() throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_volumedata_removecolor.invokeInt(new java.lang.Object[]{mHandle})); + } + + /** + * Returns the number of VolumeDataProperty + * + * @return the number of VolumeDataProperty-elements within this VolumeData + * @throws Lib3MFException + */ + public int getPropertyCount() throws Lib3MFException { + Pointer bufferCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_volumedata_getpropertycount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getInt(0); + } + + /** + * Returns the VolumeDataProperty at a given Index + * + * @param index the index of the VolumeDataProperty to be returned. + * @return the VolumeDataProperty at the given index. + * @throws Lib3MFException + */ + public VolumeDataProperty getProperty(int index) throws Lib3MFException { + Pointer bufferTheVolumeDataProperty = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_volumedata_getproperty.invokeInt(new java.lang.Object[]{mHandle, index, bufferTheVolumeDataProperty})); + Pointer valueTheVolumeDataProperty = bufferTheVolumeDataProperty.getPointer(0); + VolumeDataProperty theVolumeDataProperty = null; + if (valueTheVolumeDataProperty == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheVolumeDataProperty was a null pointer"); + } + theVolumeDataProperty = mWrapper.PolymorphicFactory(valueTheVolumeDataProperty, VolumeDataProperty.class); + return theVolumeDataProperty; + } + + /** + * Adds a new VolumeDataProperty from a Function + * + * @param name the qualified name (namespace+name) of the Property + * @param theFunction Function used in this element + * @return the newly created VolumeDataProperty. + * @throws Lib3MFException + */ + public VolumeDataProperty addPropertyFromFunction(String name, Function theFunction) throws Lib3MFException { + byte[] bytesName = name.getBytes(StandardCharsets.UTF_8); + Memory bufferName = new Memory(bytesName.length + 1); + bufferName.write(0, bytesName, 0, bytesName.length); + bufferName.setByte(bytesName.length, (byte)0); + Pointer theFunctionHandle = null; + if (theFunction != null) { + theFunctionHandle = theFunction.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheFunction is a null value."); + } + Pointer bufferTheVolumeDataProperty = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_volumedata_addpropertyfromfunction.invokeInt(new java.lang.Object[]{mHandle, bufferName, theFunctionHandle, bufferTheVolumeDataProperty})); + Pointer valueTheVolumeDataProperty = bufferTheVolumeDataProperty.getPointer(0); + VolumeDataProperty theVolumeDataProperty = null; + if (valueTheVolumeDataProperty == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheVolumeDataProperty was a null pointer"); + } + theVolumeDataProperty = mWrapper.PolymorphicFactory(valueTheVolumeDataProperty, VolumeDataProperty.class); + return theVolumeDataProperty; + } + + /** + * Removes the VolumeDataProperty with a given index + * + * @param index the index of the VolumeDataProperty to be removed. + * @throws Lib3MFException + */ + public void removeProperty(int index) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_volumedata_removeproperty.invokeInt(new java.lang.Object[]{mHandle, index})); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/VolumeDataColor.java b/Autogenerated/Bindings/Java9/lib3mf/VolumeDataColor.java new file mode 100644 index 000000000..dd587d263 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/VolumeDataColor.java @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class VolumeDataColor extends FunctionReference { + + public VolumeDataColor(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/VolumeDataComposite.java b/Autogenerated/Bindings/Java9/lib3mf/VolumeDataComposite.java new file mode 100644 index 000000000..c0bc094bb --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/VolumeDataComposite.java @@ -0,0 +1,153 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class VolumeDataComposite extends Base { + + public VolumeDataComposite(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Returns the BaseMaterialGroup used within this volume data item + * + * @return The BaseMaterialGroup instance of this VolumeDataComposite element + * @throws Lib3MFException + */ + public BaseMaterialGroup getBaseMaterialGroup() throws Lib3MFException { + Pointer bufferBaseMaterialGroupInstance = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_volumedatacomposite_getbasematerialgroup.invokeInt(new java.lang.Object[]{mHandle, bufferBaseMaterialGroupInstance})); + Pointer valueBaseMaterialGroupInstance = bufferBaseMaterialGroupInstance.getPointer(0); + BaseMaterialGroup baseMaterialGroupInstance = null; + if (valueBaseMaterialGroupInstance == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "BaseMaterialGroupInstance was a null pointer"); + } + baseMaterialGroupInstance = mWrapper.PolymorphicFactory(valueBaseMaterialGroupInstance, BaseMaterialGroup.class); + return baseMaterialGroupInstance; + } + + /** + * Sets the BaseMaterialGroup to use within this volume data item. + * + * @param baseMaterialGroupInstance The new BaseMaterialGroup instance of this VolumeDataComposite element + * @throws Lib3MFException + */ + public void setBaseMaterialGroup(BaseMaterialGroup baseMaterialGroupInstance) throws Lib3MFException { + Pointer baseMaterialGroupInstanceHandle = null; + if (baseMaterialGroupInstance != null) { + baseMaterialGroupInstanceHandle = baseMaterialGroupInstance.getHandle(); + } else { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "BaseMaterialGroupInstance is a null value."); + } + mWrapper.checkError(this, mWrapper.lib3mf_volumedatacomposite_setbasematerialgroup.invokeInt(new java.lang.Object[]{mHandle, baseMaterialGroupInstanceHandle})); + } + + /** + * Returns the number of material mappings of this VolumeDataComposite element + * + * @return the number of material mappings. + * @throws Lib3MFException + */ + public int getMaterialMappingCount() throws Lib3MFException { + Pointer bufferCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_volumedatacomposite_getmaterialmappingcount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getInt(0); + } + + /** + * Returns MaterialMapping with given index + * + * @param index Index of the MaterialMapping in question. + * @return MaterialMapping used in this element + * @throws Lib3MFException + */ + public MaterialMapping getMaterialMapping(int index) throws Lib3MFException { + Pointer bufferTheMaterialMapping = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_volumedatacomposite_getmaterialmapping.invokeInt(new java.lang.Object[]{mHandle, index, bufferTheMaterialMapping})); + Pointer valueTheMaterialMapping = bufferTheMaterialMapping.getPointer(0); + MaterialMapping theMaterialMapping = null; + if (valueTheMaterialMapping == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheMaterialMapping was a null pointer"); + } + theMaterialMapping = mWrapper.PolymorphicFactory(valueTheMaterialMapping, MaterialMapping.class); + return theMaterialMapping; + } + + /** + * Adds a MaterialMapping + * + * @param transform new transformation matrix + * @return The new MaterialMapping + * @throws Lib3MFException + */ + public MaterialMapping addMaterialMapping(Transform transform) throws Lib3MFException { + Pointer bufferTransform = new Memory(Transform.SIZE); + transform.writeToPointer(bufferTransform, 0); + Pointer bufferTheMaterialMapping = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_volumedatacomposite_addmaterialmapping.invokeInt(new java.lang.Object[]{mHandle, bufferTransform, bufferTheMaterialMapping})); + Pointer valueTheMaterialMapping = bufferTheMaterialMapping.getPointer(0); + MaterialMapping theMaterialMapping = null; + if (valueTheMaterialMapping == Pointer.NULL) { + throw new Lib3MFException(Lib3MFException.LIB3MF_ERROR_INVALIDPARAM, "TheMaterialMapping was a null pointer"); + } + theMaterialMapping = mWrapper.PolymorphicFactory(valueTheMaterialMapping, MaterialMapping.class); + return theMaterialMapping; + } + + /** + * Removes the MaterialMapping with given index + * + * @param index The index of the MaterialMapping to be removed. + * @throws Lib3MFException + */ + public void removeMaterialMapping(int index) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_volumedatacomposite_removematerialmapping.invokeInt(new java.lang.Object[]{mHandle, index})); + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/VolumeDataProperty.java b/Autogenerated/Bindings/Java9/lib3mf/VolumeDataProperty.java new file mode 100644 index 000000000..33ba58256 --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/VolumeDataProperty.java @@ -0,0 +1,94 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class VolumeDataProperty extends FunctionReference { + + public VolumeDataProperty(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Gets the qualified name of this property. + * + * @return The qualified name of this property. + * @throws Lib3MFException + */ + public String getName() throws Lib3MFException { + Pointer bytesNeededPropertyName = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_volumedataproperty_getname.invokeInt(new java.lang.Object[]{mHandle, 0, bytesNeededPropertyName, null})); + int sizePropertyName = bytesNeededPropertyName.getInt(0); + Pointer bufferPropertyName = new Memory(sizePropertyName); + mWrapper.checkError(this, mWrapper.lib3mf_volumedataproperty_getname.invokeInt(new java.lang.Object[]{mHandle, sizePropertyName, bytesNeededPropertyName, bufferPropertyName})); + return new String(bufferPropertyName.getByteArray(0, sizePropertyName - 1), StandardCharsets.UTF_8); + } + + /** + * Sets whether this property is required to process this 3MF document instance. + * + * @param isRequired New value for whether this property is required to process this 3MF document instance. + * @throws Lib3MFException + */ + public void setIsRequired(boolean isRequired) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_volumedataproperty_setisrequired.invokeInt(new java.lang.Object[]{mHandle, isRequired})); + } + + /** + * Returns whether this property is required to process this 3MF document instance. + * + * @return Is this property required to process this 3MF document instance? + * @throws Lib3MFException + */ + public boolean isRequired() throws Lib3MFException { + Pointer bufferIsRequired = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_volumedataproperty_isrequired.invokeInt(new java.lang.Object[]{mHandle, bufferIsRequired})); + return bufferIsRequired.getByte(0) != 0; + } + + +} + diff --git a/Autogenerated/Bindings/Java9/lib3mf/Writer.java b/Autogenerated/Bindings/Java9/lib3mf/Writer.java new file mode 100644 index 000000000..45bda9efc --- /dev/null +++ b/Autogenerated/Bindings/Java9/lib3mf/Writer.java @@ -0,0 +1,236 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: This is an autogenerated Java file in order to allow an easy + use of the 3MF Library + +Interface version: 2.5.0 + +*/ + +package lib3mf; + +import com.sun.jna.Library; +import com.sun.jna.Memory; +import com.sun.jna.Native; +import com.sun.jna.Pointer; +import java.lang.ref.Cleaner; + + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; + +public class Writer extends Base { + + public Writer(Lib3MFWrapper wrapper, Pointer handle) { + super(wrapper, handle); + } + + /** + * Writes out the model as file. The file type is specified by the Model Writer class. + * + * @param filename Filename to write into + * @throws Lib3MFException + */ + public void writeToFile(String filename) throws Lib3MFException { + byte[] bytesFilename = filename.getBytes(StandardCharsets.UTF_8); + Memory bufferFilename = new Memory(bytesFilename.length + 1); + bufferFilename.write(0, bytesFilename, 0, bytesFilename.length); + bufferFilename.setByte(bytesFilename.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_writer_writetofile.invokeInt(new java.lang.Object[]{mHandle, bufferFilename})); + } + + /** + * Retrieves the size of the full 3MF file stream. + * + * @return the stream size + * @throws Lib3MFException + */ + public long getStreamSize() throws Lib3MFException { + Pointer bufferStreamSize = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_writer_getstreamsize.invokeInt(new java.lang.Object[]{mHandle, bufferStreamSize})); + return bufferStreamSize.getLong(0); + } + + /** + * Writes out the 3MF file into a memory buffer + * + * @return buffer to write into + * @throws Lib3MFException + */ + public byte[] writeToBuffer() throws Lib3MFException { + Pointer countNeededBuffer = new Memory(8); + mWrapper.checkError(this, mWrapper.lib3mf_writer_writetobuffer.invokeInt(new java.lang.Object[]{mHandle, 0L, countNeededBuffer, Pointer.NULL})); + long countBuffer = countNeededBuffer.getLong(0); + Pointer bufferBuffer = new Memory(Math.max(1, 1 * countBuffer)); + mWrapper.checkError(this, mWrapper.lib3mf_writer_writetobuffer.invokeInt(new java.lang.Object[]{mHandle, countBuffer, countNeededBuffer, bufferBuffer})); + return bufferBuffer.getByteArray(0, (int)countBuffer); + } + + /** + * Writes out the model and passes the data to a provided callback function. The file type is specified by the Model Writer class. + * + * @param theWriteCallback Callback to call for writing a data chunk + * @param theSeekCallback Callback to call for seeking in the stream + * @param userData Userdata that is passed to the callback function + * @throws Lib3MFException + */ + public void writeToCallback(Lib3MFWrapper.WriteCallback theWriteCallback, Lib3MFWrapper.SeekCallback theSeekCallback, Pointer userData) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_writer_writetocallback.invokeInt(new java.lang.Object[]{mHandle, theWriteCallback, theSeekCallback, userData})); + } + + /** + * Set the progress callback for calls to this writer + * + * @param progressCallback pointer to the callback function. + * @param userData pointer to arbitrary user data that is passed without modification to the callback. + * @throws Lib3MFException + */ + public void setProgressCallback(Lib3MFWrapper.ProgressCallback progressCallback, Pointer userData) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_writer_setprogresscallback.invokeInt(new java.lang.Object[]{mHandle, progressCallback, userData})); + } + + /** + * Returns the number of digits after the decimal point to be written in each vertex coordinate-value. + * + * @return The number of digits to be written in each vertex coordinate-value after the decimal point. + * @throws Lib3MFException + */ + public int getDecimalPrecision() throws Lib3MFException { + Pointer bufferDecimalPrecision = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_writer_getdecimalprecision.invokeInt(new java.lang.Object[]{mHandle, bufferDecimalPrecision})); + return bufferDecimalPrecision.getInt(0); + } + + /** + * Sets the number of digits after the decimal point to be written in each vertex coordinate-value. + * + * @param decimalPrecision The number of digits to be written in each vertex coordinate-value after the decimal point. + * @throws Lib3MFException + */ + public void setDecimalPrecision(int decimalPrecision) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_writer_setdecimalprecision.invokeInt(new java.lang.Object[]{mHandle, decimalPrecision})); + } + + /** + * Activates (deactivates) the strict mode of the reader. + * + * @param strictModeActive flag whether strict mode is active or not. + * @throws Lib3MFException + */ + public void setStrictModeActive(boolean strictModeActive) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_writer_setstrictmodeactive.invokeInt(new java.lang.Object[]{mHandle, strictModeActive})); + } + + /** + * Queries whether the strict mode of the reader is active or not + * + * @return returns flag whether strict mode is active or not. + * @throws Lib3MFException + */ + public boolean getStrictModeActive() throws Lib3MFException { + Pointer bufferStrictModeActive = new Memory(1); + mWrapper.checkError(this, mWrapper.lib3mf_writer_getstrictmodeactive.invokeInt(new java.lang.Object[]{mHandle, bufferStrictModeActive})); + return bufferStrictModeActive.getByte(0) != 0; + } + + /** + * Returns Warning and Error Information of the read process + * + * @param index Index of the Warning. Valid values are 0 to WarningCount - 1 + * @return GetWarning Result Tuple + * @throws Lib3MFException + */ + public GetWarningResult getWarning(int index) throws Lib3MFException { + Pointer bufferErrorCode = new Memory(4); + Pointer bytesNeededWarning = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_writer_getwarning.invokeInt(new java.lang.Object[]{mHandle, index, bufferErrorCode, 0, bytesNeededWarning, null})); + int sizeWarning = bytesNeededWarning.getInt(0); + Pointer bufferWarning = new Memory(sizeWarning); + mWrapper.checkError(this, mWrapper.lib3mf_writer_getwarning.invokeInt(new java.lang.Object[]{mHandle, index, bufferErrorCode, sizeWarning, bytesNeededWarning, bufferWarning})); + GetWarningResult returnTuple = new GetWarningResult(); + returnTuple.ErrorCode = bufferErrorCode.getInt(0); + returnTuple.Warning = new String(bufferWarning.getByteArray(0, sizeWarning - 1), StandardCharsets.UTF_8); + return returnTuple; + } + + public static class GetWarningResult { + /** + * filled with the error code of the warning + */ + public int ErrorCode; + + /** + * the message of the warning + */ + public String Warning; + + } + /** + * Returns Warning and Error Count of the read process + * + * @return filled with the count of the occurred warnings. + * @throws Lib3MFException + */ + public int getWarningCount() throws Lib3MFException { + Pointer bufferCount = new Memory(4); + mWrapper.checkError(this, mWrapper.lib3mf_writer_getwarningcount.invokeInt(new java.lang.Object[]{mHandle, bufferCount})); + return bufferCount.getInt(0); + } + + /** + * Registers a callback to deal with data key encryption/decryption from keystore + * + * @param consumerID The ConsumerID to register for + * @param theCallback The callback to be callede for wrapping and encryption key + * @param userData Userdata that is passed to the callback function + * @throws Lib3MFException + */ + public void addKeyWrappingCallback(String consumerID, Lib3MFWrapper.KeyWrappingCallback theCallback, Pointer userData) throws Lib3MFException { + byte[] bytesConsumerID = consumerID.getBytes(StandardCharsets.UTF_8); + Memory bufferConsumerID = new Memory(bytesConsumerID.length + 1); + bufferConsumerID.write(0, bytesConsumerID, 0, bytesConsumerID.length); + bufferConsumerID.setByte(bytesConsumerID.length, (byte)0); + mWrapper.checkError(this, mWrapper.lib3mf_writer_addkeywrappingcallback.invokeInt(new java.lang.Object[]{mHandle, bufferConsumerID, theCallback, userData})); + } + + /** + * Registers a callback to deal with encryption of content + * + * @param theCallback The callback used to encrypt content + * @param userData Userdata that is passed to the callback function + * @throws Lib3MFException + */ + public void setContentEncryptionCallback(Lib3MFWrapper.ContentEncryptionCallback theCallback, Pointer userData) throws Lib3MFException { + mWrapper.checkError(this, mWrapper.lib3mf_writer_setcontentencryptioncallback.invokeInt(new java.lang.Object[]{mHandle, theCallback, userData})); + } + + +} + diff --git a/Autogenerated/Bindings/NodeJS/lib3mf_dynamic.cc b/Autogenerated/Bindings/NodeJS/lib3mf_dynamic.cc index f8ad9ebeb..0527a8587 100644 --- a/Autogenerated/Bindings/NodeJS/lib3mf_dynamic.cc +++ b/Autogenerated/Bindings/NodeJS/lib3mf_dynamic.cc @@ -24,12 +24,12 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha. +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. Abstract: This is an autogenerated plain C Header file in order to allow an easy use of the 3MF Library -Interface version: 2.4.1 +Interface version: 2.5.0 */ @@ -422,6 +422,29 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_UnsignedMeshNode_GetInputMesh = NULL; pWrapperTable->m_UnsignedMeshNode_GetInputPos = NULL; pWrapperTable->m_UnsignedMeshNode_GetOutputDistance = NULL; + pWrapperTable->m_BeamLatticeNode_GetInputBeamLattice = NULL; + pWrapperTable->m_BeamLatticeNode_GetInputPos = NULL; + pWrapperTable->m_BeamLatticeNode_GetOutputDistance = NULL; + pWrapperTable->m_BeamLatticeNode_SetAccurateRange = NULL; + pWrapperTable->m_BeamLatticeNode_GetAccurateRange = NULL; + pWrapperTable->m_FunctionGradientNode_GetInputFunctionID = NULL; + pWrapperTable->m_FunctionGradientNode_GetInputPos = NULL; + pWrapperTable->m_FunctionGradientNode_GetInputStep = NULL; + pWrapperTable->m_FunctionGradientNode_SetScalarOutputName = NULL; + pWrapperTable->m_FunctionGradientNode_GetScalarOutputName = NULL; + pWrapperTable->m_FunctionGradientNode_SetVectorInputName = NULL; + pWrapperTable->m_FunctionGradientNode_GetVectorInputName = NULL; + pWrapperTable->m_FunctionGradientNode_GetOutputVector = NULL; + pWrapperTable->m_FunctionGradientNode_GetOutputGradient = NULL; + pWrapperTable->m_FunctionGradientNode_GetOutputMagnitude = NULL; + pWrapperTable->m_NormalizeDistanceNode_GetInputFunctionID = NULL; + pWrapperTable->m_NormalizeDistanceNode_GetInputPos = NULL; + pWrapperTable->m_NormalizeDistanceNode_GetInputStep = NULL; + pWrapperTable->m_NormalizeDistanceNode_SetScalarOutputName = NULL; + pWrapperTable->m_NormalizeDistanceNode_GetScalarOutputName = NULL; + pWrapperTable->m_NormalizeDistanceNode_SetVectorInputName = NULL; + pWrapperTable->m_NormalizeDistanceNode_GetVectorInputName = NULL; + pWrapperTable->m_NormalizeDistanceNode_GetOutputResult = NULL; pWrapperTable->m_FunctionCallNode_GetInputFunctionID = NULL; pWrapperTable->m_NodeIterator_GetCurrent = NULL; pWrapperTable->m_Function_GetDisplayName = NULL; @@ -485,6 +508,9 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_ImplicitFunction_AddConstMatNode = NULL; pWrapperTable->m_ImplicitFunction_AddMeshNode = NULL; pWrapperTable->m_ImplicitFunction_AddUnsignedMeshNode = NULL; + pWrapperTable->m_ImplicitFunction_AddBeamLatticeNode = NULL; + pWrapperTable->m_ImplicitFunction_AddFunctionGradientNode = NULL; + pWrapperTable->m_ImplicitFunction_AddNormalizeDistanceNode = NULL; pWrapperTable->m_ImplicitFunction_AddFunctionCallNode = NULL; pWrapperTable->m_ImplicitFunction_GetNodes = NULL; pWrapperTable->m_ImplicitFunction_RemoveNode = NULL; @@ -4088,6 +4114,213 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, if (pWrapperTable->m_UnsignedMeshNode_GetOutputDistance == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_BeamLatticeNode_GetInputBeamLattice = (PLib3MFBeamLatticeNode_GetInputBeamLatticePtr) GetProcAddress(hLibrary, "lib3mf_beamlatticenode_getinputbeamlattice"); + #else // _WIN32 + pWrapperTable->m_BeamLatticeNode_GetInputBeamLattice = (PLib3MFBeamLatticeNode_GetInputBeamLatticePtr) dlsym(hLibrary, "lib3mf_beamlatticenode_getinputbeamlattice"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLatticeNode_GetInputBeamLattice == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLatticeNode_GetInputPos = (PLib3MFBeamLatticeNode_GetInputPosPtr) GetProcAddress(hLibrary, "lib3mf_beamlatticenode_getinputpos"); + #else // _WIN32 + pWrapperTable->m_BeamLatticeNode_GetInputPos = (PLib3MFBeamLatticeNode_GetInputPosPtr) dlsym(hLibrary, "lib3mf_beamlatticenode_getinputpos"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLatticeNode_GetInputPos == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLatticeNode_GetOutputDistance = (PLib3MFBeamLatticeNode_GetOutputDistancePtr) GetProcAddress(hLibrary, "lib3mf_beamlatticenode_getoutputdistance"); + #else // _WIN32 + pWrapperTable->m_BeamLatticeNode_GetOutputDistance = (PLib3MFBeamLatticeNode_GetOutputDistancePtr) dlsym(hLibrary, "lib3mf_beamlatticenode_getoutputdistance"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLatticeNode_GetOutputDistance == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLatticeNode_SetAccurateRange = (PLib3MFBeamLatticeNode_SetAccurateRangePtr) GetProcAddress(hLibrary, "lib3mf_beamlatticenode_setaccuraterange"); + #else // _WIN32 + pWrapperTable->m_BeamLatticeNode_SetAccurateRange = (PLib3MFBeamLatticeNode_SetAccurateRangePtr) dlsym(hLibrary, "lib3mf_beamlatticenode_setaccuraterange"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLatticeNode_SetAccurateRange == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLatticeNode_GetAccurateRange = (PLib3MFBeamLatticeNode_GetAccurateRangePtr) GetProcAddress(hLibrary, "lib3mf_beamlatticenode_getaccuraterange"); + #else // _WIN32 + pWrapperTable->m_BeamLatticeNode_GetAccurateRange = (PLib3MFBeamLatticeNode_GetAccurateRangePtr) dlsym(hLibrary, "lib3mf_beamlatticenode_getaccuraterange"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLatticeNode_GetAccurateRange == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_GetInputFunctionID = (PLib3MFFunctionGradientNode_GetInputFunctionIDPtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_getinputfunctionid"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_GetInputFunctionID = (PLib3MFFunctionGradientNode_GetInputFunctionIDPtr) dlsym(hLibrary, "lib3mf_functiongradientnode_getinputfunctionid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_GetInputFunctionID == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_GetInputPos = (PLib3MFFunctionGradientNode_GetInputPosPtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_getinputpos"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_GetInputPos = (PLib3MFFunctionGradientNode_GetInputPosPtr) dlsym(hLibrary, "lib3mf_functiongradientnode_getinputpos"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_GetInputPos == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_GetInputStep = (PLib3MFFunctionGradientNode_GetInputStepPtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_getinputstep"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_GetInputStep = (PLib3MFFunctionGradientNode_GetInputStepPtr) dlsym(hLibrary, "lib3mf_functiongradientnode_getinputstep"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_GetInputStep == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_SetScalarOutputName = (PLib3MFFunctionGradientNode_SetScalarOutputNamePtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_setscalaroutputname"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_SetScalarOutputName = (PLib3MFFunctionGradientNode_SetScalarOutputNamePtr) dlsym(hLibrary, "lib3mf_functiongradientnode_setscalaroutputname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_SetScalarOutputName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_GetScalarOutputName = (PLib3MFFunctionGradientNode_GetScalarOutputNamePtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_getscalaroutputname"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_GetScalarOutputName = (PLib3MFFunctionGradientNode_GetScalarOutputNamePtr) dlsym(hLibrary, "lib3mf_functiongradientnode_getscalaroutputname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_GetScalarOutputName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_SetVectorInputName = (PLib3MFFunctionGradientNode_SetVectorInputNamePtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_setvectorinputname"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_SetVectorInputName = (PLib3MFFunctionGradientNode_SetVectorInputNamePtr) dlsym(hLibrary, "lib3mf_functiongradientnode_setvectorinputname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_SetVectorInputName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_GetVectorInputName = (PLib3MFFunctionGradientNode_GetVectorInputNamePtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_getvectorinputname"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_GetVectorInputName = (PLib3MFFunctionGradientNode_GetVectorInputNamePtr) dlsym(hLibrary, "lib3mf_functiongradientnode_getvectorinputname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_GetVectorInputName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_GetOutputVector = (PLib3MFFunctionGradientNode_GetOutputVectorPtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_getoutputvector"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_GetOutputVector = (PLib3MFFunctionGradientNode_GetOutputVectorPtr) dlsym(hLibrary, "lib3mf_functiongradientnode_getoutputvector"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_GetOutputVector == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_GetOutputGradient = (PLib3MFFunctionGradientNode_GetOutputGradientPtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_getoutputgradient"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_GetOutputGradient = (PLib3MFFunctionGradientNode_GetOutputGradientPtr) dlsym(hLibrary, "lib3mf_functiongradientnode_getoutputgradient"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_GetOutputGradient == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionGradientNode_GetOutputMagnitude = (PLib3MFFunctionGradientNode_GetOutputMagnitudePtr) GetProcAddress(hLibrary, "lib3mf_functiongradientnode_getoutputmagnitude"); + #else // _WIN32 + pWrapperTable->m_FunctionGradientNode_GetOutputMagnitude = (PLib3MFFunctionGradientNode_GetOutputMagnitudePtr) dlsym(hLibrary, "lib3mf_functiongradientnode_getoutputmagnitude"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionGradientNode_GetOutputMagnitude == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetInputFunctionID = (PLib3MFNormalizeDistanceNode_GetInputFunctionIDPtr) GetProcAddress(hLibrary, "lib3mf_normalizedistancenode_getinputfunctionid"); + #else // _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetInputFunctionID = (PLib3MFNormalizeDistanceNode_GetInputFunctionIDPtr) dlsym(hLibrary, "lib3mf_normalizedistancenode_getinputfunctionid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_NormalizeDistanceNode_GetInputFunctionID == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetInputPos = (PLib3MFNormalizeDistanceNode_GetInputPosPtr) GetProcAddress(hLibrary, "lib3mf_normalizedistancenode_getinputpos"); + #else // _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetInputPos = (PLib3MFNormalizeDistanceNode_GetInputPosPtr) dlsym(hLibrary, "lib3mf_normalizedistancenode_getinputpos"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_NormalizeDistanceNode_GetInputPos == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetInputStep = (PLib3MFNormalizeDistanceNode_GetInputStepPtr) GetProcAddress(hLibrary, "lib3mf_normalizedistancenode_getinputstep"); + #else // _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetInputStep = (PLib3MFNormalizeDistanceNode_GetInputStepPtr) dlsym(hLibrary, "lib3mf_normalizedistancenode_getinputstep"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_NormalizeDistanceNode_GetInputStep == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_NormalizeDistanceNode_SetScalarOutputName = (PLib3MFNormalizeDistanceNode_SetScalarOutputNamePtr) GetProcAddress(hLibrary, "lib3mf_normalizedistancenode_setscalaroutputname"); + #else // _WIN32 + pWrapperTable->m_NormalizeDistanceNode_SetScalarOutputName = (PLib3MFNormalizeDistanceNode_SetScalarOutputNamePtr) dlsym(hLibrary, "lib3mf_normalizedistancenode_setscalaroutputname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_NormalizeDistanceNode_SetScalarOutputName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetScalarOutputName = (PLib3MFNormalizeDistanceNode_GetScalarOutputNamePtr) GetProcAddress(hLibrary, "lib3mf_normalizedistancenode_getscalaroutputname"); + #else // _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetScalarOutputName = (PLib3MFNormalizeDistanceNode_GetScalarOutputNamePtr) dlsym(hLibrary, "lib3mf_normalizedistancenode_getscalaroutputname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_NormalizeDistanceNode_GetScalarOutputName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_NormalizeDistanceNode_SetVectorInputName = (PLib3MFNormalizeDistanceNode_SetVectorInputNamePtr) GetProcAddress(hLibrary, "lib3mf_normalizedistancenode_setvectorinputname"); + #else // _WIN32 + pWrapperTable->m_NormalizeDistanceNode_SetVectorInputName = (PLib3MFNormalizeDistanceNode_SetVectorInputNamePtr) dlsym(hLibrary, "lib3mf_normalizedistancenode_setvectorinputname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_NormalizeDistanceNode_SetVectorInputName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetVectorInputName = (PLib3MFNormalizeDistanceNode_GetVectorInputNamePtr) GetProcAddress(hLibrary, "lib3mf_normalizedistancenode_getvectorinputname"); + #else // _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetVectorInputName = (PLib3MFNormalizeDistanceNode_GetVectorInputNamePtr) dlsym(hLibrary, "lib3mf_normalizedistancenode_getvectorinputname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_NormalizeDistanceNode_GetVectorInputName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetOutputResult = (PLib3MFNormalizeDistanceNode_GetOutputResultPtr) GetProcAddress(hLibrary, "lib3mf_normalizedistancenode_getoutputresult"); + #else // _WIN32 + pWrapperTable->m_NormalizeDistanceNode_GetOutputResult = (PLib3MFNormalizeDistanceNode_GetOutputResultPtr) dlsym(hLibrary, "lib3mf_normalizedistancenode_getoutputresult"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_NormalizeDistanceNode_GetOutputResult == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_FunctionCallNode_GetInputFunctionID = (PLib3MFFunctionCallNode_GetInputFunctionIDPtr) GetProcAddress(hLibrary, "lib3mf_functioncallnode_getinputfunctionid"); #else // _WIN32 @@ -4655,6 +4888,33 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, if (pWrapperTable->m_ImplicitFunction_AddUnsignedMeshNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddBeamLatticeNode = (PLib3MFImplicitFunction_AddBeamLatticeNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addbeamlatticenode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddBeamLatticeNode = (PLib3MFImplicitFunction_AddBeamLatticeNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addbeamlatticenode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddBeamLatticeNode == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddFunctionGradientNode = (PLib3MFImplicitFunction_AddFunctionGradientNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addfunctiongradientnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddFunctionGradientNode = (PLib3MFImplicitFunction_AddFunctionGradientNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addfunctiongradientnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddFunctionGradientNode == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddNormalizeDistanceNode = (PLib3MFImplicitFunction_AddNormalizeDistanceNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addnormalizedistancenode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddNormalizeDistanceNode = (PLib3MFImplicitFunction_AddNormalizeDistanceNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addnormalizedistancenode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddNormalizeDistanceNode == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_ImplicitFunction_AddFunctionCallNode = (PLib3MFImplicitFunction_AddFunctionCallNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addfunctioncallnode"); #else // _WIN32 diff --git a/Autogenerated/Bindings/NodeJS/lib3mf_dynamic.h b/Autogenerated/Bindings/NodeJS/lib3mf_dynamic.h index 4063be4d8..516c266da 100644 --- a/Autogenerated/Bindings/NodeJS/lib3mf_dynamic.h +++ b/Autogenerated/Bindings/NodeJS/lib3mf_dynamic.h @@ -24,12 +24,12 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha. +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. Abstract: This is an autogenerated plain C Header file in order to allow an easy use of the 3MF Library -Interface version: 2.4.1 +Interface version: 2.5.0 */ @@ -1913,7 +1913,7 @@ typedef Lib3MFResult (*PLib3MFVolumeDataComposite_SetBaseMaterialGroupPtr) (Lib3 typedef Lib3MFResult (*PLib3MFVolumeDataComposite_GetMaterialMappingCountPtr) (Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 * pCount); /** -* Returns MaterialMappting with given index +* Returns MaterialMapping with given index * * @param[in] pVolumeDataComposite - VolumeDataComposite instance. * @param[in] nIndex - Index of the MaterialMapping in question. @@ -1923,7 +1923,7 @@ typedef Lib3MFResult (*PLib3MFVolumeDataComposite_GetMaterialMappingCountPtr) (L typedef Lib3MFResult (*PLib3MFVolumeDataComposite_GetMaterialMappingPtr) (Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 nIndex, Lib3MF_MaterialMapping * pTheMaterialMapping); /** -* Adds a the MaterialMapping +* Adds a MaterialMapping * * @param[in] pVolumeDataComposite - VolumeDataComposite instance. * @param[in] pTransform - new transformation matrix @@ -2035,7 +2035,7 @@ typedef Lib3MFResult (*PLib3MFVolumeData_RemoveColorPtr) (Lib3MF_VolumeData pVol * Returns the number of VolumeDataProperty * * @param[in] pVolumeData - VolumeData instance. -* @param[out] pCount - the number of VolumeDataProperty-elements within this VolumdeData +* @param[out] pCount - the number of VolumeDataProperty-elements within this VolumeData * @return error code or 0 (success) */ typedef Lib3MFResult (*PLib3MFVolumeData_GetPropertyCountPtr) (Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 * pCount); @@ -2860,7 +2860,7 @@ typedef Lib3MFResult (*PLib3MFAttachment_SetRelationShipTypePtr) (Lib3MF_Attachm typedef Lib3MFResult (*PLib3MFAttachment_WriteToFilePtr) (Lib3MF_Attachment pAttachment, const char * pFileName); /** -* Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer methods. * * @param[in] pAttachment - Attachment instance. * @param[in] pFileName - file to read from. @@ -2869,7 +2869,7 @@ typedef Lib3MFResult (*PLib3MFAttachment_WriteToFilePtr) (Lib3MF_Attachment pAtt typedef Lib3MFResult (*PLib3MFAttachment_ReadFromFilePtr) (Lib3MF_Attachment pAttachment, const char * pFileName); /** -* Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer methods. * * @param[in] pAttachment - Attachment instance. * @param[in] pTheReadCallback - Callback to call for reading a data chunk @@ -2901,7 +2901,7 @@ typedef Lib3MFResult (*PLib3MFAttachment_GetStreamSizePtr) (Lib3MF_Attachment pA typedef Lib3MFResult (*PLib3MFAttachment_WriteToBufferPtr) (Lib3MF_Attachment pAttachment, const Lib3MF_uint64 nBufferBufferSize, Lib3MF_uint64* pBufferNeededCount, Lib3MF_uint8 * pBufferBuffer); /** -* Reads an attachment from a memory buffer. This buffer is immediatly read (in contrast to the ReadFromCallback and ReadFromFile-methods). +* Reads an attachment from a memory buffer. This buffer is immediately read (in contrast to the ReadFromCallback and ReadFromFile-methods). * * @param[in] pAttachment - Attachment instance. * @param[in] nBufferBufferSize - Number of elements in buffer @@ -4013,6 +4013,233 @@ typedef Lib3MFResult (*PLib3MFUnsignedMeshNode_GetInputPosPtr) (Lib3MF_UnsignedM */ typedef Lib3MFResult (*PLib3MFUnsignedMeshNode_GetOutputDistancePtr) (Lib3MF_UnsignedMeshNode pUnsignedMeshNode, Lib3MF_ImplicitPort * pDistance); +/************************************************************************************************************************* + Class definition for BeamLatticeNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the model resource id of the beam lattice +* +* @param[in] pBeamLatticeNode - BeamLatticeNode instance. +* @param[out] pBeamLattice - the input port for the model resource id of the beam lattice (mesh with beamlattice extension) +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamLatticeNode_GetInputBeamLatticePtr) (Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_ImplicitPort * pBeamLattice); + +/** +* Retrieves the input for the position +* +* @param[in] pBeamLatticeNode - BeamLatticeNode instance. +* @param[out] pPos - the input port for the position +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamLatticeNode_GetInputPosPtr) (Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_ImplicitPort * pPos); + +/** +* Retrieves the output +* +* @param[in] pBeamLatticeNode - BeamLatticeNode instance. +* @param[out] pDistance - the output port for the signed distance to the beam lattice +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamLatticeNode_GetOutputDistancePtr) (Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_ImplicitPort * pDistance); + +/** +* Sets the accurate range for distance computation +* +* @param[in] pBeamLatticeNode - BeamLatticeNode instance. +* @param[in] dAccurateRange - the accurate range in model units +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamLatticeNode_SetAccurateRangePtr) (Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_double dAccurateRange); + +/** +* Retrieves the accurate range for distance computation +* +* @param[in] pBeamLatticeNode - BeamLatticeNode instance. +* @param[out] pAccurateRange - the accurate range in model units +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamLatticeNode_GetAccurateRangePtr) (Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_double * pAccurateRange); + +/************************************************************************************************************************* + Class definition for FunctionGradientNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the function id +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pFunction - the input port for the function +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_GetInputFunctionIDPtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pFunction); + +/** +* Retrieves the input for the position +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pPos - the input port for the position +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_GetInputPosPtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pPos); + +/** +* Retrieves the input for the finite difference step +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pStep - the input port for the finite difference step +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_GetInputStepPtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pStep); + +/** +* Sets the name of the referenced scalar output +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[in] pScalarOutputName - the name of the scalar output of the referenced function +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_SetScalarOutputNamePtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, const char * pScalarOutputName); + +/** +* Retrieves the name of the referenced scalar output +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[in] nScalarOutputNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pScalarOutputNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pScalarOutputNameBuffer - buffer of the name of the scalar output of the referenced function, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_GetScalarOutputNamePtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, const Lib3MF_uint32 nScalarOutputNameBufferSize, Lib3MF_uint32* pScalarOutputNameNeededChars, char * pScalarOutputNameBuffer); + +/** +* Sets the name of the referenced vector input +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[in] pVectorInputName - the name of the vector input (float3) of the referenced function +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_SetVectorInputNamePtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, const char * pVectorInputName); + +/** +* Retrieves the name of the referenced vector input +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[in] nVectorInputNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pVectorInputNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pVectorInputNameBuffer - buffer of the name of the vector input (float3) of the referenced function, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_GetVectorInputNamePtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, const Lib3MF_uint32 nVectorInputNameBufferSize, Lib3MF_uint32* pVectorInputNameNeededChars, char * pVectorInputNameBuffer); + +/** +* Retrieves the normalized gradient output +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pVector - the output port for the normalized gradient +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_GetOutputVectorPtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pVector); + +/** +* Retrieves the raw gradient output +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pGradient - the output port for the raw gradient +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_GetOutputGradientPtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pGradient); + +/** +* Retrieves the gradient magnitude output +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pMagnitude - the output port for the gradient magnitude +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionGradientNode_GetOutputMagnitudePtr) (Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pMagnitude); + +/************************************************************************************************************************* + Class definition for NormalizeDistanceNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the function id +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[out] pFunction - the input port for the function +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFNormalizeDistanceNode_GetInputFunctionIDPtr) (Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pFunction); + +/** +* Retrieves the input for the position +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[out] pPos - the input port for the position (vector) +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFNormalizeDistanceNode_GetInputPosPtr) (Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pPos); + +/** +* Retrieves the input for the finite difference step +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[out] pStep - the input port for the finite difference step +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFNormalizeDistanceNode_GetInputStepPtr) (Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pStep); + +/** +* Sets the name of the referenced scalar output +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[in] pScalarOutputName - the name of the scalar output of the referenced function +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFNormalizeDistanceNode_SetScalarOutputNamePtr) (Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const char * pScalarOutputName); + +/** +* Retrieves the name of the referenced scalar output +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[in] nScalarOutputNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pScalarOutputNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pScalarOutputNameBuffer - buffer of the name of the scalar output of the referenced function, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFNormalizeDistanceNode_GetScalarOutputNamePtr) (Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const Lib3MF_uint32 nScalarOutputNameBufferSize, Lib3MF_uint32* pScalarOutputNameNeededChars, char * pScalarOutputNameBuffer); + +/** +* Sets the name of the referenced vector input +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[in] pVectorInputName - the name of the vector input (float3) of the referenced function +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFNormalizeDistanceNode_SetVectorInputNamePtr) (Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const char * pVectorInputName); + +/** +* Retrieves the name of the referenced vector input +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[in] nVectorInputNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pVectorInputNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pVectorInputNameBuffer - buffer of the name of the vector input (float3) of the referenced function, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFNormalizeDistanceNode_GetVectorInputNamePtr) (Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const Lib3MF_uint32 nVectorInputNameBufferSize, Lib3MF_uint32* pVectorInputNameNeededChars, char * pVectorInputNameBuffer); + +/** +* Retrieves the normalized result output +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[out] pResult - the output port for the normalized distance +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFNormalizeDistanceNode_GetOutputResultPtr) (Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pResult); + /************************************************************************************************************************* Class definition for FunctionCallNode **************************************************************************************************************************/ @@ -4788,6 +5015,42 @@ typedef Lib3MFResult (*PLib3MFImplicitFunction_AddMeshNodePtr) (Lib3MF_ImplicitF */ typedef Lib3MFResult (*PLib3MFImplicitFunction_AddUnsignedMeshNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_UnsignedMeshNode * pNode); +/** +* Add a BeamLatticeNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddBeamLatticeNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_BeamLatticeNode * pNode); + +/** +* Add a FunctionGradientNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddFunctionGradientNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_FunctionGradientNode * pNode); + +/** +* Add a NormalizeDistanceNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddNormalizeDistanceNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_NormalizeDistanceNode * pNode); + /** * Add a FunctionCallNode * @@ -6997,6 +7260,29 @@ typedef struct { PLib3MFUnsignedMeshNode_GetInputMeshPtr m_UnsignedMeshNode_GetInputMesh; PLib3MFUnsignedMeshNode_GetInputPosPtr m_UnsignedMeshNode_GetInputPos; PLib3MFUnsignedMeshNode_GetOutputDistancePtr m_UnsignedMeshNode_GetOutputDistance; + PLib3MFBeamLatticeNode_GetInputBeamLatticePtr m_BeamLatticeNode_GetInputBeamLattice; + PLib3MFBeamLatticeNode_GetInputPosPtr m_BeamLatticeNode_GetInputPos; + PLib3MFBeamLatticeNode_GetOutputDistancePtr m_BeamLatticeNode_GetOutputDistance; + PLib3MFBeamLatticeNode_SetAccurateRangePtr m_BeamLatticeNode_SetAccurateRange; + PLib3MFBeamLatticeNode_GetAccurateRangePtr m_BeamLatticeNode_GetAccurateRange; + PLib3MFFunctionGradientNode_GetInputFunctionIDPtr m_FunctionGradientNode_GetInputFunctionID; + PLib3MFFunctionGradientNode_GetInputPosPtr m_FunctionGradientNode_GetInputPos; + PLib3MFFunctionGradientNode_GetInputStepPtr m_FunctionGradientNode_GetInputStep; + PLib3MFFunctionGradientNode_SetScalarOutputNamePtr m_FunctionGradientNode_SetScalarOutputName; + PLib3MFFunctionGradientNode_GetScalarOutputNamePtr m_FunctionGradientNode_GetScalarOutputName; + PLib3MFFunctionGradientNode_SetVectorInputNamePtr m_FunctionGradientNode_SetVectorInputName; + PLib3MFFunctionGradientNode_GetVectorInputNamePtr m_FunctionGradientNode_GetVectorInputName; + PLib3MFFunctionGradientNode_GetOutputVectorPtr m_FunctionGradientNode_GetOutputVector; + PLib3MFFunctionGradientNode_GetOutputGradientPtr m_FunctionGradientNode_GetOutputGradient; + PLib3MFFunctionGradientNode_GetOutputMagnitudePtr m_FunctionGradientNode_GetOutputMagnitude; + PLib3MFNormalizeDistanceNode_GetInputFunctionIDPtr m_NormalizeDistanceNode_GetInputFunctionID; + PLib3MFNormalizeDistanceNode_GetInputPosPtr m_NormalizeDistanceNode_GetInputPos; + PLib3MFNormalizeDistanceNode_GetInputStepPtr m_NormalizeDistanceNode_GetInputStep; + PLib3MFNormalizeDistanceNode_SetScalarOutputNamePtr m_NormalizeDistanceNode_SetScalarOutputName; + PLib3MFNormalizeDistanceNode_GetScalarOutputNamePtr m_NormalizeDistanceNode_GetScalarOutputName; + PLib3MFNormalizeDistanceNode_SetVectorInputNamePtr m_NormalizeDistanceNode_SetVectorInputName; + PLib3MFNormalizeDistanceNode_GetVectorInputNamePtr m_NormalizeDistanceNode_GetVectorInputName; + PLib3MFNormalizeDistanceNode_GetOutputResultPtr m_NormalizeDistanceNode_GetOutputResult; PLib3MFFunctionCallNode_GetInputFunctionIDPtr m_FunctionCallNode_GetInputFunctionID; PLib3MFNodeIterator_GetCurrentPtr m_NodeIterator_GetCurrent; PLib3MFFunction_GetDisplayNamePtr m_Function_GetDisplayName; @@ -7060,6 +7346,9 @@ typedef struct { PLib3MFImplicitFunction_AddConstMatNodePtr m_ImplicitFunction_AddConstMatNode; PLib3MFImplicitFunction_AddMeshNodePtr m_ImplicitFunction_AddMeshNode; PLib3MFImplicitFunction_AddUnsignedMeshNodePtr m_ImplicitFunction_AddUnsignedMeshNode; + PLib3MFImplicitFunction_AddBeamLatticeNodePtr m_ImplicitFunction_AddBeamLatticeNode; + PLib3MFImplicitFunction_AddFunctionGradientNodePtr m_ImplicitFunction_AddFunctionGradientNode; + PLib3MFImplicitFunction_AddNormalizeDistanceNodePtr m_ImplicitFunction_AddNormalizeDistanceNode; PLib3MFImplicitFunction_AddFunctionCallNodePtr m_ImplicitFunction_AddFunctionCallNode; PLib3MFImplicitFunction_GetNodesPtr m_ImplicitFunction_GetNodes; PLib3MFImplicitFunction_RemoveNodePtr m_ImplicitFunction_RemoveNode; diff --git a/Autogenerated/Bindings/NodeJS/lib3mf_nodeaddon.cc b/Autogenerated/Bindings/NodeJS/lib3mf_nodeaddon.cc index e7c2735c1..b1b71d3fc 100644 --- a/Autogenerated/Bindings/NodeJS/lib3mf_nodeaddon.cc +++ b/Autogenerated/Bindings/NodeJS/lib3mf_nodeaddon.cc @@ -24,12 +24,12 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha. +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. Abstract: This is an autogenerated C++ Implementation file for the Node addon class of the 3MF Library -Interface version: 2.4.1 +Interface version: 2.5.0 */ @@ -148,6 +148,9 @@ void InitAll(v8::Local exports, v8::Local module) CLib3MFConstMatNode::Init(); CLib3MFMeshNode::Init(); CLib3MFUnsignedMeshNode::Init(); + CLib3MFBeamLatticeNode::Init(); + CLib3MFFunctionGradientNode::Init(); + CLib3MFNormalizeDistanceNode::Init(); CLib3MFFunctionCallNode::Init(); CLib3MFNodeIterator::Init(); CLib3MFFunction::Init(); diff --git a/Autogenerated/Bindings/NodeJS/lib3mf_nodewrapper.cc b/Autogenerated/Bindings/NodeJS/lib3mf_nodewrapper.cc index 6ea8ca9fb..9632f7513 100644 --- a/Autogenerated/Bindings/NodeJS/lib3mf_nodewrapper.cc +++ b/Autogenerated/Bindings/NodeJS/lib3mf_nodewrapper.cc @@ -24,12 +24,12 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha. +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. Abstract: This is an autogenerated C++ Implementation file for the Node wrapper class of the 3MF Library -Interface version: 2.4.1 +Interface version: 2.5.0 */ @@ -141,6 +141,9 @@ Persistent CLib3MFConstVecNode::constructor; Persistent CLib3MFConstMatNode::constructor; Persistent CLib3MFMeshNode::constructor; Persistent CLib3MFUnsignedMeshNode::constructor; +Persistent CLib3MFBeamLatticeNode::constructor; +Persistent CLib3MFFunctionGradientNode::constructor; +Persistent CLib3MFNormalizeDistanceNode::constructor; Persistent CLib3MFFunctionCallNode::constructor; Persistent CLib3MFNodeIterator::constructor; Persistent CLib3MFFunction::constructor; @@ -16380,6 +16383,747 @@ void CLib3MFUnsignedMeshNode::GetOutputDistance(const FunctionCallbackInfo tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFBeamLatticeNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputBeamLattice", GetInputBeamLattice); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputPos", GetInputPos); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetOutputDistance", GetOutputDistance); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetAccurateRange", SetAccurateRange); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetAccurateRange", GetAccurateRange); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFBeamLatticeNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFBeamLatticeNode * beamlatticenodeInstance = new CLib3MFBeamLatticeNode(); + beamlatticenodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFBeamLatticeNode: Invalid call to Constructor"); + } +} + +Local CLib3MFBeamLatticeNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFBeamLatticeNode::GetInputBeamLattice(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnBeamLattice = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputBeamLattice."); + if (wrapperTable->m_BeamLatticeNode_GetInputBeamLattice == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamLatticeNode::GetInputBeamLattice."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BeamLatticeNode_GetInputBeamLattice(instanceHandle, &hReturnBeamLattice); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjBeamLattice = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnBeamLattice); + args.GetReturnValue().Set(instanceObjBeamLattice); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBeamLatticeNode::GetInputPos(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnPos = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputPos."); + if (wrapperTable->m_BeamLatticeNode_GetInputPos == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamLatticeNode::GetInputPos."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BeamLatticeNode_GetInputPos(instanceHandle, &hReturnPos); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjPos = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnPos); + args.GetReturnValue().Set(instanceObjPos); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBeamLatticeNode::GetOutputDistance(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnDistance = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetOutputDistance."); + if (wrapperTable->m_BeamLatticeNode_GetOutputDistance == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamLatticeNode::GetOutputDistance."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BeamLatticeNode_GetOutputDistance(instanceHandle, &hReturnDistance); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjDistance = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnDistance); + args.GetReturnValue().Set(instanceObjDistance); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBeamLatticeNode::SetAccurateRange(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsNumber()) { + throw std::runtime_error("Expected double parameter 0 (AccurateRange)"); + } + double dAccurateRange = (double) args[0]->NumberValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetAccurateRange."); + if (wrapperTable->m_BeamLatticeNode_SetAccurateRange == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamLatticeNode::SetAccurateRange."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BeamLatticeNode_SetAccurateRange(instanceHandle, dAccurateRange); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBeamLatticeNode::GetAccurateRange(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + double dReturnAccurateRange = 0.0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetAccurateRange."); + if (wrapperTable->m_BeamLatticeNode_GetAccurateRange == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamLatticeNode::GetAccurateRange."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BeamLatticeNode_GetAccurateRange(instanceHandle, &dReturnAccurateRange); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Number::New(isolate, dReturnAccurateRange)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFFunctionGradientNode Implementation +**************************************************************************************************************************/ + +CLib3MFFunctionGradientNode::CLib3MFFunctionGradientNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFFunctionGradientNode::~CLib3MFFunctionGradientNode() +{ +} + +void CLib3MFFunctionGradientNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFFunctionGradientNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputFunctionID", GetInputFunctionID); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputPos", GetInputPos); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputStep", GetInputStep); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetScalarOutputName", SetScalarOutputName); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetScalarOutputName", GetScalarOutputName); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetVectorInputName", SetVectorInputName); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetVectorInputName", GetVectorInputName); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetOutputVector", GetOutputVector); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetOutputGradient", GetOutputGradient); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetOutputMagnitude", GetOutputMagnitude); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFFunctionGradientNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFFunctionGradientNode * functiongradientnodeInstance = new CLib3MFFunctionGradientNode(); + functiongradientnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFFunctionGradientNode: Invalid call to Constructor"); + } +} + +Local CLib3MFFunctionGradientNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFFunctionGradientNode::GetInputFunctionID(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnFunction = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputFunctionID."); + if (wrapperTable->m_FunctionGradientNode_GetInputFunctionID == nullptr) + throw std::runtime_error("Could not call Lib3MF method FunctionGradientNode::GetInputFunctionID."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_FunctionGradientNode_GetInputFunctionID(instanceHandle, &hReturnFunction); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjFunction = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnFunction); + args.GetReturnValue().Set(instanceObjFunction); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFFunctionGradientNode::GetInputPos(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnPos = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputPos."); + if (wrapperTable->m_FunctionGradientNode_GetInputPos == nullptr) + throw std::runtime_error("Could not call Lib3MF method FunctionGradientNode::GetInputPos."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_FunctionGradientNode_GetInputPos(instanceHandle, &hReturnPos); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjPos = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnPos); + args.GetReturnValue().Set(instanceObjPos); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFFunctionGradientNode::GetInputStep(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnStep = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputStep."); + if (wrapperTable->m_FunctionGradientNode_GetInputStep == nullptr) + throw std::runtime_error("Could not call Lib3MF method FunctionGradientNode::GetInputStep."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_FunctionGradientNode_GetInputStep(instanceHandle, &hReturnStep); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjStep = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnStep); + args.GetReturnValue().Set(instanceObjStep); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFFunctionGradientNode::SetScalarOutputName(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (ScalarOutputName)"); + } + v8::String::Utf8Value sutf8ScalarOutputName(isolate, args[0]); + std::string sScalarOutputName = *sutf8ScalarOutputName; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetScalarOutputName."); + if (wrapperTable->m_FunctionGradientNode_SetScalarOutputName == nullptr) + throw std::runtime_error("Could not call Lib3MF method FunctionGradientNode::SetScalarOutputName."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_FunctionGradientNode_SetScalarOutputName(instanceHandle, sScalarOutputName.c_str()); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFFunctionGradientNode::GetScalarOutputName(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int bytesNeededScalarOutputName = 0; + unsigned int bytesWrittenScalarOutputName = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetScalarOutputName."); + if (wrapperTable->m_FunctionGradientNode_GetScalarOutputName == nullptr) + throw std::runtime_error("Could not call Lib3MF method FunctionGradientNode::GetScalarOutputName."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult initErrorCode = wrapperTable->m_FunctionGradientNode_GetScalarOutputName(instanceHandle, 0, &bytesNeededScalarOutputName, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, initErrorCode); + std::vector bufferScalarOutputName; + bufferScalarOutputName.resize(bytesNeededScalarOutputName); + Lib3MFResult errorCode = wrapperTable->m_FunctionGradientNode_GetScalarOutputName(instanceHandle, bytesNeededScalarOutputName, &bytesWrittenScalarOutputName, &bufferScalarOutputName[0]); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(String::NewFromUtf8(isolate, &bufferScalarOutputName[0])); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFFunctionGradientNode::SetVectorInputName(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (VectorInputName)"); + } + v8::String::Utf8Value sutf8VectorInputName(isolate, args[0]); + std::string sVectorInputName = *sutf8VectorInputName; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetVectorInputName."); + if (wrapperTable->m_FunctionGradientNode_SetVectorInputName == nullptr) + throw std::runtime_error("Could not call Lib3MF method FunctionGradientNode::SetVectorInputName."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_FunctionGradientNode_SetVectorInputName(instanceHandle, sVectorInputName.c_str()); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFFunctionGradientNode::GetVectorInputName(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int bytesNeededVectorInputName = 0; + unsigned int bytesWrittenVectorInputName = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetVectorInputName."); + if (wrapperTable->m_FunctionGradientNode_GetVectorInputName == nullptr) + throw std::runtime_error("Could not call Lib3MF method FunctionGradientNode::GetVectorInputName."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult initErrorCode = wrapperTable->m_FunctionGradientNode_GetVectorInputName(instanceHandle, 0, &bytesNeededVectorInputName, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, initErrorCode); + std::vector bufferVectorInputName; + bufferVectorInputName.resize(bytesNeededVectorInputName); + Lib3MFResult errorCode = wrapperTable->m_FunctionGradientNode_GetVectorInputName(instanceHandle, bytesNeededVectorInputName, &bytesWrittenVectorInputName, &bufferVectorInputName[0]); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(String::NewFromUtf8(isolate, &bufferVectorInputName[0])); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFFunctionGradientNode::GetOutputVector(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnVector = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetOutputVector."); + if (wrapperTable->m_FunctionGradientNode_GetOutputVector == nullptr) + throw std::runtime_error("Could not call Lib3MF method FunctionGradientNode::GetOutputVector."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_FunctionGradientNode_GetOutputVector(instanceHandle, &hReturnVector); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjVector = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnVector); + args.GetReturnValue().Set(instanceObjVector); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFFunctionGradientNode::GetOutputGradient(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnGradient = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetOutputGradient."); + if (wrapperTable->m_FunctionGradientNode_GetOutputGradient == nullptr) + throw std::runtime_error("Could not call Lib3MF method FunctionGradientNode::GetOutputGradient."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_FunctionGradientNode_GetOutputGradient(instanceHandle, &hReturnGradient); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjGradient = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnGradient); + args.GetReturnValue().Set(instanceObjGradient); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFFunctionGradientNode::GetOutputMagnitude(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnMagnitude = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetOutputMagnitude."); + if (wrapperTable->m_FunctionGradientNode_GetOutputMagnitude == nullptr) + throw std::runtime_error("Could not call Lib3MF method FunctionGradientNode::GetOutputMagnitude."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_FunctionGradientNode_GetOutputMagnitude(instanceHandle, &hReturnMagnitude); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjMagnitude = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnMagnitude); + args.GetReturnValue().Set(instanceObjMagnitude); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFNormalizeDistanceNode Implementation +**************************************************************************************************************************/ + +CLib3MFNormalizeDistanceNode::CLib3MFNormalizeDistanceNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFNormalizeDistanceNode::~CLib3MFNormalizeDistanceNode() +{ +} + +void CLib3MFNormalizeDistanceNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFNormalizeDistanceNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputFunctionID", GetInputFunctionID); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputPos", GetInputPos); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputStep", GetInputStep); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetScalarOutputName", SetScalarOutputName); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetScalarOutputName", GetScalarOutputName); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetVectorInputName", SetVectorInputName); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetVectorInputName", GetVectorInputName); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetOutputResult", GetOutputResult); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFNormalizeDistanceNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFNormalizeDistanceNode * normalizedistancenodeInstance = new CLib3MFNormalizeDistanceNode(); + normalizedistancenodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFNormalizeDistanceNode: Invalid call to Constructor"); + } +} + +Local CLib3MFNormalizeDistanceNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFNormalizeDistanceNode::GetInputFunctionID(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnFunction = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputFunctionID."); + if (wrapperTable->m_NormalizeDistanceNode_GetInputFunctionID == nullptr) + throw std::runtime_error("Could not call Lib3MF method NormalizeDistanceNode::GetInputFunctionID."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_NormalizeDistanceNode_GetInputFunctionID(instanceHandle, &hReturnFunction); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjFunction = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnFunction); + args.GetReturnValue().Set(instanceObjFunction); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFNormalizeDistanceNode::GetInputPos(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnPos = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputPos."); + if (wrapperTable->m_NormalizeDistanceNode_GetInputPos == nullptr) + throw std::runtime_error("Could not call Lib3MF method NormalizeDistanceNode::GetInputPos."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_NormalizeDistanceNode_GetInputPos(instanceHandle, &hReturnPos); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjPos = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnPos); + args.GetReturnValue().Set(instanceObjPos); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFNormalizeDistanceNode::GetInputStep(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnStep = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputStep."); + if (wrapperTable->m_NormalizeDistanceNode_GetInputStep == nullptr) + throw std::runtime_error("Could not call Lib3MF method NormalizeDistanceNode::GetInputStep."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_NormalizeDistanceNode_GetInputStep(instanceHandle, &hReturnStep); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjStep = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnStep); + args.GetReturnValue().Set(instanceObjStep); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFNormalizeDistanceNode::SetScalarOutputName(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (ScalarOutputName)"); + } + v8::String::Utf8Value sutf8ScalarOutputName(isolate, args[0]); + std::string sScalarOutputName = *sutf8ScalarOutputName; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetScalarOutputName."); + if (wrapperTable->m_NormalizeDistanceNode_SetScalarOutputName == nullptr) + throw std::runtime_error("Could not call Lib3MF method NormalizeDistanceNode::SetScalarOutputName."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_NormalizeDistanceNode_SetScalarOutputName(instanceHandle, sScalarOutputName.c_str()); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFNormalizeDistanceNode::GetScalarOutputName(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int bytesNeededScalarOutputName = 0; + unsigned int bytesWrittenScalarOutputName = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetScalarOutputName."); + if (wrapperTable->m_NormalizeDistanceNode_GetScalarOutputName == nullptr) + throw std::runtime_error("Could not call Lib3MF method NormalizeDistanceNode::GetScalarOutputName."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult initErrorCode = wrapperTable->m_NormalizeDistanceNode_GetScalarOutputName(instanceHandle, 0, &bytesNeededScalarOutputName, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, initErrorCode); + std::vector bufferScalarOutputName; + bufferScalarOutputName.resize(bytesNeededScalarOutputName); + Lib3MFResult errorCode = wrapperTable->m_NormalizeDistanceNode_GetScalarOutputName(instanceHandle, bytesNeededScalarOutputName, &bytesWrittenScalarOutputName, &bufferScalarOutputName[0]); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(String::NewFromUtf8(isolate, &bufferScalarOutputName[0])); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFNormalizeDistanceNode::SetVectorInputName(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (VectorInputName)"); + } + v8::String::Utf8Value sutf8VectorInputName(isolate, args[0]); + std::string sVectorInputName = *sutf8VectorInputName; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetVectorInputName."); + if (wrapperTable->m_NormalizeDistanceNode_SetVectorInputName == nullptr) + throw std::runtime_error("Could not call Lib3MF method NormalizeDistanceNode::SetVectorInputName."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_NormalizeDistanceNode_SetVectorInputName(instanceHandle, sVectorInputName.c_str()); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFNormalizeDistanceNode::GetVectorInputName(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int bytesNeededVectorInputName = 0; + unsigned int bytesWrittenVectorInputName = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetVectorInputName."); + if (wrapperTable->m_NormalizeDistanceNode_GetVectorInputName == nullptr) + throw std::runtime_error("Could not call Lib3MF method NormalizeDistanceNode::GetVectorInputName."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult initErrorCode = wrapperTable->m_NormalizeDistanceNode_GetVectorInputName(instanceHandle, 0, &bytesNeededVectorInputName, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, initErrorCode); + std::vector bufferVectorInputName; + bufferVectorInputName.resize(bytesNeededVectorInputName); + Lib3MFResult errorCode = wrapperTable->m_NormalizeDistanceNode_GetVectorInputName(instanceHandle, bytesNeededVectorInputName, &bytesWrittenVectorInputName, &bufferVectorInputName[0]); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(String::NewFromUtf8(isolate, &bufferVectorInputName[0])); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFNormalizeDistanceNode::GetOutputResult(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnResult = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetOutputResult."); + if (wrapperTable->m_NormalizeDistanceNode_GetOutputResult == nullptr) + throw std::runtime_error("Could not call Lib3MF method NormalizeDistanceNode::GetOutputResult."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_NormalizeDistanceNode_GetOutputResult(instanceHandle, &hReturnResult); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjResult = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnResult); + args.GetReturnValue().Set(instanceObjResult); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + /************************************************************************************************************************* Class CLib3MFFunctionCallNode Implementation **************************************************************************************************************************/ @@ -16961,6 +17705,9 @@ void CLib3MFImplicitFunction::Init() NODE_SET_PROTOTYPE_METHOD(tpl, "AddConstMatNode", AddConstMatNode); NODE_SET_PROTOTYPE_METHOD(tpl, "AddMeshNode", AddMeshNode); NODE_SET_PROTOTYPE_METHOD(tpl, "AddUnsignedMeshNode", AddUnsignedMeshNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddBeamLatticeNode", AddBeamLatticeNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddFunctionGradientNode", AddFunctionGradientNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddNormalizeDistanceNode", AddNormalizeDistanceNode); NODE_SET_PROTOTYPE_METHOD(tpl, "AddFunctionCallNode", AddFunctionCallNode); NODE_SET_PROTOTYPE_METHOD(tpl, "GetNodes", GetNodes); NODE_SET_PROTOTYPE_METHOD(tpl, "RemoveNode", RemoveNode); @@ -19047,6 +19794,120 @@ void CLib3MFImplicitFunction::AddUnsignedMeshNode(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + if (!args[1]->IsString()) { + throw std::runtime_error("Expected string parameter 1 (DisplayName)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + v8::String::Utf8Value sutf8DisplayName(isolate, args[1]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[2]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddBeamLatticeNode."); + if (wrapperTable->m_ImplicitFunction_AddBeamLatticeNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddBeamLatticeNode."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddBeamLatticeNode(instanceHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hReturnNode); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjNode = CLib3MFBeamLatticeNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFImplicitFunction::AddFunctionGradientNode(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + if (!args[1]->IsString()) { + throw std::runtime_error("Expected string parameter 1 (DisplayName)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + v8::String::Utf8Value sutf8DisplayName(isolate, args[1]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[2]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddFunctionGradientNode."); + if (wrapperTable->m_ImplicitFunction_AddFunctionGradientNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddFunctionGradientNode."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddFunctionGradientNode(instanceHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hReturnNode); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjNode = CLib3MFFunctionGradientNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFImplicitFunction::AddNormalizeDistanceNode(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + if (!args[1]->IsString()) { + throw std::runtime_error("Expected string parameter 1 (DisplayName)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + v8::String::Utf8Value sutf8DisplayName(isolate, args[1]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[2]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddNormalizeDistanceNode."); + if (wrapperTable->m_ImplicitFunction_AddNormalizeDistanceNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddNormalizeDistanceNode."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddNormalizeDistanceNode(instanceHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hReturnNode); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjNode = CLib3MFNormalizeDistanceNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + void CLib3MFImplicitFunction::AddFunctionCallNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); @@ -24124,6 +24985,7 @@ void CLib3MFWrapper::New(const FunctionCallbackInfo& args) newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eObjectType_Model"), Integer::New(isolate, 1)); newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eObjectType_Support"), Integer::New(isolate, 2)); newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eObjectType_SolidSupport"), Integer::New(isolate, 3)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eObjectType_Surface"), Integer::New(isolate, 4)); newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eTextureType_Unknown"), Integer::New(isolate, 0)); newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eTextureType_PNG"), Integer::New(isolate, 1)); newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eTextureType_JPEG"), Integer::New(isolate, 2)); @@ -24232,6 +25094,9 @@ void CLib3MFWrapper::New(const FunctionCallbackInfo& args) newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_VectorFromScalar"), Integer::New(isolate, 48)); newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_UnsignedMesh"), Integer::New(isolate, 49)); newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_Mod"), Integer::New(isolate, 50)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_BeamLattice"), Integer::New(isolate, 51)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_FunctionGradient"), Integer::New(isolate, 52)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_NormalizeDistance"), Integer::New(isolate, 53)); newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitPortType_Scalar"), Integer::New(isolate, 0)); newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitPortType_Vector"), Integer::New(isolate, 1)); newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitPortType_Matrix"), Integer::New(isolate, 2)); diff --git a/Autogenerated/Bindings/NodeJS/lib3mf_nodewrapper.h b/Autogenerated/Bindings/NodeJS/lib3mf_nodewrapper.h index af03fa73f..37bed84ae 100644 --- a/Autogenerated/Bindings/NodeJS/lib3mf_nodewrapper.h +++ b/Autogenerated/Bindings/NodeJS/lib3mf_nodewrapper.h @@ -24,12 +24,12 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha. +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. Abstract: This is an autogenerated C++ Header file for the Node wrapper class of the 3MF Library -Interface version: 2.4.1 +Interface version: 2.5.0 */ @@ -2143,6 +2143,80 @@ class CLib3MFUnsignedMeshNode : public CLib3MFBaseClass { }; +/************************************************************************************************************************* + Class CLib3MFBeamLatticeNode +**************************************************************************************************************************/ +class CLib3MFBeamLatticeNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void GetInputBeamLattice(const v8::FunctionCallbackInfo& args); + static void GetInputPos(const v8::FunctionCallbackInfo& args); + static void GetOutputDistance(const v8::FunctionCallbackInfo& args); + static void SetAccurateRange(const v8::FunctionCallbackInfo& args); + static void GetAccurateRange(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFBeamLatticeNode(); + ~CLib3MFBeamLatticeNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFFunctionGradientNode +**************************************************************************************************************************/ +class CLib3MFFunctionGradientNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void GetInputFunctionID(const v8::FunctionCallbackInfo& args); + static void GetInputPos(const v8::FunctionCallbackInfo& args); + static void GetInputStep(const v8::FunctionCallbackInfo& args); + static void SetScalarOutputName(const v8::FunctionCallbackInfo& args); + static void GetScalarOutputName(const v8::FunctionCallbackInfo& args); + static void SetVectorInputName(const v8::FunctionCallbackInfo& args); + static void GetVectorInputName(const v8::FunctionCallbackInfo& args); + static void GetOutputVector(const v8::FunctionCallbackInfo& args); + static void GetOutputGradient(const v8::FunctionCallbackInfo& args); + static void GetOutputMagnitude(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFFunctionGradientNode(); + ~CLib3MFFunctionGradientNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFNormalizeDistanceNode +**************************************************************************************************************************/ +class CLib3MFNormalizeDistanceNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void GetInputFunctionID(const v8::FunctionCallbackInfo& args); + static void GetInputPos(const v8::FunctionCallbackInfo& args); + static void GetInputStep(const v8::FunctionCallbackInfo& args); + static void SetScalarOutputName(const v8::FunctionCallbackInfo& args); + static void GetScalarOutputName(const v8::FunctionCallbackInfo& args); + static void SetVectorInputName(const v8::FunctionCallbackInfo& args); + static void GetVectorInputName(const v8::FunctionCallbackInfo& args); + static void GetOutputResult(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFNormalizeDistanceNode(); + ~CLib3MFNormalizeDistanceNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + /************************************************************************************************************************* Class CLib3MFFunctionCallNode **************************************************************************************************************************/ @@ -2264,6 +2338,9 @@ class CLib3MFImplicitFunction : public CLib3MFBaseClass { static void AddConstMatNode(const v8::FunctionCallbackInfo& args); static void AddMeshNode(const v8::FunctionCallbackInfo& args); static void AddUnsignedMeshNode(const v8::FunctionCallbackInfo& args); + static void AddBeamLatticeNode(const v8::FunctionCallbackInfo& args); + static void AddFunctionGradientNode(const v8::FunctionCallbackInfo& args); + static void AddNormalizeDistanceNode(const v8::FunctionCallbackInfo& args); static void AddFunctionCallNode(const v8::FunctionCallbackInfo& args); static void GetNodes(const v8::FunctionCallbackInfo& args); static void RemoveNode(const v8::FunctionCallbackInfo& args); diff --git a/Autogenerated/Bindings/NodeJS/lib3mf_types.h b/Autogenerated/Bindings/NodeJS/lib3mf_types.h index 9e0b4012c..d87847a5b 100644 --- a/Autogenerated/Bindings/NodeJS/lib3mf_types.h +++ b/Autogenerated/Bindings/NodeJS/lib3mf_types.h @@ -24,12 +24,12 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha. +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. Abstract: This is an autogenerated plain C Header file with basic types in order to allow an easy use of the 3MF Library -Interface version: 2.4.1 +Interface version: 2.5.0 */ @@ -84,8 +84,8 @@ typedef void * Lib3MF_pvoid; **************************************************************************************************************************/ #define LIB3MF_VERSION_MAJOR 2 -#define LIB3MF_VERSION_MINOR 4 -#define LIB3MF_VERSION_MICRO 1 +#define LIB3MF_VERSION_MINOR 5 +#define LIB3MF_VERSION_MICRO 0 #define LIB3MF_VERSION_PRERELEASEINFO "" #define LIB3MF_VERSION_BUILDINFO "" @@ -310,6 +310,9 @@ typedef Lib3MFHandle Lib3MF_ConstVecNode; typedef Lib3MFHandle Lib3MF_ConstMatNode; typedef Lib3MFHandle Lib3MF_MeshNode; typedef Lib3MFHandle Lib3MF_UnsignedMeshNode; +typedef Lib3MFHandle Lib3MF_BeamLatticeNode; +typedef Lib3MFHandle Lib3MF_FunctionGradientNode; +typedef Lib3MFHandle Lib3MF_NormalizeDistanceNode; typedef Lib3MFHandle Lib3MF_FunctionCallNode; typedef Lib3MFHandle Lib3MF_NodeIterator; typedef Lib3MFHandle Lib3MF_Function; @@ -358,7 +361,8 @@ typedef enum eLib3MFObjectType { eObjectTypeOther = 0, eObjectTypeModel = 1, eObjectTypeSupport = 2, - eObjectTypeSolidSupport = 3 + eObjectTypeSolidSupport = 3, + eObjectTypeSurface = 4 } eLib3MFObjectType; typedef enum eLib3MFTextureType { @@ -472,11 +476,11 @@ typedef enum eLib3MFImplicitNodeType { eImplicitNodeTypeMatVecMultiplication = 14, /** Multiplies a matrix with a vector */ eImplicitNodeTypeTranspose = 15, /** Transposes a matrix */ eImplicitNodeTypeInverse = 16, /** Computes the inverse of a matrix */ - eImplicitNodeTypeSinus = 17, /** Calculates the sinus */ - eImplicitNodeTypeCosinus = 18, /** Calculates the cosinus */ + eImplicitNodeTypeSinus = 17, /** Calculates the sine */ + eImplicitNodeTypeCosinus = 18, /** Calculates the cosine */ eImplicitNodeTypeTan = 19, /** Calculates the tangent */ - eImplicitNodeTypeArcSin = 20, /** Calculates the arcsinus */ - eImplicitNodeTypeArcCos = 21, /** Calculates the arccosinus */ + eImplicitNodeTypeArcSin = 20, /** Calculates the arcsine */ + eImplicitNodeTypeArcCos = 21, /** Calculates the arccosine */ eImplicitNodeTypeArcTan = 22, /** Calculates the arctangent */ eImplicitNodeTypeArcTan2 = 23, /** Calculates the arctangent */ eImplicitNodeTypeMin = 24, /** Calculates the minimum of two values */ @@ -486,9 +490,9 @@ typedef enum eLib3MFImplicitNodeType { eImplicitNodeTypePow = 28, /** Calculates the power A^B */ eImplicitNodeTypeSqrt = 29, /** Calculates the square root */ eImplicitNodeTypeExp = 30, /** Exponential function */ - eImplicitNodeTypeLog = 31, /** Natural logarithmus */ - eImplicitNodeTypeLog2 = 32, /** Logarithmus to the base 2 */ - eImplicitNodeTypeLog10 = 33, /** Logarithmus to the base 10 */ + eImplicitNodeTypeLog = 31, /** Natural logarithm */ + eImplicitNodeTypeLog2 = 32, /** Logarithm to the base 2 */ + eImplicitNodeTypeLog10 = 33, /** Logarithm to the base 10 */ eImplicitNodeTypeSelect = 34, /** If A is less than B returns C, else D */ eImplicitNodeTypeClamp = 35, /** Clamps the input value to min and max */ eImplicitNodeTypeSinh = 36, /** Calculates the hyperbolic sine */ @@ -503,9 +507,12 @@ typedef enum eLib3MFImplicitNodeType { eImplicitNodeTypeMesh = 45, /** Calculates the signed distance to a mesh */ eImplicitNodeTypeLength = 46, /** Calculates the length of a vector */ eImplicitNodeTypeConstResourceID = 47, /** Selects a resource (function, mesh etc.) */ - eImplicitNodeTypeVectorFromScalar = 48, /** Creates a vector from one scalar values */ + eImplicitNodeTypeVectorFromScalar = 48, /** Creates a vector from one scalar value */ eImplicitNodeTypeUnsignedMesh = 49, /** Calculates the unsigned distance to a mesh */ - eImplicitNodeTypeMod = 50 /** Calculates the modulo of two values (same behaviour as glsl mod) */ + eImplicitNodeTypeMod = 50, /** Calculates the modulo of two values (same behaviour as glsl mod) */ + eImplicitNodeTypeBeamLattice = 51, /** Calculates the signed distance to a beam lattice */ + eImplicitNodeTypeFunctionGradient = 52, /** Calculates the gradient of a function */ + eImplicitNodeTypeNormalizeDistance = 53 /** Normalizes a distance field */ } eLib3MFImplicitNodeType; /** diff --git a/Autogenerated/Bindings/Pascal/Unit_Lib3MF.pas b/Autogenerated/Bindings/Pascal/Unit_Lib3MF.pas index cc8140e85..6d6644aca 100644 --- a/Autogenerated/Bindings/Pascal/Unit_Lib3MF.pas +++ b/Autogenerated/Bindings/Pascal/Unit_Lib3MF.pas @@ -25,12 +25,12 @@ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha. +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. Abstract: This is an autogenerated Pascal Header file in order to allow an easy use of the 3MF Library -Interface version: 2.4.1 +Interface version: 2.5.0 *) @@ -54,8 +54,8 @@ interface const LIB3MF_VERSION_MAJOR = 2; - LIB3MF_VERSION_MINOR = 4; - LIB3MF_VERSION_MICRO = 1; + LIB3MF_VERSION_MINOR = 5; + LIB3MF_VERSION_MICRO = 0; LIB3MF_VERSION_PRERELEASEINFO = ''; LIB3MF_VERSION_BUILDINFO = ''; @@ -161,7 +161,8 @@ interface eObjectTypeOther, eObjectTypeModel, eObjectTypeSupport, - eObjectTypeSolidSupport + eObjectTypeSolidSupport, + eObjectTypeSurface ); TLib3MFTextureType = ( @@ -305,7 +306,10 @@ interface eImplicitNodeTypeConstResourceID, eImplicitNodeTypeVectorFromScalar, eImplicitNodeTypeUnsignedMesh, - eImplicitNodeTypeMod + eImplicitNodeTypeMod, + eImplicitNodeTypeBeamLattice, + eImplicitNodeTypeFunctionGradient, + eImplicitNodeTypeNormalizeDistance ); TLib3MFImplicitPortType = ( @@ -575,6 +579,9 @@ TLib3MFConstVecNode = class; TLib3MFConstMatNode = class; TLib3MFMeshNode = class; TLib3MFUnsignedMeshNode = class; + TLib3MFBeamLatticeNode = class; + TLib3MFFunctionGradientNode = class; + TLib3MFNormalizeDistanceNode = class; TLib3MFFunctionCallNode = class; TLib3MFNodeIterator = class; TLib3MFFunction = class; @@ -2495,7 +2502,7 @@ TLib3MFModel = class; TLib3MFVolumeDataComposite_GetMaterialMappingCountFunc = function(pVolumeDataComposite: TLib3MFHandle; out pCount: Cardinal): TLib3MFResult; cdecl; (** - * Returns MaterialMappting with given index + * Returns MaterialMapping with given index * * @param[in] pVolumeDataComposite - VolumeDataComposite instance. * @param[in] nIndex - Index of the MaterialMapping in question. @@ -2505,7 +2512,7 @@ TLib3MFModel = class; TLib3MFVolumeDataComposite_GetMaterialMappingFunc = function(pVolumeDataComposite: TLib3MFHandle; const nIndex: Cardinal; out pTheMaterialMapping: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Adds a the MaterialMapping + * Adds a MaterialMapping * * @param[in] pVolumeDataComposite - VolumeDataComposite instance. * @param[in] pTransform - new transformation matrix @@ -2619,7 +2626,7 @@ TLib3MFModel = class; * Returns the number of VolumeDataProperty * * @param[in] pVolumeData - VolumeData instance. - * @param[out] pCount - the number of VolumeDataProperty-elements within this VolumdeData + * @param[out] pCount - the number of VolumeDataProperty-elements within this VolumeData * @return error code or 0 (success) *) TLib3MFVolumeData_GetPropertyCountFunc = function(pVolumeData: TLib3MFHandle; out pCount: Cardinal): TLib3MFResult; cdecl; @@ -3455,7 +3462,7 @@ TLib3MFModel = class; TLib3MFAttachment_WriteToFileFunc = function(pAttachment: TLib3MFHandle; const pFileName: PAnsiChar): TLib3MFResult; cdecl; (** - * Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. + * Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer methods. * * @param[in] pAttachment - Attachment instance. * @param[in] pFileName - file to read from. @@ -3464,7 +3471,7 @@ TLib3MFModel = class; TLib3MFAttachment_ReadFromFileFunc = function(pAttachment: TLib3MFHandle; const pFileName: PAnsiChar): TLib3MFResult; cdecl; (** - * Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. + * Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer methods. * * @param[in] pAttachment - Attachment instance. * @param[in] pTheReadCallback - Callback to call for reading a data chunk @@ -3496,7 +3503,7 @@ TLib3MFModel = class; TLib3MFAttachment_WriteToBufferFunc = function(pAttachment: TLib3MFHandle; const nBufferCount: QWord; out pBufferNeededCount: QWord; pBufferBuffer: PByte): TLib3MFResult; cdecl; (** - * Reads an attachment from a memory buffer. This buffer is immediatly read (in contrast to the ReadFromCallback and ReadFromFile-methods). + * Reads an attachment from a memory buffer. This buffer is immediately read (in contrast to the ReadFromCallback and ReadFromFile-methods). * * @param[in] pAttachment - Attachment instance. * @param[in] nBufferCount - Number of elements in buffer @@ -4666,6 +4673,236 @@ TLib3MFModel = class; TLib3MFUnsignedMeshNode_GetOutputDistanceFunc = function(pUnsignedMeshNode: TLib3MFHandle; out pDistance: TLib3MFHandle): TLib3MFResult; cdecl; +(************************************************************************************************************************* + Function type definitions for BeamLatticeNode +**************************************************************************************************************************) + + (** + * Retrieves the input for the model resource id of the beam lattice + * + * @param[in] pBeamLatticeNode - BeamLatticeNode instance. + * @param[out] pBeamLattice - the input port for the model resource id of the beam lattice (mesh with beamlattice extension) + * @return error code or 0 (success) + *) + TLib3MFBeamLatticeNode_GetInputBeamLatticeFunc = function(pBeamLatticeNode: TLib3MFHandle; out pBeamLattice: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Retrieves the input for the position + * + * @param[in] pBeamLatticeNode - BeamLatticeNode instance. + * @param[out] pPos - the input port for the position + * @return error code or 0 (success) + *) + TLib3MFBeamLatticeNode_GetInputPosFunc = function(pBeamLatticeNode: TLib3MFHandle; out pPos: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Retrieves the output + * + * @param[in] pBeamLatticeNode - BeamLatticeNode instance. + * @param[out] pDistance - the output port for the signed distance to the beam lattice + * @return error code or 0 (success) + *) + TLib3MFBeamLatticeNode_GetOutputDistanceFunc = function(pBeamLatticeNode: TLib3MFHandle; out pDistance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Sets the accurate range for distance computation + * + * @param[in] pBeamLatticeNode - BeamLatticeNode instance. + * @param[in] dAccurateRange - the accurate range in model units + * @return error code or 0 (success) + *) + TLib3MFBeamLatticeNode_SetAccurateRangeFunc = function(pBeamLatticeNode: TLib3MFHandle; const dAccurateRange: Double): TLib3MFResult; cdecl; + + (** + * Retrieves the accurate range for distance computation + * + * @param[in] pBeamLatticeNode - BeamLatticeNode instance. + * @param[out] pAccurateRange - the accurate range in model units + * @return error code or 0 (success) + *) + TLib3MFBeamLatticeNode_GetAccurateRangeFunc = function(pBeamLatticeNode: TLib3MFHandle; out pAccurateRange: Double): TLib3MFResult; cdecl; + + +(************************************************************************************************************************* + Function type definitions for FunctionGradientNode +**************************************************************************************************************************) + + (** + * Retrieves the input for the function id + * + * @param[in] pFunctionGradientNode - FunctionGradientNode instance. + * @param[out] pFunction - the input port for the function + * @return error code or 0 (success) + *) + TLib3MFFunctionGradientNode_GetInputFunctionIDFunc = function(pFunctionGradientNode: TLib3MFHandle; out pFunction: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Retrieves the input for the position + * + * @param[in] pFunctionGradientNode - FunctionGradientNode instance. + * @param[out] pPos - the input port for the position + * @return error code or 0 (success) + *) + TLib3MFFunctionGradientNode_GetInputPosFunc = function(pFunctionGradientNode: TLib3MFHandle; out pPos: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Retrieves the input for the finite difference step + * + * @param[in] pFunctionGradientNode - FunctionGradientNode instance. + * @param[out] pStep - the input port for the finite difference step + * @return error code or 0 (success) + *) + TLib3MFFunctionGradientNode_GetInputStepFunc = function(pFunctionGradientNode: TLib3MFHandle; out pStep: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Sets the name of the referenced scalar output + * + * @param[in] pFunctionGradientNode - FunctionGradientNode instance. + * @param[in] pScalarOutputName - the name of the scalar output of the referenced function + * @return error code or 0 (success) + *) + TLib3MFFunctionGradientNode_SetScalarOutputNameFunc = function(pFunctionGradientNode: TLib3MFHandle; const pScalarOutputName: PAnsiChar): TLib3MFResult; cdecl; + + (** + * Retrieves the name of the referenced scalar output + * + * @param[in] pFunctionGradientNode - FunctionGradientNode instance. + * @param[in] nScalarOutputNameBufferSize - size of the buffer (including trailing 0) + * @param[out] pScalarOutputNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. + * @param[out] pScalarOutputNameBuffer - buffer of the name of the scalar output of the referenced function, may be NULL + * @return error code or 0 (success) + *) + TLib3MFFunctionGradientNode_GetScalarOutputNameFunc = function(pFunctionGradientNode: TLib3MFHandle; const nScalarOutputNameBufferSize: Cardinal; out pScalarOutputNameNeededChars: Cardinal; pScalarOutputNameBuffer: PAnsiChar): TLib3MFResult; cdecl; + + (** + * Sets the name of the referenced vector input + * + * @param[in] pFunctionGradientNode - FunctionGradientNode instance. + * @param[in] pVectorInputName - the name of the vector input (float3) of the referenced function + * @return error code or 0 (success) + *) + TLib3MFFunctionGradientNode_SetVectorInputNameFunc = function(pFunctionGradientNode: TLib3MFHandle; const pVectorInputName: PAnsiChar): TLib3MFResult; cdecl; + + (** + * Retrieves the name of the referenced vector input + * + * @param[in] pFunctionGradientNode - FunctionGradientNode instance. + * @param[in] nVectorInputNameBufferSize - size of the buffer (including trailing 0) + * @param[out] pVectorInputNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. + * @param[out] pVectorInputNameBuffer - buffer of the name of the vector input (float3) of the referenced function, may be NULL + * @return error code or 0 (success) + *) + TLib3MFFunctionGradientNode_GetVectorInputNameFunc = function(pFunctionGradientNode: TLib3MFHandle; const nVectorInputNameBufferSize: Cardinal; out pVectorInputNameNeededChars: Cardinal; pVectorInputNameBuffer: PAnsiChar): TLib3MFResult; cdecl; + + (** + * Retrieves the normalized gradient output + * + * @param[in] pFunctionGradientNode - FunctionGradientNode instance. + * @param[out] pVector - the output port for the normalized gradient + * @return error code or 0 (success) + *) + TLib3MFFunctionGradientNode_GetOutputVectorFunc = function(pFunctionGradientNode: TLib3MFHandle; out pVector: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Retrieves the raw gradient output + * + * @param[in] pFunctionGradientNode - FunctionGradientNode instance. + * @param[out] pGradient - the output port for the raw gradient + * @return error code or 0 (success) + *) + TLib3MFFunctionGradientNode_GetOutputGradientFunc = function(pFunctionGradientNode: TLib3MFHandle; out pGradient: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Retrieves the gradient magnitude output + * + * @param[in] pFunctionGradientNode - FunctionGradientNode instance. + * @param[out] pMagnitude - the output port for the gradient magnitude + * @return error code or 0 (success) + *) + TLib3MFFunctionGradientNode_GetOutputMagnitudeFunc = function(pFunctionGradientNode: TLib3MFHandle; out pMagnitude: TLib3MFHandle): TLib3MFResult; cdecl; + + +(************************************************************************************************************************* + Function type definitions for NormalizeDistanceNode +**************************************************************************************************************************) + + (** + * Retrieves the input for the function id + * + * @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. + * @param[out] pFunction - the input port for the function + * @return error code or 0 (success) + *) + TLib3MFNormalizeDistanceNode_GetInputFunctionIDFunc = function(pNormalizeDistanceNode: TLib3MFHandle; out pFunction: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Retrieves the input for the position + * + * @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. + * @param[out] pPos - the input port for the position (vector) + * @return error code or 0 (success) + *) + TLib3MFNormalizeDistanceNode_GetInputPosFunc = function(pNormalizeDistanceNode: TLib3MFHandle; out pPos: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Retrieves the input for the finite difference step + * + * @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. + * @param[out] pStep - the input port for the finite difference step + * @return error code or 0 (success) + *) + TLib3MFNormalizeDistanceNode_GetInputStepFunc = function(pNormalizeDistanceNode: TLib3MFHandle; out pStep: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Sets the name of the referenced scalar output + * + * @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. + * @param[in] pScalarOutputName - the name of the scalar output of the referenced function + * @return error code or 0 (success) + *) + TLib3MFNormalizeDistanceNode_SetScalarOutputNameFunc = function(pNormalizeDistanceNode: TLib3MFHandle; const pScalarOutputName: PAnsiChar): TLib3MFResult; cdecl; + + (** + * Retrieves the name of the referenced scalar output + * + * @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. + * @param[in] nScalarOutputNameBufferSize - size of the buffer (including trailing 0) + * @param[out] pScalarOutputNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. + * @param[out] pScalarOutputNameBuffer - buffer of the name of the scalar output of the referenced function, may be NULL + * @return error code or 0 (success) + *) + TLib3MFNormalizeDistanceNode_GetScalarOutputNameFunc = function(pNormalizeDistanceNode: TLib3MFHandle; const nScalarOutputNameBufferSize: Cardinal; out pScalarOutputNameNeededChars: Cardinal; pScalarOutputNameBuffer: PAnsiChar): TLib3MFResult; cdecl; + + (** + * Sets the name of the referenced vector input + * + * @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. + * @param[in] pVectorInputName - the name of the vector input (float3) of the referenced function + * @return error code or 0 (success) + *) + TLib3MFNormalizeDistanceNode_SetVectorInputNameFunc = function(pNormalizeDistanceNode: TLib3MFHandle; const pVectorInputName: PAnsiChar): TLib3MFResult; cdecl; + + (** + * Retrieves the name of the referenced vector input + * + * @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. + * @param[in] nVectorInputNameBufferSize - size of the buffer (including trailing 0) + * @param[out] pVectorInputNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. + * @param[out] pVectorInputNameBuffer - buffer of the name of the vector input (float3) of the referenced function, may be NULL + * @return error code or 0 (success) + *) + TLib3MFNormalizeDistanceNode_GetVectorInputNameFunc = function(pNormalizeDistanceNode: TLib3MFHandle; const nVectorInputNameBufferSize: Cardinal; out pVectorInputNameNeededChars: Cardinal; pVectorInputNameBuffer: PAnsiChar): TLib3MFResult; cdecl; + + (** + * Retrieves the normalized result output + * + * @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. + * @param[out] pResult - the output port for the normalized distance + * @return error code or 0 (success) + *) + TLib3MFNormalizeDistanceNode_GetOutputResultFunc = function(pNormalizeDistanceNode: TLib3MFHandle; out pResult: TLib3MFHandle): TLib3MFResult; cdecl; + + (************************************************************************************************************************* Function type definitions for FunctionCallNode **************************************************************************************************************************) @@ -5444,6 +5681,42 @@ TLib3MFModel = class; *) TLib3MFImplicitFunction_AddUnsignedMeshNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; + (** + * Add a BeamLatticeNode + * + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node + * @return error code or 0 (success) + *) + TLib3MFImplicitFunction_AddBeamLatticeNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Add a FunctionGradientNode + * + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node + * @return error code or 0 (success) + *) + TLib3MFImplicitFunction_AddFunctionGradientNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Add a NormalizeDistanceNode + * + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node + * @return error code or 0 (success) + *) + TLib3MFImplicitFunction_AddNormalizeDistanceNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; + (** * Add a FunctionCallNode * @@ -8785,6 +9058,62 @@ TLib3MFUnsignedMeshNode = class(TLib3MFImplicitNode) end; +(************************************************************************************************************************* + Class definition for BeamLatticeNode +**************************************************************************************************************************) + + TLib3MFBeamLatticeNode = class(TLib3MFImplicitNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetInputBeamLattice(): TLib3MFImplicitPort; + function GetInputPos(): TLib3MFImplicitPort; + function GetOutputDistance(): TLib3MFImplicitPort; + procedure SetAccurateRange(const AAccurateRange: Double); + function GetAccurateRange(): Double; + end; + + +(************************************************************************************************************************* + Class definition for FunctionGradientNode +**************************************************************************************************************************) + + TLib3MFFunctionGradientNode = class(TLib3MFImplicitNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetInputFunctionID(): TLib3MFImplicitPort; + function GetInputPos(): TLib3MFImplicitPort; + function GetInputStep(): TLib3MFImplicitPort; + procedure SetScalarOutputName(const AScalarOutputName: String); + function GetScalarOutputName(): String; + procedure SetVectorInputName(const AVectorInputName: String); + function GetVectorInputName(): String; + function GetOutputVector(): TLib3MFImplicitPort; + function GetOutputGradient(): TLib3MFImplicitPort; + function GetOutputMagnitude(): TLib3MFImplicitPort; + end; + + +(************************************************************************************************************************* + Class definition for NormalizeDistanceNode +**************************************************************************************************************************) + + TLib3MFNormalizeDistanceNode = class(TLib3MFImplicitNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetInputFunctionID(): TLib3MFImplicitPort; + function GetInputPos(): TLib3MFImplicitPort; + function GetInputStep(): TLib3MFImplicitPort; + procedure SetScalarOutputName(const AScalarOutputName: String); + function GetScalarOutputName(): String; + procedure SetVectorInputName(const AVectorInputName: String); + function GetVectorInputName(): String; + function GetOutputResult(): TLib3MFImplicitPort; + end; + + (************************************************************************************************************************* Class definition for FunctionCallNode **************************************************************************************************************************) @@ -8889,6 +9218,9 @@ TLib3MFImplicitFunction = class(TLib3MFFunction) function AddConstMatNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFConstMatNode; function AddMeshNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFMeshNode; function AddUnsignedMeshNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFUnsignedMeshNode; + function AddBeamLatticeNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFBeamLatticeNode; + function AddFunctionGradientNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFFunctionGradientNode; + function AddNormalizeDistanceNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFNormalizeDistanceNode; function AddFunctionCallNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFFunctionCallNode; function GetNodes(): TLib3MFNodeIterator; procedure RemoveNode(const ANode: TLib3MFImplicitNode); @@ -9568,6 +9900,29 @@ TLib3MFWrapper = class(TObject) FLib3MFUnsignedMeshNode_GetInputMeshFunc: TLib3MFUnsignedMeshNode_GetInputMeshFunc; FLib3MFUnsignedMeshNode_GetInputPosFunc: TLib3MFUnsignedMeshNode_GetInputPosFunc; FLib3MFUnsignedMeshNode_GetOutputDistanceFunc: TLib3MFUnsignedMeshNode_GetOutputDistanceFunc; + FLib3MFBeamLatticeNode_GetInputBeamLatticeFunc: TLib3MFBeamLatticeNode_GetInputBeamLatticeFunc; + FLib3MFBeamLatticeNode_GetInputPosFunc: TLib3MFBeamLatticeNode_GetInputPosFunc; + FLib3MFBeamLatticeNode_GetOutputDistanceFunc: TLib3MFBeamLatticeNode_GetOutputDistanceFunc; + FLib3MFBeamLatticeNode_SetAccurateRangeFunc: TLib3MFBeamLatticeNode_SetAccurateRangeFunc; + FLib3MFBeamLatticeNode_GetAccurateRangeFunc: TLib3MFBeamLatticeNode_GetAccurateRangeFunc; + FLib3MFFunctionGradientNode_GetInputFunctionIDFunc: TLib3MFFunctionGradientNode_GetInputFunctionIDFunc; + FLib3MFFunctionGradientNode_GetInputPosFunc: TLib3MFFunctionGradientNode_GetInputPosFunc; + FLib3MFFunctionGradientNode_GetInputStepFunc: TLib3MFFunctionGradientNode_GetInputStepFunc; + FLib3MFFunctionGradientNode_SetScalarOutputNameFunc: TLib3MFFunctionGradientNode_SetScalarOutputNameFunc; + FLib3MFFunctionGradientNode_GetScalarOutputNameFunc: TLib3MFFunctionGradientNode_GetScalarOutputNameFunc; + FLib3MFFunctionGradientNode_SetVectorInputNameFunc: TLib3MFFunctionGradientNode_SetVectorInputNameFunc; + FLib3MFFunctionGradientNode_GetVectorInputNameFunc: TLib3MFFunctionGradientNode_GetVectorInputNameFunc; + FLib3MFFunctionGradientNode_GetOutputVectorFunc: TLib3MFFunctionGradientNode_GetOutputVectorFunc; + FLib3MFFunctionGradientNode_GetOutputGradientFunc: TLib3MFFunctionGradientNode_GetOutputGradientFunc; + FLib3MFFunctionGradientNode_GetOutputMagnitudeFunc: TLib3MFFunctionGradientNode_GetOutputMagnitudeFunc; + FLib3MFNormalizeDistanceNode_GetInputFunctionIDFunc: TLib3MFNormalizeDistanceNode_GetInputFunctionIDFunc; + FLib3MFNormalizeDistanceNode_GetInputPosFunc: TLib3MFNormalizeDistanceNode_GetInputPosFunc; + FLib3MFNormalizeDistanceNode_GetInputStepFunc: TLib3MFNormalizeDistanceNode_GetInputStepFunc; + FLib3MFNormalizeDistanceNode_SetScalarOutputNameFunc: TLib3MFNormalizeDistanceNode_SetScalarOutputNameFunc; + FLib3MFNormalizeDistanceNode_GetScalarOutputNameFunc: TLib3MFNormalizeDistanceNode_GetScalarOutputNameFunc; + FLib3MFNormalizeDistanceNode_SetVectorInputNameFunc: TLib3MFNormalizeDistanceNode_SetVectorInputNameFunc; + FLib3MFNormalizeDistanceNode_GetVectorInputNameFunc: TLib3MFNormalizeDistanceNode_GetVectorInputNameFunc; + FLib3MFNormalizeDistanceNode_GetOutputResultFunc: TLib3MFNormalizeDistanceNode_GetOutputResultFunc; FLib3MFFunctionCallNode_GetInputFunctionIDFunc: TLib3MFFunctionCallNode_GetInputFunctionIDFunc; FLib3MFNodeIterator_GetCurrentFunc: TLib3MFNodeIterator_GetCurrentFunc; FLib3MFFunction_GetDisplayNameFunc: TLib3MFFunction_GetDisplayNameFunc; @@ -9631,6 +9986,9 @@ TLib3MFWrapper = class(TObject) FLib3MFImplicitFunction_AddConstMatNodeFunc: TLib3MFImplicitFunction_AddConstMatNodeFunc; FLib3MFImplicitFunction_AddMeshNodeFunc: TLib3MFImplicitFunction_AddMeshNodeFunc; FLib3MFImplicitFunction_AddUnsignedMeshNodeFunc: TLib3MFImplicitFunction_AddUnsignedMeshNodeFunc; + FLib3MFImplicitFunction_AddBeamLatticeNodeFunc: TLib3MFImplicitFunction_AddBeamLatticeNodeFunc; + FLib3MFImplicitFunction_AddFunctionGradientNodeFunc: TLib3MFImplicitFunction_AddFunctionGradientNodeFunc; + FLib3MFImplicitFunction_AddNormalizeDistanceNodeFunc: TLib3MFImplicitFunction_AddNormalizeDistanceNodeFunc; FLib3MFImplicitFunction_AddFunctionCallNodeFunc: TLib3MFImplicitFunction_AddFunctionCallNodeFunc; FLib3MFImplicitFunction_GetNodesFunc: TLib3MFImplicitFunction_GetNodesFunc; FLib3MFImplicitFunction_RemoveNodeFunc: TLib3MFImplicitFunction_RemoveNodeFunc; @@ -10198,6 +10556,29 @@ TLib3MFWrapper = class(TObject) property Lib3MFUnsignedMeshNode_GetInputMeshFunc: TLib3MFUnsignedMeshNode_GetInputMeshFunc read FLib3MFUnsignedMeshNode_GetInputMeshFunc; property Lib3MFUnsignedMeshNode_GetInputPosFunc: TLib3MFUnsignedMeshNode_GetInputPosFunc read FLib3MFUnsignedMeshNode_GetInputPosFunc; property Lib3MFUnsignedMeshNode_GetOutputDistanceFunc: TLib3MFUnsignedMeshNode_GetOutputDistanceFunc read FLib3MFUnsignedMeshNode_GetOutputDistanceFunc; + property Lib3MFBeamLatticeNode_GetInputBeamLatticeFunc: TLib3MFBeamLatticeNode_GetInputBeamLatticeFunc read FLib3MFBeamLatticeNode_GetInputBeamLatticeFunc; + property Lib3MFBeamLatticeNode_GetInputPosFunc: TLib3MFBeamLatticeNode_GetInputPosFunc read FLib3MFBeamLatticeNode_GetInputPosFunc; + property Lib3MFBeamLatticeNode_GetOutputDistanceFunc: TLib3MFBeamLatticeNode_GetOutputDistanceFunc read FLib3MFBeamLatticeNode_GetOutputDistanceFunc; + property Lib3MFBeamLatticeNode_SetAccurateRangeFunc: TLib3MFBeamLatticeNode_SetAccurateRangeFunc read FLib3MFBeamLatticeNode_SetAccurateRangeFunc; + property Lib3MFBeamLatticeNode_GetAccurateRangeFunc: TLib3MFBeamLatticeNode_GetAccurateRangeFunc read FLib3MFBeamLatticeNode_GetAccurateRangeFunc; + property Lib3MFFunctionGradientNode_GetInputFunctionIDFunc: TLib3MFFunctionGradientNode_GetInputFunctionIDFunc read FLib3MFFunctionGradientNode_GetInputFunctionIDFunc; + property Lib3MFFunctionGradientNode_GetInputPosFunc: TLib3MFFunctionGradientNode_GetInputPosFunc read FLib3MFFunctionGradientNode_GetInputPosFunc; + property Lib3MFFunctionGradientNode_GetInputStepFunc: TLib3MFFunctionGradientNode_GetInputStepFunc read FLib3MFFunctionGradientNode_GetInputStepFunc; + property Lib3MFFunctionGradientNode_SetScalarOutputNameFunc: TLib3MFFunctionGradientNode_SetScalarOutputNameFunc read FLib3MFFunctionGradientNode_SetScalarOutputNameFunc; + property Lib3MFFunctionGradientNode_GetScalarOutputNameFunc: TLib3MFFunctionGradientNode_GetScalarOutputNameFunc read FLib3MFFunctionGradientNode_GetScalarOutputNameFunc; + property Lib3MFFunctionGradientNode_SetVectorInputNameFunc: TLib3MFFunctionGradientNode_SetVectorInputNameFunc read FLib3MFFunctionGradientNode_SetVectorInputNameFunc; + property Lib3MFFunctionGradientNode_GetVectorInputNameFunc: TLib3MFFunctionGradientNode_GetVectorInputNameFunc read FLib3MFFunctionGradientNode_GetVectorInputNameFunc; + property Lib3MFFunctionGradientNode_GetOutputVectorFunc: TLib3MFFunctionGradientNode_GetOutputVectorFunc read FLib3MFFunctionGradientNode_GetOutputVectorFunc; + property Lib3MFFunctionGradientNode_GetOutputGradientFunc: TLib3MFFunctionGradientNode_GetOutputGradientFunc read FLib3MFFunctionGradientNode_GetOutputGradientFunc; + property Lib3MFFunctionGradientNode_GetOutputMagnitudeFunc: TLib3MFFunctionGradientNode_GetOutputMagnitudeFunc read FLib3MFFunctionGradientNode_GetOutputMagnitudeFunc; + property Lib3MFNormalizeDistanceNode_GetInputFunctionIDFunc: TLib3MFNormalizeDistanceNode_GetInputFunctionIDFunc read FLib3MFNormalizeDistanceNode_GetInputFunctionIDFunc; + property Lib3MFNormalizeDistanceNode_GetInputPosFunc: TLib3MFNormalizeDistanceNode_GetInputPosFunc read FLib3MFNormalizeDistanceNode_GetInputPosFunc; + property Lib3MFNormalizeDistanceNode_GetInputStepFunc: TLib3MFNormalizeDistanceNode_GetInputStepFunc read FLib3MFNormalizeDistanceNode_GetInputStepFunc; + property Lib3MFNormalizeDistanceNode_SetScalarOutputNameFunc: TLib3MFNormalizeDistanceNode_SetScalarOutputNameFunc read FLib3MFNormalizeDistanceNode_SetScalarOutputNameFunc; + property Lib3MFNormalizeDistanceNode_GetScalarOutputNameFunc: TLib3MFNormalizeDistanceNode_GetScalarOutputNameFunc read FLib3MFNormalizeDistanceNode_GetScalarOutputNameFunc; + property Lib3MFNormalizeDistanceNode_SetVectorInputNameFunc: TLib3MFNormalizeDistanceNode_SetVectorInputNameFunc read FLib3MFNormalizeDistanceNode_SetVectorInputNameFunc; + property Lib3MFNormalizeDistanceNode_GetVectorInputNameFunc: TLib3MFNormalizeDistanceNode_GetVectorInputNameFunc read FLib3MFNormalizeDistanceNode_GetVectorInputNameFunc; + property Lib3MFNormalizeDistanceNode_GetOutputResultFunc: TLib3MFNormalizeDistanceNode_GetOutputResultFunc read FLib3MFNormalizeDistanceNode_GetOutputResultFunc; property Lib3MFFunctionCallNode_GetInputFunctionIDFunc: TLib3MFFunctionCallNode_GetInputFunctionIDFunc read FLib3MFFunctionCallNode_GetInputFunctionIDFunc; property Lib3MFNodeIterator_GetCurrentFunc: TLib3MFNodeIterator_GetCurrentFunc read FLib3MFNodeIterator_GetCurrentFunc; property Lib3MFFunction_GetDisplayNameFunc: TLib3MFFunction_GetDisplayNameFunc read FLib3MFFunction_GetDisplayNameFunc; @@ -10261,6 +10642,9 @@ TLib3MFWrapper = class(TObject) property Lib3MFImplicitFunction_AddConstMatNodeFunc: TLib3MFImplicitFunction_AddConstMatNodeFunc read FLib3MFImplicitFunction_AddConstMatNodeFunc; property Lib3MFImplicitFunction_AddMeshNodeFunc: TLib3MFImplicitFunction_AddMeshNodeFunc read FLib3MFImplicitFunction_AddMeshNodeFunc; property Lib3MFImplicitFunction_AddUnsignedMeshNodeFunc: TLib3MFImplicitFunction_AddUnsignedMeshNodeFunc read FLib3MFImplicitFunction_AddUnsignedMeshNodeFunc; + property Lib3MFImplicitFunction_AddBeamLatticeNodeFunc: TLib3MFImplicitFunction_AddBeamLatticeNodeFunc read FLib3MFImplicitFunction_AddBeamLatticeNodeFunc; + property Lib3MFImplicitFunction_AddFunctionGradientNodeFunc: TLib3MFImplicitFunction_AddFunctionGradientNodeFunc read FLib3MFImplicitFunction_AddFunctionGradientNodeFunc; + property Lib3MFImplicitFunction_AddNormalizeDistanceNodeFunc: TLib3MFImplicitFunction_AddNormalizeDistanceNodeFunc read FLib3MFImplicitFunction_AddNormalizeDistanceNodeFunc; property Lib3MFImplicitFunction_AddFunctionCallNodeFunc: TLib3MFImplicitFunction_AddFunctionCallNodeFunc read FLib3MFImplicitFunction_AddFunctionCallNodeFunc; property Lib3MFImplicitFunction_GetNodesFunc: TLib3MFImplicitFunction_GetNodesFunc read FLib3MFImplicitFunction_GetNodesFunc; property Lib3MFImplicitFunction_RemoveNodeFunc: TLib3MFImplicitFunction_RemoveNodeFunc read FLib3MFImplicitFunction_RemoveNodeFunc; @@ -10470,57 +10854,6 @@ TLib3MFWrapper = class(TObject) function GetTranslationTransform(const AVectorX: Single; const AVectorY: Single; const AVectorZ: Single): TLib3MFTransform; end; -(************************************************************************************************************************* - Enum conversion -**************************************************************************************************************************) - - function convertPropertyTypeToConst(const AValue: TLib3MFPropertyType): Integer; - function convertConstToPropertyType(const AValue: Integer): TLib3MFPropertyType; - function convertSlicesMeshResolutionToConst(const AValue: TLib3MFSlicesMeshResolution): Integer; - function convertConstToSlicesMeshResolution(const AValue: Integer): TLib3MFSlicesMeshResolution; - function convertModelUnitToConst(const AValue: TLib3MFModelUnit): Integer; - function convertConstToModelUnit(const AValue: Integer): TLib3MFModelUnit; - function convertObjectTypeToConst(const AValue: TLib3MFObjectType): Integer; - function convertConstToObjectType(const AValue: Integer): TLib3MFObjectType; - function convertTextureTypeToConst(const AValue: TLib3MFTextureType): Integer; - function convertConstToTextureType(const AValue: Integer): TLib3MFTextureType; - function convertTextureTileStyleToConst(const AValue: TLib3MFTextureTileStyle): Integer; - function convertConstToTextureTileStyle(const AValue: Integer): TLib3MFTextureTileStyle; - function convertTextureFilterToConst(const AValue: TLib3MFTextureFilter): Integer; - function convertConstToTextureFilter(const AValue: Integer): TLib3MFTextureFilter; - function convertBeamLatticeCapModeToConst(const AValue: TLib3MFBeamLatticeCapMode): Integer; - function convertConstToBeamLatticeCapMode(const AValue: Integer): TLib3MFBeamLatticeCapMode; - function convertBeamLatticeClipModeToConst(const AValue: TLib3MFBeamLatticeClipMode): Integer; - function convertConstToBeamLatticeClipMode(const AValue: Integer): TLib3MFBeamLatticeClipMode; - function convertBeamLatticeBallModeToConst(const AValue: TLib3MFBeamLatticeBallMode): Integer; - function convertConstToBeamLatticeBallMode(const AValue: Integer): TLib3MFBeamLatticeBallMode; - function convertProgressIdentifierToConst(const AValue: TLib3MFProgressIdentifier): Integer; - function convertConstToProgressIdentifier(const AValue: Integer): TLib3MFProgressIdentifier; - function convertBlendMethodToConst(const AValue: TLib3MFBlendMethod): Integer; - function convertConstToBlendMethod(const AValue: Integer): TLib3MFBlendMethod; - function convertChannelNameToConst(const AValue: TLib3MFChannelName): Integer; - function convertConstToChannelName(const AValue: Integer): TLib3MFChannelName; - function convertCompositionMethodToConst(const AValue: TLib3MFCompositionMethod): Integer; - function convertConstToCompositionMethod(const AValue: Integer): TLib3MFCompositionMethod; - function convertCompositionSpaceToConst(const AValue: TLib3MFCompositionSpace): Integer; - function convertConstToCompositionSpace(const AValue: Integer): TLib3MFCompositionSpace; - function convertImplicitNodeTypeToConst(const AValue: TLib3MFImplicitNodeType): Integer; - function convertConstToImplicitNodeType(const AValue: Integer): TLib3MFImplicitNodeType; - function convertImplicitPortTypeToConst(const AValue: TLib3MFImplicitPortType): Integer; - function convertConstToImplicitPortType(const AValue: Integer): TLib3MFImplicitPortType; - function convertImplicitNodeConfigurationToConst(const AValue: TLib3MFImplicitNodeConfiguration): Integer; - function convertConstToImplicitNodeConfiguration(const AValue: Integer): TLib3MFImplicitNodeConfiguration; - function convertEncryptionAlgorithmToConst(const AValue: TLib3MFEncryptionAlgorithm): Integer; - function convertConstToEncryptionAlgorithm(const AValue: Integer): TLib3MFEncryptionAlgorithm; - function convertWrappingAlgorithmToConst(const AValue: TLib3MFWrappingAlgorithm): Integer; - function convertConstToWrappingAlgorithm(const AValue: Integer): TLib3MFWrappingAlgorithm; - function convertMgfAlgorithmToConst(const AValue: TLib3MFMgfAlgorithm): Integer; - function convertConstToMgfAlgorithm(const AValue: Integer): TLib3MFMgfAlgorithm; - function convertDigestMethodToConst(const AValue: TLib3MFDigestMethod): Integer; - function convertConstToDigestMethod(const AValue: Integer): TLib3MFDigestMethod; - function convertCompressionToConst(const AValue: TLib3MFCompression): Integer; - function convertConstToCompression(const AValue: Integer): TLib3MFCompression; - TLib3MFPolymorphicFactory<_T:class; _B> = record class function Make(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): _T; static; end; @@ -10624,6 +10957,9 @@ TLib3MFPolymorphicFactory<_T:class; _B> = record function TLib3MFPolymorphicFactoryMakeConstMatNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFConstMatNode; function TLib3MFPolymorphicFactoryMakeMeshNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMeshNode; function TLib3MFPolymorphicFactoryMakeUnsignedMeshNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFUnsignedMeshNode; + function TLib3MFPolymorphicFactoryMakeBeamLatticeNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFBeamLatticeNode; + function TLib3MFPolymorphicFactoryMakeFunctionGradientNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFFunctionGradientNode; + function TLib3MFPolymorphicFactoryMakeNormalizeDistanceNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFNormalizeDistanceNode; function TLib3MFPolymorphicFactoryMakeFunctionCallNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFFunctionCallNode; function TLib3MFPolymorphicFactoryMakeNodeIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFNodeIterator; function TLib3MFPolymorphicFactoryMakeFunction(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFFunction; @@ -10640,6 +10976,57 @@ TLib3MFPolymorphicFactory<_T:class; _B> = record function TLib3MFPolymorphicFactoryMakeResourceDataGroup(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFResourceDataGroup; function TLib3MFPolymorphicFactoryMakeKeyStore(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFKeyStore; function TLib3MFPolymorphicFactoryMakeModel(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFModel; +(************************************************************************************************************************* + Enum conversion +**************************************************************************************************************************) + + function convertPropertyTypeToConst(const AValue: TLib3MFPropertyType): Integer; + function convertConstToPropertyType(const AValue: Integer): TLib3MFPropertyType; + function convertSlicesMeshResolutionToConst(const AValue: TLib3MFSlicesMeshResolution): Integer; + function convertConstToSlicesMeshResolution(const AValue: Integer): TLib3MFSlicesMeshResolution; + function convertModelUnitToConst(const AValue: TLib3MFModelUnit): Integer; + function convertConstToModelUnit(const AValue: Integer): TLib3MFModelUnit; + function convertObjectTypeToConst(const AValue: TLib3MFObjectType): Integer; + function convertConstToObjectType(const AValue: Integer): TLib3MFObjectType; + function convertTextureTypeToConst(const AValue: TLib3MFTextureType): Integer; + function convertConstToTextureType(const AValue: Integer): TLib3MFTextureType; + function convertTextureTileStyleToConst(const AValue: TLib3MFTextureTileStyle): Integer; + function convertConstToTextureTileStyle(const AValue: Integer): TLib3MFTextureTileStyle; + function convertTextureFilterToConst(const AValue: TLib3MFTextureFilter): Integer; + function convertConstToTextureFilter(const AValue: Integer): TLib3MFTextureFilter; + function convertBeamLatticeCapModeToConst(const AValue: TLib3MFBeamLatticeCapMode): Integer; + function convertConstToBeamLatticeCapMode(const AValue: Integer): TLib3MFBeamLatticeCapMode; + function convertBeamLatticeClipModeToConst(const AValue: TLib3MFBeamLatticeClipMode): Integer; + function convertConstToBeamLatticeClipMode(const AValue: Integer): TLib3MFBeamLatticeClipMode; + function convertBeamLatticeBallModeToConst(const AValue: TLib3MFBeamLatticeBallMode): Integer; + function convertConstToBeamLatticeBallMode(const AValue: Integer): TLib3MFBeamLatticeBallMode; + function convertProgressIdentifierToConst(const AValue: TLib3MFProgressIdentifier): Integer; + function convertConstToProgressIdentifier(const AValue: Integer): TLib3MFProgressIdentifier; + function convertBlendMethodToConst(const AValue: TLib3MFBlendMethod): Integer; + function convertConstToBlendMethod(const AValue: Integer): TLib3MFBlendMethod; + function convertChannelNameToConst(const AValue: TLib3MFChannelName): Integer; + function convertConstToChannelName(const AValue: Integer): TLib3MFChannelName; + function convertCompositionMethodToConst(const AValue: TLib3MFCompositionMethod): Integer; + function convertConstToCompositionMethod(const AValue: Integer): TLib3MFCompositionMethod; + function convertCompositionSpaceToConst(const AValue: TLib3MFCompositionSpace): Integer; + function convertConstToCompositionSpace(const AValue: Integer): TLib3MFCompositionSpace; + function convertImplicitNodeTypeToConst(const AValue: TLib3MFImplicitNodeType): Integer; + function convertConstToImplicitNodeType(const AValue: Integer): TLib3MFImplicitNodeType; + function convertImplicitPortTypeToConst(const AValue: TLib3MFImplicitPortType): Integer; + function convertConstToImplicitPortType(const AValue: Integer): TLib3MFImplicitPortType; + function convertImplicitNodeConfigurationToConst(const AValue: TLib3MFImplicitNodeConfiguration): Integer; + function convertConstToImplicitNodeConfiguration(const AValue: Integer): TLib3MFImplicitNodeConfiguration; + function convertEncryptionAlgorithmToConst(const AValue: TLib3MFEncryptionAlgorithm): Integer; + function convertConstToEncryptionAlgorithm(const AValue: Integer): TLib3MFEncryptionAlgorithm; + function convertWrappingAlgorithmToConst(const AValue: TLib3MFWrappingAlgorithm): Integer; + function convertConstToWrappingAlgorithm(const AValue: Integer): TLib3MFWrappingAlgorithm; + function convertMgfAlgorithmToConst(const AValue: TLib3MFMgfAlgorithm): Integer; + function convertConstToMgfAlgorithm(const AValue: Integer): TLib3MFMgfAlgorithm; + function convertDigestMethodToConst(const AValue: TLib3MFDigestMethod): Integer; + function convertConstToDigestMethod(const AValue: Integer): TLib3MFDigestMethod; + function convertCompressionToConst(const AValue: TLib3MFCompression): Integer; + function convertConstToCompression(const AValue: Integer): TLib3MFCompression; + implementation @@ -10733,6 +11120,7 @@ implementation eObjectTypeModel: Result := 1; eObjectTypeSupport: Result := 2; eObjectTypeSolidSupport: Result := 3; + eObjectTypeSurface: Result := 4; else raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); end; @@ -10745,6 +11133,7 @@ implementation 1: Result := eObjectTypeModel; 2: Result := eObjectTypeSupport; 3: Result := eObjectTypeSolidSupport; + 4: Result := eObjectTypeSurface; else raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); end; @@ -11106,6 +11495,9 @@ implementation eImplicitNodeTypeVectorFromScalar: Result := 48; eImplicitNodeTypeUnsignedMesh: Result := 49; eImplicitNodeTypeMod: Result := 50; + eImplicitNodeTypeBeamLattice: Result := 51; + eImplicitNodeTypeFunctionGradient: Result := 52; + eImplicitNodeTypeNormalizeDistance: Result := 53; else raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); end; @@ -11165,6 +11557,9 @@ implementation 48: Result := eImplicitNodeTypeVectorFromScalar; 49: Result := eImplicitNodeTypeUnsignedMesh; 50: Result := eImplicitNodeTypeMod; + 51: Result := eImplicitNodeTypeBeamLattice; + 52: Result := eImplicitNodeTypeFunctionGradient; + 53: Result := eImplicitNodeTypeNormalizeDistance; else raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); end; @@ -11449,6 +11844,9 @@ implementation QWord($F85C90EDCE6F90A4): begin Obj := TLIB3MFConstMatNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ConstMatNode" QWord($53601FD432E3DEF4): begin Obj := TLIB3MFMeshNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::MeshNode" QWord($29985A628251A9CD): begin Obj := TLIB3MFUnsignedMeshNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::UnsignedMeshNode" + QWord($0F3A4EE98F7FEC0C): begin Obj := TLIB3MFBeamLatticeNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::BeamLatticeNode" + QWord($0437E27AEF740121): begin Obj := TLIB3MFFunctionGradientNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionGradientNode" + QWord($817D2E566E73AA8F): begin Obj := TLIB3MFNormalizeDistanceNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::NormalizeDistanceNode" QWord($0765C17C952F24E3): begin Obj := TLIB3MFFunctionCallNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionCallNode" QWord($FC006BC888CAB4D0): begin Obj := TLIB3MFNodeIterator.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::NodeIterator" QWord($9EFB2757CA1A5231): begin Obj := TLIB3MFFunction.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Function" @@ -11868,6 +12266,18 @@ implementation begin Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); end; + function TLib3MFPolymorphicFactoryMakeBeamLatticeNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFBeamLatticeNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeFunctionGradientNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFFunctionGradientNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeNormalizeDistanceNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFNormalizeDistanceNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; function TLib3MFPolymorphicFactoryMakeFunctionCallNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFFunctionCallNode; begin Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); @@ -16758,6 +17168,277 @@ implementation Result := TLib3MFPolymorphicFactory.Make(FWrapper, HDistance); end; +(************************************************************************************************************************* + Class implementation for BeamLatticeNode +**************************************************************************************************************************) + + constructor TLib3MFBeamLatticeNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFBeamLatticeNode.Destroy; + begin + inherited; + end; + + function TLib3MFBeamLatticeNode.GetInputBeamLattice(): TLib3MFImplicitPort; + var + HBeamLattice: TLib3MFHandle; + begin + Result := nil; + HBeamLattice := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLatticeNode_GetInputBeamLatticeFunc(FHandle, HBeamLattice)); + if Assigned(HBeamLattice) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HBeamLattice); + end; + + function TLib3MFBeamLatticeNode.GetInputPos(): TLib3MFImplicitPort; + var + HPos: TLib3MFHandle; + begin + Result := nil; + HPos := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLatticeNode_GetInputPosFunc(FHandle, HPos)); + if Assigned(HPos) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HPos); + end; + + function TLib3MFBeamLatticeNode.GetOutputDistance(): TLib3MFImplicitPort; + var + HDistance: TLib3MFHandle; + begin + Result := nil; + HDistance := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLatticeNode_GetOutputDistanceFunc(FHandle, HDistance)); + if Assigned(HDistance) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HDistance); + end; + + procedure TLib3MFBeamLatticeNode.SetAccurateRange(const AAccurateRange: Double); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLatticeNode_SetAccurateRangeFunc(FHandle, AAccurateRange)); + end; + + function TLib3MFBeamLatticeNode.GetAccurateRange(): Double; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLatticeNode_GetAccurateRangeFunc(FHandle, Result)); + end; + +(************************************************************************************************************************* + Class implementation for FunctionGradientNode +**************************************************************************************************************************) + + constructor TLib3MFFunctionGradientNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFFunctionGradientNode.Destroy; + begin + inherited; + end; + + function TLib3MFFunctionGradientNode.GetInputFunctionID(): TLib3MFImplicitPort; + var + HFunction: TLib3MFHandle; + begin + Result := nil; + HFunction := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFFunctionGradientNode_GetInputFunctionIDFunc(FHandle, HFunction)); + if Assigned(HFunction) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HFunction); + end; + + function TLib3MFFunctionGradientNode.GetInputPos(): TLib3MFImplicitPort; + var + HPos: TLib3MFHandle; + begin + Result := nil; + HPos := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFFunctionGradientNode_GetInputPosFunc(FHandle, HPos)); + if Assigned(HPos) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HPos); + end; + + function TLib3MFFunctionGradientNode.GetInputStep(): TLib3MFImplicitPort; + var + HStep: TLib3MFHandle; + begin + Result := nil; + HStep := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFFunctionGradientNode_GetInputStepFunc(FHandle, HStep)); + if Assigned(HStep) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HStep); + end; + + procedure TLib3MFFunctionGradientNode.SetScalarOutputName(const AScalarOutputName: String); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFFunctionGradientNode_SetScalarOutputNameFunc(FHandle, PAnsiChar(AScalarOutputName))); + end; + + function TLib3MFFunctionGradientNode.GetScalarOutputName(): String; + var + bytesNeededScalarOutputName: Cardinal; + bytesWrittenScalarOutputName: Cardinal; + bufferScalarOutputName: array of Char; + begin + bytesNeededScalarOutputName:= 0; + bytesWrittenScalarOutputName:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFFunctionGradientNode_GetScalarOutputNameFunc(FHandle, 0, bytesNeededScalarOutputName, nil)); + SetLength(bufferScalarOutputName, bytesNeededScalarOutputName); + FWrapper.CheckError(Self, FWrapper.Lib3MFFunctionGradientNode_GetScalarOutputNameFunc(FHandle, bytesNeededScalarOutputName, bytesWrittenScalarOutputName, @bufferScalarOutputName[0])); + Result := StrPas(@bufferScalarOutputName[0]); + end; + + procedure TLib3MFFunctionGradientNode.SetVectorInputName(const AVectorInputName: String); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFFunctionGradientNode_SetVectorInputNameFunc(FHandle, PAnsiChar(AVectorInputName))); + end; + + function TLib3MFFunctionGradientNode.GetVectorInputName(): String; + var + bytesNeededVectorInputName: Cardinal; + bytesWrittenVectorInputName: Cardinal; + bufferVectorInputName: array of Char; + begin + bytesNeededVectorInputName:= 0; + bytesWrittenVectorInputName:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFFunctionGradientNode_GetVectorInputNameFunc(FHandle, 0, bytesNeededVectorInputName, nil)); + SetLength(bufferVectorInputName, bytesNeededVectorInputName); + FWrapper.CheckError(Self, FWrapper.Lib3MFFunctionGradientNode_GetVectorInputNameFunc(FHandle, bytesNeededVectorInputName, bytesWrittenVectorInputName, @bufferVectorInputName[0])); + Result := StrPas(@bufferVectorInputName[0]); + end; + + function TLib3MFFunctionGradientNode.GetOutputVector(): TLib3MFImplicitPort; + var + HVector: TLib3MFHandle; + begin + Result := nil; + HVector := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFFunctionGradientNode_GetOutputVectorFunc(FHandle, HVector)); + if Assigned(HVector) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HVector); + end; + + function TLib3MFFunctionGradientNode.GetOutputGradient(): TLib3MFImplicitPort; + var + HGradient: TLib3MFHandle; + begin + Result := nil; + HGradient := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFFunctionGradientNode_GetOutputGradientFunc(FHandle, HGradient)); + if Assigned(HGradient) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HGradient); + end; + + function TLib3MFFunctionGradientNode.GetOutputMagnitude(): TLib3MFImplicitPort; + var + HMagnitude: TLib3MFHandle; + begin + Result := nil; + HMagnitude := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFFunctionGradientNode_GetOutputMagnitudeFunc(FHandle, HMagnitude)); + if Assigned(HMagnitude) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HMagnitude); + end; + +(************************************************************************************************************************* + Class implementation for NormalizeDistanceNode +**************************************************************************************************************************) + + constructor TLib3MFNormalizeDistanceNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFNormalizeDistanceNode.Destroy; + begin + inherited; + end; + + function TLib3MFNormalizeDistanceNode.GetInputFunctionID(): TLib3MFImplicitPort; + var + HFunction: TLib3MFHandle; + begin + Result := nil; + HFunction := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFNormalizeDistanceNode_GetInputFunctionIDFunc(FHandle, HFunction)); + if Assigned(HFunction) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HFunction); + end; + + function TLib3MFNormalizeDistanceNode.GetInputPos(): TLib3MFImplicitPort; + var + HPos: TLib3MFHandle; + begin + Result := nil; + HPos := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFNormalizeDistanceNode_GetInputPosFunc(FHandle, HPos)); + if Assigned(HPos) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HPos); + end; + + function TLib3MFNormalizeDistanceNode.GetInputStep(): TLib3MFImplicitPort; + var + HStep: TLib3MFHandle; + begin + Result := nil; + HStep := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFNormalizeDistanceNode_GetInputStepFunc(FHandle, HStep)); + if Assigned(HStep) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HStep); + end; + + procedure TLib3MFNormalizeDistanceNode.SetScalarOutputName(const AScalarOutputName: String); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFNormalizeDistanceNode_SetScalarOutputNameFunc(FHandle, PAnsiChar(AScalarOutputName))); + end; + + function TLib3MFNormalizeDistanceNode.GetScalarOutputName(): String; + var + bytesNeededScalarOutputName: Cardinal; + bytesWrittenScalarOutputName: Cardinal; + bufferScalarOutputName: array of Char; + begin + bytesNeededScalarOutputName:= 0; + bytesWrittenScalarOutputName:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFNormalizeDistanceNode_GetScalarOutputNameFunc(FHandle, 0, bytesNeededScalarOutputName, nil)); + SetLength(bufferScalarOutputName, bytesNeededScalarOutputName); + FWrapper.CheckError(Self, FWrapper.Lib3MFNormalizeDistanceNode_GetScalarOutputNameFunc(FHandle, bytesNeededScalarOutputName, bytesWrittenScalarOutputName, @bufferScalarOutputName[0])); + Result := StrPas(@bufferScalarOutputName[0]); + end; + + procedure TLib3MFNormalizeDistanceNode.SetVectorInputName(const AVectorInputName: String); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFNormalizeDistanceNode_SetVectorInputNameFunc(FHandle, PAnsiChar(AVectorInputName))); + end; + + function TLib3MFNormalizeDistanceNode.GetVectorInputName(): String; + var + bytesNeededVectorInputName: Cardinal; + bytesWrittenVectorInputName: Cardinal; + bufferVectorInputName: array of Char; + begin + bytesNeededVectorInputName:= 0; + bytesWrittenVectorInputName:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFNormalizeDistanceNode_GetVectorInputNameFunc(FHandle, 0, bytesNeededVectorInputName, nil)); + SetLength(bufferVectorInputName, bytesNeededVectorInputName); + FWrapper.CheckError(Self, FWrapper.Lib3MFNormalizeDistanceNode_GetVectorInputNameFunc(FHandle, bytesNeededVectorInputName, bytesWrittenVectorInputName, @bufferVectorInputName[0])); + Result := StrPas(@bufferVectorInputName[0]); + end; + + function TLib3MFNormalizeDistanceNode.GetOutputResult(): TLib3MFImplicitPort; + var + HResult: TLib3MFHandle; + begin + Result := nil; + HResult := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFNormalizeDistanceNode_GetOutputResultFunc(FHandle, HResult)); + if Assigned(HResult) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HResult); + end; + (************************************************************************************************************************* Class implementation for FunctionCallNode **************************************************************************************************************************) @@ -17501,6 +18182,39 @@ implementation Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; + function TLib3MFImplicitFunction.AddBeamLatticeNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFBeamLatticeNode; + var + HNode: TLib3MFHandle; + begin + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddBeamLatticeNodeFunc(FHandle, PAnsiChar(AIdentifier), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); + end; + + function TLib3MFImplicitFunction.AddFunctionGradientNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFFunctionGradientNode; + var + HNode: TLib3MFHandle; + begin + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddFunctionGradientNodeFunc(FHandle, PAnsiChar(AIdentifier), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); + end; + + function TLib3MFImplicitFunction.AddNormalizeDistanceNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFNormalizeDistanceNode; + var + HNode: TLib3MFHandle; + begin + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddNormalizeDistanceNodeFunc(FHandle, PAnsiChar(AIdentifier), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); + end; + function TLib3MFImplicitFunction.AddFunctionCallNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFFunctionCallNode; var HNode: TLib3MFHandle; @@ -19754,6 +20468,29 @@ implementation FLib3MFUnsignedMeshNode_GetInputMeshFunc := LoadFunction('lib3mf_unsignedmeshnode_getinputmesh'); FLib3MFUnsignedMeshNode_GetInputPosFunc := LoadFunction('lib3mf_unsignedmeshnode_getinputpos'); FLib3MFUnsignedMeshNode_GetOutputDistanceFunc := LoadFunction('lib3mf_unsignedmeshnode_getoutputdistance'); + FLib3MFBeamLatticeNode_GetInputBeamLatticeFunc := LoadFunction('lib3mf_beamlatticenode_getinputbeamlattice'); + FLib3MFBeamLatticeNode_GetInputPosFunc := LoadFunction('lib3mf_beamlatticenode_getinputpos'); + FLib3MFBeamLatticeNode_GetOutputDistanceFunc := LoadFunction('lib3mf_beamlatticenode_getoutputdistance'); + FLib3MFBeamLatticeNode_SetAccurateRangeFunc := LoadFunction('lib3mf_beamlatticenode_setaccuraterange'); + FLib3MFBeamLatticeNode_GetAccurateRangeFunc := LoadFunction('lib3mf_beamlatticenode_getaccuraterange'); + FLib3MFFunctionGradientNode_GetInputFunctionIDFunc := LoadFunction('lib3mf_functiongradientnode_getinputfunctionid'); + FLib3MFFunctionGradientNode_GetInputPosFunc := LoadFunction('lib3mf_functiongradientnode_getinputpos'); + FLib3MFFunctionGradientNode_GetInputStepFunc := LoadFunction('lib3mf_functiongradientnode_getinputstep'); + FLib3MFFunctionGradientNode_SetScalarOutputNameFunc := LoadFunction('lib3mf_functiongradientnode_setscalaroutputname'); + FLib3MFFunctionGradientNode_GetScalarOutputNameFunc := LoadFunction('lib3mf_functiongradientnode_getscalaroutputname'); + FLib3MFFunctionGradientNode_SetVectorInputNameFunc := LoadFunction('lib3mf_functiongradientnode_setvectorinputname'); + FLib3MFFunctionGradientNode_GetVectorInputNameFunc := LoadFunction('lib3mf_functiongradientnode_getvectorinputname'); + FLib3MFFunctionGradientNode_GetOutputVectorFunc := LoadFunction('lib3mf_functiongradientnode_getoutputvector'); + FLib3MFFunctionGradientNode_GetOutputGradientFunc := LoadFunction('lib3mf_functiongradientnode_getoutputgradient'); + FLib3MFFunctionGradientNode_GetOutputMagnitudeFunc := LoadFunction('lib3mf_functiongradientnode_getoutputmagnitude'); + FLib3MFNormalizeDistanceNode_GetInputFunctionIDFunc := LoadFunction('lib3mf_normalizedistancenode_getinputfunctionid'); + FLib3MFNormalizeDistanceNode_GetInputPosFunc := LoadFunction('lib3mf_normalizedistancenode_getinputpos'); + FLib3MFNormalizeDistanceNode_GetInputStepFunc := LoadFunction('lib3mf_normalizedistancenode_getinputstep'); + FLib3MFNormalizeDistanceNode_SetScalarOutputNameFunc := LoadFunction('lib3mf_normalizedistancenode_setscalaroutputname'); + FLib3MFNormalizeDistanceNode_GetScalarOutputNameFunc := LoadFunction('lib3mf_normalizedistancenode_getscalaroutputname'); + FLib3MFNormalizeDistanceNode_SetVectorInputNameFunc := LoadFunction('lib3mf_normalizedistancenode_setvectorinputname'); + FLib3MFNormalizeDistanceNode_GetVectorInputNameFunc := LoadFunction('lib3mf_normalizedistancenode_getvectorinputname'); + FLib3MFNormalizeDistanceNode_GetOutputResultFunc := LoadFunction('lib3mf_normalizedistancenode_getoutputresult'); FLib3MFFunctionCallNode_GetInputFunctionIDFunc := LoadFunction('lib3mf_functioncallnode_getinputfunctionid'); FLib3MFNodeIterator_GetCurrentFunc := LoadFunction('lib3mf_nodeiterator_getcurrent'); FLib3MFFunction_GetDisplayNameFunc := LoadFunction('lib3mf_function_getdisplayname'); @@ -19817,6 +20554,9 @@ implementation FLib3MFImplicitFunction_AddConstMatNodeFunc := LoadFunction('lib3mf_implicitfunction_addconstmatnode'); FLib3MFImplicitFunction_AddMeshNodeFunc := LoadFunction('lib3mf_implicitfunction_addmeshnode'); FLib3MFImplicitFunction_AddUnsignedMeshNodeFunc := LoadFunction('lib3mf_implicitfunction_addunsignedmeshnode'); + FLib3MFImplicitFunction_AddBeamLatticeNodeFunc := LoadFunction('lib3mf_implicitfunction_addbeamlatticenode'); + FLib3MFImplicitFunction_AddFunctionGradientNodeFunc := LoadFunction('lib3mf_implicitfunction_addfunctiongradientnode'); + FLib3MFImplicitFunction_AddNormalizeDistanceNodeFunc := LoadFunction('lib3mf_implicitfunction_addnormalizedistancenode'); FLib3MFImplicitFunction_AddFunctionCallNodeFunc := LoadFunction('lib3mf_implicitfunction_addfunctioncallnode'); FLib3MFImplicitFunction_GetNodesFunc := LoadFunction('lib3mf_implicitfunction_getnodes'); FLib3MFImplicitFunction_RemoveNodeFunc := LoadFunction('lib3mf_implicitfunction_removenode'); @@ -21131,6 +21871,75 @@ implementation if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); AResult := ALookupMethod(PAnsiChar('lib3mf_unsignedmeshnode_getoutputdistance'), @FLib3MFUnsignedMeshNode_GetOutputDistanceFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamlatticenode_getinputbeamlattice'), @FLib3MFBeamLatticeNode_GetInputBeamLatticeFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamlatticenode_getinputpos'), @FLib3MFBeamLatticeNode_GetInputPosFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamlatticenode_getoutputdistance'), @FLib3MFBeamLatticeNode_GetOutputDistanceFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamlatticenode_setaccuraterange'), @FLib3MFBeamLatticeNode_SetAccurateRangeFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamlatticenode_getaccuraterange'), @FLib3MFBeamLatticeNode_GetAccurateRangeFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_functiongradientnode_getinputfunctionid'), @FLib3MFFunctionGradientNode_GetInputFunctionIDFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_functiongradientnode_getinputpos'), @FLib3MFFunctionGradientNode_GetInputPosFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_functiongradientnode_getinputstep'), @FLib3MFFunctionGradientNode_GetInputStepFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_functiongradientnode_setscalaroutputname'), @FLib3MFFunctionGradientNode_SetScalarOutputNameFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_functiongradientnode_getscalaroutputname'), @FLib3MFFunctionGradientNode_GetScalarOutputNameFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_functiongradientnode_setvectorinputname'), @FLib3MFFunctionGradientNode_SetVectorInputNameFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_functiongradientnode_getvectorinputname'), @FLib3MFFunctionGradientNode_GetVectorInputNameFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_functiongradientnode_getoutputvector'), @FLib3MFFunctionGradientNode_GetOutputVectorFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_functiongradientnode_getoutputgradient'), @FLib3MFFunctionGradientNode_GetOutputGradientFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_functiongradientnode_getoutputmagnitude'), @FLib3MFFunctionGradientNode_GetOutputMagnitudeFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_normalizedistancenode_getinputfunctionid'), @FLib3MFNormalizeDistanceNode_GetInputFunctionIDFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_normalizedistancenode_getinputpos'), @FLib3MFNormalizeDistanceNode_GetInputPosFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_normalizedistancenode_getinputstep'), @FLib3MFNormalizeDistanceNode_GetInputStepFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_normalizedistancenode_setscalaroutputname'), @FLib3MFNormalizeDistanceNode_SetScalarOutputNameFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_normalizedistancenode_getscalaroutputname'), @FLib3MFNormalizeDistanceNode_GetScalarOutputNameFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_normalizedistancenode_setvectorinputname'), @FLib3MFNormalizeDistanceNode_SetVectorInputNameFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_normalizedistancenode_getvectorinputname'), @FLib3MFNormalizeDistanceNode_GetVectorInputNameFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_normalizedistancenode_getoutputresult'), @FLib3MFNormalizeDistanceNode_GetOutputResultFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); AResult := ALookupMethod(PAnsiChar('lib3mf_functioncallnode_getinputfunctionid'), @FLib3MFFunctionCallNode_GetInputFunctionIDFunc); @@ -21320,6 +22129,15 @@ implementation if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addunsignedmeshnode'), @FLib3MFImplicitFunction_AddUnsignedMeshNodeFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addbeamlatticenode'), @FLib3MFImplicitFunction_AddBeamLatticeNodeFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addfunctiongradientnode'), @FLib3MFImplicitFunction_AddFunctionGradientNodeFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addnormalizedistancenode'), @FLib3MFImplicitFunction_AddNormalizeDistanceNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addfunctioncallnode'), @FLib3MFImplicitFunction_AddFunctionCallNodeFunc); diff --git a/Autogenerated/Bindings/Python/Lib3MF.py b/Autogenerated/Bindings/Python/Lib3MF.py index e730c5a50..9f577a70c 100644 --- a/Autogenerated/Bindings/Python/Lib3MF.py +++ b/Autogenerated/Bindings/Python/Lib3MF.py @@ -24,12 +24,12 @@ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha. +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. Abstract: This is an autogenerated Python file in order to allow an easy use of the 3MF Library -Interface version: 2.4.1 +Interface version: 2.5.0 ''' @@ -52,13 +52,255 @@ def __str__(self): if self._message: return 'Lib3MFException ' + str(self._code) + ': '+ str(self._message) return 'Lib3MFException ' + str(self._code) + + def get_error_code(self): + """Returns the error code""" + return self._code + + def get_error_message(self): + """Returns the custom error message""" + return self._message + + def get_error_name(self): + """Returns the error name (constant name)""" + if self._code == ErrorCodes.SUCCESS: + return 'SUCCESS' + elif self._code == ErrorCodes.NOTIMPLEMENTED: + return 'NOTIMPLEMENTED' + elif self._code == ErrorCodes.INVALIDPARAM: + return 'INVALIDPARAM' + elif self._code == ErrorCodes.INVALIDCAST: + return 'INVALIDCAST' + elif self._code == ErrorCodes.BUFFERTOOSMALL: + return 'BUFFERTOOSMALL' + elif self._code == ErrorCodes.GENERICEXCEPTION: + return 'GENERICEXCEPTION' + elif self._code == ErrorCodes.COULDNOTLOADLIBRARY: + return 'COULDNOTLOADLIBRARY' + elif self._code == ErrorCodes.COULDNOTFINDLIBRARYEXPORT: + return 'COULDNOTFINDLIBRARYEXPORT' + elif self._code == ErrorCodes.INCOMPATIBLEBINARYVERSION: + return 'INCOMPATIBLEBINARYVERSION' + elif self._code == ErrorCodes.CALCULATIONABORTED: + return 'CALCULATIONABORTED' + elif self._code == ErrorCodes.SHOULDNOTBECALLED: + return 'SHOULDNOTBECALLED' + elif self._code == ErrorCodes.READERCLASSUNKNOWN: + return 'READERCLASSUNKNOWN' + elif self._code == ErrorCodes.WRITERCLASSUNKNOWN: + return 'WRITERCLASSUNKNOWN' + elif self._code == ErrorCodes.ITERATORINVALIDINDEX: + return 'ITERATORINVALIDINDEX' + elif self._code == ErrorCodes.INVALIDMODELRESOURCE: + return 'INVALIDMODELRESOURCE' + elif self._code == ErrorCodes.RESOURCENOTFOUND: + return 'RESOURCENOTFOUND' + elif self._code == ErrorCodes.INVALIDMODEL: + return 'INVALIDMODEL' + elif self._code == ErrorCodes.INVALIDOBJECT: + return 'INVALIDOBJECT' + elif self._code == ErrorCodes.INVALIDMESHOBJECT: + return 'INVALIDMESHOBJECT' + elif self._code == ErrorCodes.INVALIDCOMPONENTSOBJECT: + return 'INVALIDCOMPONENTSOBJECT' + elif self._code == ErrorCodes.INVALIDCOMPONENT: + return 'INVALIDCOMPONENT' + elif self._code == ErrorCodes.INVALIDBUILDITEM: + return 'INVALIDBUILDITEM' + elif self._code == ErrorCodes.INVALIDBASEMATERIALGROUP: + return 'INVALIDBASEMATERIALGROUP' + elif self._code == ErrorCodes.INVALIDSLICESTACKRESOURCE: + return 'INVALIDSLICESTACKRESOURCE' + elif self._code == ErrorCodes.INVALIDTEXTURERESOURCE: + return 'INVALIDTEXTURERESOURCE' + elif self._code == ErrorCodes.INVALIDCOLORGROUP: + return 'INVALIDCOLORGROUP' + elif self._code == ErrorCodes.INVALIDTEXTURE2DGROUP: + return 'INVALIDTEXTURE2DGROUP' + elif self._code == ErrorCodes.INVALIDCOMPOSITEMATERIALS: + return 'INVALIDCOMPOSITEMATERIALS' + elif self._code == ErrorCodes.INVALIDMULTIPROPERTYGROUP: + return 'INVALIDMULTIPROPERTYGROUP' + elif self._code == ErrorCodes.INVALIDRESOURCEINDEX: + return 'INVALIDRESOURCEINDEX' + elif self._code == ErrorCodes.ATTACHMENTNOTFOUND: + return 'ATTACHMENTNOTFOUND' + elif self._code == ErrorCodes.FORBIDDENCYCLICREFERENCE: + return 'FORBIDDENCYCLICREFERENCE' + elif self._code == ErrorCodes.INVALIDATTACHMENTSTREAM: + return 'INVALIDATTACHMENTSTREAM' + elif self._code == ErrorCodes.INVALIDPROPERTYCOUNT: + return 'INVALIDPROPERTYCOUNT' + elif self._code == ErrorCodes.UNKOWNPROGRESSIDENTIFIER: + return 'UNKOWNPROGRESSIDENTIFIER' + elif self._code == ErrorCodes.ELEMENTCOUNTEXCEEDSLIMIT: + return 'ELEMENTCOUNTEXCEEDSLIMIT' + elif self._code == ErrorCodes.INVALIDRESOURCE: + return 'INVALIDRESOURCE' + elif self._code == ErrorCodes.INVALIDLEVELSET: + return 'INVALIDLEVELSET' + elif self._code == ErrorCodes.COULDNOTFINDTRIANGLESET: + return 'COULDNOTFINDTRIANGLESET' + elif self._code == ErrorCodes.INVALIDTRIANGLESETINDEX: + return 'INVALIDTRIANGLESETINDEX' + elif self._code == ErrorCodes.BEAMLATTICE_INVALID_OBJECTTYPE: + return 'BEAMLATTICE_INVALID_OBJECTTYPE' + elif self._code == ErrorCodes.INVALIDKEYSTORE: + return 'INVALIDKEYSTORE' + elif self._code == ErrorCodes.INVALIDKEYSTORECONSUMER: + return 'INVALIDKEYSTORECONSUMER' + elif self._code == ErrorCodes.KEYSTORECONSUMERNOTFOUND: + return 'KEYSTORECONSUMERNOTFOUND' + elif self._code == ErrorCodes.KEYSTORERESOURCEDATANOTFOUND: + return 'KEYSTORERESOURCEDATANOTFOUND' + elif self._code == ErrorCodes.SECURECONTEXTNOTREGISTERED: + return 'SECURECONTEXTNOTREGISTERED' + elif self._code == ErrorCodes.INVALIDKEYSIZE: + return 'INVALIDKEYSIZE' + elif self._code == ErrorCodes.INCOMPATIBLEPORTTYPES: + return 'INCOMPATIBLEPORTTYPES' + elif self._code == ErrorCodes.GRAPHISCYCLIC: + return 'GRAPHISCYCLIC' + elif self._code == ErrorCodes.INPUTNOTSET: + return 'INPUTNOTSET' + elif self._code == ErrorCodes.INVALIDNODECONFIGURATION: + return 'INVALIDNODECONFIGURATION' + else: + return 'UNKNOWN' + + def get_error_description(self): + """Returns the error description (human-readable)""" + if self._code == ErrorCodes.SUCCESS: + return 'success' + elif self._code == ErrorCodes.NOTIMPLEMENTED: + return 'functionality not implemented' + elif self._code == ErrorCodes.INVALIDPARAM: + return 'an invalid parameter was passed' + elif self._code == ErrorCodes.INVALIDCAST: + return 'a type cast failed' + elif self._code == ErrorCodes.BUFFERTOOSMALL: + return 'a provided buffer is too small' + elif self._code == ErrorCodes.GENERICEXCEPTION: + return 'a generic exception occurred' + elif self._code == ErrorCodes.COULDNOTLOADLIBRARY: + return 'the library could not be loaded' + elif self._code == ErrorCodes.COULDNOTFINDLIBRARYEXPORT: + return 'a required exported symbol could not be found in the library' + elif self._code == ErrorCodes.INCOMPATIBLEBINARYVERSION: + return 'the version of the binary interface does not match the bindings interface' + elif self._code == ErrorCodes.CALCULATIONABORTED: + return 'a calculation has been aborted' + elif self._code == ErrorCodes.SHOULDNOTBECALLED: + return 'functionality should not be called' + elif self._code == ErrorCodes.READERCLASSUNKNOWN: + return 'the queried reader class is unknown' + elif self._code == ErrorCodes.WRITERCLASSUNKNOWN: + return 'the queried writer class is unknown' + elif self._code == ErrorCodes.ITERATORINVALIDINDEX: + return 'the current index of an iterator is invalid' + elif self._code == ErrorCodes.INVALIDMODELRESOURCE: + return 'no Model Resource has been given' + elif self._code == ErrorCodes.RESOURCENOTFOUND: + return 'Resource not found' + elif self._code == ErrorCodes.INVALIDMODEL: + return 'A model is invalid' + elif self._code == ErrorCodes.INVALIDOBJECT: + return 'An object is invalid' + elif self._code == ErrorCodes.INVALIDMESHOBJECT: + return 'A mesh object is invalid' + elif self._code == ErrorCodes.INVALIDCOMPONENTSOBJECT: + return 'A components object is invalid' + elif self._code == ErrorCodes.INVALIDCOMPONENT: + return 'A component is invalid' + elif self._code == ErrorCodes.INVALIDBUILDITEM: + return 'A build item is invalid' + elif self._code == ErrorCodes.INVALIDBASEMATERIALGROUP: + return 'A basematerialgroup is invalid' + elif self._code == ErrorCodes.INVALIDSLICESTACKRESOURCE: + return 'A slicestack resource is invalid' + elif self._code == ErrorCodes.INVALIDTEXTURERESOURCE: + return 'A texture resource is invalid' + elif self._code == ErrorCodes.INVALIDCOLORGROUP: + return 'A color group resource is invalid' + elif self._code == ErrorCodes.INVALIDTEXTURE2DGROUP: + return 'A texture2d group resource is invalid' + elif self._code == ErrorCodes.INVALIDCOMPOSITEMATERIALS: + return 'A composite materials resource is invalid' + elif self._code == ErrorCodes.INVALIDMULTIPROPERTYGROUP: + return 'A MultiPropertyGroup resource is invalid' + elif self._code == ErrorCodes.INVALIDRESOURCEINDEX: + return 'A resource index is invalid' + elif self._code == ErrorCodes.ATTACHMENTNOTFOUND: + return 'Attachment not found' + elif self._code == ErrorCodes.FORBIDDENCYCLICREFERENCE: + return 'A component references one of its ancestors' + elif self._code == ErrorCodes.INVALIDATTACHMENTSTREAM: + return 'An attachment stream is invalid' + elif self._code == ErrorCodes.INVALIDPROPERTYCOUNT: + return 'Invalid property count.' + elif self._code == ErrorCodes.UNKOWNPROGRESSIDENTIFIER: + return 'A progress identifier is unknown' + elif self._code == ErrorCodes.ELEMENTCOUNTEXCEEDSLIMIT: + return 'An element buffer exceeds its spec limit' + elif self._code == ErrorCodes.INVALIDRESOURCE: + return 'A resource is invalid' + elif self._code == ErrorCodes.INVALIDLEVELSET: + return 'A level set is invalid' + elif self._code == ErrorCodes.COULDNOTFINDTRIANGLESET: + return 'Could not find triangle set' + elif self._code == ErrorCodes.INVALIDTRIANGLESETINDEX: + return 'Invalid triangle set index' + elif self._code == ErrorCodes.BEAMLATTICE_INVALID_OBJECTTYPE: + return 'This object type is not valid for beamlattices' + elif self._code == ErrorCodes.INVALIDKEYSTORE: + return 'The keystore object is invalid' + elif self._code == ErrorCodes.INVALIDKEYSTORECONSUMER: + return 'The consumer keystore object is invalid' + elif self._code == ErrorCodes.KEYSTORECONSUMERNOTFOUND: + return 'A consumer has not been found' + elif self._code == ErrorCodes.KEYSTORERESOURCEDATANOTFOUND: + return 'A resource data has not been found' + elif self._code == ErrorCodes.SECURECONTEXTNOTREGISTERED: + return 'A Key or Conentent encryption callback has not been registered' + elif self._code == ErrorCodes.INVALIDKEYSIZE: + return 'The key size is invalid' + elif self._code == ErrorCodes.INCOMPATIBLEPORTTYPES: + return 'Link could not be added, the port types are incompatible' + elif self._code == ErrorCodes.GRAPHISCYCLIC: + return 'The functin graph is cyclic. Only dircected graphs are valid and can be topological sorted.' + elif self._code == ErrorCodes.INPUTNOTSET: + return 'The input of a node is not set.' + elif self._code == ErrorCodes.INVALIDNODECONFIGURATION: + return 'The selected node configuration is not supported' + else: + return 'unknown error' + + @property + def error_code(self): + """Property to access error code""" + return self._code + + @property + def error_message(self): + """Property to access custom error message""" + return self._message + + @property + def error_name(self): + """Property to access error name""" + return self.get_error_name() + + @property + def error_description(self): + """Property to access error description""" + return self.get_error_description() '''Definition of binding API version ''' class BindingVersion(enum.IntEnum): MAJOR = 2 - MINOR = 4 - MICRO = 1 + MINOR = 5 + MICRO = 0 '''Definition Error Codes ''' @@ -511,6 +753,29 @@ class FunctionTable: lib3mf_unsignedmeshnode_getinputmesh = None lib3mf_unsignedmeshnode_getinputpos = None lib3mf_unsignedmeshnode_getoutputdistance = None + lib3mf_beamlatticenode_getinputbeamlattice = None + lib3mf_beamlatticenode_getinputpos = None + lib3mf_beamlatticenode_getoutputdistance = None + lib3mf_beamlatticenode_setaccuraterange = None + lib3mf_beamlatticenode_getaccuraterange = None + lib3mf_functiongradientnode_getinputfunctionid = None + lib3mf_functiongradientnode_getinputpos = None + lib3mf_functiongradientnode_getinputstep = None + lib3mf_functiongradientnode_setscalaroutputname = None + lib3mf_functiongradientnode_getscalaroutputname = None + lib3mf_functiongradientnode_setvectorinputname = None + lib3mf_functiongradientnode_getvectorinputname = None + lib3mf_functiongradientnode_getoutputvector = None + lib3mf_functiongradientnode_getoutputgradient = None + lib3mf_functiongradientnode_getoutputmagnitude = None + lib3mf_normalizedistancenode_getinputfunctionid = None + lib3mf_normalizedistancenode_getinputpos = None + lib3mf_normalizedistancenode_getinputstep = None + lib3mf_normalizedistancenode_setscalaroutputname = None + lib3mf_normalizedistancenode_getscalaroutputname = None + lib3mf_normalizedistancenode_setvectorinputname = None + lib3mf_normalizedistancenode_getvectorinputname = None + lib3mf_normalizedistancenode_getoutputresult = None lib3mf_functioncallnode_getinputfunctionid = None lib3mf_nodeiterator_getcurrent = None lib3mf_function_getdisplayname = None @@ -574,6 +839,9 @@ class FunctionTable: lib3mf_implicitfunction_addconstmatnode = None lib3mf_implicitfunction_addmeshnode = None lib3mf_implicitfunction_addunsignedmeshnode = None + lib3mf_implicitfunction_addbeamlatticenode = None + lib3mf_implicitfunction_addfunctiongradientnode = None + lib3mf_implicitfunction_addnormalizedistancenode = None lib3mf_implicitfunction_addfunctioncallnode = None lib3mf_implicitfunction_getnodes = None lib3mf_implicitfunction_removenode = None @@ -778,6 +1046,7 @@ class ObjectType(CTypesEnum): Model = 1 Support = 2 SolidSupport = 3 + Surface = 4 '''Definition of TextureType ''' class TextureType(CTypesEnum): @@ -922,6 +1191,9 @@ class ImplicitNodeType(CTypesEnum): VectorFromScalar = 48 UnsignedMesh = 49 Mod = 50 + BeamLattice = 51 + FunctionGradient = 52 + NormalizeDistance = 53 '''Definition of ImplicitPortType ''' class ImplicitPortType(CTypesEnum): @@ -3506,6 +3778,144 @@ def _loadFunctionTableFromMethod(self, symbolLookupMethodAddress): methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) self.lib.lib3mf_unsignedmeshnode_getoutputdistance = methodType(int(methodAddress.value)) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_beamlatticenode_getinputbeamlattice")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_beamlatticenode_getinputbeamlattice = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_beamlatticenode_getinputpos")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_beamlatticenode_getinputpos = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_beamlatticenode_getoutputdistance")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_beamlatticenode_getoutputdistance = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_beamlatticenode_setaccuraterange")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_double) + self.lib.lib3mf_beamlatticenode_setaccuraterange = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_beamlatticenode_getaccuraterange")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_double)) + self.lib.lib3mf_beamlatticenode_getaccuraterange = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_functiongradientnode_getinputfunctionid")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_functiongradientnode_getinputfunctionid = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_functiongradientnode_getinputpos")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_functiongradientnode_getinputpos = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_functiongradientnode_getinputstep")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_functiongradientnode_getinputstep = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_functiongradientnode_setscalaroutputname")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p) + self.lib.lib3mf_functiongradientnode_setscalaroutputname = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_functiongradientnode_getscalaroutputname")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) + self.lib.lib3mf_functiongradientnode_getscalaroutputname = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_functiongradientnode_setvectorinputname")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p) + self.lib.lib3mf_functiongradientnode_setvectorinputname = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_functiongradientnode_getvectorinputname")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) + self.lib.lib3mf_functiongradientnode_getvectorinputname = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_functiongradientnode_getoutputvector")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_functiongradientnode_getoutputvector = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_functiongradientnode_getoutputgradient")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_functiongradientnode_getoutputgradient = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_functiongradientnode_getoutputmagnitude")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_functiongradientnode_getoutputmagnitude = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_normalizedistancenode_getinputfunctionid")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_normalizedistancenode_getinputfunctionid = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_normalizedistancenode_getinputpos")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_normalizedistancenode_getinputpos = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_normalizedistancenode_getinputstep")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_normalizedistancenode_getinputstep = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_normalizedistancenode_setscalaroutputname")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p) + self.lib.lib3mf_normalizedistancenode_setscalaroutputname = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_normalizedistancenode_getscalaroutputname")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) + self.lib.lib3mf_normalizedistancenode_getscalaroutputname = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_normalizedistancenode_setvectorinputname")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p) + self.lib.lib3mf_normalizedistancenode_setvectorinputname = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_normalizedistancenode_getvectorinputname")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) + self.lib.lib3mf_normalizedistancenode_getvectorinputname = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_normalizedistancenode_getoutputresult")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_normalizedistancenode_getoutputresult = methodType(int(methodAddress.value)) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_functioncallnode_getinputfunctionid")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) @@ -3884,6 +4294,24 @@ def _loadFunctionTableFromMethod(self, symbolLookupMethodAddress): methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) self.lib.lib3mf_implicitfunction_addunsignedmeshnode = methodType(int(methodAddress.value)) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addbeamlatticenode")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addbeamlatticenode = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addfunctiongradientnode")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addfunctiongradientnode = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addnormalizedistancenode")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addnormalizedistancenode = methodType(int(methodAddress.value)) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addfunctioncallnode")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) @@ -6052,6 +6480,75 @@ def _loadFunctionTable(self): self.lib.lib3mf_unsignedmeshnode_getoutputdistance.restype = ctypes.c_int32 self.lib.lib3mf_unsignedmeshnode_getoutputdistance.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_beamlatticenode_getinputbeamlattice.restype = ctypes.c_int32 + self.lib.lib3mf_beamlatticenode_getinputbeamlattice.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_beamlatticenode_getinputpos.restype = ctypes.c_int32 + self.lib.lib3mf_beamlatticenode_getinputpos.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_beamlatticenode_getoutputdistance.restype = ctypes.c_int32 + self.lib.lib3mf_beamlatticenode_getoutputdistance.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_beamlatticenode_setaccuraterange.restype = ctypes.c_int32 + self.lib.lib3mf_beamlatticenode_setaccuraterange.argtypes = [ctypes.c_void_p, ctypes.c_double] + + self.lib.lib3mf_beamlatticenode_getaccuraterange.restype = ctypes.c_int32 + self.lib.lib3mf_beamlatticenode_getaccuraterange.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_double)] + + self.lib.lib3mf_functiongradientnode_getinputfunctionid.restype = ctypes.c_int32 + self.lib.lib3mf_functiongradientnode_getinputfunctionid.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_functiongradientnode_getinputpos.restype = ctypes.c_int32 + self.lib.lib3mf_functiongradientnode_getinputpos.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_functiongradientnode_getinputstep.restype = ctypes.c_int32 + self.lib.lib3mf_functiongradientnode_getinputstep.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_functiongradientnode_setscalaroutputname.restype = ctypes.c_int32 + self.lib.lib3mf_functiongradientnode_setscalaroutputname.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + + self.lib.lib3mf_functiongradientnode_getscalaroutputname.restype = ctypes.c_int32 + self.lib.lib3mf_functiongradientnode_getscalaroutputname.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + + self.lib.lib3mf_functiongradientnode_setvectorinputname.restype = ctypes.c_int32 + self.lib.lib3mf_functiongradientnode_setvectorinputname.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + + self.lib.lib3mf_functiongradientnode_getvectorinputname.restype = ctypes.c_int32 + self.lib.lib3mf_functiongradientnode_getvectorinputname.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + + self.lib.lib3mf_functiongradientnode_getoutputvector.restype = ctypes.c_int32 + self.lib.lib3mf_functiongradientnode_getoutputvector.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_functiongradientnode_getoutputgradient.restype = ctypes.c_int32 + self.lib.lib3mf_functiongradientnode_getoutputgradient.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_functiongradientnode_getoutputmagnitude.restype = ctypes.c_int32 + self.lib.lib3mf_functiongradientnode_getoutputmagnitude.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_normalizedistancenode_getinputfunctionid.restype = ctypes.c_int32 + self.lib.lib3mf_normalizedistancenode_getinputfunctionid.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_normalizedistancenode_getinputpos.restype = ctypes.c_int32 + self.lib.lib3mf_normalizedistancenode_getinputpos.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_normalizedistancenode_getinputstep.restype = ctypes.c_int32 + self.lib.lib3mf_normalizedistancenode_getinputstep.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_normalizedistancenode_setscalaroutputname.restype = ctypes.c_int32 + self.lib.lib3mf_normalizedistancenode_setscalaroutputname.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + + self.lib.lib3mf_normalizedistancenode_getscalaroutputname.restype = ctypes.c_int32 + self.lib.lib3mf_normalizedistancenode_getscalaroutputname.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + + self.lib.lib3mf_normalizedistancenode_setvectorinputname.restype = ctypes.c_int32 + self.lib.lib3mf_normalizedistancenode_setvectorinputname.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + + self.lib.lib3mf_normalizedistancenode_getvectorinputname.restype = ctypes.c_int32 + self.lib.lib3mf_normalizedistancenode_getvectorinputname.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + + self.lib.lib3mf_normalizedistancenode_getoutputresult.restype = ctypes.c_int32 + self.lib.lib3mf_normalizedistancenode_getoutputresult.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_functioncallnode_getinputfunctionid.restype = ctypes.c_int32 self.lib.lib3mf_functioncallnode_getinputfunctionid.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] @@ -6241,6 +6738,15 @@ def _loadFunctionTable(self): self.lib.lib3mf_implicitfunction_addunsignedmeshnode.restype = ctypes.c_int32 self.lib.lib3mf_implicitfunction_addunsignedmeshnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_implicitfunction_addbeamlatticenode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addbeamlatticenode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addfunctiongradientnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addfunctiongradientnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addnormalizedistancenode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addnormalizedistancenode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_implicitfunction_addfunctioncallnode.restype = ctypes.c_int32 self.lib.lib3mf_implicitfunction_addfunctioncallnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] @@ -6742,26 +7248,30 @@ def _checkBinaryVersion(self): raise ELib3MFException(ErrorCodes.INCOMPATIBLEBINARYVERSION) def checkError(self, instance, errorCode): - if errorCode != ErrorCodes.SUCCESS.value: + ec = globals().get('ErrorCodes') + if ec is None: + # Interpreter shutdown: ErrorCodes may already be cleared; avoid noisy teardown + return + if errorCode != ec.SUCCESS.value: if instance: if instance._wrapper != self: - raise ELib3MFException(ErrorCodes.INVALIDCAST, 'invalid wrapper call') + raise ELib3MFException(ec.INVALIDCAST, 'invalid wrapper call') message,_ = self.GetLastError(instance) raise ELib3MFException(errorCode, message) - def GetLibraryVersion(self): - pMajor = ctypes.c_uint32() - pMinor = ctypes.c_uint32() - pMicro = ctypes.c_uint32() + def GetLibraryVersion(self, Major = None, Minor = None, Micro = None): + pMajor = ctypes.c_uint32(Major if Major is not None else 0) + pMinor = ctypes.c_uint32(Minor if Minor is not None else 0) + pMicro = ctypes.c_uint32(Micro if Micro is not None else 0) self.checkError(None, self.lib.lib3mf_getlibraryversion(pMajor, pMinor, pMicro)) return pMajor.value, pMinor.value, pMicro.value - def GetPrereleaseInformation(self): + def GetPrereleaseInformation(self, PrereleaseInfo = None): pHasPrereleaseInfo = ctypes.c_bool() - nPrereleaseInfoBufferSize = ctypes.c_uint64(0) + nPrereleaseInfoBufferSize = ctypes.c_uint64(len(PrereleaseInfo) if PrereleaseInfo else 0) nPrereleaseInfoNeededChars = ctypes.c_uint64(0) - pPrereleaseInfoBuffer = ctypes.c_char_p(None) + pPrereleaseInfoBuffer = ctypes.c_char_p(str.encode(PrereleaseInfo) if PrereleaseInfo else None) self.checkError(None, self.lib.lib3mf_getprereleaseinformation(pHasPrereleaseInfo, nPrereleaseInfoBufferSize, nPrereleaseInfoNeededChars, pPrereleaseInfoBuffer)) nPrereleaseInfoBufferSize = ctypes.c_uint64(nPrereleaseInfoNeededChars.value) pPrereleaseInfoBuffer = (ctypes.c_char * (nPrereleaseInfoNeededChars.value))() @@ -6769,11 +7279,11 @@ def GetPrereleaseInformation(self): return pHasPrereleaseInfo.value, pPrereleaseInfoBuffer.value.decode() - def GetBuildInformation(self): + def GetBuildInformation(self, BuildInformation = None): pHasBuildInfo = ctypes.c_bool() - nBuildInformationBufferSize = ctypes.c_uint64(0) + nBuildInformationBufferSize = ctypes.c_uint64(len(BuildInformation) if BuildInformation else 0) nBuildInformationNeededChars = ctypes.c_uint64(0) - pBuildInformationBuffer = ctypes.c_char_p(None) + pBuildInformationBuffer = ctypes.c_char_p(str.encode(BuildInformation) if BuildInformation else None) self.checkError(None, self.lib.lib3mf_getbuildinformation(pHasBuildInfo, nBuildInformationBufferSize, nBuildInformationNeededChars, pBuildInformationBuffer)) nBuildInformationBufferSize = ctypes.c_uint64(nBuildInformationNeededChars.value) pBuildInformationBuffer = (ctypes.c_char * (nBuildInformationNeededChars.value))() @@ -6781,12 +7291,12 @@ def GetBuildInformation(self): return pHasBuildInfo.value, pBuildInformationBuffer.value.decode() - def GetSpecificationVersion(self, SpecificationURL): + def GetSpecificationVersion(self, SpecificationURL, IsSupported = None, Major = None, Minor = None, Micro = None): pSpecificationURL = ctypes.c_char_p(str.encode(SpecificationURL)) - pIsSupported = ctypes.c_bool() - pMajor = ctypes.c_uint32() - pMinor = ctypes.c_uint32() - pMicro = ctypes.c_uint32() + pIsSupported = ctypes.c_bool(IsSupported if IsSupported is not None else 0) + pMajor = ctypes.c_uint32(Major if Major is not None else 0) + pMinor = ctypes.c_uint32(Minor if Minor is not None else 0) + pMicro = ctypes.c_uint32(Micro if Micro is not None else 0) self.checkError(None, self.lib.lib3mf_getspecificationversion(pSpecificationURL, pIsSupported, pMajor, pMinor, pMicro)) return pIsSupported.value, pMajor.value, pMinor.value, pMicro.value @@ -6824,15 +7334,15 @@ def SetJournal(self, JournalPath): self.checkError(None, self.lib.lib3mf_setjournal(pJournalPath)) - def GetLastError(self, InstanceObject): + def GetLastError(self, InstanceObject, LastErrorString = None): InstanceHandle = None if InstanceObject: InstanceHandle = InstanceObject._handle else: raise ELib3MFException(ErrorCodes.INVALIDPARAM, 'Invalid return/output value') - nLastErrorStringBufferSize = ctypes.c_uint64(0) + nLastErrorStringBufferSize = ctypes.c_uint64(len(LastErrorString) if LastErrorString else 0) nLastErrorStringNeededChars = ctypes.c_uint64(0) - pLastErrorStringBuffer = ctypes.c_char_p(None) + pLastErrorStringBuffer = ctypes.c_char_p(str.encode(LastErrorString) if LastErrorString else None) pHasLastError = ctypes.c_bool() self.checkError(None, self.lib.lib3mf_getlasterror(InstanceHandle, nLastErrorStringBufferSize, nLastErrorStringNeededChars, pLastErrorStringBuffer, pHasLastError)) nLastErrorStringBufferSize = ctypes.c_uint64(nLastErrorStringNeededChars.value) @@ -6847,10 +7357,10 @@ def GetSymbolLookupMethod(self): return pSymbolLookupMethod.value - def RetrieveProgressMessage(self, TheProgressIdentifier): - nProgressMessageBufferSize = ctypes.c_uint64(0) + def RetrieveProgressMessage(self, TheProgressIdentifier, ProgressMessage = None): + nProgressMessageBufferSize = ctypes.c_uint64(len(ProgressMessage) if ProgressMessage else 0) nProgressMessageNeededChars = ctypes.c_uint64(0) - pProgressMessageBuffer = ctypes.c_char_p(None) + pProgressMessageBuffer = ctypes.c_char_p(str.encode(ProgressMessage) if ProgressMessage else None) self.checkError(None, self.lib.lib3mf_retrieveprogressmessage(TheProgressIdentifier, nProgressMessageBufferSize, nProgressMessageNeededChars, pProgressMessageBuffer)) nProgressMessageBufferSize = ctypes.c_uint64(nProgressMessageNeededChars.value) pProgressMessageBuffer = (ctypes.c_char * (nProgressMessageNeededChars.value))() @@ -6878,20 +7388,20 @@ def FloatRGBAToColor(self, Red, Green, Blue, Alpha): return pTheColor - def ColorToRGBA(self, TheColor): - pRed = ctypes.c_uint8() - pGreen = ctypes.c_uint8() - pBlue = ctypes.c_uint8() - pAlpha = ctypes.c_uint8() + def ColorToRGBA(self, TheColor, Red = None, Green = None, Blue = None, Alpha = None): + pRed = ctypes.c_uint8(Red if Red is not None else 0) + pGreen = ctypes.c_uint8(Green if Green is not None else 0) + pBlue = ctypes.c_uint8(Blue if Blue is not None else 0) + pAlpha = ctypes.c_uint8(Alpha if Alpha is not None else 0) self.checkError(None, self.lib.lib3mf_colortorgba(TheColor, pRed, pGreen, pBlue, pAlpha)) return pRed.value, pGreen.value, pBlue.value, pAlpha.value - def ColorToFloatRGBA(self, TheColor): - pRed = ctypes.c_float() - pGreen = ctypes.c_float() - pBlue = ctypes.c_float() - pAlpha = ctypes.c_float() + def ColorToFloatRGBA(self, TheColor, Red = None, Green = None, Blue = None, Alpha = None): + pRed = ctypes.c_float(Red if Red is not None else 0) + pGreen = ctypes.c_float(Green if Green is not None else 0) + pBlue = ctypes.c_float(Blue if Blue is not None else 0) + pAlpha = ctypes.c_float(Alpha if Alpha is not None else 0) self.checkError(None, self.lib.lib3mf_colortofloatrgba(TheColor, pRed, pGreen, pBlue, pAlpha)) return pRed.value, pGreen.value, pBlue.value, pAlpha.value @@ -7139,6 +7649,12 @@ def getObjectById_53601FD432E3DEF4(self, handle, wrapper): # First 64 bits of SH return MeshNode(handle, wrapper) def getObjectById_29985A628251A9CD(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::UnsignedMeshNode" return UnsignedMeshNode(handle, wrapper) + def getObjectById_0F3A4EE98F7FEC0C(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::BeamLatticeNode" + return BeamLatticeNode(handle, wrapper) + def getObjectById_0437E27AEF740121(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::FunctionGradientNode" + return FunctionGradientNode(handle, wrapper) + def getObjectById_817D2E566E73AA8F(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::NormalizeDistanceNode" + return NormalizeDistanceNode(handle, wrapper) def getObjectById_0765C17C952F24E3(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::FunctionCallNode" return FunctionCallNode(handle, wrapper) def getObjectById_FC006BC888CAB4D0(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::NodeIterator" @@ -7216,16 +7732,16 @@ def GetStreamSize(self): return pStreamSize.value - def WriteToBuffer(self): - nBufferCount = ctypes.c_uint64(0) + def WriteToBuffer(self, Buffer = None): + nBufferCount = ctypes.c_uint64(len(Buffer) if Buffer else 0) nBufferNeededCount = ctypes.c_uint64(0) - pBufferBuffer = (ctypes.c_uint8*0)() + pBufferBuffer = (ctypes.c_uint8*(len(Buffer) if Buffer else 0))(*Buffer if Buffer else []) self._wrapper.checkError(self, self._wrapper.lib.lib3mf_writer_writetobuffer(self._handle, nBufferCount, nBufferNeededCount, pBufferBuffer)) nBufferCount = ctypes.c_uint64(nBufferNeededCount.value) pBufferBuffer = (ctypes.c_uint8 * nBufferNeededCount.value)() self._wrapper.checkError(self, self._wrapper.lib.lib3mf_writer_writetobuffer(self._handle, nBufferCount, nBufferNeededCount, pBufferBuffer)) - return [pBufferBuffer[i] for i in range(nBufferNeededCount.value)] + return list(pBufferBuffer) def WriteToCallback(self, TheWriteCallbackFunc, TheSeekCallbackFunc, UserData): pUserData = ctypes.c_void_p(UserData) @@ -7259,9 +7775,9 @@ def GetStrictModeActive(self): return pStrictModeActive.value - def GetWarning(self, Index): + def GetWarning(self, Index, ErrorCode = None): nIndex = ctypes.c_uint32(Index) - pErrorCode = ctypes.c_uint32() + pErrorCode = ctypes.c_uint32(ErrorCode if ErrorCode is not None else 0) nWarningBufferSize = ctypes.c_uint64(0) nWarningNeededChars = ctypes.c_uint64(0) pWarningBuffer = ctypes.c_char_p(None) @@ -7339,9 +7855,9 @@ def GetStrictModeActive(self): return pStrictModeActive.value - def GetWarning(self, Index): + def GetWarning(self, Index, ErrorCode = None): nIndex = ctypes.c_uint32(Index) - pErrorCode = ctypes.c_uint32() + pErrorCode = ctypes.c_uint32(ErrorCode if ErrorCode is not None else 0) nWarningBufferSize = ctypes.c_uint64(0) nWarningNeededChars = ctypes.c_uint64(0) pWarningBuffer = ctypes.c_char_p(None) @@ -7919,16 +8435,16 @@ def SetTriangleList(self, TriangleIndices): self._wrapper.checkError(self, self._wrapper.lib.lib3mf_triangleset_settrianglelist(self._handle, nTriangleIndicesCount, pTriangleIndicesBuffer)) - def GetTriangleList(self): - nTriangleIndicesCount = ctypes.c_uint64(0) + def GetTriangleList(self, TriangleIndices = None): + nTriangleIndicesCount = ctypes.c_uint64(len(TriangleIndices) if TriangleIndices else 0) nTriangleIndicesNeededCount = ctypes.c_uint64(0) - pTriangleIndicesBuffer = (ctypes.c_uint32*0)() + pTriangleIndicesBuffer = (ctypes.c_uint32*(len(TriangleIndices) if TriangleIndices else 0))(*TriangleIndices if TriangleIndices else []) self._wrapper.checkError(self, self._wrapper.lib.lib3mf_triangleset_gettrianglelist(self._handle, nTriangleIndicesCount, nTriangleIndicesNeededCount, pTriangleIndicesBuffer)) nTriangleIndicesCount = ctypes.c_uint64(nTriangleIndicesNeededCount.value) pTriangleIndicesBuffer = (ctypes.c_uint32 * nTriangleIndicesNeededCount.value)() self._wrapper.checkError(self, self._wrapper.lib.lib3mf_triangleset_gettrianglelist(self._handle, nTriangleIndicesCount, nTriangleIndicesNeededCount, pTriangleIndicesBuffer)) - return [pTriangleIndicesBuffer[i] for i in range(nTriangleIndicesNeededCount.value)] + return list(pTriangleIndicesBuffer) def AddTriangleList(self, TriangleIndices): nTriangleIndicesCount = ctypes.c_uint64(len(TriangleIndices)) @@ -8063,8 +8579,8 @@ def GetOutbox(self): return pOutbox - def GetUUID(self): - pHasUUID = ctypes.c_bool() + def GetUUID(self, HasUUID = None): + pHasUUID = ctypes.c_bool(HasUUID if HasUUID is not None else 0) nUUIDBufferSize = ctypes.c_uint64(0) nUUIDNeededChars = ctypes.c_uint64(0) pUUIDBuffer = ctypes.c_char_p(None) @@ -8167,16 +8683,16 @@ def AddVertex(self, Coordinates): return pNewIndex.value - def GetVertices(self): - nVerticesCount = ctypes.c_uint64(0) + def GetVertices(self, Vertices = None): + nVerticesCount = ctypes.c_uint64(len(Vertices) if Vertices else 0) nVerticesNeededCount = ctypes.c_uint64(0) - pVerticesBuffer = (Position*0)() + pVerticesBuffer = (Position*(len(Vertices) if Vertices else 0))(*Vertices if Vertices else []) self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_getvertices(self._handle, nVerticesCount, nVerticesNeededCount, pVerticesBuffer)) nVerticesCount = ctypes.c_uint64(nVerticesNeededCount.value) pVerticesBuffer = (Position * nVerticesNeededCount.value)() self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_getvertices(self._handle, nVerticesCount, nVerticesNeededCount, pVerticesBuffer)) - return [pVerticesBuffer[i] for i in range(nVerticesNeededCount.value)] + return list(pVerticesBuffer) def GetTriangle(self, Index): nIndex = ctypes.c_uint32(Index) @@ -8196,16 +8712,16 @@ def AddTriangle(self, Indices): return pNewIndex.value - def GetTriangleIndices(self): - nIndicesCount = ctypes.c_uint64(0) + def GetTriangleIndices(self, Indices = None): + nIndicesCount = ctypes.c_uint64(len(Indices) if Indices else 0) nIndicesNeededCount = ctypes.c_uint64(0) - pIndicesBuffer = (Triangle*0)() + pIndicesBuffer = (Triangle*(len(Indices) if Indices else 0))(*Indices if Indices else []) self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_gettriangleindices(self._handle, nIndicesCount, nIndicesNeededCount, pIndicesBuffer)) nIndicesCount = ctypes.c_uint64(nIndicesNeededCount.value) pIndicesBuffer = (Triangle * nIndicesNeededCount.value)() self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_gettriangleindices(self._handle, nIndicesCount, nIndicesNeededCount, pIndicesBuffer)) - return [pIndicesBuffer[i] for i in range(nIndicesNeededCount.value)] + return list(pIndicesBuffer) def SetObjectLevelProperty(self, UniqueResourceID, PropertyID): nUniqueResourceID = ctypes.c_uint32(UniqueResourceID) @@ -8213,9 +8729,9 @@ def SetObjectLevelProperty(self, UniqueResourceID, PropertyID): self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_setobjectlevelproperty(self._handle, nUniqueResourceID, nPropertyID)) - def GetObjectLevelProperty(self): - pUniqueResourceID = ctypes.c_uint32() - pPropertyID = ctypes.c_uint32() + def GetObjectLevelProperty(self, UniqueResourceID = None, PropertyID = None): + pUniqueResourceID = ctypes.c_uint32(UniqueResourceID if UniqueResourceID is not None else 0) + pPropertyID = ctypes.c_uint32(PropertyID if PropertyID is not None else 0) pHasObjectLevelProperty = ctypes.c_bool() self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_getobjectlevelproperty(self._handle, pUniqueResourceID, pPropertyID, pHasObjectLevelProperty)) @@ -8226,9 +8742,9 @@ def SetTriangleProperties(self, Index, Properties): self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_settriangleproperties(self._handle, nIndex, Properties)) - def GetTriangleProperties(self, Index): + def GetTriangleProperties(self, Index, Property = None): nIndex = ctypes.c_uint32(Index) - pProperty = TriangleProperties() + pProperty = Property if Property is not None else TriangleProperties() self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_gettriangleproperties(self._handle, nIndex, pProperty)) return pProperty @@ -8239,16 +8755,16 @@ def SetAllTriangleProperties(self, PropertiesArray): self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_setalltriangleproperties(self._handle, nPropertiesArrayCount, pPropertiesArrayBuffer)) - def GetAllTriangleProperties(self): - nPropertiesArrayCount = ctypes.c_uint64(0) + def GetAllTriangleProperties(self, PropertiesArray = None): + nPropertiesArrayCount = ctypes.c_uint64(len(PropertiesArray) if PropertiesArray else 0) nPropertiesArrayNeededCount = ctypes.c_uint64(0) - pPropertiesArrayBuffer = (TriangleProperties*0)() + pPropertiesArrayBuffer = (TriangleProperties*(len(PropertiesArray) if PropertiesArray else 0))(*PropertiesArray if PropertiesArray else []) self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_getalltriangleproperties(self._handle, nPropertiesArrayCount, nPropertiesArrayNeededCount, pPropertiesArrayBuffer)) nPropertiesArrayCount = ctypes.c_uint64(nPropertiesArrayNeededCount.value) pPropertiesArrayBuffer = (TriangleProperties * nPropertiesArrayNeededCount.value)() self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_getalltriangleproperties(self._handle, nPropertiesArrayCount, nPropertiesArrayNeededCount, pPropertiesArrayBuffer)) - return [pPropertiesArrayBuffer[i] for i in range(nPropertiesArrayNeededCount.value)] + return list(pPropertiesArrayBuffer) def ClearAllProperties(self): self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_clearallproperties(self._handle)) @@ -8485,21 +9001,21 @@ def SetMinLength(self, MinLength): self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_setminlength(self._handle, dMinLength)) - def GetClipping(self): - pClipMode = ctypes.c_int32() - pUniqueResourceID = ctypes.c_uint32() + def GetClipping(self, ClipMode = None, UniqueResourceID = None): + pClipMode = ctypes.c_int32(ClipMode if ClipMode else 0) + pUniqueResourceID = ctypes.c_uint32(UniqueResourceID if UniqueResourceID is not None else 0) self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_getclipping(self._handle, pClipMode, pUniqueResourceID)) - return BeamLatticeClipMode(pClipMode.value), pUniqueResourceID.value + return pClipMode.value, pUniqueResourceID.value def SetClipping(self, ClipMode, UniqueResourceID): nUniqueResourceID = ctypes.c_uint32(UniqueResourceID) self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_setclipping(self._handle, ClipMode, nUniqueResourceID)) - def GetRepresentation(self): + def GetRepresentation(self, UniqueResourceID = None): pHasRepresentation = ctypes.c_bool() - pUniqueResourceID = ctypes.c_uint32() + pUniqueResourceID = ctypes.c_uint32(UniqueResourceID if UniqueResourceID is not None else 0) self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_getrepresentation(self._handle, pHasRepresentation, pUniqueResourceID)) return pHasRepresentation.value, pUniqueResourceID.value @@ -8509,12 +9025,12 @@ def SetRepresentation(self, UniqueResourceID): self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_setrepresentation(self._handle, nUniqueResourceID)) - def GetBallOptions(self): - pBallMode = ctypes.c_int32() - pBallRadius = ctypes.c_double() + def GetBallOptions(self, BallMode = None, BallRadius = None): + pBallMode = ctypes.c_int32(BallMode if BallMode else 0) + pBallRadius = ctypes.c_double(BallRadius if BallRadius is not None else 0) self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_getballoptions(self._handle, pBallMode, pBallRadius)) - return BeamLatticeBallMode(pBallMode.value), pBallRadius.value + return pBallMode.value, pBallRadius.value def SetBallOptions(self, BallMode, BallRadius): dBallRadius = ctypes.c_double(BallRadius) @@ -8551,16 +9067,16 @@ def SetBeams(self, BeamInfo): self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_setbeams(self._handle, nBeamInfoCount, pBeamInfoBuffer)) - def GetBeams(self): - nBeamInfoCount = ctypes.c_uint64(0) + def GetBeams(self, BeamInfo = None): + nBeamInfoCount = ctypes.c_uint64(len(BeamInfo) if BeamInfo else 0) nBeamInfoNeededCount = ctypes.c_uint64(0) - pBeamInfoBuffer = (Beam*0)() + pBeamInfoBuffer = (Beam*(len(BeamInfo) if BeamInfo else 0))(*BeamInfo if BeamInfo else []) self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_getbeams(self._handle, nBeamInfoCount, nBeamInfoNeededCount, pBeamInfoBuffer)) nBeamInfoCount = ctypes.c_uint64(nBeamInfoNeededCount.value) pBeamInfoBuffer = (Beam * nBeamInfoNeededCount.value)() self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_getbeams(self._handle, nBeamInfoCount, nBeamInfoNeededCount, pBeamInfoBuffer)) - return [pBeamInfoBuffer[i] for i in range(nBeamInfoNeededCount.value)] + return list(pBeamInfoBuffer) def GetBallCount(self): pCount = ctypes.c_uint32() @@ -8592,16 +9108,16 @@ def SetBalls(self, BallInfo): self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_setballs(self._handle, nBallInfoCount, pBallInfoBuffer)) - def GetBalls(self): - nBallInfoCount = ctypes.c_uint64(0) + def GetBalls(self, BallInfo = None): + nBallInfoCount = ctypes.c_uint64(len(BallInfo) if BallInfo else 0) nBallInfoNeededCount = ctypes.c_uint64(0) - pBallInfoBuffer = (Ball*0)() + pBallInfoBuffer = (Ball*(len(BallInfo) if BallInfo else 0))(*BallInfo if BallInfo else []) self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_getballs(self._handle, nBallInfoCount, nBallInfoNeededCount, pBallInfoBuffer)) nBallInfoCount = ctypes.c_uint64(nBallInfoNeededCount.value) pBallInfoBuffer = (Ball * nBallInfoNeededCount.value)() self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_getballs(self._handle, nBallInfoCount, nBallInfoNeededCount, pBallInfoBuffer)) - return [pBallInfoBuffer[i] for i in range(nBallInfoNeededCount.value)] + return list(pBallInfoBuffer) def GetBeamSetCount(self): pCount = ctypes.c_uint32() @@ -8918,8 +9434,8 @@ def GetObjectResourceID(self): return pUniqueResourceID.value - def GetUUID(self): - pHasUUID = ctypes.c_bool() + def GetUUID(self, HasUUID = None): + pHasUUID = ctypes.c_bool(HasUUID if HasUUID is not None else 0) nUUIDBufferSize = ctypes.c_uint64(0) nUUIDNeededChars = ctypes.c_uint64(0) pUUIDBuffer = ctypes.c_char_p(None) @@ -9041,16 +9557,16 @@ def SetReferences(self, References): self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamset_setreferences(self._handle, nReferencesCount, pReferencesBuffer)) - def GetReferences(self): - nReferencesCount = ctypes.c_uint64(0) + def GetReferences(self, References = None): + nReferencesCount = ctypes.c_uint64(len(References) if References else 0) nReferencesNeededCount = ctypes.c_uint64(0) - pReferencesBuffer = (ctypes.c_uint32*0)() + pReferencesBuffer = (ctypes.c_uint32*(len(References) if References else 0))(*References if References else []) self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamset_getreferences(self._handle, nReferencesCount, nReferencesNeededCount, pReferencesBuffer)) nReferencesCount = ctypes.c_uint64(nReferencesNeededCount.value) pReferencesBuffer = (ctypes.c_uint32 * nReferencesNeededCount.value)() self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamset_getreferences(self._handle, nReferencesCount, nReferencesNeededCount, pReferencesBuffer)) - return [pReferencesBuffer[i] for i in range(nReferencesNeededCount.value)] + return list(pReferencesBuffer) def GetBallReferenceCount(self): pCount = ctypes.c_uint32() @@ -9064,16 +9580,16 @@ def SetBallReferences(self, BallReferences): self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamset_setballreferences(self._handle, nBallReferencesCount, pBallReferencesBuffer)) - def GetBallReferences(self): - nBallReferencesCount = ctypes.c_uint64(0) + def GetBallReferences(self, BallReferences = None): + nBallReferencesCount = ctypes.c_uint64(len(BallReferences) if BallReferences else 0) nBallReferencesNeededCount = ctypes.c_uint64(0) - pBallReferencesBuffer = (ctypes.c_uint32*0)() + pBallReferencesBuffer = (ctypes.c_uint32*(len(BallReferences) if BallReferences else 0))(*BallReferences if BallReferences else []) self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamset_getballreferences(self._handle, nBallReferencesCount, nBallReferencesNeededCount, pBallReferencesBuffer)) nBallReferencesCount = ctypes.c_uint64(nBallReferencesNeededCount.value) pBallReferencesBuffer = (ctypes.c_uint32 * nBallReferencesNeededCount.value)() self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamset_getballreferences(self._handle, nBallReferencesCount, nBallReferencesNeededCount, pBallReferencesBuffer)) - return [pBallReferencesBuffer[i] for i in range(nBallReferencesNeededCount.value)] + return list(pBallReferencesBuffer) @@ -9088,16 +9604,16 @@ def GetCount(self): return pCount.value - def GetAllPropertyIDs(self): - nPropertyIDsCount = ctypes.c_uint64(0) + def GetAllPropertyIDs(self, PropertyIDs = None): + nPropertyIDsCount = ctypes.c_uint64(len(PropertyIDs) if PropertyIDs else 0) nPropertyIDsNeededCount = ctypes.c_uint64(0) - pPropertyIDsBuffer = (ctypes.c_uint32*0)() + pPropertyIDsBuffer = (ctypes.c_uint32*(len(PropertyIDs) if PropertyIDs else 0))(*PropertyIDs if PropertyIDs else []) self._wrapper.checkError(self, self._wrapper.lib.lib3mf_basematerialgroup_getallpropertyids(self._handle, nPropertyIDsCount, nPropertyIDsNeededCount, pPropertyIDsBuffer)) nPropertyIDsCount = ctypes.c_uint64(nPropertyIDsNeededCount.value) pPropertyIDsBuffer = (ctypes.c_uint32 * nPropertyIDsNeededCount.value)() self._wrapper.checkError(self, self._wrapper.lib.lib3mf_basematerialgroup_getallpropertyids(self._handle, nPropertyIDsCount, nPropertyIDsNeededCount, pPropertyIDsBuffer)) - return [pPropertyIDsBuffer[i] for i in range(nPropertyIDsNeededCount.value)] + return list(pPropertyIDsBuffer) def AddMaterial(self, Name, DisplayColor): pName = ctypes.c_char_p(str.encode(Name)) @@ -9154,16 +9670,16 @@ def GetCount(self): return pCount.value - def GetAllPropertyIDs(self): - nPropertyIDsCount = ctypes.c_uint64(0) + def GetAllPropertyIDs(self, PropertyIDs = None): + nPropertyIDsCount = ctypes.c_uint64(len(PropertyIDs) if PropertyIDs else 0) nPropertyIDsNeededCount = ctypes.c_uint64(0) - pPropertyIDsBuffer = (ctypes.c_uint32*0)() + pPropertyIDsBuffer = (ctypes.c_uint32*(len(PropertyIDs) if PropertyIDs else 0))(*PropertyIDs if PropertyIDs else []) self._wrapper.checkError(self, self._wrapper.lib.lib3mf_colorgroup_getallpropertyids(self._handle, nPropertyIDsCount, nPropertyIDsNeededCount, pPropertyIDsBuffer)) nPropertyIDsCount = ctypes.c_uint64(nPropertyIDsNeededCount.value) pPropertyIDsBuffer = (ctypes.c_uint32 * nPropertyIDsNeededCount.value)() self._wrapper.checkError(self, self._wrapper.lib.lib3mf_colorgroup_getallpropertyids(self._handle, nPropertyIDsCount, nPropertyIDsNeededCount, pPropertyIDsBuffer)) - return [pPropertyIDsBuffer[i] for i in range(nPropertyIDsNeededCount.value)] + return list(pPropertyIDsBuffer) def AddColor(self, TheColor): pPropertyID = ctypes.c_uint32() @@ -9201,16 +9717,16 @@ def GetCount(self): return pCount.value - def GetAllPropertyIDs(self): - nPropertyIDsCount = ctypes.c_uint64(0) + def GetAllPropertyIDs(self, PropertyIDs = None): + nPropertyIDsCount = ctypes.c_uint64(len(PropertyIDs) if PropertyIDs else 0) nPropertyIDsNeededCount = ctypes.c_uint64(0) - pPropertyIDsBuffer = (ctypes.c_uint32*0)() + pPropertyIDsBuffer = (ctypes.c_uint32*(len(PropertyIDs) if PropertyIDs else 0))(*PropertyIDs if PropertyIDs else []) self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2dgroup_getallpropertyids(self._handle, nPropertyIDsCount, nPropertyIDsNeededCount, pPropertyIDsBuffer)) nPropertyIDsCount = ctypes.c_uint64(nPropertyIDsNeededCount.value) pPropertyIDsBuffer = (ctypes.c_uint32 * nPropertyIDsNeededCount.value)() self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2dgroup_getallpropertyids(self._handle, nPropertyIDsCount, nPropertyIDsNeededCount, pPropertyIDsBuffer)) - return [pPropertyIDsBuffer[i] for i in range(nPropertyIDsNeededCount.value)] + return list(pPropertyIDsBuffer) def AddTex2Coord(self, UVCoordinate): pPropertyID = ctypes.c_uint32() @@ -9253,16 +9769,16 @@ def GetCount(self): return pCount.value - def GetAllPropertyIDs(self): - nPropertyIDsCount = ctypes.c_uint64(0) + def GetAllPropertyIDs(self, PropertyIDs = None): + nPropertyIDsCount = ctypes.c_uint64(len(PropertyIDs) if PropertyIDs else 0) nPropertyIDsNeededCount = ctypes.c_uint64(0) - pPropertyIDsBuffer = (ctypes.c_uint32*0)() + pPropertyIDsBuffer = (ctypes.c_uint32*(len(PropertyIDs) if PropertyIDs else 0))(*PropertyIDs if PropertyIDs else []) self._wrapper.checkError(self, self._wrapper.lib.lib3mf_compositematerials_getallpropertyids(self._handle, nPropertyIDsCount, nPropertyIDsNeededCount, pPropertyIDsBuffer)) nPropertyIDsCount = ctypes.c_uint64(nPropertyIDsNeededCount.value) pPropertyIDsBuffer = (ctypes.c_uint32 * nPropertyIDsNeededCount.value)() self._wrapper.checkError(self, self._wrapper.lib.lib3mf_compositematerials_getallpropertyids(self._handle, nPropertyIDsCount, nPropertyIDsNeededCount, pPropertyIDsBuffer)) - return [pPropertyIDsBuffer[i] for i in range(nPropertyIDsNeededCount.value)] + return list(pPropertyIDsBuffer) def GetBaseMaterialGroup(self): BaseMaterialGroupInstanceHandle = ctypes.c_void_p() @@ -9287,17 +9803,17 @@ def RemoveComposite(self, PropertyID): self._wrapper.checkError(self, self._wrapper.lib.lib3mf_compositematerials_removecomposite(self._handle, nPropertyID)) - def GetComposite(self, PropertyID): + def GetComposite(self, PropertyID, Composite = None): nPropertyID = ctypes.c_uint32(PropertyID) - nCompositeCount = ctypes.c_uint64(0) + nCompositeCount = ctypes.c_uint64(len(Composite) if Composite else 0) nCompositeNeededCount = ctypes.c_uint64(0) - pCompositeBuffer = (CompositeConstituent*0)() + pCompositeBuffer = (CompositeConstituent*(len(Composite) if Composite else 0))(*Composite if Composite else []) self._wrapper.checkError(self, self._wrapper.lib.lib3mf_compositematerials_getcomposite(self._handle, nPropertyID, nCompositeCount, nCompositeNeededCount, pCompositeBuffer)) nCompositeCount = ctypes.c_uint64(nCompositeNeededCount.value) pCompositeBuffer = (CompositeConstituent * nCompositeNeededCount.value)() self._wrapper.checkError(self, self._wrapper.lib.lib3mf_compositematerials_getcomposite(self._handle, nPropertyID, nCompositeCount, nCompositeNeededCount, pCompositeBuffer)) - return [pCompositeBuffer[i] for i in range(nCompositeNeededCount.value)] + return list(pCompositeBuffer) @@ -9312,16 +9828,16 @@ def GetCount(self): return pCount.value - def GetAllPropertyIDs(self): - nPropertyIDsCount = ctypes.c_uint64(0) + def GetAllPropertyIDs(self, PropertyIDs = None): + nPropertyIDsCount = ctypes.c_uint64(len(PropertyIDs) if PropertyIDs else 0) nPropertyIDsNeededCount = ctypes.c_uint64(0) - pPropertyIDsBuffer = (ctypes.c_uint32*0)() + pPropertyIDsBuffer = (ctypes.c_uint32*(len(PropertyIDs) if PropertyIDs else 0))(*PropertyIDs if PropertyIDs else []) self._wrapper.checkError(self, self._wrapper.lib.lib3mf_multipropertygroup_getallpropertyids(self._handle, nPropertyIDsCount, nPropertyIDsNeededCount, pPropertyIDsBuffer)) nPropertyIDsCount = ctypes.c_uint64(nPropertyIDsNeededCount.value) pPropertyIDsBuffer = (ctypes.c_uint32 * nPropertyIDsNeededCount.value)() self._wrapper.checkError(self, self._wrapper.lib.lib3mf_multipropertygroup_getallpropertyids(self._handle, nPropertyIDsCount, nPropertyIDsNeededCount, pPropertyIDsBuffer)) - return [pPropertyIDsBuffer[i] for i in range(nPropertyIDsNeededCount.value)] + return list(pPropertyIDsBuffer) def AddMultiProperty(self, PropertyIDs): nPropertyIDsCount = ctypes.c_uint64(len(PropertyIDs)) @@ -9338,17 +9854,17 @@ def SetMultiProperty(self, PropertyID, PropertyIDs): self._wrapper.checkError(self, self._wrapper.lib.lib3mf_multipropertygroup_setmultiproperty(self._handle, nPropertyID, nPropertyIDsCount, pPropertyIDsBuffer)) - def GetMultiProperty(self, PropertyID): + def GetMultiProperty(self, PropertyID, PropertyIDs = None): nPropertyID = ctypes.c_uint32(PropertyID) - nPropertyIDsCount = ctypes.c_uint64(0) + nPropertyIDsCount = ctypes.c_uint64(len(PropertyIDs) if PropertyIDs else 0) nPropertyIDsNeededCount = ctypes.c_uint64(0) - pPropertyIDsBuffer = (ctypes.c_uint32*0)() + pPropertyIDsBuffer = (ctypes.c_uint32*(len(PropertyIDs) if PropertyIDs else 0))(*PropertyIDs if PropertyIDs else []) self._wrapper.checkError(self, self._wrapper.lib.lib3mf_multipropertygroup_getmultiproperty(self._handle, nPropertyID, nPropertyIDsCount, nPropertyIDsNeededCount, pPropertyIDsBuffer)) nPropertyIDsCount = ctypes.c_uint64(nPropertyIDsNeededCount.value) pPropertyIDsBuffer = (ctypes.c_uint32 * nPropertyIDsNeededCount.value)() self._wrapper.checkError(self, self._wrapper.lib.lib3mf_multipropertygroup_getmultiproperty(self._handle, nPropertyID, nPropertyIDsCount, nPropertyIDsNeededCount, pPropertyIDsBuffer)) - return [pPropertyIDsBuffer[i] for i in range(nPropertyIDsNeededCount.value)] + return list(pPropertyIDsBuffer) def RemoveMultiProperty(self, PropertyID): nPropertyID = ctypes.c_uint32(PropertyID) @@ -9574,16 +10090,16 @@ def GetStreamSize(self): return pStreamSize.value - def WriteToBuffer(self): - nBufferCount = ctypes.c_uint64(0) + def WriteToBuffer(self, Buffer = None): + nBufferCount = ctypes.c_uint64(len(Buffer) if Buffer else 0) nBufferNeededCount = ctypes.c_uint64(0) - pBufferBuffer = (ctypes.c_uint8*0)() + pBufferBuffer = (ctypes.c_uint8*(len(Buffer) if Buffer else 0))(*Buffer if Buffer else []) self._wrapper.checkError(self, self._wrapper.lib.lib3mf_attachment_writetobuffer(self._handle, nBufferCount, nBufferNeededCount, pBufferBuffer)) nBufferCount = ctypes.c_uint64(nBufferNeededCount.value) pBufferBuffer = (ctypes.c_uint8 * nBufferNeededCount.value)() self._wrapper.checkError(self, self._wrapper.lib.lib3mf_attachment_writetobuffer(self._handle, nBufferCount, nBufferNeededCount, pBufferBuffer)) - return [pBufferBuffer[i] for i in range(nBufferNeededCount.value)] + return list(pBufferBuffer) def ReadFromBuffer(self, Buffer): nBufferCount = ctypes.c_uint64(len(Buffer)) @@ -9627,12 +10143,12 @@ def SetContentType(self, ContentType): self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2d_setcontenttype(self._handle, ContentType)) - def GetTileStyleUV(self): - pTileStyleU = ctypes.c_int32() - pTileStyleV = ctypes.c_int32() + def GetTileStyleUV(self, TileStyleU = None, TileStyleV = None): + pTileStyleU = ctypes.c_int32(TileStyleU if TileStyleU else 0) + pTileStyleV = ctypes.c_int32(TileStyleV if TileStyleV else 0) self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2d_gettilestyleuv(self._handle, pTileStyleU, pTileStyleV)) - return TextureTileStyle(pTileStyleU.value), TextureTileStyle(pTileStyleV.value) + return pTileStyleU.value, pTileStyleV.value def SetTileStyleUV(self, TileStyleU, TileStyleV): self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2d_settilestyleuv(self._handle, TileStyleU, TileStyleV)) @@ -10834,6 +11350,232 @@ def GetOutputDistance(self): +''' Class Implementation for BeamLatticeNode +''' +class BeamLatticeNode(ImplicitNode): + def __init__(self, handle, wrapper): + ImplicitNode.__init__(self, handle, wrapper) + def GetInputBeamLattice(self): + BeamLatticeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlatticenode_getinputbeamlattice(self._handle, BeamLatticeHandle)) + if BeamLatticeHandle: + BeamLatticeObject = self._wrapper._polymorphicFactory(BeamLatticeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return BeamLatticeObject + + def GetInputPos(self): + PosHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlatticenode_getinputpos(self._handle, PosHandle)) + if PosHandle: + PosObject = self._wrapper._polymorphicFactory(PosHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return PosObject + + def GetOutputDistance(self): + DistanceHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlatticenode_getoutputdistance(self._handle, DistanceHandle)) + if DistanceHandle: + DistanceObject = self._wrapper._polymorphicFactory(DistanceHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return DistanceObject + + def SetAccurateRange(self, AccurateRange): + dAccurateRange = ctypes.c_double(AccurateRange) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlatticenode_setaccuraterange(self._handle, dAccurateRange)) + + + def GetAccurateRange(self): + pAccurateRange = ctypes.c_double() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlatticenode_getaccuraterange(self._handle, pAccurateRange)) + + return pAccurateRange.value + + + +''' Class Implementation for FunctionGradientNode +''' +class FunctionGradientNode(ImplicitNode): + def __init__(self, handle, wrapper): + ImplicitNode.__init__(self, handle, wrapper) + def GetInputFunctionID(self): + FunctionHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functiongradientnode_getinputfunctionid(self._handle, FunctionHandle)) + if FunctionHandle: + FunctionObject = self._wrapper._polymorphicFactory(FunctionHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return FunctionObject + + def GetInputPos(self): + PosHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functiongradientnode_getinputpos(self._handle, PosHandle)) + if PosHandle: + PosObject = self._wrapper._polymorphicFactory(PosHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return PosObject + + def GetInputStep(self): + StepHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functiongradientnode_getinputstep(self._handle, StepHandle)) + if StepHandle: + StepObject = self._wrapper._polymorphicFactory(StepHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return StepObject + + def SetScalarOutputName(self, ScalarOutputName): + pScalarOutputName = ctypes.c_char_p(str.encode(ScalarOutputName)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functiongradientnode_setscalaroutputname(self._handle, pScalarOutputName)) + + + def GetScalarOutputName(self): + nScalarOutputNameBufferSize = ctypes.c_uint64(0) + nScalarOutputNameNeededChars = ctypes.c_uint64(0) + pScalarOutputNameBuffer = ctypes.c_char_p(None) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functiongradientnode_getscalaroutputname(self._handle, nScalarOutputNameBufferSize, nScalarOutputNameNeededChars, pScalarOutputNameBuffer)) + nScalarOutputNameBufferSize = ctypes.c_uint64(nScalarOutputNameNeededChars.value) + pScalarOutputNameBuffer = (ctypes.c_char * (nScalarOutputNameNeededChars.value))() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functiongradientnode_getscalaroutputname(self._handle, nScalarOutputNameBufferSize, nScalarOutputNameNeededChars, pScalarOutputNameBuffer)) + + return pScalarOutputNameBuffer.value.decode() + + def SetVectorInputName(self, VectorInputName): + pVectorInputName = ctypes.c_char_p(str.encode(VectorInputName)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functiongradientnode_setvectorinputname(self._handle, pVectorInputName)) + + + def GetVectorInputName(self): + nVectorInputNameBufferSize = ctypes.c_uint64(0) + nVectorInputNameNeededChars = ctypes.c_uint64(0) + pVectorInputNameBuffer = ctypes.c_char_p(None) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functiongradientnode_getvectorinputname(self._handle, nVectorInputNameBufferSize, nVectorInputNameNeededChars, pVectorInputNameBuffer)) + nVectorInputNameBufferSize = ctypes.c_uint64(nVectorInputNameNeededChars.value) + pVectorInputNameBuffer = (ctypes.c_char * (nVectorInputNameNeededChars.value))() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functiongradientnode_getvectorinputname(self._handle, nVectorInputNameBufferSize, nVectorInputNameNeededChars, pVectorInputNameBuffer)) + + return pVectorInputNameBuffer.value.decode() + + def GetOutputVector(self): + VectorHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functiongradientnode_getoutputvector(self._handle, VectorHandle)) + if VectorHandle: + VectorObject = self._wrapper._polymorphicFactory(VectorHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return VectorObject + + def GetOutputGradient(self): + GradientHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functiongradientnode_getoutputgradient(self._handle, GradientHandle)) + if GradientHandle: + GradientObject = self._wrapper._polymorphicFactory(GradientHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return GradientObject + + def GetOutputMagnitude(self): + MagnitudeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functiongradientnode_getoutputmagnitude(self._handle, MagnitudeHandle)) + if MagnitudeHandle: + MagnitudeObject = self._wrapper._polymorphicFactory(MagnitudeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return MagnitudeObject + + + +''' Class Implementation for NormalizeDistanceNode +''' +class NormalizeDistanceNode(ImplicitNode): + def __init__(self, handle, wrapper): + ImplicitNode.__init__(self, handle, wrapper) + def GetInputFunctionID(self): + FunctionHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_normalizedistancenode_getinputfunctionid(self._handle, FunctionHandle)) + if FunctionHandle: + FunctionObject = self._wrapper._polymorphicFactory(FunctionHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return FunctionObject + + def GetInputPos(self): + PosHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_normalizedistancenode_getinputpos(self._handle, PosHandle)) + if PosHandle: + PosObject = self._wrapper._polymorphicFactory(PosHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return PosObject + + def GetInputStep(self): + StepHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_normalizedistancenode_getinputstep(self._handle, StepHandle)) + if StepHandle: + StepObject = self._wrapper._polymorphicFactory(StepHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return StepObject + + def SetScalarOutputName(self, ScalarOutputName): + pScalarOutputName = ctypes.c_char_p(str.encode(ScalarOutputName)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_normalizedistancenode_setscalaroutputname(self._handle, pScalarOutputName)) + + + def GetScalarOutputName(self): + nScalarOutputNameBufferSize = ctypes.c_uint64(0) + nScalarOutputNameNeededChars = ctypes.c_uint64(0) + pScalarOutputNameBuffer = ctypes.c_char_p(None) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_normalizedistancenode_getscalaroutputname(self._handle, nScalarOutputNameBufferSize, nScalarOutputNameNeededChars, pScalarOutputNameBuffer)) + nScalarOutputNameBufferSize = ctypes.c_uint64(nScalarOutputNameNeededChars.value) + pScalarOutputNameBuffer = (ctypes.c_char * (nScalarOutputNameNeededChars.value))() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_normalizedistancenode_getscalaroutputname(self._handle, nScalarOutputNameBufferSize, nScalarOutputNameNeededChars, pScalarOutputNameBuffer)) + + return pScalarOutputNameBuffer.value.decode() + + def SetVectorInputName(self, VectorInputName): + pVectorInputName = ctypes.c_char_p(str.encode(VectorInputName)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_normalizedistancenode_setvectorinputname(self._handle, pVectorInputName)) + + + def GetVectorInputName(self): + nVectorInputNameBufferSize = ctypes.c_uint64(0) + nVectorInputNameNeededChars = ctypes.c_uint64(0) + pVectorInputNameBuffer = ctypes.c_char_p(None) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_normalizedistancenode_getvectorinputname(self._handle, nVectorInputNameBufferSize, nVectorInputNameNeededChars, pVectorInputNameBuffer)) + nVectorInputNameBufferSize = ctypes.c_uint64(nVectorInputNameNeededChars.value) + pVectorInputNameBuffer = (ctypes.c_char * (nVectorInputNameNeededChars.value))() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_normalizedistancenode_getvectorinputname(self._handle, nVectorInputNameBufferSize, nVectorInputNameNeededChars, pVectorInputNameBuffer)) + + return pVectorInputNameBuffer.value.decode() + + def GetOutputResult(self): + ResultHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_normalizedistancenode_getoutputresult(self._handle, ResultHandle)) + if ResultHandle: + ResultObject = self._wrapper._polymorphicFactory(ResultHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return ResultObject + + + ''' Class Implementation for FunctionCallNode ''' class FunctionCallNode(ImplicitNode): @@ -11633,6 +12375,45 @@ def AddUnsignedMeshNode(self, Identifier, DisplayName, Tag): return NodeObject + def AddBeamLatticeNode(self, Identifier, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addbeamlatticenode(self._handle, pIdentifier, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return NodeObject + + def AddFunctionGradientNode(self, Identifier, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addfunctiongradientnode(self._handle, pIdentifier, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return NodeObject + + def AddNormalizeDistanceNode(self, Identifier, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addnormalizedistancenode(self._handle, pIdentifier, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return NodeObject + def AddFunctionCallNode(self, Identifier, DisplayName, Tag): pIdentifier = ctypes.c_char_p(str.encode(Identifier)) pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) @@ -11733,13 +12514,13 @@ def SetTileStyles(self, TileStyleU, TileStyleV, TileStyleW): self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functionfromimage3d_settilestyles(self._handle, TileStyleU, TileStyleV, TileStyleW)) - def GetTileStyles(self): - pTileStyleU = ctypes.c_int32() - pTileStyleV = ctypes.c_int32() - pTileStyleW = ctypes.c_int32() + def GetTileStyles(self, TileStyleU = None, TileStyleV = None, TileStyleW = None): + pTileStyleU = ctypes.c_int32(TileStyleU if TileStyleU else 0) + pTileStyleV = ctypes.c_int32(TileStyleV if TileStyleV else 0) + pTileStyleW = ctypes.c_int32(TileStyleW if TileStyleW else 0) self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functionfromimage3d_gettilestyles(self._handle, pTileStyleU, pTileStyleV, pTileStyleW)) - return TextureTileStyle(pTileStyleU.value), TextureTileStyle(pTileStyleV.value), TextureTileStyle(pTileStyleW.value) + return pTileStyleU.value, pTileStyleV.value, pTileStyleW.value def GetOffset(self): pOffset = ctypes.c_double() @@ -11780,8 +12561,8 @@ def GetObjectResource(self): return ObjectResourceObject - def GetUUID(self): - pHasUUID = ctypes.c_bool() + def GetUUID(self, HasUUID = None): + pHasUUID = ctypes.c_bool(HasUUID if HasUUID is not None else 0) nUUIDBufferSize = ctypes.c_uint64(0) nUUIDNeededChars = ctypes.c_uint64(0) pUUIDBuffer = ctypes.c_char_p(None) @@ -11909,16 +12690,16 @@ def SetVertices(self, Vertices): self._wrapper.checkError(self, self._wrapper.lib.lib3mf_slice_setvertices(self._handle, nVerticesCount, pVerticesBuffer)) - def GetVertices(self): - nVerticesCount = ctypes.c_uint64(0) + def GetVertices(self, Vertices = None): + nVerticesCount = ctypes.c_uint64(len(Vertices) if Vertices else 0) nVerticesNeededCount = ctypes.c_uint64(0) - pVerticesBuffer = (Position2D*0)() + pVerticesBuffer = (Position2D*(len(Vertices) if Vertices else 0))(*Vertices if Vertices else []) self._wrapper.checkError(self, self._wrapper.lib.lib3mf_slice_getvertices(self._handle, nVerticesCount, nVerticesNeededCount, pVerticesBuffer)) nVerticesCount = ctypes.c_uint64(nVerticesNeededCount.value) pVerticesBuffer = (Position2D * nVerticesNeededCount.value)() self._wrapper.checkError(self, self._wrapper.lib.lib3mf_slice_getvertices(self._handle, nVerticesCount, nVerticesNeededCount, pVerticesBuffer)) - return [pVerticesBuffer[i] for i in range(nVerticesNeededCount.value)] + return list(pVerticesBuffer) def GetVertexCount(self): pCount = ctypes.c_uint64() @@ -11947,17 +12728,17 @@ def SetPolygonIndices(self, Index, Indices): self._wrapper.checkError(self, self._wrapper.lib.lib3mf_slice_setpolygonindices(self._handle, nIndex, nIndicesCount, pIndicesBuffer)) - def GetPolygonIndices(self, Index): + def GetPolygonIndices(self, Index, Indices = None): nIndex = ctypes.c_uint64(Index) - nIndicesCount = ctypes.c_uint64(0) + nIndicesCount = ctypes.c_uint64(len(Indices) if Indices else 0) nIndicesNeededCount = ctypes.c_uint64(0) - pIndicesBuffer = (ctypes.c_uint32*0)() + pIndicesBuffer = (ctypes.c_uint32*(len(Indices) if Indices else 0))(*Indices if Indices else []) self._wrapper.checkError(self, self._wrapper.lib.lib3mf_slice_getpolygonindices(self._handle, nIndex, nIndicesCount, nIndicesNeededCount, pIndicesBuffer)) nIndicesCount = ctypes.c_uint64(nIndicesNeededCount.value) pIndicesBuffer = (ctypes.c_uint32 * nIndicesNeededCount.value)() self._wrapper.checkError(self, self._wrapper.lib.lib3mf_slice_getpolygonindices(self._handle, nIndex, nIndicesCount, nIndicesNeededCount, pIndicesBuffer)) - return [pIndicesBuffer[i] for i in range(nIndicesNeededCount.value)] + return list(pIndicesBuffer) def GetPolygonIndexCount(self, Index): nIndex = ctypes.c_uint64(Index) @@ -12147,38 +12928,38 @@ def GetEncryptionAlgorithm(self): return EncryptionAlgorithm(pAlgorithm.value) - def GetKey(self): - nByteDataCount = ctypes.c_uint64(0) + def GetKey(self, ByteData = None): + nByteDataCount = ctypes.c_uint64(len(ByteData) if ByteData else 0) nByteDataNeededCount = ctypes.c_uint64(0) - pByteDataBuffer = (ctypes.c_uint8*0)() + pByteDataBuffer = (ctypes.c_uint8*(len(ByteData) if ByteData else 0))(*ByteData if ByteData else []) self._wrapper.checkError(self, self._wrapper.lib.lib3mf_contentencryptionparams_getkey(self._handle, nByteDataCount, nByteDataNeededCount, pByteDataBuffer)) nByteDataCount = ctypes.c_uint64(nByteDataNeededCount.value) pByteDataBuffer = (ctypes.c_uint8 * nByteDataNeededCount.value)() self._wrapper.checkError(self, self._wrapper.lib.lib3mf_contentencryptionparams_getkey(self._handle, nByteDataCount, nByteDataNeededCount, pByteDataBuffer)) - return [pByteDataBuffer[i] for i in range(nByteDataNeededCount.value)] + return list(pByteDataBuffer) - def GetInitializationVector(self): - nByteDataCount = ctypes.c_uint64(0) + def GetInitializationVector(self, ByteData = None): + nByteDataCount = ctypes.c_uint64(len(ByteData) if ByteData else 0) nByteDataNeededCount = ctypes.c_uint64(0) - pByteDataBuffer = (ctypes.c_uint8*0)() + pByteDataBuffer = (ctypes.c_uint8*(len(ByteData) if ByteData else 0))(*ByteData if ByteData else []) self._wrapper.checkError(self, self._wrapper.lib.lib3mf_contentencryptionparams_getinitializationvector(self._handle, nByteDataCount, nByteDataNeededCount, pByteDataBuffer)) nByteDataCount = ctypes.c_uint64(nByteDataNeededCount.value) pByteDataBuffer = (ctypes.c_uint8 * nByteDataNeededCount.value)() self._wrapper.checkError(self, self._wrapper.lib.lib3mf_contentencryptionparams_getinitializationvector(self._handle, nByteDataCount, nByteDataNeededCount, pByteDataBuffer)) - return [pByteDataBuffer[i] for i in range(nByteDataNeededCount.value)] + return list(pByteDataBuffer) - def GetAuthenticationTag(self): - nByteDataCount = ctypes.c_uint64(0) + def GetAuthenticationTag(self, ByteData = None): + nByteDataCount = ctypes.c_uint64(len(ByteData) if ByteData else 0) nByteDataNeededCount = ctypes.c_uint64(0) - pByteDataBuffer = (ctypes.c_uint8*0)() + pByteDataBuffer = (ctypes.c_uint8*(len(ByteData) if ByteData else 0))(*ByteData if ByteData else []) self._wrapper.checkError(self, self._wrapper.lib.lib3mf_contentencryptionparams_getauthenticationtag(self._handle, nByteDataCount, nByteDataNeededCount, pByteDataBuffer)) nByteDataCount = ctypes.c_uint64(nByteDataNeededCount.value) pByteDataBuffer = (ctypes.c_uint8 * nByteDataNeededCount.value)() self._wrapper.checkError(self, self._wrapper.lib.lib3mf_contentencryptionparams_getauthenticationtag(self._handle, nByteDataCount, nByteDataNeededCount, pByteDataBuffer)) - return [pByteDataBuffer[i] for i in range(nByteDataNeededCount.value)] + return list(pByteDataBuffer) def SetAuthenticationTag(self, ByteData): nByteDataCount = ctypes.c_uint64(len(ByteData)) @@ -12186,16 +12967,16 @@ def SetAuthenticationTag(self, ByteData): self._wrapper.checkError(self, self._wrapper.lib.lib3mf_contentencryptionparams_setauthenticationtag(self._handle, nByteDataCount, pByteDataBuffer)) - def GetAdditionalAuthenticationData(self): - nByteDataCount = ctypes.c_uint64(0) + def GetAdditionalAuthenticationData(self, ByteData = None): + nByteDataCount = ctypes.c_uint64(len(ByteData) if ByteData else 0) nByteDataNeededCount = ctypes.c_uint64(0) - pByteDataBuffer = (ctypes.c_uint8*0)() + pByteDataBuffer = (ctypes.c_uint8*(len(ByteData) if ByteData else 0))(*ByteData if ByteData else []) self._wrapper.checkError(self, self._wrapper.lib.lib3mf_contentencryptionparams_getadditionalauthenticationdata(self._handle, nByteDataCount, nByteDataNeededCount, pByteDataBuffer)) nByteDataCount = ctypes.c_uint64(nByteDataNeededCount.value) pByteDataBuffer = (ctypes.c_uint8 * nByteDataNeededCount.value)() self._wrapper.checkError(self, self._wrapper.lib.lib3mf_contentencryptionparams_getadditionalauthenticationdata(self._handle, nByteDataCount, nByteDataNeededCount, pByteDataBuffer)) - return [pByteDataBuffer[i] for i in range(nByteDataNeededCount.value)] + return list(pByteDataBuffer) def GetDescriptor(self): pDescriptor = ctypes.c_uint64() @@ -12243,16 +13024,16 @@ def GetCompression(self): return Compression(pCompression.value) - def GetAdditionalAuthenticationData(self): - nByteDataCount = ctypes.c_uint64(0) + def GetAdditionalAuthenticationData(self, ByteData = None): + nByteDataCount = ctypes.c_uint64(len(ByteData) if ByteData else 0) nByteDataNeededCount = ctypes.c_uint64(0) - pByteDataBuffer = (ctypes.c_uint8*0)() + pByteDataBuffer = (ctypes.c_uint8*(len(ByteData) if ByteData else 0))(*ByteData if ByteData else []) self._wrapper.checkError(self, self._wrapper.lib.lib3mf_resourcedata_getadditionalauthenticationdata(self._handle, nByteDataCount, nByteDataNeededCount, pByteDataBuffer)) nByteDataCount = ctypes.c_uint64(nByteDataNeededCount.value) pByteDataBuffer = (ctypes.c_uint8 * nByteDataNeededCount.value)() self._wrapper.checkError(self, self._wrapper.lib.lib3mf_resourcedata_getadditionalauthenticationdata(self._handle, nByteDataCount, nByteDataNeededCount, pByteDataBuffer)) - return [pByteDataBuffer[i] for i in range(nByteDataNeededCount.value)] + return list(pByteDataBuffer) @@ -12482,8 +13263,8 @@ def GetResourceData(self, ResourceDataIndex): return ResourceDataObject - def GetUUID(self): - pHasUUID = ctypes.c_bool() + def GetUUID(self, HasUUID = None): + pHasUUID = ctypes.c_bool(HasUUID if HasUUID is not None else 0) nUUIDBufferSize = ctypes.c_uint64(0) nUUIDNeededChars = ctypes.c_uint64(0) pUUIDBuffer = ctypes.c_char_p(None) @@ -12703,8 +13484,8 @@ def GetLevelSetByID(self, UniqueResourceID): return LevelSetObjectInstanceObject - def GetBuildUUID(self): - pHasUUID = ctypes.c_bool() + def GetBuildUUID(self, HasUUID = None): + pHasUUID = ctypes.c_bool(HasUUID if HasUUID is not None else 0) nUUIDBufferSize = ctypes.c_uint64(0) nUUIDNeededChars = ctypes.c_uint64(0) pUUIDBuffer = ctypes.c_char_p(None) diff --git a/Autogenerated/Bindings/WASM/lib3mf_bindings.cpp b/Autogenerated/Bindings/WASM/lib3mf_bindings.cpp new file mode 100644 index 000000000..440fafe8a --- /dev/null +++ b/Autogenerated/Bindings/WASM/lib3mf_bindings.cpp @@ -0,0 +1,2714 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. + +Abstract: C++ Emscripten wrapper for WebAssembly + +Interface version: 2.5.0 + +*/ + +#include +#include +#include +#include +#include +#include "Cpp/lib3mf_implicit.hpp" + +using namespace emscripten; +using namespace Lib3MF; + +struct sTriangleWrapper { + sTriangle value; + Lib3MF_uint32 get_Indices0() const { return value.m_Indices[0]; } + void set_Indices0(Lib3MF_uint32 v) { value.m_Indices[0] = v; } + Lib3MF_uint32 get_Indices1() const { return value.m_Indices[1]; } + void set_Indices1(Lib3MF_uint32 v) { value.m_Indices[1] = v; } + Lib3MF_uint32 get_Indices2() const { return value.m_Indices[2]; } + void set_Indices2(Lib3MF_uint32 v) { value.m_Indices[2] = v; } + + sTriangle toStruct() const { return value; } + + static sTriangleWrapper fromStruct(const emscripten::val &js) { + sTriangleWrapper wrapper; + wrapper.value.m_Indices[0] = js["Indices0"].as(); + wrapper.value.m_Indices[1] = js["Indices1"].as(); + wrapper.value.m_Indices[2] = js["Indices2"].as(); + return wrapper; + } +}; + +struct sTrianglePropertiesWrapper { + sTriangleProperties value; + Lib3MF_uint32 get_ResourceID() const { return value.m_ResourceID; } + void set_ResourceID(Lib3MF_uint32 v) { value.m_ResourceID = v; } + Lib3MF_uint32 get_PropertyIDs0() const { return value.m_PropertyIDs[0]; } + void set_PropertyIDs0(Lib3MF_uint32 v) { value.m_PropertyIDs[0] = v; } + Lib3MF_uint32 get_PropertyIDs1() const { return value.m_PropertyIDs[1]; } + void set_PropertyIDs1(Lib3MF_uint32 v) { value.m_PropertyIDs[1] = v; } + Lib3MF_uint32 get_PropertyIDs2() const { return value.m_PropertyIDs[2]; } + void set_PropertyIDs2(Lib3MF_uint32 v) { value.m_PropertyIDs[2] = v; } + + sTriangleProperties toStruct() const { return value; } + + static sTrianglePropertiesWrapper fromStruct(const emscripten::val &js) { + sTrianglePropertiesWrapper wrapper; + wrapper.value.m_ResourceID = js["ResourceID"].as(); + wrapper.value.m_PropertyIDs[0] = js["PropertyIDs0"].as(); + wrapper.value.m_PropertyIDs[1] = js["PropertyIDs1"].as(); + wrapper.value.m_PropertyIDs[2] = js["PropertyIDs2"].as(); + return wrapper; + } +}; + +struct sPositionWrapper { + sPosition value; + Lib3MF_single get_Coordinates0() const { return value.m_Coordinates[0]; } + void set_Coordinates0(Lib3MF_single v) { value.m_Coordinates[0] = v; } + Lib3MF_single get_Coordinates1() const { return value.m_Coordinates[1]; } + void set_Coordinates1(Lib3MF_single v) { value.m_Coordinates[1] = v; } + Lib3MF_single get_Coordinates2() const { return value.m_Coordinates[2]; } + void set_Coordinates2(Lib3MF_single v) { value.m_Coordinates[2] = v; } + + sPosition toStruct() const { return value; } + + static sPositionWrapper fromStruct(const emscripten::val &js) { + sPositionWrapper wrapper; + wrapper.value.m_Coordinates[0] = js["Coordinates0"].as(); + wrapper.value.m_Coordinates[1] = js["Coordinates1"].as(); + wrapper.value.m_Coordinates[2] = js["Coordinates2"].as(); + return wrapper; + } +}; + +struct sPosition2DWrapper { + sPosition2D value; + Lib3MF_single get_Coordinates0() const { return value.m_Coordinates[0]; } + void set_Coordinates0(Lib3MF_single v) { value.m_Coordinates[0] = v; } + Lib3MF_single get_Coordinates1() const { return value.m_Coordinates[1]; } + void set_Coordinates1(Lib3MF_single v) { value.m_Coordinates[1] = v; } + + sPosition2D toStruct() const { return value; } + + static sPosition2DWrapper fromStruct(const emscripten::val &js) { + sPosition2DWrapper wrapper; + wrapper.value.m_Coordinates[0] = js["Coordinates0"].as(); + wrapper.value.m_Coordinates[1] = js["Coordinates1"].as(); + return wrapper; + } +}; + +struct sCompositeConstituentWrapper { + sCompositeConstituent value; + Lib3MF_uint32 get_PropertyID() const { return value.m_PropertyID; } + void set_PropertyID(Lib3MF_uint32 v) { value.m_PropertyID = v; } + Lib3MF_double get_MixingRatio() const { return value.m_MixingRatio; } + void set_MixingRatio(Lib3MF_double v) { value.m_MixingRatio = v; } + + sCompositeConstituent toStruct() const { return value; } + + static sCompositeConstituentWrapper fromStruct(const emscripten::val &js) { + sCompositeConstituentWrapper wrapper; + wrapper.value.m_PropertyID = js["PropertyID"].as(); + wrapper.value.m_MixingRatio = js["MixingRatio"].as(); + return wrapper; + } +}; + +struct sMultiPropertyLayerWrapper { + sMultiPropertyLayer value; + Lib3MF_uint32 get_ResourceID() const { return value.m_ResourceID; } + void set_ResourceID(Lib3MF_uint32 v) { value.m_ResourceID = v; } + eBlendMethod get_TheBlendMethod() const { return value.m_TheBlendMethod; } + void set_TheBlendMethod(eBlendMethod v) { value.m_TheBlendMethod = v; } + + sMultiPropertyLayer toStruct() const { return value; } + + static sMultiPropertyLayerWrapper fromStruct(const emscripten::val &js) { + sMultiPropertyLayerWrapper wrapper; + wrapper.value.m_ResourceID = js["ResourceID"].as(); + wrapper.value.m_TheBlendMethod = js["TheBlendMethod"].as(); + return wrapper; + } +}; + +struct sTex2CoordWrapper { + sTex2Coord value; + Lib3MF_double get_U() const { return value.m_U; } + void set_U(Lib3MF_double v) { value.m_U = v; } + Lib3MF_double get_V() const { return value.m_V; } + void set_V(Lib3MF_double v) { value.m_V = v; } + + sTex2Coord toStruct() const { return value; } + + static sTex2CoordWrapper fromStruct(const emscripten::val &js) { + sTex2CoordWrapper wrapper; + wrapper.value.m_U = js["U"].as(); + wrapper.value.m_V = js["V"].as(); + return wrapper; + } +}; + +struct sTransformWrapper { + sTransform value; + Lib3MF_single get_Fields_0_0() const { return value.m_Fields[0][0]; } + void set_Fields_0_0(Lib3MF_single v) { value.m_Fields[0][0] = v; } + Lib3MF_single get_Fields_0_1() const { return value.m_Fields[0][1]; } + void set_Fields_0_1(Lib3MF_single v) { value.m_Fields[0][1] = v; } + Lib3MF_single get_Fields_0_2() const { return value.m_Fields[0][2]; } + void set_Fields_0_2(Lib3MF_single v) { value.m_Fields[0][2] = v; } + Lib3MF_single get_Fields_1_0() const { return value.m_Fields[1][0]; } + void set_Fields_1_0(Lib3MF_single v) { value.m_Fields[1][0] = v; } + Lib3MF_single get_Fields_1_1() const { return value.m_Fields[1][1]; } + void set_Fields_1_1(Lib3MF_single v) { value.m_Fields[1][1] = v; } + Lib3MF_single get_Fields_1_2() const { return value.m_Fields[1][2]; } + void set_Fields_1_2(Lib3MF_single v) { value.m_Fields[1][2] = v; } + Lib3MF_single get_Fields_2_0() const { return value.m_Fields[2][0]; } + void set_Fields_2_0(Lib3MF_single v) { value.m_Fields[2][0] = v; } + Lib3MF_single get_Fields_2_1() const { return value.m_Fields[2][1]; } + void set_Fields_2_1(Lib3MF_single v) { value.m_Fields[2][1] = v; } + Lib3MF_single get_Fields_2_2() const { return value.m_Fields[2][2]; } + void set_Fields_2_2(Lib3MF_single v) { value.m_Fields[2][2] = v; } + Lib3MF_single get_Fields_3_0() const { return value.m_Fields[3][0]; } + void set_Fields_3_0(Lib3MF_single v) { value.m_Fields[3][0] = v; } + Lib3MF_single get_Fields_3_1() const { return value.m_Fields[3][1]; } + void set_Fields_3_1(Lib3MF_single v) { value.m_Fields[3][1] = v; } + Lib3MF_single get_Fields_3_2() const { return value.m_Fields[3][2]; } + void set_Fields_3_2(Lib3MF_single v) { value.m_Fields[3][2] = v; } + + sTransform toStruct() const { return value; } + + static sTransformWrapper fromStruct(const emscripten::val &js) { + sTransformWrapper wrapper; + wrapper.value.m_Fields[0][0] = js["Fields_0_0"].as(); + wrapper.value.m_Fields[1][0] = js["Fields_1_0"].as(); + wrapper.value.m_Fields[2][0] = js["Fields_2_0"].as(); + wrapper.value.m_Fields[3][0] = js["Fields_3_0"].as(); + wrapper.value.m_Fields[0][1] = js["Fields_0_1"].as(); + wrapper.value.m_Fields[1][1] = js["Fields_1_1"].as(); + wrapper.value.m_Fields[2][1] = js["Fields_2_1"].as(); + wrapper.value.m_Fields[3][1] = js["Fields_3_1"].as(); + wrapper.value.m_Fields[0][2] = js["Fields_0_2"].as(); + wrapper.value.m_Fields[1][2] = js["Fields_1_2"].as(); + wrapper.value.m_Fields[2][2] = js["Fields_2_2"].as(); + wrapper.value.m_Fields[3][2] = js["Fields_3_2"].as(); + return wrapper; + } +}; + +struct sBoxWrapper { + sBox value; + Lib3MF_single get_MinCoordinate0() const { return value.m_MinCoordinate[0]; } + void set_MinCoordinate0(Lib3MF_single v) { value.m_MinCoordinate[0] = v; } + Lib3MF_single get_MinCoordinate1() const { return value.m_MinCoordinate[1]; } + void set_MinCoordinate1(Lib3MF_single v) { value.m_MinCoordinate[1] = v; } + Lib3MF_single get_MinCoordinate2() const { return value.m_MinCoordinate[2]; } + void set_MinCoordinate2(Lib3MF_single v) { value.m_MinCoordinate[2] = v; } + Lib3MF_single get_MaxCoordinate0() const { return value.m_MaxCoordinate[0]; } + void set_MaxCoordinate0(Lib3MF_single v) { value.m_MaxCoordinate[0] = v; } + Lib3MF_single get_MaxCoordinate1() const { return value.m_MaxCoordinate[1]; } + void set_MaxCoordinate1(Lib3MF_single v) { value.m_MaxCoordinate[1] = v; } + Lib3MF_single get_MaxCoordinate2() const { return value.m_MaxCoordinate[2]; } + void set_MaxCoordinate2(Lib3MF_single v) { value.m_MaxCoordinate[2] = v; } + + sBox toStruct() const { return value; } + + static sBoxWrapper fromStruct(const emscripten::val &js) { + sBoxWrapper wrapper; + wrapper.value.m_MinCoordinate[0] = js["MinCoordinate0"].as(); + wrapper.value.m_MinCoordinate[1] = js["MinCoordinate1"].as(); + wrapper.value.m_MinCoordinate[2] = js["MinCoordinate2"].as(); + wrapper.value.m_MaxCoordinate[0] = js["MaxCoordinate0"].as(); + wrapper.value.m_MaxCoordinate[1] = js["MaxCoordinate1"].as(); + wrapper.value.m_MaxCoordinate[2] = js["MaxCoordinate2"].as(); + return wrapper; + } +}; + +struct sColorWrapper { + sColor value; + Lib3MF_uint8 get_Red() const { return value.m_Red; } + void set_Red(Lib3MF_uint8 v) { value.m_Red = v; } + Lib3MF_uint8 get_Green() const { return value.m_Green; } + void set_Green(Lib3MF_uint8 v) { value.m_Green = v; } + Lib3MF_uint8 get_Blue() const { return value.m_Blue; } + void set_Blue(Lib3MF_uint8 v) { value.m_Blue = v; } + Lib3MF_uint8 get_Alpha() const { return value.m_Alpha; } + void set_Alpha(Lib3MF_uint8 v) { value.m_Alpha = v; } + + sColor toStruct() const { return value; } + + static sColorWrapper fromStruct(const emscripten::val &js) { + sColorWrapper wrapper; + wrapper.value.m_Red = js["Red"].as(); + wrapper.value.m_Green = js["Green"].as(); + wrapper.value.m_Blue = js["Blue"].as(); + wrapper.value.m_Alpha = js["Alpha"].as(); + return wrapper; + } +}; + +struct sBeamWrapper { + sBeam value; + Lib3MF_uint32 get_Indices0() const { return value.m_Indices[0]; } + void set_Indices0(Lib3MF_uint32 v) { value.m_Indices[0] = v; } + Lib3MF_uint32 get_Indices1() const { return value.m_Indices[1]; } + void set_Indices1(Lib3MF_uint32 v) { value.m_Indices[1] = v; } + Lib3MF_double get_Radii0() const { return value.m_Radii[0]; } + void set_Radii0(Lib3MF_double v) { value.m_Radii[0] = v; } + Lib3MF_double get_Radii1() const { return value.m_Radii[1]; } + void set_Radii1(Lib3MF_double v) { value.m_Radii[1] = v; } + eBeamLatticeCapMode get_CapModes0() const { return value.m_CapModes[0]; } + void set_CapModes0(eBeamLatticeCapMode v) { value.m_CapModes[0] = v; } + eBeamLatticeCapMode get_CapModes1() const { return value.m_CapModes[1]; } + void set_CapModes1(eBeamLatticeCapMode v) { value.m_CapModes[1] = v; } + + sBeam toStruct() const { return value; } + + static sBeamWrapper fromStruct(const emscripten::val &js) { + sBeamWrapper wrapper; + wrapper.value.m_Indices[0] = js["Indices0"].as(); + wrapper.value.m_Indices[1] = js["Indices1"].as(); + wrapper.value.m_Radii[0] = js["Radii0"].as(); + wrapper.value.m_Radii[1] = js["Radii1"].as(); + wrapper.value.m_CapModes[0] = js["CapModes0"].as(); + wrapper.value.m_CapModes[1] = js["CapModes1"].as(); + return wrapper; + } +}; + +struct sBallWrapper { + sBall value; + Lib3MF_uint32 get_Index() const { return value.m_Index; } + void set_Index(Lib3MF_uint32 v) { value.m_Index = v; } + Lib3MF_double get_Radius() const { return value.m_Radius; } + void set_Radius(Lib3MF_double v) { value.m_Radius = v; } + + sBall toStruct() const { return value; } + + static sBallWrapper fromStruct(const emscripten::val &js) { + sBallWrapper wrapper; + wrapper.value.m_Index = js["Index"].as(); + wrapper.value.m_Radius = js["Radius"].as(); + return wrapper; + } +}; + +struct sVectorWrapper { + sVector value; + Lib3MF_double get_Coordinates0() const { return value.m_Coordinates[0]; } + void set_Coordinates0(Lib3MF_double v) { value.m_Coordinates[0] = v; } + Lib3MF_double get_Coordinates1() const { return value.m_Coordinates[1]; } + void set_Coordinates1(Lib3MF_double v) { value.m_Coordinates[1] = v; } + Lib3MF_double get_Coordinates2() const { return value.m_Coordinates[2]; } + void set_Coordinates2(Lib3MF_double v) { value.m_Coordinates[2] = v; } + + sVector toStruct() const { return value; } + + static sVectorWrapper fromStruct(const emscripten::val &js) { + sVectorWrapper wrapper; + wrapper.value.m_Coordinates[0] = js["Coordinates0"].as(); + wrapper.value.m_Coordinates[1] = js["Coordinates1"].as(); + wrapper.value.m_Coordinates[2] = js["Coordinates2"].as(); + return wrapper; + } +}; + +struct sMatrix4x4Wrapper { + sMatrix4x4 value; + Lib3MF_double get_Field_0_0() const { return value.m_Field[0][0]; } + void set_Field_0_0(Lib3MF_double v) { value.m_Field[0][0] = v; } + Lib3MF_double get_Field_0_1() const { return value.m_Field[0][1]; } + void set_Field_0_1(Lib3MF_double v) { value.m_Field[0][1] = v; } + Lib3MF_double get_Field_0_2() const { return value.m_Field[0][2]; } + void set_Field_0_2(Lib3MF_double v) { value.m_Field[0][2] = v; } + Lib3MF_double get_Field_0_3() const { return value.m_Field[0][3]; } + void set_Field_0_3(Lib3MF_double v) { value.m_Field[0][3] = v; } + Lib3MF_double get_Field_1_0() const { return value.m_Field[1][0]; } + void set_Field_1_0(Lib3MF_double v) { value.m_Field[1][0] = v; } + Lib3MF_double get_Field_1_1() const { return value.m_Field[1][1]; } + void set_Field_1_1(Lib3MF_double v) { value.m_Field[1][1] = v; } + Lib3MF_double get_Field_1_2() const { return value.m_Field[1][2]; } + void set_Field_1_2(Lib3MF_double v) { value.m_Field[1][2] = v; } + Lib3MF_double get_Field_1_3() const { return value.m_Field[1][3]; } + void set_Field_1_3(Lib3MF_double v) { value.m_Field[1][3] = v; } + Lib3MF_double get_Field_2_0() const { return value.m_Field[2][0]; } + void set_Field_2_0(Lib3MF_double v) { value.m_Field[2][0] = v; } + Lib3MF_double get_Field_2_1() const { return value.m_Field[2][1]; } + void set_Field_2_1(Lib3MF_double v) { value.m_Field[2][1] = v; } + Lib3MF_double get_Field_2_2() const { return value.m_Field[2][2]; } + void set_Field_2_2(Lib3MF_double v) { value.m_Field[2][2] = v; } + Lib3MF_double get_Field_2_3() const { return value.m_Field[2][3]; } + void set_Field_2_3(Lib3MF_double v) { value.m_Field[2][3] = v; } + Lib3MF_double get_Field_3_0() const { return value.m_Field[3][0]; } + void set_Field_3_0(Lib3MF_double v) { value.m_Field[3][0] = v; } + Lib3MF_double get_Field_3_1() const { return value.m_Field[3][1]; } + void set_Field_3_1(Lib3MF_double v) { value.m_Field[3][1] = v; } + Lib3MF_double get_Field_3_2() const { return value.m_Field[3][2]; } + void set_Field_3_2(Lib3MF_double v) { value.m_Field[3][2] = v; } + Lib3MF_double get_Field_3_3() const { return value.m_Field[3][3]; } + void set_Field_3_3(Lib3MF_double v) { value.m_Field[3][3] = v; } + + sMatrix4x4 toStruct() const { return value; } + + static sMatrix4x4Wrapper fromStruct(const emscripten::val &js) { + sMatrix4x4Wrapper wrapper; + wrapper.value.m_Field[0][0] = js["Field_0_0"].as(); + wrapper.value.m_Field[1][0] = js["Field_1_0"].as(); + wrapper.value.m_Field[2][0] = js["Field_2_0"].as(); + wrapper.value.m_Field[3][0] = js["Field_3_0"].as(); + wrapper.value.m_Field[0][1] = js["Field_0_1"].as(); + wrapper.value.m_Field[1][1] = js["Field_1_1"].as(); + wrapper.value.m_Field[2][1] = js["Field_2_1"].as(); + wrapper.value.m_Field[3][1] = js["Field_3_1"].as(); + wrapper.value.m_Field[0][2] = js["Field_0_2"].as(); + wrapper.value.m_Field[1][2] = js["Field_1_2"].as(); + wrapper.value.m_Field[2][2] = js["Field_2_2"].as(); + wrapper.value.m_Field[3][2] = js["Field_3_2"].as(); + wrapper.value.m_Field[0][3] = js["Field_0_3"].as(); + wrapper.value.m_Field[1][3] = js["Field_1_3"].as(); + wrapper.value.m_Field[2][3] = js["Field_2_3"].as(); + wrapper.value.m_Field[3][3] = js["Field_3_3"].as(); + return wrapper; + } +}; + +static void wrap_Resource_SetPackagePart(CResource &self, PPackagePart& PackagePart) { + self.SetPackagePart(classParam(PackagePart)); +} + +static void wrap_MetaDataGroup_RemoveMetaData(CMetaDataGroup &self, PMetaData& TheMetaData) { + self.RemoveMetaData(classParam(TheMetaData)); +} + +static void wrap_TriangleSet_Merge(CTriangleSet &self, PTriangleSet& OtherTriangleSet, const bool& DeleteOther) { + self.Merge(classParam(OtherTriangleSet), DeleteOther); +} + +static void wrap_Object_SetAttachmentAsThumbnail(CObject &self, PAttachment& Attachment) { + self.SetAttachmentAsThumbnail(classParam(Attachment)); +} + +static sBoxWrapper wrap_Object_GetOutbox(CObject &self) { + auto result = self.GetOutbox(); + sBoxWrapper wrapper; + wrapper.value = result; + return wrapper; +} + +static void wrap_Object_AssignSliceStack(CObject &self, PSliceStack& SliceStackInstance) { + self.AssignSliceStack(classParam(SliceStackInstance)); +} + +static sPositionWrapper wrap_MeshObject_GetVertex(CMeshObject &self, const Lib3MF_uint32& Index) { + auto result = self.GetVertex(Index); + sPositionWrapper wrapper; + wrapper.value = result; + return wrapper; +} + +static void wrap_MeshObject_SetVertex(CMeshObject &self, const Lib3MF_uint32& Index, const sPositionWrapper& Coordinates) { + self.SetVertex(Index, Coordinates.toStruct()); +} + +static Lib3MF_uint32 wrap_MeshObject_AddVertex(CMeshObject &self, const sPositionWrapper& Coordinates) { + auto result = self.AddVertex(Coordinates.toStruct()); + return result; +} + +static sTriangleWrapper wrap_MeshObject_GetTriangle(CMeshObject &self, const Lib3MF_uint32& Index) { + auto result = self.GetTriangle(Index); + sTriangleWrapper wrapper; + wrapper.value = result; + return wrapper; +} + +static void wrap_MeshObject_SetTriangle(CMeshObject &self, const Lib3MF_uint32& Index, const sTriangleWrapper& Indices) { + self.SetTriangle(Index, Indices.toStruct()); +} + +static Lib3MF_uint32 wrap_MeshObject_AddTriangle(CMeshObject &self, const sTriangleWrapper& Indices) { + auto result = self.AddTriangle(Indices.toStruct()); + return result; +} + +static void wrap_MeshObject_SetTriangleProperties(CMeshObject &self, const Lib3MF_uint32& Index, const sTrianglePropertiesWrapper& Properties) { + self.SetTriangleProperties(Index, Properties.toStruct()); +} + +static void wrap_MeshObject_SetAllTriangleProperties(CMeshObject &self, const std::vector& PropertiesArray) { + std::vector converted_PropertiesArray; + converted_PropertiesArray.reserve(PropertiesArray.size()); + for (const auto& w : PropertiesArray) converted_PropertiesArray.push_back(w.toStruct()); + self.SetAllTriangleProperties(converted_PropertiesArray); +} + +static void wrap_MeshObject_SetGeometry(CMeshObject &self, const std::vector& Vertices, const std::vector& Indices) { + std::vector converted_Vertices; + converted_Vertices.reserve(Vertices.size()); + for (const auto& w : Vertices) converted_Vertices.push_back(w.toStruct()); + std::vector converted_Indices; + converted_Indices.reserve(Indices.size()); + for (const auto& w : Indices) converted_Indices.push_back(w.toStruct()); + self.SetGeometry(converted_Vertices, converted_Indices); +} + +static void wrap_MeshObject_SetVolumeData(CMeshObject &self, PVolumeData& TheVolumeData) { + self.SetVolumeData(classParam(TheVolumeData)); +} + +static void wrap_LevelSet_SetFunction(CLevelSet &self, PFunction& TheFunction) { + self.SetFunction(classParam(TheFunction)); +} + +static sTransformWrapper wrap_LevelSet_GetTransform(CLevelSet &self) { + auto result = self.GetTransform(); + sTransformWrapper wrapper; + wrapper.value = result; + return wrapper; +} + +static void wrap_LevelSet_SetTransform(CLevelSet &self, const sTransformWrapper& Transform) { + self.SetTransform(Transform.toStruct()); +} + +static void wrap_LevelSet_SetMesh(CLevelSet &self, PMeshObject& TheMesh) { + self.SetMesh(classParam(TheMesh)); +} + +static void wrap_LevelSet_SetVolumeData(CLevelSet &self, PVolumeData& TheVolumeData) { + self.SetVolumeData(classParam(TheVolumeData)); +} + +static sBeamWrapper wrap_BeamLattice_GetBeam(CBeamLattice &self, const Lib3MF_uint32& Index) { + auto result = self.GetBeam(Index); + sBeamWrapper wrapper; + wrapper.value = result; + return wrapper; +} + +static Lib3MF_uint32 wrap_BeamLattice_AddBeam(CBeamLattice &self, const sBeamWrapper& BeamInfo) { + auto result = self.AddBeam(BeamInfo.toStruct()); + return result; +} + +static void wrap_BeamLattice_SetBeam(CBeamLattice &self, const Lib3MF_uint32& Index, const sBeamWrapper& BeamInfo) { + self.SetBeam(Index, BeamInfo.toStruct()); +} + +static void wrap_BeamLattice_SetBeams(CBeamLattice &self, const std::vector& BeamInfo) { + std::vector converted_BeamInfo; + converted_BeamInfo.reserve(BeamInfo.size()); + for (const auto& w : BeamInfo) converted_BeamInfo.push_back(w.toStruct()); + self.SetBeams(converted_BeamInfo); +} + +static sBallWrapper wrap_BeamLattice_GetBall(CBeamLattice &self, const Lib3MF_uint32& Index) { + auto result = self.GetBall(Index); + sBallWrapper wrapper; + wrapper.value = result; + return wrapper; +} + +static Lib3MF_uint32 wrap_BeamLattice_AddBall(CBeamLattice &self, const sBallWrapper& BallInfo) { + auto result = self.AddBall(BallInfo.toStruct()); + return result; +} + +static void wrap_BeamLattice_SetBall(CBeamLattice &self, const Lib3MF_uint32& Index, const sBallWrapper& BallInfo) { + self.SetBall(Index, BallInfo.toStruct()); +} + +static void wrap_BeamLattice_SetBalls(CBeamLattice &self, const std::vector& BallInfo) { + std::vector converted_BallInfo; + converted_BallInfo.reserve(BallInfo.size()); + for (const auto& w : BallInfo) converted_BallInfo.push_back(w.toStruct()); + self.SetBalls(converted_BallInfo); +} + +static sTransformWrapper wrap_FunctionReference_GetTransform(CFunctionReference &self) { + auto result = self.GetTransform(); + sTransformWrapper wrapper; + wrapper.value = result; + return wrapper; +} + +static void wrap_FunctionReference_SetTransform(CFunctionReference &self, const sTransformWrapper& Transform) { + self.SetTransform(Transform.toStruct()); +} + +static void wrap_VolumeDataComposite_SetBaseMaterialGroup(CVolumeDataComposite &self, PBaseMaterialGroup& BaseMaterialGroupInstance) { + self.SetBaseMaterialGroup(classParam(BaseMaterialGroupInstance)); +} + +static PMaterialMapping wrap_VolumeDataComposite_AddMaterialMapping(CVolumeDataComposite &self, const sTransformWrapper& Transform) { + auto result = self.AddMaterialMapping(Transform.toStruct()); + return result; +} + +static PVolumeDataColor wrap_VolumeData_CreateNewColor(CVolumeData &self, PFunction& TheFunction) { + auto result = self.CreateNewColor(classParam(TheFunction)); + return result; +} + +static PVolumeDataProperty wrap_VolumeData_AddPropertyFromFunction(CVolumeData &self, const std::string& Name, PFunction& TheFunction) { + auto result = self.AddPropertyFromFunction(Name, classParam(TheFunction)); + return result; +} + +static sTransformWrapper wrap_Component_GetTransform(CComponent &self) { + auto result = self.GetTransform(); + sTransformWrapper wrapper; + wrapper.value = result; + return wrapper; +} + +static void wrap_Component_SetTransform(CComponent &self, const sTransformWrapper& Transform) { + self.SetTransform(Transform.toStruct()); +} + +static PComponent wrap_ComponentsObject_AddComponent(CComponentsObject &self, PObject& ObjectResource, const sTransformWrapper& Transform) { + auto result = self.AddComponent(classParam(ObjectResource), Transform.toStruct()); + return result; +} + +static Lib3MF_uint32 wrap_BaseMaterialGroup_AddMaterial(CBaseMaterialGroup &self, const std::string& Name, const sColorWrapper& DisplayColor) { + auto result = self.AddMaterial(Name, DisplayColor.toStruct()); + return result; +} + +static void wrap_BaseMaterialGroup_SetDisplayColor(CBaseMaterialGroup &self, const Lib3MF_uint32& PropertyID, const sColorWrapper& TheColor) { + self.SetDisplayColor(PropertyID, TheColor.toStruct()); +} + +static sColorWrapper wrap_BaseMaterialGroup_GetDisplayColor(CBaseMaterialGroup &self, const Lib3MF_uint32& PropertyID) { + auto result = self.GetDisplayColor(PropertyID); + sColorWrapper wrapper; + wrapper.value = result; + return wrapper; +} + +static Lib3MF_uint32 wrap_ColorGroup_AddColor(CColorGroup &self, const sColorWrapper& TheColor) { + auto result = self.AddColor(TheColor.toStruct()); + return result; +} + +static void wrap_ColorGroup_SetColor(CColorGroup &self, const Lib3MF_uint32& PropertyID, const sColorWrapper& TheColor) { + self.SetColor(PropertyID, TheColor.toStruct()); +} + +static sColorWrapper wrap_ColorGroup_GetColor(CColorGroup &self, const Lib3MF_uint32& PropertyID) { + auto result = self.GetColor(PropertyID); + sColorWrapper wrapper; + wrapper.value = result; + return wrapper; +} + +static Lib3MF_uint32 wrap_Texture2DGroup_AddTex2Coord(CTexture2DGroup &self, const sTex2CoordWrapper& UVCoordinate) { + auto result = self.AddTex2Coord(UVCoordinate.toStruct()); + return result; +} + +static sTex2CoordWrapper wrap_Texture2DGroup_GetTex2Coord(CTexture2DGroup &self, const Lib3MF_uint32& PropertyID) { + auto result = self.GetTex2Coord(PropertyID); + sTex2CoordWrapper wrapper; + wrapper.value = result; + return wrapper; +} + +static Lib3MF_uint32 wrap_CompositeMaterials_AddComposite(CCompositeMaterials &self, const std::vector& Composite) { + std::vector converted_Composite; + converted_Composite.reserve(Composite.size()); + for (const auto& w : Composite) converted_Composite.push_back(w.toStruct()); + auto result = self.AddComposite(converted_Composite); + return result; +} + +static Lib3MF_uint32 wrap_MultiPropertyGroup_AddLayer(CMultiPropertyGroup &self, const sMultiPropertyLayerWrapper& TheLayer) { + auto result = self.AddLayer(TheLayer.toStruct()); + return result; +} + +static sMultiPropertyLayerWrapper wrap_MultiPropertyGroup_GetLayer(CMultiPropertyGroup &self, const Lib3MF_uint32& LayerIndex) { + auto result = self.GetLayer(LayerIndex); + sMultiPropertyLayerWrapper wrapper; + wrapper.value = result; + return wrapper; +} + +static void wrap_ImageStack_SetSheet(CImageStack &self, const Lib3MF_uint32& Index, PAttachment& Sheet) { + self.SetSheet(Index, classParam(Sheet)); +} + +static void wrap_Texture2D_SetAttachment(CTexture2D &self, PAttachment& Attachment) { + self.SetAttachment(classParam(Attachment)); +} + +static void wrap_ResourceIdNode_SetResource(CResourceIdNode &self, PResource& Resource) { + self.SetResource(classParam(Resource)); +} + +static void wrap_ConstVecNode_SetVector(CConstVecNode &self, const sVectorWrapper& Value) { + self.SetVector(Value.toStruct()); +} + +static sVectorWrapper wrap_ConstVecNode_GetVector(CConstVecNode &self) { + auto result = self.GetVector(); + sVectorWrapper wrapper; + wrapper.value = result; + return wrapper; +} + +static void wrap_ConstMatNode_SetMatrix(CConstMatNode &self, const sMatrix4x4Wrapper& Value) { + self.SetMatrix(Value.toStruct()); +} + +static sMatrix4x4Wrapper wrap_ConstMatNode_GetMatrix(CConstMatNode &self) { + auto result = self.GetMatrix(); + sMatrix4x4Wrapper wrapper; + wrapper.value = result; + return wrapper; +} + +static void wrap_Function_RemoveInput(CFunction &self, PImplicitPort& Input) { + self.RemoveInput(classParam(Input)); +} + +static void wrap_Function_RemoveOutput(CFunction &self, PImplicitPort& Output) { + self.RemoveOutput(classParam(Output)); +} + +static void wrap_ImplicitFunction_RemoveNode(CImplicitFunction &self, PImplicitNode& Node) { + self.RemoveNode(classParam(Node)); +} + +static void wrap_ImplicitFunction_AddLink(CImplicitFunction &self, PImplicitPort& Source, PImplicitPort& Target) { + self.AddLink(classParam(Source), classParam(Target)); +} + +static void wrap_FunctionFromImage3D_SetImage3D(CFunctionFromImage3D &self, PImage3D& Image3D) { + self.SetImage3D(classParam(Image3D)); +} + +static sTransformWrapper wrap_BuildItem_GetObjectTransform(CBuildItem &self) { + auto result = self.GetObjectTransform(); + sTransformWrapper wrapper; + wrapper.value = result; + return wrapper; +} + +static void wrap_BuildItem_SetObjectTransform(CBuildItem &self, const sTransformWrapper& Transform) { + self.SetObjectTransform(Transform.toStruct()); +} + +static sBoxWrapper wrap_BuildItem_GetOutbox(CBuildItem &self) { + auto result = self.GetOutbox(); + sBoxWrapper wrapper; + wrapper.value = result; + return wrapper; +} + +static void wrap_Slice_SetVertices(CSlice &self, const std::vector& Vertices) { + std::vector converted_Vertices; + converted_Vertices.reserve(Vertices.size()); + for (const auto& w : Vertices) converted_Vertices.push_back(w.toStruct()); + self.SetVertices(converted_Vertices); +} + +static void wrap_SliceStack_AddSliceStackReference(CSliceStack &self, PSliceStack& TheSliceStack) { + self.AddSliceStackReference(classParam(TheSliceStack)); +} + +static PAccessRight wrap_ResourceDataGroup_AddAccessRight(CResourceDataGroup &self, PConsumer& Consumer, const eWrappingAlgorithm& WrappingAlgorithm, const eMgfAlgorithm& MgfAlgorithm, const eDigestMethod& DigestMethod) { + auto result = self.AddAccessRight(classParam(Consumer), WrappingAlgorithm, MgfAlgorithm, DigestMethod); + return result; +} + +static PAccessRight wrap_ResourceDataGroup_FindAccessRightByConsumer(CResourceDataGroup &self, PConsumer& Consumer) { + auto result = self.FindAccessRightByConsumer(classParam(Consumer)); + return result; +} + +static void wrap_ResourceDataGroup_RemoveAccessRight(CResourceDataGroup &self, PConsumer& Consumer) { + self.RemoveAccessRight(classParam(Consumer)); +} + +static void wrap_KeyStore_RemoveConsumer(CKeyStore &self, PConsumer& Consumer) { + self.RemoveConsumer(classParam(Consumer)); +} + +static void wrap_KeyStore_RemoveResourceDataGroup(CKeyStore &self, PResourceDataGroup& ResourceDataGroup) { + self.RemoveResourceDataGroup(classParam(ResourceDataGroup)); +} + +static PResourceDataGroup wrap_KeyStore_FindResourceDataGroup(CKeyStore &self, PPackagePart& PartPath) { + auto result = self.FindResourceDataGroup(classParam(PartPath)); + return result; +} + +static PResourceData wrap_KeyStore_AddResourceData(CKeyStore &self, PResourceDataGroup& ResourceDataGroup, PPackagePart& PartPath, const eEncryptionAlgorithm& Algorithm, const eCompression& Compression, std::vector& AdditionalAuthenticationData) { + auto result = self.AddResourceData(classParam(ResourceDataGroup), classParam(PartPath), Algorithm, Compression, AdditionalAuthenticationData); + return result; +} + +static void wrap_KeyStore_RemoveResourceData(CKeyStore &self, PResourceData& ResourceData) { + self.RemoveResourceData(classParam(ResourceData)); +} + +static PResourceData wrap_KeyStore_FindResourceData(CKeyStore &self, PPackagePart& ResourcePath) { + auto result = self.FindResourceData(classParam(ResourcePath)); + return result; +} + +static sBoxWrapper wrap_Model_GetOutbox(CModel &self) { + auto result = self.GetOutbox(); + sBoxWrapper wrapper; + wrapper.value = result; + return wrapper; +} + +static void wrap_Model_MergeFromModel(CModel &self, PModel& ModelInstance) { + self.MergeFromModel(classParam(ModelInstance)); +} + +static PTexture2D wrap_Model_AddTexture2DFromAttachment(CModel &self, PAttachment& TextureAttachment) { + auto result = self.AddTexture2DFromAttachment(classParam(TextureAttachment)); + return result; +} + +static PTexture2DGroup wrap_Model_AddTexture2DGroup(CModel &self, PTexture2D& Texture2DInstance) { + auto result = self.AddTexture2DGroup(classParam(Texture2DInstance)); + return result; +} + +static PCompositeMaterials wrap_Model_AddCompositeMaterials(CModel &self, PBaseMaterialGroup& BaseMaterialGroupInstance) { + auto result = self.AddCompositeMaterials(classParam(BaseMaterialGroupInstance)); + return result; +} + +static PBuildItem wrap_Model_AddBuildItem(CModel &self, PObject& Object, const sTransformWrapper& Transform) { + auto result = self.AddBuildItem(classParam(Object), Transform.toStruct()); + return result; +} + +static void wrap_Model_RemoveBuildItem(CModel &self, PBuildItem& BuildItemInstance) { + self.RemoveBuildItem(classParam(BuildItemInstance)); +} + +static void wrap_Model_RemoveAttachment(CModel &self, PAttachment& AttachmentInstance) { + self.RemoveAttachment(classParam(AttachmentInstance)); +} + +static PFunctionFromImage3D wrap_Model_AddFunctionFromImage3D(CModel &self, PImage3D& Image3DInstance) { + auto result = self.AddFunctionFromImage3D(classParam(Image3DInstance)); + return result; +} + +static void wrap_Model_RemoveResource(CModel &self, PResource& Resource) { + self.RemoveResource(classParam(Resource)); +} + +static void wrap_Wrapper_Release(CWrapper &self, PBase& Instance) { + self.Release(classParam(Instance)); +} + +static void wrap_Wrapper_Acquire(CWrapper &self, PBase& Instance) { + self.Acquire(classParam(Instance)); +} + +static sColorWrapper wrap_Wrapper_RGBAToColor(CWrapper &self, const Lib3MF_uint8& Red, const Lib3MF_uint8& Green, const Lib3MF_uint8& Blue, const Lib3MF_uint8& Alpha) { + auto result = self.RGBAToColor(Red, Green, Blue, Alpha); + sColorWrapper wrapper; + wrapper.value = result; + return wrapper; +} + +static sColorWrapper wrap_Wrapper_FloatRGBAToColor(CWrapper &self, const Lib3MF_single& Red, const Lib3MF_single& Green, const Lib3MF_single& Blue, const Lib3MF_single& Alpha) { + auto result = self.FloatRGBAToColor(Red, Green, Blue, Alpha); + sColorWrapper wrapper; + wrapper.value = result; + return wrapper; +} + +static sTransformWrapper wrap_Wrapper_GetIdentityTransform(CWrapper &self) { + auto result = self.GetIdentityTransform(); + sTransformWrapper wrapper; + wrapper.value = result; + return wrapper; +} + +static sTransformWrapper wrap_Wrapper_GetUniformScaleTransform(CWrapper &self, const Lib3MF_single& Factor) { + auto result = self.GetUniformScaleTransform(Factor); + sTransformWrapper wrapper; + wrapper.value = result; + return wrapper; +} + +static sTransformWrapper wrap_Wrapper_GetScaleTransform(CWrapper &self, const Lib3MF_single& FactorX, const Lib3MF_single& FactorY, const Lib3MF_single& FactorZ) { + auto result = self.GetScaleTransform(FactorX, FactorY, FactorZ); + sTransformWrapper wrapper; + wrapper.value = result; + return wrapper; +} + +static sTransformWrapper wrap_Wrapper_GetTranslationTransform(CWrapper &self, const Lib3MF_single& VectorX, const Lib3MF_single& VectorY, const Lib3MF_single& VectorZ) { + auto result = self.GetTranslationTransform(VectorX, VectorY, VectorZ); + sTransformWrapper wrapper; + wrapper.value = result; + return wrapper; +} + +static emscripten::val wrap_Writer_WriteToBuffer(CWriter &self) { + emscripten::val output = emscripten::val::object(); + std::vector Buffer; + self.WriteToBuffer(Buffer); + output.set("Buffer", Buffer); + return output; +} + +static emscripten::val wrap_Writer_GetWarning(CWriter &self, const Lib3MF_uint32& Index) { + emscripten::val output = emscripten::val::object(); + Lib3MF_uint32 ErrorCode; + std::string return_value = self.GetWarning(Index, ErrorCode); + output.set("return", return_value); + output.set("ErrorCode", ErrorCode); + return output; +} + +static emscripten::val wrap_Reader_GetWarning(CReader &self, const Lib3MF_uint32& Index) { + emscripten::val output = emscripten::val::object(); + Lib3MF_uint32 ErrorCode; + std::string return_value = self.GetWarning(Index, ErrorCode); + output.set("return", return_value); + output.set("ErrorCode", ErrorCode); + return output; +} + +static emscripten::val wrap_TriangleSet_GetTriangleList(CTriangleSet &self) { + emscripten::val output = emscripten::val::object(); + std::vector TriangleIndices; + self.GetTriangleList(TriangleIndices); + output.set("TriangleIndices", TriangleIndices); + return output; +} + +static emscripten::val wrap_Object_GetUUID(CObject &self) { + emscripten::val output = emscripten::val::object(); + bool HasUUID; + std::string return_value = self.GetUUID(HasUUID); + output.set("return", return_value); + output.set("HasUUID", HasUUID); + return output; +} + +static emscripten::val wrap_MeshObject_GetVertices(CMeshObject &self) { + emscripten::val output = emscripten::val::object(); + std::vector Vertices; + self.GetVertices(Vertices); + output.set("Vertices", Vertices); + return output; +} + +static emscripten::val wrap_MeshObject_GetTriangleIndices(CMeshObject &self) { + emscripten::val output = emscripten::val::object(); + std::vector Indices; + self.GetTriangleIndices(Indices); + output.set("Indices", Indices); + return output; +} + +static emscripten::val wrap_MeshObject_GetObjectLevelProperty(CMeshObject &self) { + emscripten::val output = emscripten::val::object(); + Lib3MF_uint32 UniqueResourceID; + Lib3MF_uint32 PropertyID; + bool return_value = self.GetObjectLevelProperty(UniqueResourceID, PropertyID); + output.set("return", return_value); + output.set("UniqueResourceID", UniqueResourceID); + output.set("PropertyID", PropertyID); + return output; +} + +static emscripten::val wrap_MeshObject_GetTriangleProperties(CMeshObject &self, const Lib3MF_uint32& Index) { + emscripten::val output = emscripten::val::object(); + sTrianglePropertiesWrapper Property; + self.GetTriangleProperties(Index, Property.value); + output.set("Property", Property); + return output; +} + +static emscripten::val wrap_MeshObject_GetAllTriangleProperties(CMeshObject &self) { + emscripten::val output = emscripten::val::object(); + std::vector PropertiesArray; + self.GetAllTriangleProperties(PropertiesArray); + output.set("PropertiesArray", PropertiesArray); + return output; +} + +static emscripten::val wrap_BeamLattice_GetClipping(CBeamLattice &self) { + emscripten::val output = emscripten::val::object(); + eBeamLatticeClipMode ClipMode; + Lib3MF_uint32 UniqueResourceID; + self.GetClipping(ClipMode, UniqueResourceID); + output.set("ClipMode", ClipMode); + output.set("UniqueResourceID", UniqueResourceID); + return output; +} + +static emscripten::val wrap_BeamLattice_GetRepresentation(CBeamLattice &self) { + emscripten::val output = emscripten::val::object(); + Lib3MF_uint32 UniqueResourceID; + bool return_value = self.GetRepresentation(UniqueResourceID); + output.set("return", return_value); + output.set("UniqueResourceID", UniqueResourceID); + return output; +} + +static emscripten::val wrap_BeamLattice_GetBallOptions(CBeamLattice &self) { + emscripten::val output = emscripten::val::object(); + eBeamLatticeBallMode BallMode; + Lib3MF_double BallRadius; + self.GetBallOptions(BallMode, BallRadius); + output.set("BallMode", BallMode); + output.set("BallRadius", BallRadius); + return output; +} + +static emscripten::val wrap_BeamLattice_GetBeams(CBeamLattice &self) { + emscripten::val output = emscripten::val::object(); + std::vector BeamInfo; + self.GetBeams(BeamInfo); + output.set("BeamInfo", BeamInfo); + return output; +} + +static emscripten::val wrap_BeamLattice_GetBalls(CBeamLattice &self) { + emscripten::val output = emscripten::val::object(); + std::vector BallInfo; + self.GetBalls(BallInfo); + output.set("BallInfo", BallInfo); + return output; +} + +static emscripten::val wrap_Component_GetUUID(CComponent &self) { + emscripten::val output = emscripten::val::object(); + bool HasUUID; + std::string return_value = self.GetUUID(HasUUID); + output.set("return", return_value); + output.set("HasUUID", HasUUID); + return output; +} + +static emscripten::val wrap_BeamSet_GetReferences(CBeamSet &self) { + emscripten::val output = emscripten::val::object(); + std::vector References; + self.GetReferences(References); + output.set("References", References); + return output; +} + +static emscripten::val wrap_BeamSet_GetBallReferences(CBeamSet &self) { + emscripten::val output = emscripten::val::object(); + std::vector BallReferences; + self.GetBallReferences(BallReferences); + output.set("BallReferences", BallReferences); + return output; +} + +static emscripten::val wrap_BaseMaterialGroup_GetAllPropertyIDs(CBaseMaterialGroup &self) { + emscripten::val output = emscripten::val::object(); + std::vector PropertyIDs; + self.GetAllPropertyIDs(PropertyIDs); + output.set("PropertyIDs", PropertyIDs); + return output; +} + +static emscripten::val wrap_ColorGroup_GetAllPropertyIDs(CColorGroup &self) { + emscripten::val output = emscripten::val::object(); + std::vector PropertyIDs; + self.GetAllPropertyIDs(PropertyIDs); + output.set("PropertyIDs", PropertyIDs); + return output; +} + +static emscripten::val wrap_Texture2DGroup_GetAllPropertyIDs(CTexture2DGroup &self) { + emscripten::val output = emscripten::val::object(); + std::vector PropertyIDs; + self.GetAllPropertyIDs(PropertyIDs); + output.set("PropertyIDs", PropertyIDs); + return output; +} + +static emscripten::val wrap_CompositeMaterials_GetAllPropertyIDs(CCompositeMaterials &self) { + emscripten::val output = emscripten::val::object(); + std::vector PropertyIDs; + self.GetAllPropertyIDs(PropertyIDs); + output.set("PropertyIDs", PropertyIDs); + return output; +} + +static emscripten::val wrap_CompositeMaterials_GetComposite(CCompositeMaterials &self, const Lib3MF_uint32& PropertyID) { + emscripten::val output = emscripten::val::object(); + std::vector Composite; + self.GetComposite(PropertyID, Composite); + output.set("Composite", Composite); + return output; +} + +static emscripten::val wrap_MultiPropertyGroup_GetAllPropertyIDs(CMultiPropertyGroup &self) { + emscripten::val output = emscripten::val::object(); + std::vector PropertyIDs; + self.GetAllPropertyIDs(PropertyIDs); + output.set("PropertyIDs", PropertyIDs); + return output; +} + +static emscripten::val wrap_MultiPropertyGroup_GetMultiProperty(CMultiPropertyGroup &self, const Lib3MF_uint32& PropertyID) { + emscripten::val output = emscripten::val::object(); + std::vector PropertyIDs; + self.GetMultiProperty(PropertyID, PropertyIDs); + output.set("PropertyIDs", PropertyIDs); + return output; +} + +static emscripten::val wrap_Attachment_WriteToBuffer(CAttachment &self) { + emscripten::val output = emscripten::val::object(); + std::vector Buffer; + self.WriteToBuffer(Buffer); + output.set("Buffer", Buffer); + return output; +} + +static emscripten::val wrap_Texture2D_GetTileStyleUV(CTexture2D &self) { + emscripten::val output = emscripten::val::object(); + eTextureTileStyle TileStyleU; + eTextureTileStyle TileStyleV; + self.GetTileStyleUV(TileStyleU, TileStyleV); + output.set("TileStyleU", TileStyleU); + output.set("TileStyleV", TileStyleV); + return output; +} + +static emscripten::val wrap_FunctionFromImage3D_GetTileStyles(CFunctionFromImage3D &self) { + emscripten::val output = emscripten::val::object(); + eTextureTileStyle TileStyleU; + eTextureTileStyle TileStyleV; + eTextureTileStyle TileStyleW; + self.GetTileStyles(TileStyleU, TileStyleV, TileStyleW); + output.set("TileStyleU", TileStyleU); + output.set("TileStyleV", TileStyleV); + output.set("TileStyleW", TileStyleW); + return output; +} + +static emscripten::val wrap_BuildItem_GetUUID(CBuildItem &self) { + emscripten::val output = emscripten::val::object(); + bool HasUUID; + std::string return_value = self.GetUUID(HasUUID); + output.set("return", return_value); + output.set("HasUUID", HasUUID); + return output; +} + +static emscripten::val wrap_Slice_GetVertices(CSlice &self) { + emscripten::val output = emscripten::val::object(); + std::vector Vertices; + self.GetVertices(Vertices); + output.set("Vertices", Vertices); + return output; +} + +static emscripten::val wrap_Slice_GetPolygonIndices(CSlice &self, const Lib3MF_uint64& Index) { + emscripten::val output = emscripten::val::object(); + std::vector Indices; + self.GetPolygonIndices(Index, Indices); + output.set("Indices", Indices); + return output; +} + +static emscripten::val wrap_ContentEncryptionParams_GetKey(CContentEncryptionParams &self) { + emscripten::val output = emscripten::val::object(); + std::vector ByteData; + self.GetKey(ByteData); + output.set("ByteData", ByteData); + return output; +} + +static emscripten::val wrap_ContentEncryptionParams_GetInitializationVector(CContentEncryptionParams &self) { + emscripten::val output = emscripten::val::object(); + std::vector ByteData; + self.GetInitializationVector(ByteData); + output.set("ByteData", ByteData); + return output; +} + +static emscripten::val wrap_ContentEncryptionParams_GetAuthenticationTag(CContentEncryptionParams &self) { + emscripten::val output = emscripten::val::object(); + std::vector ByteData; + self.GetAuthenticationTag(ByteData); + output.set("ByteData", ByteData); + return output; +} + +static emscripten::val wrap_ContentEncryptionParams_GetAdditionalAuthenticationData(CContentEncryptionParams &self) { + emscripten::val output = emscripten::val::object(); + std::vector ByteData; + self.GetAdditionalAuthenticationData(ByteData); + output.set("ByteData", ByteData); + return output; +} + +static emscripten::val wrap_ResourceData_GetAdditionalAuthenticationData(CResourceData &self) { + emscripten::val output = emscripten::val::object(); + std::vector ByteData; + self.GetAdditionalAuthenticationData(ByteData); + output.set("ByteData", ByteData); + return output; +} + +static emscripten::val wrap_KeyStore_GetUUID(CKeyStore &self) { + emscripten::val output = emscripten::val::object(); + bool HasUUID; + std::string return_value = self.GetUUID(HasUUID); + output.set("return", return_value); + output.set("HasUUID", HasUUID); + return output; +} + +static emscripten::val wrap_Model_GetBuildUUID(CModel &self) { + emscripten::val output = emscripten::val::object(); + bool HasUUID; + std::string return_value = self.GetBuildUUID(HasUUID); + output.set("return", return_value); + output.set("HasUUID", HasUUID); + return output; +} + +static emscripten::val wrap_Wrapper_GetLibraryVersion(CWrapper &self) { + emscripten::val output = emscripten::val::object(); + Lib3MF_uint32 Major; + Lib3MF_uint32 Minor; + Lib3MF_uint32 Micro; + self.GetLibraryVersion(Major, Minor, Micro); + output.set("Major", Major); + output.set("Minor", Minor); + output.set("Micro", Micro); + return output; +} + +static emscripten::val wrap_Wrapper_GetPrereleaseInformation(CWrapper &self) { + emscripten::val output = emscripten::val::object(); + std::string PrereleaseInfo; + bool return_value = self.GetPrereleaseInformation(PrereleaseInfo); + output.set("return", return_value); + output.set("PrereleaseInfo", PrereleaseInfo); + return output; +} + +static emscripten::val wrap_Wrapper_GetBuildInformation(CWrapper &self) { + emscripten::val output = emscripten::val::object(); + std::string BuildInformation; + bool return_value = self.GetBuildInformation(BuildInformation); + output.set("return", return_value); + output.set("BuildInformation", BuildInformation); + return output; +} + +static emscripten::val wrap_Wrapper_GetSpecificationVersion(CWrapper &self, const std::string& SpecificationURL) { + emscripten::val output = emscripten::val::object(); + bool IsSupported; + Lib3MF_uint32 Major; + Lib3MF_uint32 Minor; + Lib3MF_uint32 Micro; + self.GetSpecificationVersion(SpecificationURL, IsSupported, Major, Minor, Micro); + output.set("IsSupported", IsSupported); + output.set("Major", Major); + output.set("Minor", Minor); + output.set("Micro", Micro); + return output; +} + +static emscripten::val wrap_Wrapper_GetLastError(CWrapper &self, PBase& Instance) { + emscripten::val output = emscripten::val::object(); + std::string LastErrorString; + bool return_value = self.GetLastError(classParam(Instance), LastErrorString); + output.set("return", return_value); + output.set("LastErrorString", LastErrorString); + return output; +} + +static emscripten::val wrap_Wrapper_RetrieveProgressMessage(CWrapper &self, const eProgressIdentifier& TheProgressIdentifier) { + emscripten::val output = emscripten::val::object(); + std::string ProgressMessage; + self.RetrieveProgressMessage(TheProgressIdentifier, ProgressMessage); + output.set("ProgressMessage", ProgressMessage); + return output; +} + +static emscripten::val wrap_Wrapper_ColorToRGBA(CWrapper &self, const sColorWrapper& TheColor) { + emscripten::val output = emscripten::val::object(); + Lib3MF_uint8 Red; + Lib3MF_uint8 Green; + Lib3MF_uint8 Blue; + Lib3MF_uint8 Alpha; + self.ColorToRGBA(TheColor.toStruct(), Red, Green, Blue, Alpha); + output.set("Red", Red); + output.set("Green", Green); + output.set("Blue", Blue); + output.set("Alpha", Alpha); + return output; +} + +static emscripten::val wrap_Wrapper_ColorToFloatRGBA(CWrapper &self, const sColorWrapper& TheColor) { + emscripten::val output = emscripten::val::object(); + Lib3MF_single Red; + Lib3MF_single Green; + Lib3MF_single Blue; + Lib3MF_single Alpha; + self.ColorToFloatRGBA(TheColor.toStruct(), Red, Green, Blue, Alpha); + output.set("Red", Red); + output.set("Green", Green); + output.set("Blue", Blue); + output.set("Alpha", Alpha); + return output; +} + +// ================== Emscripten Bindings ================== +EMSCRIPTEN_BINDINGS(Lib3MF) { + // Enums + enum_("ePropertyType") + .value("NoPropertyType", ePropertyType::NoPropertyType) + .value("BaseMaterial", ePropertyType::BaseMaterial) + .value("TexCoord", ePropertyType::TexCoord) + .value("Colors", ePropertyType::Colors) + .value("Composite", ePropertyType::Composite) + .value("Multi", ePropertyType::Multi) + ; + enum_("eSlicesMeshResolution") + .value("Fullres", eSlicesMeshResolution::Fullres) + .value("Lowres", eSlicesMeshResolution::Lowres) + ; + enum_("eModelUnit") + .value("MicroMeter", eModelUnit::MicroMeter) + .value("MilliMeter", eModelUnit::MilliMeter) + .value("CentiMeter", eModelUnit::CentiMeter) + .value("Inch", eModelUnit::Inch) + .value("Foot", eModelUnit::Foot) + .value("Meter", eModelUnit::Meter) + ; + enum_("eObjectType") + .value("Other", eObjectType::Other) + .value("Model", eObjectType::Model) + .value("Support", eObjectType::Support) + .value("SolidSupport", eObjectType::SolidSupport) + .value("Surface", eObjectType::Surface) + ; + enum_("eTextureType") + .value("Unknown", eTextureType::Unknown) + .value("PNG", eTextureType::PNG) + .value("JPEG", eTextureType::JPEG) + ; + enum_("eTextureTileStyle") + .value("Wrap", eTextureTileStyle::Wrap) + .value("Mirror", eTextureTileStyle::Mirror) + .value("Clamp", eTextureTileStyle::Clamp) + .value("NoTileStyle", eTextureTileStyle::NoTileStyle) + ; + enum_("eTextureFilter") + .value("Auto", eTextureFilter::Auto) + .value("Linear", eTextureFilter::Linear) + .value("Nearest", eTextureFilter::Nearest) + ; + enum_("eBeamLatticeCapMode") + .value("Sphere", eBeamLatticeCapMode::Sphere) + .value("HemiSphere", eBeamLatticeCapMode::HemiSphere) + .value("Butt", eBeamLatticeCapMode::Butt) + ; + enum_("eBeamLatticeClipMode") + .value("NoClipMode", eBeamLatticeClipMode::NoClipMode) + .value("Inside", eBeamLatticeClipMode::Inside) + .value("Outside", eBeamLatticeClipMode::Outside) + ; + enum_("eBeamLatticeBallMode") + .value("BeamLatticeBallModeNone", eBeamLatticeBallMode::BeamLatticeBallModeNone) + .value("Mixed", eBeamLatticeBallMode::Mixed) + .value("All", eBeamLatticeBallMode::All) + ; + enum_("eProgressIdentifier") + .value("QUERYCANCELED", eProgressIdentifier::QUERYCANCELED) + .value("DONE", eProgressIdentifier::DONE) + .value("CLEANUP", eProgressIdentifier::CLEANUP) + .value("READSTREAM", eProgressIdentifier::READSTREAM) + .value("EXTRACTOPCPACKAGE", eProgressIdentifier::EXTRACTOPCPACKAGE) + .value("READNONROOTMODELS", eProgressIdentifier::READNONROOTMODELS) + .value("READROOTMODEL", eProgressIdentifier::READROOTMODEL) + .value("READRESOURCES", eProgressIdentifier::READRESOURCES) + .value("READMESH", eProgressIdentifier::READMESH) + .value("READSLICES", eProgressIdentifier::READSLICES) + .value("READBUILD", eProgressIdentifier::READBUILD) + .value("READCUSTOMATTACHMENT", eProgressIdentifier::READCUSTOMATTACHMENT) + .value("READTEXTURETACHMENTS", eProgressIdentifier::READTEXTURETACHMENTS) + .value("CREATEOPCPACKAGE", eProgressIdentifier::CREATEOPCPACKAGE) + .value("WRITEMODELSTOSTREAM", eProgressIdentifier::WRITEMODELSTOSTREAM) + .value("WRITEROOTMODEL", eProgressIdentifier::WRITEROOTMODEL) + .value("WRITENONROOTMODELS", eProgressIdentifier::WRITENONROOTMODELS) + .value("WRITEATTACHMENTS", eProgressIdentifier::WRITEATTACHMENTS) + .value("WRITECONTENTTYPES", eProgressIdentifier::WRITECONTENTTYPES) + .value("WRITENOBJECTS", eProgressIdentifier::WRITENOBJECTS) + .value("WRITENODES", eProgressIdentifier::WRITENODES) + .value("WRITETRIANGLES", eProgressIdentifier::WRITETRIANGLES) + .value("WRITESLICES", eProgressIdentifier::WRITESLICES) + .value("WRITEKEYSTORE", eProgressIdentifier::WRITEKEYSTORE) + ; + enum_("eBlendMethod") + .value("NoBlendMethod", eBlendMethod::NoBlendMethod) + .value("Mix", eBlendMethod::Mix) + .value("Multiply", eBlendMethod::Multiply) + ; + enum_("eChannelName") + .value("Red", eChannelName::Red) + .value("Green", eChannelName::Green) + .value("Blue", eChannelName::Blue) + .value("Alpha", eChannelName::Alpha) + ; + enum_("eCompositionMethod") + .value("WeightedSum", eCompositionMethod::WeightedSum) + .value("Multiply", eCompositionMethod::Multiply) + .value("Min", eCompositionMethod::Min) + .value("Max", eCompositionMethod::Max) + .value("Mask", eCompositionMethod::Mask) + ; + enum_("eCompositionSpace") + .value("Raw", eCompositionSpace::Raw) + .value("LinearColor", eCompositionSpace::LinearColor) + ; + enum_("eImplicitNodeType") + .value("Addition", eImplicitNodeType::Addition) + .value("Subtraction", eImplicitNodeType::Subtraction) + .value("Multiplication", eImplicitNodeType::Multiplication) + .value("Division", eImplicitNodeType::Division) + .value("Constant", eImplicitNodeType::Constant) + .value("ConstVec", eImplicitNodeType::ConstVec) + .value("ConstMat", eImplicitNodeType::ConstMat) + .value("ComposeVector", eImplicitNodeType::ComposeVector) + .value("DecomposeVector", eImplicitNodeType::DecomposeVector) + .value("ComposeMatrix", eImplicitNodeType::ComposeMatrix) + .value("MatrixFromColumns", eImplicitNodeType::MatrixFromColumns) + .value("MatrixFromRows", eImplicitNodeType::MatrixFromRows) + .value("Dot", eImplicitNodeType::Dot) + .value("Cross", eImplicitNodeType::Cross) + .value("MatVecMultiplication", eImplicitNodeType::MatVecMultiplication) + .value("Transpose", eImplicitNodeType::Transpose) + .value("Inverse", eImplicitNodeType::Inverse) + .value("Sinus", eImplicitNodeType::Sinus) + .value("Cosinus", eImplicitNodeType::Cosinus) + .value("Tan", eImplicitNodeType::Tan) + .value("ArcSin", eImplicitNodeType::ArcSin) + .value("ArcCos", eImplicitNodeType::ArcCos) + .value("ArcTan", eImplicitNodeType::ArcTan) + .value("ArcTan2", eImplicitNodeType::ArcTan2) + .value("Min", eImplicitNodeType::Min) + .value("Max", eImplicitNodeType::Max) + .value("Abs", eImplicitNodeType::Abs) + .value("Fmod", eImplicitNodeType::Fmod) + .value("Pow", eImplicitNodeType::Pow) + .value("Sqrt", eImplicitNodeType::Sqrt) + .value("Exp", eImplicitNodeType::Exp) + .value("Log", eImplicitNodeType::Log) + .value("Log2", eImplicitNodeType::Log2) + .value("Log10", eImplicitNodeType::Log10) + .value("Select", eImplicitNodeType::Select) + .value("Clamp", eImplicitNodeType::Clamp) + .value("Sinh", eImplicitNodeType::Sinh) + .value("Cosh", eImplicitNodeType::Cosh) + .value("Tanh", eImplicitNodeType::Tanh) + .value("Round", eImplicitNodeType::Round) + .value("Ceil", eImplicitNodeType::Ceil) + .value("Floor", eImplicitNodeType::Floor) + .value("Sign", eImplicitNodeType::Sign) + .value("Fract", eImplicitNodeType::Fract) + .value("FunctionCall", eImplicitNodeType::FunctionCall) + .value("Mesh", eImplicitNodeType::Mesh) + .value("Length", eImplicitNodeType::Length) + .value("ConstResourceID", eImplicitNodeType::ConstResourceID) + .value("VectorFromScalar", eImplicitNodeType::VectorFromScalar) + .value("UnsignedMesh", eImplicitNodeType::UnsignedMesh) + .value("Mod", eImplicitNodeType::Mod) + .value("BeamLattice", eImplicitNodeType::BeamLattice) + .value("FunctionGradient", eImplicitNodeType::FunctionGradient) + .value("NormalizeDistance", eImplicitNodeType::NormalizeDistance) + ; + enum_("eImplicitPortType") + .value("Scalar", eImplicitPortType::Scalar) + .value("Vector", eImplicitPortType::Vector) + .value("Matrix", eImplicitPortType::Matrix) + .value("ResourceID", eImplicitPortType::ResourceID) + ; + enum_("eImplicitNodeConfiguration") + .value("Default", eImplicitNodeConfiguration::Default) + .value("ScalarToScalar", eImplicitNodeConfiguration::ScalarToScalar) + .value("VectorToVector", eImplicitNodeConfiguration::VectorToVector) + .value("MatrixToMatrix", eImplicitNodeConfiguration::MatrixToMatrix) + ; + enum_("eEncryptionAlgorithm") + .value("AES256_GCM", eEncryptionAlgorithm::AES256_GCM) + ; + enum_("eWrappingAlgorithm") + .value("RSA_OAEP", eWrappingAlgorithm::RSA_OAEP) + ; + enum_("eMgfAlgorithm") + .value("MGF1_SHA1", eMgfAlgorithm::MGF1_SHA1) + .value("MGF1_SHA224", eMgfAlgorithm::MGF1_SHA224) + .value("MGF1_SHA256", eMgfAlgorithm::MGF1_SHA256) + .value("MGF1_SHA384", eMgfAlgorithm::MGF1_SHA384) + .value("MGF1_SHA512", eMgfAlgorithm::MGF1_SHA512) + ; + enum_("eDigestMethod") + .value("SHA1", eDigestMethod::SHA1) + .value("SHA256", eDigestMethod::SHA256) + ; + enum_("eCompression") + .value("NoCompression", eCompression::NoCompression) + .value("Deflate", eCompression::Deflate) + ; + + // Register JS bindings for struct-array wrappers + register_vector("std::vector"); + register_vector("std::vector"); + register_vector("std::vector"); + register_vector("std::vector"); + register_vector("std::vector"); + register_vector("std::vector"); + register_vector("std::vector"); + register_vector("std::vector"); + register_vector("std::vector"); + register_vector("std::vector"); + register_vector("std::vector"); + register_vector("std::vector"); + register_vector("std::vector"); + register_vector("std::vector"); + + // Structs as exposed JS classes + class_("sTriangle") + .constructor<>() + .class_function("fromStruct", &sTriangleWrapper::fromStruct) + .function("get_Indices0", &sTriangleWrapper::get_Indices0) + .function("set_Indices0", &sTriangleWrapper::set_Indices0) + .function("get_Indices1", &sTriangleWrapper::get_Indices1) + .function("set_Indices1", &sTriangleWrapper::set_Indices1) + .function("get_Indices2", &sTriangleWrapper::get_Indices2) + .function("set_Indices2", &sTriangleWrapper::set_Indices2) + ; + class_("sTriangleProperties") + .constructor<>() + .class_function("fromStruct", &sTrianglePropertiesWrapper::fromStruct) + .function("get_ResourceID", &sTrianglePropertiesWrapper::get_ResourceID) + .function("set_ResourceID", &sTrianglePropertiesWrapper::set_ResourceID) + .function("get_PropertyIDs0", &sTrianglePropertiesWrapper::get_PropertyIDs0) + .function("set_PropertyIDs0", &sTrianglePropertiesWrapper::set_PropertyIDs0) + .function("get_PropertyIDs1", &sTrianglePropertiesWrapper::get_PropertyIDs1) + .function("set_PropertyIDs1", &sTrianglePropertiesWrapper::set_PropertyIDs1) + .function("get_PropertyIDs2", &sTrianglePropertiesWrapper::get_PropertyIDs2) + .function("set_PropertyIDs2", &sTrianglePropertiesWrapper::set_PropertyIDs2) + ; + class_("sPosition") + .constructor<>() + .class_function("fromStruct", &sPositionWrapper::fromStruct) + .function("get_Coordinates0", &sPositionWrapper::get_Coordinates0) + .function("set_Coordinates0", &sPositionWrapper::set_Coordinates0) + .function("get_Coordinates1", &sPositionWrapper::get_Coordinates1) + .function("set_Coordinates1", &sPositionWrapper::set_Coordinates1) + .function("get_Coordinates2", &sPositionWrapper::get_Coordinates2) + .function("set_Coordinates2", &sPositionWrapper::set_Coordinates2) + ; + class_("sPosition2D") + .constructor<>() + .class_function("fromStruct", &sPosition2DWrapper::fromStruct) + .function("get_Coordinates0", &sPosition2DWrapper::get_Coordinates0) + .function("set_Coordinates0", &sPosition2DWrapper::set_Coordinates0) + .function("get_Coordinates1", &sPosition2DWrapper::get_Coordinates1) + .function("set_Coordinates1", &sPosition2DWrapper::set_Coordinates1) + ; + class_("sCompositeConstituent") + .constructor<>() + .class_function("fromStruct", &sCompositeConstituentWrapper::fromStruct) + .function("get_PropertyID", &sCompositeConstituentWrapper::get_PropertyID) + .function("set_PropertyID", &sCompositeConstituentWrapper::set_PropertyID) + .function("get_MixingRatio", &sCompositeConstituentWrapper::get_MixingRatio) + .function("set_MixingRatio", &sCompositeConstituentWrapper::set_MixingRatio) + ; + class_("sMultiPropertyLayer") + .constructor<>() + .class_function("fromStruct", &sMultiPropertyLayerWrapper::fromStruct) + .function("get_ResourceID", &sMultiPropertyLayerWrapper::get_ResourceID) + .function("set_ResourceID", &sMultiPropertyLayerWrapper::set_ResourceID) + .function("get_TheBlendMethod", &sMultiPropertyLayerWrapper::get_TheBlendMethod) + .function("set_TheBlendMethod", &sMultiPropertyLayerWrapper::set_TheBlendMethod) + ; + class_("sTex2Coord") + .constructor<>() + .class_function("fromStruct", &sTex2CoordWrapper::fromStruct) + .function("get_U", &sTex2CoordWrapper::get_U) + .function("set_U", &sTex2CoordWrapper::set_U) + .function("get_V", &sTex2CoordWrapper::get_V) + .function("set_V", &sTex2CoordWrapper::set_V) + ; + class_("sTransform") + .constructor<>() + .class_function("fromStruct", &sTransformWrapper::fromStruct) + .function("get_Fields_0_0", &sTransformWrapper::get_Fields_0_0) + .function("set_Fields_0_0", &sTransformWrapper::set_Fields_0_0) + .function("get_Fields_0_1", &sTransformWrapper::get_Fields_0_1) + .function("set_Fields_0_1", &sTransformWrapper::set_Fields_0_1) + .function("get_Fields_0_2", &sTransformWrapper::get_Fields_0_2) + .function("set_Fields_0_2", &sTransformWrapper::set_Fields_0_2) + .function("get_Fields_1_0", &sTransformWrapper::get_Fields_1_0) + .function("set_Fields_1_0", &sTransformWrapper::set_Fields_1_0) + .function("get_Fields_1_1", &sTransformWrapper::get_Fields_1_1) + .function("set_Fields_1_1", &sTransformWrapper::set_Fields_1_1) + .function("get_Fields_1_2", &sTransformWrapper::get_Fields_1_2) + .function("set_Fields_1_2", &sTransformWrapper::set_Fields_1_2) + .function("get_Fields_2_0", &sTransformWrapper::get_Fields_2_0) + .function("set_Fields_2_0", &sTransformWrapper::set_Fields_2_0) + .function("get_Fields_2_1", &sTransformWrapper::get_Fields_2_1) + .function("set_Fields_2_1", &sTransformWrapper::set_Fields_2_1) + .function("get_Fields_2_2", &sTransformWrapper::get_Fields_2_2) + .function("set_Fields_2_2", &sTransformWrapper::set_Fields_2_2) + .function("get_Fields_3_0", &sTransformWrapper::get_Fields_3_0) + .function("set_Fields_3_0", &sTransformWrapper::set_Fields_3_0) + .function("get_Fields_3_1", &sTransformWrapper::get_Fields_3_1) + .function("set_Fields_3_1", &sTransformWrapper::set_Fields_3_1) + .function("get_Fields_3_2", &sTransformWrapper::get_Fields_3_2) + .function("set_Fields_3_2", &sTransformWrapper::set_Fields_3_2) + ; + class_("sBox") + .constructor<>() + .class_function("fromStruct", &sBoxWrapper::fromStruct) + .function("get_MinCoordinate0", &sBoxWrapper::get_MinCoordinate0) + .function("set_MinCoordinate0", &sBoxWrapper::set_MinCoordinate0) + .function("get_MinCoordinate1", &sBoxWrapper::get_MinCoordinate1) + .function("set_MinCoordinate1", &sBoxWrapper::set_MinCoordinate1) + .function("get_MinCoordinate2", &sBoxWrapper::get_MinCoordinate2) + .function("set_MinCoordinate2", &sBoxWrapper::set_MinCoordinate2) + .function("get_MaxCoordinate0", &sBoxWrapper::get_MaxCoordinate0) + .function("set_MaxCoordinate0", &sBoxWrapper::set_MaxCoordinate0) + .function("get_MaxCoordinate1", &sBoxWrapper::get_MaxCoordinate1) + .function("set_MaxCoordinate1", &sBoxWrapper::set_MaxCoordinate1) + .function("get_MaxCoordinate2", &sBoxWrapper::get_MaxCoordinate2) + .function("set_MaxCoordinate2", &sBoxWrapper::set_MaxCoordinate2) + ; + class_("sColor") + .constructor<>() + .class_function("fromStruct", &sColorWrapper::fromStruct) + .function("get_Red", &sColorWrapper::get_Red) + .function("set_Red", &sColorWrapper::set_Red) + .function("get_Green", &sColorWrapper::get_Green) + .function("set_Green", &sColorWrapper::set_Green) + .function("get_Blue", &sColorWrapper::get_Blue) + .function("set_Blue", &sColorWrapper::set_Blue) + .function("get_Alpha", &sColorWrapper::get_Alpha) + .function("set_Alpha", &sColorWrapper::set_Alpha) + ; + class_("sBeam") + .constructor<>() + .class_function("fromStruct", &sBeamWrapper::fromStruct) + .function("get_Indices0", &sBeamWrapper::get_Indices0) + .function("set_Indices0", &sBeamWrapper::set_Indices0) + .function("get_Indices1", &sBeamWrapper::get_Indices1) + .function("set_Indices1", &sBeamWrapper::set_Indices1) + .function("get_Radii0", &sBeamWrapper::get_Radii0) + .function("set_Radii0", &sBeamWrapper::set_Radii0) + .function("get_Radii1", &sBeamWrapper::get_Radii1) + .function("set_Radii1", &sBeamWrapper::set_Radii1) + .function("get_CapModes0", &sBeamWrapper::get_CapModes0) + .function("set_CapModes0", &sBeamWrapper::set_CapModes0) + .function("get_CapModes1", &sBeamWrapper::get_CapModes1) + .function("set_CapModes1", &sBeamWrapper::set_CapModes1) + ; + class_("sBall") + .constructor<>() + .class_function("fromStruct", &sBallWrapper::fromStruct) + .function("get_Index", &sBallWrapper::get_Index) + .function("set_Index", &sBallWrapper::set_Index) + .function("get_Radius", &sBallWrapper::get_Radius) + .function("set_Radius", &sBallWrapper::set_Radius) + ; + class_("sVector") + .constructor<>() + .class_function("fromStruct", &sVectorWrapper::fromStruct) + .function("get_Coordinates0", &sVectorWrapper::get_Coordinates0) + .function("set_Coordinates0", &sVectorWrapper::set_Coordinates0) + .function("get_Coordinates1", &sVectorWrapper::get_Coordinates1) + .function("set_Coordinates1", &sVectorWrapper::set_Coordinates1) + .function("get_Coordinates2", &sVectorWrapper::get_Coordinates2) + .function("set_Coordinates2", &sVectorWrapper::set_Coordinates2) + ; + class_("sMatrix4x4") + .constructor<>() + .class_function("fromStruct", &sMatrix4x4Wrapper::fromStruct) + .function("get_Field_0_0", &sMatrix4x4Wrapper::get_Field_0_0) + .function("set_Field_0_0", &sMatrix4x4Wrapper::set_Field_0_0) + .function("get_Field_0_1", &sMatrix4x4Wrapper::get_Field_0_1) + .function("set_Field_0_1", &sMatrix4x4Wrapper::set_Field_0_1) + .function("get_Field_0_2", &sMatrix4x4Wrapper::get_Field_0_2) + .function("set_Field_0_2", &sMatrix4x4Wrapper::set_Field_0_2) + .function("get_Field_0_3", &sMatrix4x4Wrapper::get_Field_0_3) + .function("set_Field_0_3", &sMatrix4x4Wrapper::set_Field_0_3) + .function("get_Field_1_0", &sMatrix4x4Wrapper::get_Field_1_0) + .function("set_Field_1_0", &sMatrix4x4Wrapper::set_Field_1_0) + .function("get_Field_1_1", &sMatrix4x4Wrapper::get_Field_1_1) + .function("set_Field_1_1", &sMatrix4x4Wrapper::set_Field_1_1) + .function("get_Field_1_2", &sMatrix4x4Wrapper::get_Field_1_2) + .function("set_Field_1_2", &sMatrix4x4Wrapper::set_Field_1_2) + .function("get_Field_1_3", &sMatrix4x4Wrapper::get_Field_1_3) + .function("set_Field_1_3", &sMatrix4x4Wrapper::set_Field_1_3) + .function("get_Field_2_0", &sMatrix4x4Wrapper::get_Field_2_0) + .function("set_Field_2_0", &sMatrix4x4Wrapper::set_Field_2_0) + .function("get_Field_2_1", &sMatrix4x4Wrapper::get_Field_2_1) + .function("set_Field_2_1", &sMatrix4x4Wrapper::set_Field_2_1) + .function("get_Field_2_2", &sMatrix4x4Wrapper::get_Field_2_2) + .function("set_Field_2_2", &sMatrix4x4Wrapper::set_Field_2_2) + .function("get_Field_2_3", &sMatrix4x4Wrapper::get_Field_2_3) + .function("set_Field_2_3", &sMatrix4x4Wrapper::set_Field_2_3) + .function("get_Field_3_0", &sMatrix4x4Wrapper::get_Field_3_0) + .function("set_Field_3_0", &sMatrix4x4Wrapper::set_Field_3_0) + .function("get_Field_3_1", &sMatrix4x4Wrapper::get_Field_3_1) + .function("set_Field_3_1", &sMatrix4x4Wrapper::set_Field_3_1) + .function("get_Field_3_2", &sMatrix4x4Wrapper::get_Field_3_2) + .function("set_Field_3_2", &sMatrix4x4Wrapper::set_Field_3_2) + .function("get_Field_3_3", &sMatrix4x4Wrapper::get_Field_3_3) + .function("set_Field_3_3", &sMatrix4x4Wrapper::set_Field_3_3) + ; + + // Binding Methods + class_("CBase") + .smart_ptr>("shared_ptr") + .function("ClassTypeId", &CBase::ClassTypeId) + ; + class_>("CWriter") + .smart_ptr>("shared_ptr") + .function("WriteToFile", &CWriter::WriteToFile) + .function("GetStreamSize", &CWriter::GetStreamSize) + .function("WriteToBuffer", &wrap_Writer_WriteToBuffer) + // .function("WriteToCallback", &wrap_Writer_WriteToCallback) // Skipped due to callback + // .function("SetProgressCallback", &wrap_Writer_SetProgressCallback) // Skipped due to callback + .function("GetDecimalPrecision", &CWriter::GetDecimalPrecision) + .function("SetDecimalPrecision", &CWriter::SetDecimalPrecision) + .function("SetStrictModeActive", &CWriter::SetStrictModeActive) + .function("GetStrictModeActive", &CWriter::GetStrictModeActive) + .function("GetWarning", &wrap_Writer_GetWarning) + .function("GetWarningCount", &CWriter::GetWarningCount) + // .function("AddKeyWrappingCallback", &wrap_Writer_AddKeyWrappingCallback) // Skipped due to callback + // .function("SetContentEncryptionCallback", &wrap_Writer_SetContentEncryptionCallback) // Skipped due to callback + ; + class_>("CReader") + .smart_ptr>("shared_ptr") + .function("ReadFromFile", &CReader::ReadFromFile) + .function("ReadFromBuffer", &CReader::ReadFromBuffer) + // .function("ReadFromCallback", &wrap_Reader_ReadFromCallback) // Skipped due to callback + // .function("SetProgressCallback", &wrap_Reader_SetProgressCallback) // Skipped due to callback + .function("AddRelationToRead", &CReader::AddRelationToRead) + .function("RemoveRelationToRead", &CReader::RemoveRelationToRead) + .function("SetStrictModeActive", &CReader::SetStrictModeActive) + .function("GetStrictModeActive", &CReader::GetStrictModeActive) + .function("GetWarning", &wrap_Reader_GetWarning) + .function("GetWarningCount", &CReader::GetWarningCount) + // .function("AddKeyWrappingCallback", &wrap_Reader_AddKeyWrappingCallback) // Skipped due to callback + // .function("SetContentEncryptionCallback", &wrap_Reader_SetContentEncryptionCallback) // Skipped due to callback + ; + class_>("CPackagePart") + .smart_ptr>("shared_ptr") + .function("GetPath", &CPackagePart::GetPath) + .function("SetPath", &CPackagePart::SetPath) + ; + class_>("CResource") + .smart_ptr>("shared_ptr") + .function("GetResourceID", &CResource::GetResourceID) + .function("GetUniqueResourceID", &CResource::GetUniqueResourceID) + .function("PackagePart", &CResource::PackagePart) + .function("SetPackagePart", &wrap_Resource_SetPackagePart) + .function("GetModelResourceID", &CResource::GetModelResourceID) + ; + class_>("CResourceIterator") + .smart_ptr>("shared_ptr") + .function("MoveNext", &CResourceIterator::MoveNext) + .function("MovePrevious", &CResourceIterator::MovePrevious) + .function("GetCurrent", &CResourceIterator::GetCurrent) + .function("Clone", &CResourceIterator::Clone) + .function("Count", &CResourceIterator::Count) + ; + class_>("CSliceStackIterator") + .smart_ptr>("shared_ptr") + .function("GetCurrentSliceStack", &CSliceStackIterator::GetCurrentSliceStack) + ; + class_>("CObjectIterator") + .smart_ptr>("shared_ptr") + .function("GetCurrentObject", &CObjectIterator::GetCurrentObject) + ; + class_>("CMeshObjectIterator") + .smart_ptr>("shared_ptr") + .function("GetCurrentMeshObject", &CMeshObjectIterator::GetCurrentMeshObject) + ; + class_>("CComponentsObjectIterator") + .smart_ptr>("shared_ptr") + .function("GetCurrentComponentsObject", &CComponentsObjectIterator::GetCurrentComponentsObject) + ; + class_>("CTexture2DIterator") + .smart_ptr>("shared_ptr") + .function("GetCurrentTexture2D", &CTexture2DIterator::GetCurrentTexture2D) + ; + class_>("CBaseMaterialGroupIterator") + .smart_ptr>("shared_ptr") + .function("GetCurrentBaseMaterialGroup", &CBaseMaterialGroupIterator::GetCurrentBaseMaterialGroup) + ; + class_>("CColorGroupIterator") + .smart_ptr>("shared_ptr") + .function("GetCurrentColorGroup", &CColorGroupIterator::GetCurrentColorGroup) + ; + class_>("CTexture2DGroupIterator") + .smart_ptr>("shared_ptr") + .function("GetCurrentTexture2DGroup", &CTexture2DGroupIterator::GetCurrentTexture2DGroup) + ; + class_>("CCompositeMaterialsIterator") + .smart_ptr>("shared_ptr") + .function("GetCurrentCompositeMaterials", &CCompositeMaterialsIterator::GetCurrentCompositeMaterials) + ; + class_>("CMultiPropertyGroupIterator") + .smart_ptr>("shared_ptr") + .function("GetCurrentMultiPropertyGroup", &CMultiPropertyGroupIterator::GetCurrentMultiPropertyGroup) + ; + class_>("CImage3DIterator") + .smart_ptr>("shared_ptr") + .function("GetCurrentImage3D", &CImage3DIterator::GetCurrentImage3D) + ; + class_>("CFunctionIterator") + .smart_ptr>("shared_ptr") + .function("GetCurrentFunction", &CFunctionIterator::GetCurrentFunction) + ; + class_>("CLevelSetIterator") + .smart_ptr>("shared_ptr") + .function("GetCurrentLevelSet", &CLevelSetIterator::GetCurrentLevelSet) + ; + class_>("CMetaData") + .smart_ptr>("shared_ptr") + .function("GetNameSpace", &CMetaData::GetNameSpace) + .function("SetNameSpace", &CMetaData::SetNameSpace) + .function("GetName", &CMetaData::GetName) + .function("SetName", &CMetaData::SetName) + .function("GetKey", &CMetaData::GetKey) + .function("GetMustPreserve", &CMetaData::GetMustPreserve) + .function("SetMustPreserve", &CMetaData::SetMustPreserve) + .function("GetType", &CMetaData::GetType) + .function("SetType", &CMetaData::SetType) + .function("GetValue", &CMetaData::GetValue) + .function("SetValue", &CMetaData::SetValue) + ; + class_>("CMetaDataGroup") + .smart_ptr>("shared_ptr") + .function("GetMetaDataCount", &CMetaDataGroup::GetMetaDataCount) + .function("GetMetaData", &CMetaDataGroup::GetMetaData) + .function("GetMetaDataByKey", &CMetaDataGroup::GetMetaDataByKey) + .function("RemoveMetaDataByIndex", &CMetaDataGroup::RemoveMetaDataByIndex) + .function("RemoveMetaData", &wrap_MetaDataGroup_RemoveMetaData) + .function("AddMetaData", &CMetaDataGroup::AddMetaData) + ; + class_>("CTriangleSet") + .smart_ptr>("shared_ptr") + .function("SetName", &CTriangleSet::SetName) + .function("GetName", &CTriangleSet::GetName) + .function("SetIdentifier", &CTriangleSet::SetIdentifier) + .function("GetIdentifier", &CTriangleSet::GetIdentifier) + .function("AddTriangle", &CTriangleSet::AddTriangle) + .function("RemoveTriangle", &CTriangleSet::RemoveTriangle) + .function("Clear", &CTriangleSet::Clear) + .function("SetTriangleList", &CTriangleSet::SetTriangleList) + .function("GetTriangleList", &wrap_TriangleSet_GetTriangleList) + .function("AddTriangleList", &CTriangleSet::AddTriangleList) + .function("Merge", &wrap_TriangleSet_Merge) + .function("DeleteSet", &CTriangleSet::DeleteSet) + .function("Duplicate", &CTriangleSet::Duplicate) + ; + class_>("CObject") + .smart_ptr>("shared_ptr") + .function("GetType", &CObject::GetType) + .function("SetType", &CObject::SetType) + .function("GetName", &CObject::GetName) + .function("SetName", &CObject::SetName) + .function("GetPartNumber", &CObject::GetPartNumber) + .function("SetPartNumber", &CObject::SetPartNumber) + .function("IsMeshObject", &CObject::IsMeshObject) + .function("IsComponentsObject", &CObject::IsComponentsObject) + .function("IsLevelSetObject", &CObject::IsLevelSetObject) + .function("IsValid", &CObject::IsValid) + .function("SetAttachmentAsThumbnail", &wrap_Object_SetAttachmentAsThumbnail) + .function("GetThumbnailAttachment", &CObject::GetThumbnailAttachment) + .function("ClearThumbnailAttachment", &CObject::ClearThumbnailAttachment) + .function("GetOutbox", &wrap_Object_GetOutbox) + .function("GetUUID", &wrap_Object_GetUUID) + .function("SetUUID", &CObject::SetUUID) + .function("GetMetaDataGroup", &CObject::GetMetaDataGroup) + .function("SetSlicesMeshResolution", &CObject::SetSlicesMeshResolution) + .function("GetSlicesMeshResolution", &CObject::GetSlicesMeshResolution) + .function("HasSlices", &CObject::HasSlices) + .function("ClearSliceStack", &CObject::ClearSliceStack) + .function("GetSliceStack", &CObject::GetSliceStack) + .function("AssignSliceStack", &wrap_Object_AssignSliceStack) + ; + class_>("CMeshObject") + .smart_ptr>("shared_ptr") + .function("GetVertexCount", &CMeshObject::GetVertexCount) + .function("GetTriangleCount", &CMeshObject::GetTriangleCount) + .function("GetVertex", &wrap_MeshObject_GetVertex) + .function("SetVertex", &wrap_MeshObject_SetVertex) + .function("AddVertex", &wrap_MeshObject_AddVertex) + .function("GetVertices", &wrap_MeshObject_GetVertices) + .function("GetTriangle", &wrap_MeshObject_GetTriangle) + .function("SetTriangle", &wrap_MeshObject_SetTriangle) + .function("AddTriangle", &wrap_MeshObject_AddTriangle) + .function("GetTriangleIndices", &wrap_MeshObject_GetTriangleIndices) + .function("SetObjectLevelProperty", &CMeshObject::SetObjectLevelProperty) + .function("GetObjectLevelProperty", &wrap_MeshObject_GetObjectLevelProperty) + .function("SetTriangleProperties", &wrap_MeshObject_SetTriangleProperties) + .function("GetTriangleProperties", &wrap_MeshObject_GetTriangleProperties) + .function("SetAllTriangleProperties", &wrap_MeshObject_SetAllTriangleProperties) + .function("GetAllTriangleProperties", &wrap_MeshObject_GetAllTriangleProperties) + .function("ClearAllProperties", &CMeshObject::ClearAllProperties) + .function("SetGeometry", &wrap_MeshObject_SetGeometry) + .function("IsManifoldAndOriented", &CMeshObject::IsManifoldAndOriented) + .function("BeamLattice", &CMeshObject::BeamLattice) + .function("GetVolumeData", &CMeshObject::GetVolumeData) + .function("SetVolumeData", &wrap_MeshObject_SetVolumeData) + .function("AddTriangleSet", &CMeshObject::AddTriangleSet) + .function("HasTriangleSet", &CMeshObject::HasTriangleSet) + .function("FindTriangleSet", &CMeshObject::FindTriangleSet) + .function("GetTriangleSetCount", &CMeshObject::GetTriangleSetCount) + .function("GetTriangleSet", &CMeshObject::GetTriangleSet) + ; + class_>("CLevelSet") + .smart_ptr>("shared_ptr") + .function("GetFunction", &CLevelSet::GetFunction) + .function("SetFunction", &wrap_LevelSet_SetFunction) + .function("GetTransform", &wrap_LevelSet_GetTransform) + .function("SetTransform", &wrap_LevelSet_SetTransform) + .function("GetChannelName", &CLevelSet::GetChannelName) + .function("SetChannelName", &CLevelSet::SetChannelName) + .function("SetMinFeatureSize", &CLevelSet::SetMinFeatureSize) + .function("GetMinFeatureSize", &CLevelSet::GetMinFeatureSize) + .function("SetFallBackValue", &CLevelSet::SetFallBackValue) + .function("GetFallBackValue", &CLevelSet::GetFallBackValue) + .function("SetMeshBBoxOnly", &CLevelSet::SetMeshBBoxOnly) + .function("GetMeshBBoxOnly", &CLevelSet::GetMeshBBoxOnly) + .function("SetMesh", &wrap_LevelSet_SetMesh) + .function("GetMesh", &CLevelSet::GetMesh) + .function("GetVolumeData", &CLevelSet::GetVolumeData) + .function("SetVolumeData", &wrap_LevelSet_SetVolumeData) + ; + class_>("CBeamLattice") + .smart_ptr>("shared_ptr") + .function("GetMinLength", &CBeamLattice::GetMinLength) + .function("SetMinLength", &CBeamLattice::SetMinLength) + .function("GetClipping", &wrap_BeamLattice_GetClipping) + .function("SetClipping", &CBeamLattice::SetClipping) + .function("GetRepresentation", &wrap_BeamLattice_GetRepresentation) + .function("SetRepresentation", &CBeamLattice::SetRepresentation) + .function("GetBallOptions", &wrap_BeamLattice_GetBallOptions) + .function("SetBallOptions", &CBeamLattice::SetBallOptions) + .function("GetBeamCount", &CBeamLattice::GetBeamCount) + .function("GetBeam", &wrap_BeamLattice_GetBeam) + .function("AddBeam", &wrap_BeamLattice_AddBeam) + .function("SetBeam", &wrap_BeamLattice_SetBeam) + .function("SetBeams", &wrap_BeamLattice_SetBeams) + .function("GetBeams", &wrap_BeamLattice_GetBeams) + .function("GetBallCount", &CBeamLattice::GetBallCount) + .function("GetBall", &wrap_BeamLattice_GetBall) + .function("AddBall", &wrap_BeamLattice_AddBall) + .function("SetBall", &wrap_BeamLattice_SetBall) + .function("SetBalls", &wrap_BeamLattice_SetBalls) + .function("GetBalls", &wrap_BeamLattice_GetBalls) + .function("GetBeamSetCount", &CBeamLattice::GetBeamSetCount) + .function("AddBeamSet", &CBeamLattice::AddBeamSet) + .function("GetBeamSet", &CBeamLattice::GetBeamSet) + ; + class_>("CFunctionReference") + .smart_ptr>("shared_ptr") + .function("GetFunctionResourceID", &CFunctionReference::GetFunctionResourceID) + .function("SetFunctionResourceID", &CFunctionReference::SetFunctionResourceID) + .function("GetTransform", &wrap_FunctionReference_GetTransform) + .function("SetTransform", &wrap_FunctionReference_SetTransform) + .function("GetChannelName", &CFunctionReference::GetChannelName) + .function("SetChannelName", &CFunctionReference::SetChannelName) + .function("SetMinFeatureSize", &CFunctionReference::SetMinFeatureSize) + .function("GetMinFeatureSize", &CFunctionReference::GetMinFeatureSize) + .function("SetFallBackValue", &CFunctionReference::SetFallBackValue) + .function("GetFallBackValue", &CFunctionReference::GetFallBackValue) + ; + class_>("CVolumeDataColor") + .smart_ptr>("shared_ptr") + ; + class_>("CMaterialMapping") + .smart_ptr>("shared_ptr") + ; + class_>("CVolumeDataComposite") + .smart_ptr>("shared_ptr") + .function("GetBaseMaterialGroup", &CVolumeDataComposite::GetBaseMaterialGroup) + .function("SetBaseMaterialGroup", &wrap_VolumeDataComposite_SetBaseMaterialGroup) + .function("GetMaterialMappingCount", &CVolumeDataComposite::GetMaterialMappingCount) + .function("GetMaterialMapping", &CVolumeDataComposite::GetMaterialMapping) + .function("AddMaterialMapping", &wrap_VolumeDataComposite_AddMaterialMapping) + .function("RemoveMaterialMapping", &CVolumeDataComposite::RemoveMaterialMapping) + ; + class_>("CVolumeDataProperty") + .smart_ptr>("shared_ptr") + .function("GetName", &CVolumeDataProperty::GetName) + .function("SetIsRequired", &CVolumeDataProperty::SetIsRequired) + .function("IsRequired", &CVolumeDataProperty::IsRequired) + ; + class_>("CVolumeData") + .smart_ptr>("shared_ptr") + .function("GetComposite", &CVolumeData::GetComposite) + .function("CreateNewComposite", &CVolumeData::CreateNewComposite) + .function("RemoveComposite", &CVolumeData::RemoveComposite) + .function("GetColor", &CVolumeData::GetColor) + .function("CreateNewColor", &wrap_VolumeData_CreateNewColor) + .function("RemoveColor", &CVolumeData::RemoveColor) + .function("GetPropertyCount", &CVolumeData::GetPropertyCount) + .function("GetProperty", &CVolumeData::GetProperty) + .function("AddPropertyFromFunction", &wrap_VolumeData_AddPropertyFromFunction) + .function("RemoveProperty", &CVolumeData::RemoveProperty) + ; + class_>("CComponent") + .smart_ptr>("shared_ptr") + .function("GetObjectResource", &CComponent::GetObjectResource) + .function("GetObjectResourceID", &CComponent::GetObjectResourceID) + .function("GetUUID", &wrap_Component_GetUUID) + .function("SetUUID", &CComponent::SetUUID) + .function("HasTransform", &CComponent::HasTransform) + .function("GetTransform", &wrap_Component_GetTransform) + .function("SetTransform", &wrap_Component_SetTransform) + ; + class_>("CComponentsObject") + .smart_ptr>("shared_ptr") + .function("AddComponent", &wrap_ComponentsObject_AddComponent) + .function("GetComponent", &CComponentsObject::GetComponent) + .function("GetComponentCount", &CComponentsObject::GetComponentCount) + ; + class_>("CBeamSet") + .smart_ptr>("shared_ptr") + .function("SetName", &CBeamSet::SetName) + .function("GetName", &CBeamSet::GetName) + .function("SetIdentifier", &CBeamSet::SetIdentifier) + .function("GetIdentifier", &CBeamSet::GetIdentifier) + .function("GetReferenceCount", &CBeamSet::GetReferenceCount) + .function("SetReferences", &CBeamSet::SetReferences) + .function("GetReferences", &wrap_BeamSet_GetReferences) + .function("GetBallReferenceCount", &CBeamSet::GetBallReferenceCount) + .function("SetBallReferences", &CBeamSet::SetBallReferences) + .function("GetBallReferences", &wrap_BeamSet_GetBallReferences) + ; + class_>("CBaseMaterialGroup") + .smart_ptr>("shared_ptr") + .function("GetCount", &CBaseMaterialGroup::GetCount) + .function("GetAllPropertyIDs", &wrap_BaseMaterialGroup_GetAllPropertyIDs) + .function("AddMaterial", &wrap_BaseMaterialGroup_AddMaterial) + .function("RemoveMaterial", &CBaseMaterialGroup::RemoveMaterial) + .function("GetName", &CBaseMaterialGroup::GetName) + .function("SetName", &CBaseMaterialGroup::SetName) + .function("SetDisplayColor", &wrap_BaseMaterialGroup_SetDisplayColor) + .function("GetDisplayColor", &wrap_BaseMaterialGroup_GetDisplayColor) + ; + class_>("CColorGroup") + .smart_ptr>("shared_ptr") + .function("GetCount", &CColorGroup::GetCount) + .function("GetAllPropertyIDs", &wrap_ColorGroup_GetAllPropertyIDs) + .function("AddColor", &wrap_ColorGroup_AddColor) + .function("RemoveColor", &CColorGroup::RemoveColor) + .function("SetColor", &wrap_ColorGroup_SetColor) + .function("GetColor", &wrap_ColorGroup_GetColor) + ; + class_>("CTexture2DGroup") + .smart_ptr>("shared_ptr") + .function("GetCount", &CTexture2DGroup::GetCount) + .function("GetAllPropertyIDs", &wrap_Texture2DGroup_GetAllPropertyIDs) + .function("AddTex2Coord", &wrap_Texture2DGroup_AddTex2Coord) + .function("GetTex2Coord", &wrap_Texture2DGroup_GetTex2Coord) + .function("RemoveTex2Coord", &CTexture2DGroup::RemoveTex2Coord) + .function("GetTexture2D", &CTexture2DGroup::GetTexture2D) + ; + class_>("CCompositeMaterials") + .smart_ptr>("shared_ptr") + .function("GetCount", &CCompositeMaterials::GetCount) + .function("GetAllPropertyIDs", &wrap_CompositeMaterials_GetAllPropertyIDs) + .function("GetBaseMaterialGroup", &CCompositeMaterials::GetBaseMaterialGroup) + .function("AddComposite", &wrap_CompositeMaterials_AddComposite) + .function("RemoveComposite", &CCompositeMaterials::RemoveComposite) + .function("GetComposite", &wrap_CompositeMaterials_GetComposite) + ; + class_>("CMultiPropertyGroup") + .smart_ptr>("shared_ptr") + .function("GetCount", &CMultiPropertyGroup::GetCount) + .function("GetAllPropertyIDs", &wrap_MultiPropertyGroup_GetAllPropertyIDs) + .function("AddMultiProperty", &CMultiPropertyGroup::AddMultiProperty) + .function("SetMultiProperty", &CMultiPropertyGroup::SetMultiProperty) + .function("GetMultiProperty", &wrap_MultiPropertyGroup_GetMultiProperty) + .function("RemoveMultiProperty", &CMultiPropertyGroup::RemoveMultiProperty) + .function("GetLayerCount", &CMultiPropertyGroup::GetLayerCount) + .function("AddLayer", &wrap_MultiPropertyGroup_AddLayer) + .function("GetLayer", &wrap_MultiPropertyGroup_GetLayer) + .function("RemoveLayer", &CMultiPropertyGroup::RemoveLayer) + ; + class_>("CImage3D") + .smart_ptr>("shared_ptr") + .function("GetName", &CImage3D::GetName) + .function("SetName", &CImage3D::SetName) + .function("IsImageStack", &CImage3D::IsImageStack) + ; + class_>("CImageStack") + .smart_ptr>("shared_ptr") + .function("GetRowCount", &CImageStack::GetRowCount) + .function("SetRowCount", &CImageStack::SetRowCount) + .function("GetColumnCount", &CImageStack::GetColumnCount) + .function("SetColumnCount", &CImageStack::SetColumnCount) + .function("GetSheetCount", &CImageStack::GetSheetCount) + .function("GetSheet", &CImageStack::GetSheet) + .function("SetSheet", &wrap_ImageStack_SetSheet) + .function("CreateEmptySheet", &CImageStack::CreateEmptySheet) + .function("CreateSheetFromBuffer", &CImageStack::CreateSheetFromBuffer) + .function("CreateSheetFromFile", &CImageStack::CreateSheetFromFile) + ; + class_>("CAttachment") + .smart_ptr>("shared_ptr") + .function("GetPath", &CAttachment::GetPath) + .function("SetPath", &CAttachment::SetPath) + .function("PackagePart", &CAttachment::PackagePart) + .function("GetRelationShipType", &CAttachment::GetRelationShipType) + .function("SetRelationShipType", &CAttachment::SetRelationShipType) + .function("WriteToFile", &CAttachment::WriteToFile) + .function("ReadFromFile", &CAttachment::ReadFromFile) + // .function("ReadFromCallback", &wrap_Attachment_ReadFromCallback) // Skipped due to callback + .function("GetStreamSize", &CAttachment::GetStreamSize) + .function("WriteToBuffer", &wrap_Attachment_WriteToBuffer) + .function("ReadFromBuffer", &CAttachment::ReadFromBuffer) + ; + class_>("CTexture2D") + .smart_ptr>("shared_ptr") + .function("GetAttachment", &CTexture2D::GetAttachment) + .function("SetAttachment", &wrap_Texture2D_SetAttachment) + .function("GetContentType", &CTexture2D::GetContentType) + .function("SetContentType", &CTexture2D::SetContentType) + .function("GetTileStyleUV", &wrap_Texture2D_GetTileStyleUV) + .function("SetTileStyleUV", &CTexture2D::SetTileStyleUV) + .function("GetFilter", &CTexture2D::GetFilter) + .function("SetFilter", &CTexture2D::SetFilter) + ; + class_>("CImplicitPort") + .smart_ptr>("shared_ptr") + .function("GetIdentifier", &CImplicitPort::GetIdentifier) + .function("SetIdentifier", &CImplicitPort::SetIdentifier) + .function("GetDisplayName", &CImplicitPort::GetDisplayName) + .function("SetDisplayName", &CImplicitPort::SetDisplayName) + .function("SetType", &CImplicitPort::SetType) + .function("GetType", &CImplicitPort::GetType) + .function("GetReference", &CImplicitPort::GetReference) + .function("SetReference", &CImplicitPort::SetReference) + ; + class_>("CIterator") + .smart_ptr>("shared_ptr") + .function("MoveNext", &CIterator::MoveNext) + .function("MovePrevious", &CIterator::MovePrevious) + .function("Count", &CIterator::Count) + ; + class_>("CImplicitPortIterator") + .smart_ptr>("shared_ptr") + .function("GetCurrent", &CImplicitPortIterator::GetCurrent) + ; + class_>("CImplicitNode") + .smart_ptr>("shared_ptr") + .function("GetIdentifier", &CImplicitNode::GetIdentifier) + .function("SetIdentifier", &CImplicitNode::SetIdentifier) + .function("GetDisplayName", &CImplicitNode::GetDisplayName) + .function("SetDisplayName", &CImplicitNode::SetDisplayName) + .function("GetTag", &CImplicitNode::GetTag) + .function("SetTag", &CImplicitNode::SetTag) + .function("GetNodeType", &CImplicitNode::GetNodeType) + .function("AddInput", &CImplicitNode::AddInput) + .function("GetInputs", &CImplicitNode::GetInputs) + .function("AddOutput", &CImplicitNode::AddOutput) + .function("GetOutputs", &CImplicitNode::GetOutputs) + .function("FindInput", &CImplicitNode::FindInput) + .function("FindOutput", &CImplicitNode::FindOutput) + .function("AreTypesValid", &CImplicitNode::AreTypesValid) + ; + class_>("COneInputNode") + .smart_ptr>("shared_ptr") + .function("GetInputA", &COneInputNode::GetInputA) + .function("GetOutputResult", &COneInputNode::GetOutputResult) + ; + class_>("CSinNode") + .smart_ptr>("shared_ptr") + ; + class_>("CCosNode") + .smart_ptr>("shared_ptr") + ; + class_>("CTanNode") + .smart_ptr>("shared_ptr") + ; + class_>("CArcSinNode") + .smart_ptr>("shared_ptr") + ; + class_>("CArcCosNode") + .smart_ptr>("shared_ptr") + ; + class_>("CArcTanNode") + .smart_ptr>("shared_ptr") + ; + class_>("CSinhNode") + .smart_ptr>("shared_ptr") + ; + class_>("CCoshNode") + .smart_ptr>("shared_ptr") + ; + class_>("CTanhNode") + .smart_ptr>("shared_ptr") + ; + class_>("CRoundNode") + .smart_ptr>("shared_ptr") + ; + class_>("CCeilNode") + .smart_ptr>("shared_ptr") + ; + class_>("CFloorNode") + .smart_ptr>("shared_ptr") + ; + class_>("CSignNode") + .smart_ptr>("shared_ptr") + ; + class_>("CFractNode") + .smart_ptr>("shared_ptr") + ; + class_>("CAbsNode") + .smart_ptr>("shared_ptr") + ; + class_>("CExpNode") + .smart_ptr>("shared_ptr") + ; + class_>("CLogNode") + .smart_ptr>("shared_ptr") + ; + class_>("CLog2Node") + .smart_ptr>("shared_ptr") + ; + class_>("CLog10Node") + .smart_ptr>("shared_ptr") + ; + class_>("CLengthNode") + .smart_ptr>("shared_ptr") + ; + class_>("CTransposeNode") + .smart_ptr>("shared_ptr") + ; + class_>("CInverseNode") + .smart_ptr>("shared_ptr") + ; + class_>("CSqrtNode") + .smart_ptr>("shared_ptr") + ; + class_>("CResourceIdNode") + .smart_ptr>("shared_ptr") + .function("SetResource", &wrap_ResourceIdNode_SetResource) + .function("GetResource", &CResourceIdNode::GetResource) + .function("GetOutputValue", &CResourceIdNode::GetOutputValue) + ; + class_>("CTwoInputNode") + .smart_ptr>("shared_ptr") + .function("GetInputB", &CTwoInputNode::GetInputB) + ; + class_>("CAdditionNode") + .smart_ptr>("shared_ptr") + ; + class_>("CSubtractionNode") + .smart_ptr>("shared_ptr") + ; + class_>("CMultiplicationNode") + .smart_ptr>("shared_ptr") + ; + class_>("CDivisionNode") + .smart_ptr>("shared_ptr") + ; + class_>("CDotNode") + .smart_ptr>("shared_ptr") + ; + class_>("CCrossNode") + .smart_ptr>("shared_ptr") + ; + class_>("CArcTan2Node") + .smart_ptr>("shared_ptr") + ; + class_>("CMatVecMultiplicationNode") + .smart_ptr>("shared_ptr") + ; + class_>("CMinNode") + .smart_ptr>("shared_ptr") + ; + class_>("CMaxNode") + .smart_ptr>("shared_ptr") + ; + class_>("CFmodNode") + .smart_ptr>("shared_ptr") + ; + class_>("CModNode") + .smart_ptr>("shared_ptr") + ; + class_>("CPowNode") + .smart_ptr>("shared_ptr") + ; + class_>("CSelectNode") + .smart_ptr>("shared_ptr") + .function("GetInputB", &CSelectNode::GetInputB) + .function("GetInputC", &CSelectNode::GetInputC) + .function("GetInputD", &CSelectNode::GetInputD) + ; + class_>("CClampNode") + .smart_ptr>("shared_ptr") + .function("GetInputMin", &CClampNode::GetInputMin) + .function("GetInputMax", &CClampNode::GetInputMax) + ; + class_>("CComposeVectorNode") + .smart_ptr>("shared_ptr") + .function("GetInputX", &CComposeVectorNode::GetInputX) + .function("GetInputY", &CComposeVectorNode::GetInputY) + .function("GetInputZ", &CComposeVectorNode::GetInputZ) + .function("GetOutputResult", &CComposeVectorNode::GetOutputResult) + ; + class_>("CVectorFromScalarNode") + .smart_ptr>("shared_ptr") + ; + class_>("CDecomposeVectorNode") + .smart_ptr>("shared_ptr") + .function("GetInputA", &CDecomposeVectorNode::GetInputA) + .function("GetOutputX", &CDecomposeVectorNode::GetOutputX) + .function("GetOutputY", &CDecomposeVectorNode::GetOutputY) + .function("GetOutputZ", &CDecomposeVectorNode::GetOutputZ) + ; + class_>("CComposeMatrixNode") + .smart_ptr>("shared_ptr") + .function("GetInputM00", &CComposeMatrixNode::GetInputM00) + .function("GetInputM01", &CComposeMatrixNode::GetInputM01) + .function("GetInputM02", &CComposeMatrixNode::GetInputM02) + .function("GetInputM03", &CComposeMatrixNode::GetInputM03) + .function("GetInputM10", &CComposeMatrixNode::GetInputM10) + .function("GetInputM11", &CComposeMatrixNode::GetInputM11) + .function("GetInputM12", &CComposeMatrixNode::GetInputM12) + .function("GetInputM13", &CComposeMatrixNode::GetInputM13) + .function("GetInputM20", &CComposeMatrixNode::GetInputM20) + .function("GetInputM21", &CComposeMatrixNode::GetInputM21) + .function("GetInputM22", &CComposeMatrixNode::GetInputM22) + .function("GetInputM23", &CComposeMatrixNode::GetInputM23) + .function("GetInputM30", &CComposeMatrixNode::GetInputM30) + .function("GetInputM31", &CComposeMatrixNode::GetInputM31) + .function("GetInputM32", &CComposeMatrixNode::GetInputM32) + .function("GetInputM33", &CComposeMatrixNode::GetInputM33) + .function("GetOutputResult", &CComposeMatrixNode::GetOutputResult) + ; + class_>("CMatrixFromRowsNode") + .smart_ptr>("shared_ptr") + .function("GetInputA", &CMatrixFromRowsNode::GetInputA) + .function("GetInputB", &CMatrixFromRowsNode::GetInputB) + .function("GetInputC", &CMatrixFromRowsNode::GetInputC) + .function("GetInputD", &CMatrixFromRowsNode::GetInputD) + .function("GetOutputResult", &CMatrixFromRowsNode::GetOutputResult) + ; + class_>("CMatrixFromColumnsNode") + .smart_ptr>("shared_ptr") + .function("GetInputA", &CMatrixFromColumnsNode::GetInputA) + .function("GetInputB", &CMatrixFromColumnsNode::GetInputB) + .function("GetInputC", &CMatrixFromColumnsNode::GetInputC) + .function("GetInputD", &CMatrixFromColumnsNode::GetInputD) + .function("GetOutputResult", &CMatrixFromColumnsNode::GetOutputResult) + ; + class_>("CConstantNode") + .smart_ptr>("shared_ptr") + .function("SetConstant", &CConstantNode::SetConstant) + .function("GetConstant", &CConstantNode::GetConstant) + .function("GetOutputValue", &CConstantNode::GetOutputValue) + ; + class_>("CConstVecNode") + .smart_ptr>("shared_ptr") + .function("SetVector", &wrap_ConstVecNode_SetVector) + .function("GetVector", &wrap_ConstVecNode_GetVector) + .function("GetOutputVector", &CConstVecNode::GetOutputVector) + ; + class_>("CConstMatNode") + .smart_ptr>("shared_ptr") + .function("SetMatrix", &wrap_ConstMatNode_SetMatrix) + .function("GetMatrix", &wrap_ConstMatNode_GetMatrix) + .function("GetOutputMatrix", &CConstMatNode::GetOutputMatrix) + ; + class_>("CMeshNode") + .smart_ptr>("shared_ptr") + .function("GetInputMesh", &CMeshNode::GetInputMesh) + .function("GetInputPos", &CMeshNode::GetInputPos) + .function("GetOutputDistance", &CMeshNode::GetOutputDistance) + ; + class_>("CUnsignedMeshNode") + .smart_ptr>("shared_ptr") + .function("GetInputMesh", &CUnsignedMeshNode::GetInputMesh) + .function("GetInputPos", &CUnsignedMeshNode::GetInputPos) + .function("GetOutputDistance", &CUnsignedMeshNode::GetOutputDistance) + ; + class_>("CBeamLatticeNode") + .smart_ptr>("shared_ptr") + .function("GetInputBeamLattice", &CBeamLatticeNode::GetInputBeamLattice) + .function("GetInputPos", &CBeamLatticeNode::GetInputPos) + .function("GetOutputDistance", &CBeamLatticeNode::GetOutputDistance) + .function("SetAccurateRange", &CBeamLatticeNode::SetAccurateRange) + .function("GetAccurateRange", &CBeamLatticeNode::GetAccurateRange) + ; + class_>("CFunctionGradientNode") + .smart_ptr>("shared_ptr") + .function("GetInputFunctionID", &CFunctionGradientNode::GetInputFunctionID) + .function("GetInputPos", &CFunctionGradientNode::GetInputPos) + .function("GetInputStep", &CFunctionGradientNode::GetInputStep) + .function("SetScalarOutputName", &CFunctionGradientNode::SetScalarOutputName) + .function("GetScalarOutputName", &CFunctionGradientNode::GetScalarOutputName) + .function("SetVectorInputName", &CFunctionGradientNode::SetVectorInputName) + .function("GetVectorInputName", &CFunctionGradientNode::GetVectorInputName) + .function("GetOutputVector", &CFunctionGradientNode::GetOutputVector) + .function("GetOutputGradient", &CFunctionGradientNode::GetOutputGradient) + .function("GetOutputMagnitude", &CFunctionGradientNode::GetOutputMagnitude) + ; + class_>("CNormalizeDistanceNode") + .smart_ptr>("shared_ptr") + .function("GetInputFunctionID", &CNormalizeDistanceNode::GetInputFunctionID) + .function("GetInputPos", &CNormalizeDistanceNode::GetInputPos) + .function("GetInputStep", &CNormalizeDistanceNode::GetInputStep) + .function("SetScalarOutputName", &CNormalizeDistanceNode::SetScalarOutputName) + .function("GetScalarOutputName", &CNormalizeDistanceNode::GetScalarOutputName) + .function("SetVectorInputName", &CNormalizeDistanceNode::SetVectorInputName) + .function("GetVectorInputName", &CNormalizeDistanceNode::GetVectorInputName) + .function("GetOutputResult", &CNormalizeDistanceNode::GetOutputResult) + ; + class_>("CFunctionCallNode") + .smart_ptr>("shared_ptr") + .function("GetInputFunctionID", &CFunctionCallNode::GetInputFunctionID) + ; + class_>("CNodeIterator") + .smart_ptr>("shared_ptr") + .function("GetCurrent", &CNodeIterator::GetCurrent) + ; + class_>("CFunction") + .smart_ptr>("shared_ptr") + .function("GetDisplayName", &CFunction::GetDisplayName) + .function("SetDisplayName", &CFunction::SetDisplayName) + .function("AddInput", &CFunction::AddInput) + .function("GetInputs", &CFunction::GetInputs) + .function("RemoveInput", &wrap_Function_RemoveInput) + .function("AddOutput", &CFunction::AddOutput) + .function("GetOutputs", &CFunction::GetOutputs) + .function("RemoveOutput", &wrap_Function_RemoveOutput) + .function("FindInput", &CFunction::FindInput) + .function("FindOutput", &CFunction::FindOutput) + ; + class_>("CImplicitFunction") + .smart_ptr>("shared_ptr") + .function("GetIdentifier", &CImplicitFunction::GetIdentifier) + .function("SetIdentifier", &CImplicitFunction::SetIdentifier) + .function("AddNode", &CImplicitFunction::AddNode) + .function("AddSinNode", &CImplicitFunction::AddSinNode) + .function("AddCosNode", &CImplicitFunction::AddCosNode) + .function("AddTanNode", &CImplicitFunction::AddTanNode) + .function("AddArcSinNode", &CImplicitFunction::AddArcSinNode) + .function("AddArcCosNode", &CImplicitFunction::AddArcCosNode) + .function("AddArcTan2Node", &CImplicitFunction::AddArcTan2Node) + .function("AddSinhNode", &CImplicitFunction::AddSinhNode) + .function("AddCoshNode", &CImplicitFunction::AddCoshNode) + .function("AddTanhNode", &CImplicitFunction::AddTanhNode) + .function("AddRoundNode", &CImplicitFunction::AddRoundNode) + .function("AddCeilNode", &CImplicitFunction::AddCeilNode) + .function("AddFloorNode", &CImplicitFunction::AddFloorNode) + .function("AddSignNode", &CImplicitFunction::AddSignNode) + .function("AddFractNode", &CImplicitFunction::AddFractNode) + .function("AddAbsNode", &CImplicitFunction::AddAbsNode) + .function("AddExpNode", &CImplicitFunction::AddExpNode) + .function("AddLogNode", &CImplicitFunction::AddLogNode) + .function("AddLog2Node", &CImplicitFunction::AddLog2Node) + .function("AddLog10Node", &CImplicitFunction::AddLog10Node) + .function("AddLengthNode", &CImplicitFunction::AddLengthNode) + .function("AddTransposeNode", &CImplicitFunction::AddTransposeNode) + .function("AddInverseNode", &CImplicitFunction::AddInverseNode) + .function("AddSqrtNode", &CImplicitFunction::AddSqrtNode) + .function("AddResourceIdNode", &CImplicitFunction::AddResourceIdNode) + .function("AddAdditionNode", &CImplicitFunction::AddAdditionNode) + .function("AddSubtractionNode", &CImplicitFunction::AddSubtractionNode) + .function("AddMultiplicationNode", &CImplicitFunction::AddMultiplicationNode) + .function("AddDivisionNode", &CImplicitFunction::AddDivisionNode) + .function("AddDotNode", &CImplicitFunction::AddDotNode) + .function("AddCrossNode", &CImplicitFunction::AddCrossNode) + .function("AddMatVecMultiplicationNode", &CImplicitFunction::AddMatVecMultiplicationNode) + .function("AddMinNode", &CImplicitFunction::AddMinNode) + .function("AddMaxNode", &CImplicitFunction::AddMaxNode) + .function("AddFmodNode", &CImplicitFunction::AddFmodNode) + .function("AddPowNode", &CImplicitFunction::AddPowNode) + .function("AddSelectNode", &CImplicitFunction::AddSelectNode) + .function("AddClampNode", &CImplicitFunction::AddClampNode) + .function("AddComposeVectorNode", &CImplicitFunction::AddComposeVectorNode) + .function("AddVectorFromScalarNode", &CImplicitFunction::AddVectorFromScalarNode) + .function("AddDecomposeVectorNode", &CImplicitFunction::AddDecomposeVectorNode) + .function("AddComposeMatrixNode", &CImplicitFunction::AddComposeMatrixNode) + .function("AddMatrixFromRowsNode", &CImplicitFunction::AddMatrixFromRowsNode) + .function("AddMatrixFromColumnsNode", &CImplicitFunction::AddMatrixFromColumnsNode) + .function("AddConstantNode", &CImplicitFunction::AddConstantNode) + .function("AddConstVecNode", &CImplicitFunction::AddConstVecNode) + .function("AddConstMatNode", &CImplicitFunction::AddConstMatNode) + .function("AddMeshNode", &CImplicitFunction::AddMeshNode) + .function("AddUnsignedMeshNode", &CImplicitFunction::AddUnsignedMeshNode) + .function("AddBeamLatticeNode", &CImplicitFunction::AddBeamLatticeNode) + .function("AddFunctionGradientNode", &CImplicitFunction::AddFunctionGradientNode) + .function("AddNormalizeDistanceNode", &CImplicitFunction::AddNormalizeDistanceNode) + .function("AddFunctionCallNode", &CImplicitFunction::AddFunctionCallNode) + .function("GetNodes", &CImplicitFunction::GetNodes) + .function("RemoveNode", &wrap_ImplicitFunction_RemoveNode) + .function("AddLink", &wrap_ImplicitFunction_AddLink) + .function("AddLinkByNames", &CImplicitFunction::AddLinkByNames) + .function("Clear", &CImplicitFunction::Clear) + .function("SortNodesTopologically", &CImplicitFunction::SortNodesTopologically) + ; + class_>("CFunctionFromImage3D") + .smart_ptr>("shared_ptr") + .function("GetImage3D", &CFunctionFromImage3D::GetImage3D) + .function("SetImage3D", &wrap_FunctionFromImage3D_SetImage3D) + .function("SetFilter", &CFunctionFromImage3D::SetFilter) + .function("GetFilter", &CFunctionFromImage3D::GetFilter) + .function("SetTileStyles", &CFunctionFromImage3D::SetTileStyles) + .function("GetTileStyles", &wrap_FunctionFromImage3D_GetTileStyles) + .function("GetOffset", &CFunctionFromImage3D::GetOffset) + .function("SetOffset", &CFunctionFromImage3D::SetOffset) + .function("GetScale", &CFunctionFromImage3D::GetScale) + .function("SetScale", &CFunctionFromImage3D::SetScale) + ; + class_>("CBuildItem") + .smart_ptr>("shared_ptr") + .function("GetObjectResource", &CBuildItem::GetObjectResource) + .function("GetUUID", &wrap_BuildItem_GetUUID) + .function("SetUUID", &CBuildItem::SetUUID) + .function("GetObjectResourceID", &CBuildItem::GetObjectResourceID) + .function("HasObjectTransform", &CBuildItem::HasObjectTransform) + .function("GetObjectTransform", &wrap_BuildItem_GetObjectTransform) + .function("SetObjectTransform", &wrap_BuildItem_SetObjectTransform) + .function("GetPartNumber", &CBuildItem::GetPartNumber) + .function("SetPartNumber", &CBuildItem::SetPartNumber) + .function("GetMetaDataGroup", &CBuildItem::GetMetaDataGroup) + .function("GetOutbox", &wrap_BuildItem_GetOutbox) + ; + class_>("CBuildItemIterator") + .smart_ptr>("shared_ptr") + .function("MoveNext", &CBuildItemIterator::MoveNext) + .function("MovePrevious", &CBuildItemIterator::MovePrevious) + .function("GetCurrent", &CBuildItemIterator::GetCurrent) + .function("Clone", &CBuildItemIterator::Clone) + .function("Count", &CBuildItemIterator::Count) + ; + class_>("CSlice") + .smart_ptr>("shared_ptr") + .function("SetVertices", &wrap_Slice_SetVertices) + .function("GetVertices", &wrap_Slice_GetVertices) + .function("GetVertexCount", &CSlice::GetVertexCount) + .function("AddPolygon", &CSlice::AddPolygon) + .function("GetPolygonCount", &CSlice::GetPolygonCount) + .function("SetPolygonIndices", &CSlice::SetPolygonIndices) + .function("GetPolygonIndices", &wrap_Slice_GetPolygonIndices) + .function("GetPolygonIndexCount", &CSlice::GetPolygonIndexCount) + .function("GetZTop", &CSlice::GetZTop) + ; + class_>("CSliceStack") + .smart_ptr>("shared_ptr") + .function("GetBottomZ", &CSliceStack::GetBottomZ) + .function("GetSliceCount", &CSliceStack::GetSliceCount) + .function("GetSlice", &CSliceStack::GetSlice) + .function("AddSlice", &CSliceStack::AddSlice) + .function("GetSliceRefCount", &CSliceStack::GetSliceRefCount) + .function("AddSliceStackReference", &wrap_SliceStack_AddSliceStackReference) + .function("GetSliceStackReference", &CSliceStack::GetSliceStackReference) + .function("CollapseSliceReferences", &CSliceStack::CollapseSliceReferences) + .function("SetOwnPath", &CSliceStack::SetOwnPath) + .function("GetOwnPath", &CSliceStack::GetOwnPath) + ; + class_>("CConsumer") + .smart_ptr>("shared_ptr") + .function("GetConsumerID", &CConsumer::GetConsumerID) + .function("GetKeyID", &CConsumer::GetKeyID) + .function("GetKeyValue", &CConsumer::GetKeyValue) + ; + class_>("CAccessRight") + .smart_ptr>("shared_ptr") + .function("GetConsumer", &CAccessRight::GetConsumer) + .function("GetWrappingAlgorithm", &CAccessRight::GetWrappingAlgorithm) + .function("GetMgfAlgorithm", &CAccessRight::GetMgfAlgorithm) + .function("GetDigestMethod", &CAccessRight::GetDigestMethod) + ; + class_>("CContentEncryptionParams") + .smart_ptr>("shared_ptr") + .function("GetEncryptionAlgorithm", &CContentEncryptionParams::GetEncryptionAlgorithm) + .function("GetKey", &wrap_ContentEncryptionParams_GetKey) + .function("GetInitializationVector", &wrap_ContentEncryptionParams_GetInitializationVector) + .function("GetAuthenticationTag", &wrap_ContentEncryptionParams_GetAuthenticationTag) + .function("SetAuthenticationTag", &CContentEncryptionParams::SetAuthenticationTag) + .function("GetAdditionalAuthenticationData", &wrap_ContentEncryptionParams_GetAdditionalAuthenticationData) + .function("GetDescriptor", &CContentEncryptionParams::GetDescriptor) + .function("GetKeyUUID", &CContentEncryptionParams::GetKeyUUID) + ; + class_>("CResourceData") + .smart_ptr>("shared_ptr") + .function("GetPath", &CResourceData::GetPath) + .function("GetEncryptionAlgorithm", &CResourceData::GetEncryptionAlgorithm) + .function("GetCompression", &CResourceData::GetCompression) + .function("GetAdditionalAuthenticationData", &wrap_ResourceData_GetAdditionalAuthenticationData) + ; + class_>("CResourceDataGroup") + .smart_ptr>("shared_ptr") + .function("GetKeyUUID", &CResourceDataGroup::GetKeyUUID) + .function("AddAccessRight", &wrap_ResourceDataGroup_AddAccessRight) + .function("FindAccessRightByConsumer", &wrap_ResourceDataGroup_FindAccessRightByConsumer) + .function("RemoveAccessRight", &wrap_ResourceDataGroup_RemoveAccessRight) + ; + class_>("CKeyStore") + .smart_ptr>("shared_ptr") + .function("AddConsumer", &CKeyStore::AddConsumer) + .function("GetConsumerCount", &CKeyStore::GetConsumerCount) + .function("GetConsumer", &CKeyStore::GetConsumer) + .function("RemoveConsumer", &wrap_KeyStore_RemoveConsumer) + .function("FindConsumer", &CKeyStore::FindConsumer) + .function("GetResourceDataGroupCount", &CKeyStore::GetResourceDataGroupCount) + .function("AddResourceDataGroup", &CKeyStore::AddResourceDataGroup) + .function("GetResourceDataGroup", &CKeyStore::GetResourceDataGroup) + .function("RemoveResourceDataGroup", &wrap_KeyStore_RemoveResourceDataGroup) + .function("FindResourceDataGroup", &wrap_KeyStore_FindResourceDataGroup) + .function("AddResourceData", &wrap_KeyStore_AddResourceData) + .function("RemoveResourceData", &wrap_KeyStore_RemoveResourceData) + .function("FindResourceData", &wrap_KeyStore_FindResourceData) + .function("GetResourceDataCount", &CKeyStore::GetResourceDataCount) + .function("GetResourceData", &CKeyStore::GetResourceData) + .function("GetUUID", &wrap_KeyStore_GetUUID) + .function("SetUUID", &CKeyStore::SetUUID) + ; + class_>("CModel") + .smart_ptr>("shared_ptr") + .function("RootModelPart", &CModel::RootModelPart) + .function("FindOrCreatePackagePart", &CModel::FindOrCreatePackagePart) + .function("SetUnit", &CModel::SetUnit) + .function("GetUnit", &CModel::GetUnit) + .function("GetLanguage", &CModel::GetLanguage) + .function("SetLanguage", &CModel::SetLanguage) + .function("QueryWriter", &CModel::QueryWriter) + .function("QueryReader", &CModel::QueryReader) + .function("GetResourceByID", &CModel::GetResourceByID) + .function("GetTexture2DByID", &CModel::GetTexture2DByID) + .function("GetPropertyTypeByID", &CModel::GetPropertyTypeByID) + .function("GetBaseMaterialGroupByID", &CModel::GetBaseMaterialGroupByID) + .function("GetTexture2DGroupByID", &CModel::GetTexture2DGroupByID) + .function("GetCompositeMaterialsByID", &CModel::GetCompositeMaterialsByID) + .function("GetMultiPropertyGroupByID", &CModel::GetMultiPropertyGroupByID) + .function("GetMeshObjectByID", &CModel::GetMeshObjectByID) + .function("GetComponentsObjectByID", &CModel::GetComponentsObjectByID) + .function("GetColorGroupByID", &CModel::GetColorGroupByID) + .function("GetSliceStackByID", &CModel::GetSliceStackByID) + .function("GetLevelSetByID", &CModel::GetLevelSetByID) + .function("GetBuildUUID", &wrap_Model_GetBuildUUID) + .function("SetBuildUUID", &CModel::SetBuildUUID) + .function("GetBuildItems", &CModel::GetBuildItems) + .function("GetOutbox", &wrap_Model_GetOutbox) + .function("GetResources", &CModel::GetResources) + .function("GetObjects", &CModel::GetObjects) + .function("GetMeshObjects", &CModel::GetMeshObjects) + .function("GetComponentsObjects", &CModel::GetComponentsObjects) + .function("GetTexture2Ds", &CModel::GetTexture2Ds) + .function("GetBaseMaterialGroups", &CModel::GetBaseMaterialGroups) + .function("GetColorGroups", &CModel::GetColorGroups) + .function("GetTexture2DGroups", &CModel::GetTexture2DGroups) + .function("GetCompositeMaterials", &CModel::GetCompositeMaterials) + .function("GetMultiPropertyGroups", &CModel::GetMultiPropertyGroups) + .function("GetSliceStacks", &CModel::GetSliceStacks) + .function("GetImage3Ds", &CModel::GetImage3Ds) + .function("MergeToModel", &CModel::MergeToModel) + .function("MergeFromModel", &wrap_Model_MergeFromModel) + .function("AddMeshObject", &CModel::AddMeshObject) + .function("AddComponentsObject", &CModel::AddComponentsObject) + .function("AddSliceStack", &CModel::AddSliceStack) + .function("AddTexture2DFromAttachment", &wrap_Model_AddTexture2DFromAttachment) + .function("AddBaseMaterialGroup", &CModel::AddBaseMaterialGroup) + .function("AddColorGroup", &CModel::AddColorGroup) + .function("AddTexture2DGroup", &wrap_Model_AddTexture2DGroup) + .function("AddCompositeMaterials", &wrap_Model_AddCompositeMaterials) + .function("AddMultiPropertyGroup", &CModel::AddMultiPropertyGroup) + .function("AddImageStack", &CModel::AddImageStack) + .function("GetImageStackByID", &CModel::GetImageStackByID) + .function("AddBuildItem", &wrap_Model_AddBuildItem) + .function("RemoveBuildItem", &wrap_Model_RemoveBuildItem) + .function("GetMetaDataGroup", &CModel::GetMetaDataGroup) + .function("AddAttachment", &CModel::AddAttachment) + .function("RemoveAttachment", &wrap_Model_RemoveAttachment) + .function("GetAttachment", &CModel::GetAttachment) + .function("FindAttachment", &CModel::FindAttachment) + .function("GetAttachmentCount", &CModel::GetAttachmentCount) + .function("HasPackageThumbnailAttachment", &CModel::HasPackageThumbnailAttachment) + .function("CreatePackageThumbnailAttachment", &CModel::CreatePackageThumbnailAttachment) + .function("GetPackageThumbnailAttachment", &CModel::GetPackageThumbnailAttachment) + .function("RemovePackageThumbnailAttachment", &CModel::RemovePackageThumbnailAttachment) + .function("AddCustomContentType", &CModel::AddCustomContentType) + .function("RemoveCustomContentType", &CModel::RemoveCustomContentType) + // .function("SetRandomNumberCallback", &wrap_Model_SetRandomNumberCallback) // Skipped due to callback + .function("GetKeyStore", &CModel::GetKeyStore) + .function("GetFunctions", &CModel::GetFunctions) + .function("AddImplicitFunction", &CModel::AddImplicitFunction) + .function("AddFunctionFromImage3D", &wrap_Model_AddFunctionFromImage3D) + .function("AddVolumeData", &CModel::AddVolumeData) + .function("AddLevelSet", &CModel::AddLevelSet) + .function("GetLevelSets", &CModel::GetLevelSets) + .function("RemoveResource", &wrap_Model_RemoveResource) + ; + // CWrapper global bindings + class_("CWrapper") + .constructor<>() + .function("GetLibraryVersion", &wrap_Wrapper_GetLibraryVersion) + .function("GetPrereleaseInformation", &wrap_Wrapper_GetPrereleaseInformation) + .function("GetBuildInformation", &wrap_Wrapper_GetBuildInformation) + .function("GetSpecificationVersion", &wrap_Wrapper_GetSpecificationVersion) + .function("CreateModel", &CWrapper::CreateModel) + .function("Release", &wrap_Wrapper_Release) + .function("Acquire", &wrap_Wrapper_Acquire) + .function("SetJournal", &CWrapper::SetJournal) + .function("GetLastError", &wrap_Wrapper_GetLastError) + // .function("GetSymbolLookupMethod", &CWrapper::GetSymbolLookupMethod) // Explicitly skipped (Returns a void pointer) + .function("RetrieveProgressMessage", &wrap_Wrapper_RetrieveProgressMessage) + .function("RGBAToColor", &wrap_Wrapper_RGBAToColor) + .function("FloatRGBAToColor", &wrap_Wrapper_FloatRGBAToColor) + .function("ColorToRGBA", &wrap_Wrapper_ColorToRGBA) + .function("ColorToFloatRGBA", &wrap_Wrapper_ColorToFloatRGBA) + .function("GetIdentityTransform", &wrap_Wrapper_GetIdentityTransform) + .function("GetUniformScaleTransform", &wrap_Wrapper_GetUniformScaleTransform) + .function("GetScaleTransform", &wrap_Wrapper_GetScaleTransform) + .function("GetTranslationTransform", &wrap_Wrapper_GetTranslationTransform) + ; +} diff --git a/Autogenerated/Source/lib3mf_abi.hpp b/Autogenerated/Source/lib3mf_abi.hpp index 30d3538d0..0742297d0 100644 --- a/Autogenerated/Source/lib3mf_abi.hpp +++ b/Autogenerated/Source/lib3mf_abi.hpp @@ -24,12 +24,12 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha. +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. Abstract: This is an autogenerated C++-Header file in order to allow an easy use of the 3MF Library -Interface version: 2.4.1 +Interface version: 2.5.0 */ @@ -1926,7 +1926,7 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedatacomposite_setbasematerialgroup(Lib LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedatacomposite_getmaterialmappingcount(Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 * pCount); /** -* Returns MaterialMappting with given index +* Returns MaterialMapping with given index * * @param[in] pVolumeDataComposite - VolumeDataComposite instance. * @param[in] nIndex - Index of the MaterialMapping in question. @@ -1936,7 +1936,7 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedatacomposite_getmaterialmappingcount( LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedatacomposite_getmaterialmapping(Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 nIndex, Lib3MF_MaterialMapping * pTheMaterialMapping); /** -* Adds a the MaterialMapping +* Adds a MaterialMapping * * @param[in] pVolumeDataComposite - VolumeDataComposite instance. * @param[in] pTransform - new transformation matrix @@ -2048,7 +2048,7 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_removecolor(Lib3MF_VolumeData pVo * Returns the number of VolumeDataProperty * * @param[in] pVolumeData - VolumeData instance. -* @param[out] pCount - the number of VolumeDataProperty-elements within this VolumdeData +* @param[out] pCount - the number of VolumeDataProperty-elements within this VolumeData * @return error code or 0 (success) */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_getpropertycount(Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 * pCount); @@ -2873,7 +2873,7 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_setrelationshiptype(Lib3MF_Attach LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_writetofile(Lib3MF_Attachment pAttachment, const char * pFileName); /** -* Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer methods. * * @param[in] pAttachment - Attachment instance. * @param[in] pFileName - file to read from. @@ -2882,7 +2882,7 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_writetofile(Lib3MF_Attachment pAt LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_readfromfile(Lib3MF_Attachment pAttachment, const char * pFileName); /** -* Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer methods. * * @param[in] pAttachment - Attachment instance. * @param[in] pTheReadCallback - Callback to call for reading a data chunk @@ -2914,7 +2914,7 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_getstreamsize(Lib3MF_Attachment p LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_writetobuffer(Lib3MF_Attachment pAttachment, const Lib3MF_uint64 nBufferBufferSize, Lib3MF_uint64* pBufferNeededCount, Lib3MF_uint8 * pBufferBuffer); /** -* Reads an attachment from a memory buffer. This buffer is immediatly read (in contrast to the ReadFromCallback and ReadFromFile-methods). +* Reads an attachment from a memory buffer. This buffer is immediately read (in contrast to the ReadFromCallback and ReadFromFile-methods). * * @param[in] pAttachment - Attachment instance. * @param[in] nBufferBufferSize - Number of elements in buffer @@ -4026,6 +4026,233 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_unsignedmeshnode_getinputpos(Lib3MF_Unsigned */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_unsignedmeshnode_getoutputdistance(Lib3MF_UnsignedMeshNode pUnsignedMeshNode, Lib3MF_ImplicitPort * pDistance); +/************************************************************************************************************************* + Class definition for BeamLatticeNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the model resource id of the beam lattice +* +* @param[in] pBeamLatticeNode - BeamLatticeNode instance. +* @param[out] pBeamLattice - the input port for the model resource id of the beam lattice (mesh with beamlattice extension) +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlatticenode_getinputbeamlattice(Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_ImplicitPort * pBeamLattice); + +/** +* Retrieves the input for the position +* +* @param[in] pBeamLatticeNode - BeamLatticeNode instance. +* @param[out] pPos - the input port for the position +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlatticenode_getinputpos(Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_ImplicitPort * pPos); + +/** +* Retrieves the output +* +* @param[in] pBeamLatticeNode - BeamLatticeNode instance. +* @param[out] pDistance - the output port for the signed distance to the beam lattice +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlatticenode_getoutputdistance(Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_ImplicitPort * pDistance); + +/** +* Sets the accurate range for distance computation +* +* @param[in] pBeamLatticeNode - BeamLatticeNode instance. +* @param[in] dAccurateRange - the accurate range in model units +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlatticenode_setaccuraterange(Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_double dAccurateRange); + +/** +* Retrieves the accurate range for distance computation +* +* @param[in] pBeamLatticeNode - BeamLatticeNode instance. +* @param[out] pAccurateRange - the accurate range in model units +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlatticenode_getaccuraterange(Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_double * pAccurateRange); + +/************************************************************************************************************************* + Class definition for FunctionGradientNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the function id +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pFunction - the input port for the function +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functiongradientnode_getinputfunctionid(Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pFunction); + +/** +* Retrieves the input for the position +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pPos - the input port for the position +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functiongradientnode_getinputpos(Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pPos); + +/** +* Retrieves the input for the finite difference step +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pStep - the input port for the finite difference step +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functiongradientnode_getinputstep(Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pStep); + +/** +* Sets the name of the referenced scalar output +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[in] pScalarOutputName - the name of the scalar output of the referenced function +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functiongradientnode_setscalaroutputname(Lib3MF_FunctionGradientNode pFunctionGradientNode, const char * pScalarOutputName); + +/** +* Retrieves the name of the referenced scalar output +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[in] nScalarOutputNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pScalarOutputNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pScalarOutputNameBuffer - buffer of the name of the scalar output of the referenced function, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functiongradientnode_getscalaroutputname(Lib3MF_FunctionGradientNode pFunctionGradientNode, const Lib3MF_uint32 nScalarOutputNameBufferSize, Lib3MF_uint32* pScalarOutputNameNeededChars, char * pScalarOutputNameBuffer); + +/** +* Sets the name of the referenced vector input +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[in] pVectorInputName - the name of the vector input (float3) of the referenced function +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functiongradientnode_setvectorinputname(Lib3MF_FunctionGradientNode pFunctionGradientNode, const char * pVectorInputName); + +/** +* Retrieves the name of the referenced vector input +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[in] nVectorInputNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pVectorInputNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pVectorInputNameBuffer - buffer of the name of the vector input (float3) of the referenced function, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functiongradientnode_getvectorinputname(Lib3MF_FunctionGradientNode pFunctionGradientNode, const Lib3MF_uint32 nVectorInputNameBufferSize, Lib3MF_uint32* pVectorInputNameNeededChars, char * pVectorInputNameBuffer); + +/** +* Retrieves the normalized gradient output +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pVector - the output port for the normalized gradient +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functiongradientnode_getoutputvector(Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pVector); + +/** +* Retrieves the raw gradient output +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pGradient - the output port for the raw gradient +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functiongradientnode_getoutputgradient(Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pGradient); + +/** +* Retrieves the gradient magnitude output +* +* @param[in] pFunctionGradientNode - FunctionGradientNode instance. +* @param[out] pMagnitude - the output port for the gradient magnitude +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functiongradientnode_getoutputmagnitude(Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pMagnitude); + +/************************************************************************************************************************* + Class definition for NormalizeDistanceNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the function id +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[out] pFunction - the input port for the function +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_normalizedistancenode_getinputfunctionid(Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pFunction); + +/** +* Retrieves the input for the position +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[out] pPos - the input port for the position (vector) +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_normalizedistancenode_getinputpos(Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pPos); + +/** +* Retrieves the input for the finite difference step +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[out] pStep - the input port for the finite difference step +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_normalizedistancenode_getinputstep(Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pStep); + +/** +* Sets the name of the referenced scalar output +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[in] pScalarOutputName - the name of the scalar output of the referenced function +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_normalizedistancenode_setscalaroutputname(Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const char * pScalarOutputName); + +/** +* Retrieves the name of the referenced scalar output +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[in] nScalarOutputNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pScalarOutputNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pScalarOutputNameBuffer - buffer of the name of the scalar output of the referenced function, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_normalizedistancenode_getscalaroutputname(Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const Lib3MF_uint32 nScalarOutputNameBufferSize, Lib3MF_uint32* pScalarOutputNameNeededChars, char * pScalarOutputNameBuffer); + +/** +* Sets the name of the referenced vector input +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[in] pVectorInputName - the name of the vector input (float3) of the referenced function +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_normalizedistancenode_setvectorinputname(Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const char * pVectorInputName); + +/** +* Retrieves the name of the referenced vector input +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[in] nVectorInputNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pVectorInputNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pVectorInputNameBuffer - buffer of the name of the vector input (float3) of the referenced function, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_normalizedistancenode_getvectorinputname(Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const Lib3MF_uint32 nVectorInputNameBufferSize, Lib3MF_uint32* pVectorInputNameNeededChars, char * pVectorInputNameBuffer); + +/** +* Retrieves the normalized result output +* +* @param[in] pNormalizeDistanceNode - NormalizeDistanceNode instance. +* @param[out] pResult - the output port for the normalized distance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_normalizedistancenode_getoutputresult(Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pResult); + /************************************************************************************************************************* Class definition for FunctionCallNode **************************************************************************************************************************/ @@ -4801,6 +5028,42 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addmeshnode(Lib3MF_Implicit */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addunsignedmeshnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_UnsignedMeshNode * pNode); +/** +* Add a BeamLatticeNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addbeamlatticenode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_BeamLatticeNode * pNode); + +/** +* Add a FunctionGradientNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addfunctiongradientnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_FunctionGradientNode * pNode); + +/** +* Add a NormalizeDistanceNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addnormalizedistancenode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_NormalizeDistanceNode * pNode); + /** * Add a FunctionCallNode * diff --git a/Autogenerated/Source/lib3mf_interfaceexception.cpp b/Autogenerated/Source/lib3mf_interfaceexception.cpp index 4d8a27701..2a9b0d94c 100644 --- a/Autogenerated/Source/lib3mf_interfaceexception.cpp +++ b/Autogenerated/Source/lib3mf_interfaceexception.cpp @@ -24,12 +24,12 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha. +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. Abstract: This is an autogenerated C++ Implementation file with the basic internal exception type in order to allow an easy use of the 3MF Library -Interface version: 2.4.1 +Interface version: 2.5.0 */ diff --git a/Autogenerated/Source/lib3mf_interfaceexception.hpp b/Autogenerated/Source/lib3mf_interfaceexception.hpp index b869dc0ee..51201c246 100644 --- a/Autogenerated/Source/lib3mf_interfaceexception.hpp +++ b/Autogenerated/Source/lib3mf_interfaceexception.hpp @@ -24,12 +24,12 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha. +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. Abstract: This is an autogenerated C++ Header file with the basic internal exception type in order to allow an easy use of the 3MF Library -Interface version: 2.4.1 +Interface version: 2.5.0 */ diff --git a/Autogenerated/Source/lib3mf_interfacejournal.cpp b/Autogenerated/Source/lib3mf_interfacejournal.cpp index 78555e39e..d793b240c 100644 --- a/Autogenerated/Source/lib3mf_interfacejournal.cpp +++ b/Autogenerated/Source/lib3mf_interfacejournal.cpp @@ -24,12 +24,12 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha. +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. Abstract: This is an autogenerated C++ implementation file in order to allow easy development of the 3MF Library. It provides an automatic Journaling mechanism for the library implementation. -Interface version: 2.4.1 +Interface version: 2.5.0 */ @@ -286,7 +286,7 @@ CLib3MFInterfaceJournal::CLib3MFInterfaceJournal (const std::string & sFileName) m_StartTime = std::chrono::high_resolution_clock::now(); m_Stream.open (sFileName, std::ios::out); m_Stream << "\n"; - m_Stream << "\n"; + m_Stream << "\n"; m_Stream << "\n"; } diff --git a/Autogenerated/Source/lib3mf_interfacejournal.hpp b/Autogenerated/Source/lib3mf_interfacejournal.hpp index 6243cfb19..ce6e58958 100644 --- a/Autogenerated/Source/lib3mf_interfacejournal.hpp +++ b/Autogenerated/Source/lib3mf_interfacejournal.hpp @@ -24,12 +24,12 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha. +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. Abstract: This is an autogenerated C++ header file in order to allow easy development of the 3MF Library. It provides an automatic Journaling mechanism for the library implementation. -Interface version: 2.4.1 +Interface version: 2.5.0 */ diff --git a/Autogenerated/Source/lib3mf_interfaces.hpp b/Autogenerated/Source/lib3mf_interfaces.hpp index fadbc745c..2851ca876 100644 --- a/Autogenerated/Source/lib3mf_interfaces.hpp +++ b/Autogenerated/Source/lib3mf_interfaces.hpp @@ -24,13 +24,13 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha. +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. Abstract: This is an autogenerated C++ header file in order to allow easy development of the 3MF Library. The implementer of the 3MF Library needs to derive concrete classes from the abstract classes in this header. -Interface version: 2.4.1 +Interface version: 2.5.0 */ @@ -151,6 +151,9 @@ class IConstVecNode; class IConstMatNode; class IMeshNode; class IUnsignedMeshNode; +class IBeamLatticeNode; +class IFunctionGradientNode; +class INormalizeDistanceNode; class IFunctionCallNode; class INodeIterator; class IFunction; @@ -257,7 +260,7 @@ template class ParameterCache_4 : publi **************************************************************************************************************************/ class IBase { -private: +protected: std::unique_ptr m_ParameterCache; public: /** @@ -2116,14 +2119,14 @@ class IVolumeDataComposite : public virtual IBase { virtual Lib3MF_uint32 GetMaterialMappingCount() = 0; /** - * IVolumeDataComposite::GetMaterialMapping - Returns MaterialMappting with given index + * IVolumeDataComposite::GetMaterialMapping - Returns MaterialMapping with given index * @param[in] nIndex - Index of the MaterialMapping in question. * @return MaterialMapping used in this element */ virtual IMaterialMapping * GetMaterialMapping(const Lib3MF_uint32 nIndex) = 0; /** - * IVolumeDataComposite::AddMaterialMapping - Adds a the MaterialMapping + * IVolumeDataComposite::AddMaterialMapping - Adds a MaterialMapping * @param[in] Transform - new transformation matrix * @return The new MaterialMapping */ @@ -2230,7 +2233,7 @@ class IVolumeData : public virtual IResource { /** * IVolumeData::GetPropertyCount - Returns the number of VolumeDataProperty - * @return the number of VolumeDataProperty-elements within this VolumdeData + * @return the number of VolumeDataProperty-elements within this VolumeData */ virtual Lib3MF_uint32 GetPropertyCount() = 0; @@ -2982,13 +2985,13 @@ class IAttachment : public virtual IBase { virtual void WriteToFile(const std::string & sFileName) = 0; /** - * IAttachment::ReadFromFile - Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. + * IAttachment::ReadFromFile - Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer methods. * @param[in] sFileName - file to read from. */ virtual void ReadFromFile(const std::string & sFileName) = 0; /** - * IAttachment::ReadFromCallback - Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. + * IAttachment::ReadFromCallback - Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer methods. * @param[in] pTheReadCallback - callback function * @param[in] nStreamSize - number of bytes the callback returns * @param[in] pTheSeekCallback - callback function @@ -3011,7 +3014,7 @@ class IAttachment : public virtual IBase { virtual void WriteToBuffer(Lib3MF_uint64 nBufferBufferSize, Lib3MF_uint64* pBufferNeededCount, Lib3MF_uint8 * pBufferBuffer) = 0; /** - * IAttachment::ReadFromBuffer - Reads an attachment from a memory buffer. This buffer is immediatly read (in contrast to the ReadFromCallback and ReadFromFile-methods). + * IAttachment::ReadFromBuffer - Reads an attachment from a memory buffer. This buffer is immediately read (in contrast to the ReadFromCallback and ReadFromFile-methods). * @param[in] nBufferBufferSize - Number of elements in buffer * @param[in] pBufferBuffer - Buffer to read from */ @@ -4740,6 +4743,204 @@ class IUnsignedMeshNode : public virtual IImplicitNode { typedef IBaseSharedPtr PIUnsignedMeshNode; +/************************************************************************************************************************* + Class interface for BeamLatticeNode +**************************************************************************************************************************/ + +class IBeamLatticeNode : public virtual IImplicitNode { +public: + /** + * IBeamLatticeNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0xF3A4EE98F7FEC0CUL; // First 64 bits of SHA1 of a string: "Lib3MF::BeamLatticeNode" + } + + /** + * IBeamLatticeNode::GetInputBeamLattice - Retrieves the input for the model resource id of the beam lattice + * @return the input port for the model resource id of the beam lattice (mesh with beamlattice extension) + */ + virtual IImplicitPort * GetInputBeamLattice() = 0; + + /** + * IBeamLatticeNode::GetInputPos - Retrieves the input for the position + * @return the input port for the position + */ + virtual IImplicitPort * GetInputPos() = 0; + + /** + * IBeamLatticeNode::GetOutputDistance - Retrieves the output + * @return the output port for the signed distance to the beam lattice + */ + virtual IImplicitPort * GetOutputDistance() = 0; + + /** + * IBeamLatticeNode::SetAccurateRange - Sets the accurate range for distance computation + * @param[in] dAccurateRange - the accurate range in model units + */ + virtual void SetAccurateRange(const Lib3MF_double dAccurateRange) = 0; + + /** + * IBeamLatticeNode::GetAccurateRange - Retrieves the accurate range for distance computation + * @return the accurate range in model units + */ + virtual Lib3MF_double GetAccurateRange() = 0; + +}; + +typedef IBaseSharedPtr PIBeamLatticeNode; + + +/************************************************************************************************************************* + Class interface for FunctionGradientNode +**************************************************************************************************************************/ + +class IFunctionGradientNode : public virtual IImplicitNode { +public: + /** + * IFunctionGradientNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x437E27AEF740121UL; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionGradientNode" + } + + /** + * IFunctionGradientNode::GetInputFunctionID - Retrieves the input for the function id + * @return the input port for the function + */ + virtual IImplicitPort * GetInputFunctionID() = 0; + + /** + * IFunctionGradientNode::GetInputPos - Retrieves the input for the position + * @return the input port for the position + */ + virtual IImplicitPort * GetInputPos() = 0; + + /** + * IFunctionGradientNode::GetInputStep - Retrieves the input for the finite difference step + * @return the input port for the finite difference step + */ + virtual IImplicitPort * GetInputStep() = 0; + + /** + * IFunctionGradientNode::SetScalarOutputName - Sets the name of the referenced scalar output + * @param[in] sScalarOutputName - the name of the scalar output of the referenced function + */ + virtual void SetScalarOutputName(const std::string & sScalarOutputName) = 0; + + /** + * IFunctionGradientNode::GetScalarOutputName - Retrieves the name of the referenced scalar output + * @return the name of the scalar output of the referenced function + */ + virtual std::string GetScalarOutputName() = 0; + + /** + * IFunctionGradientNode::SetVectorInputName - Sets the name of the referenced vector input + * @param[in] sVectorInputName - the name of the vector input (float3) of the referenced function + */ + virtual void SetVectorInputName(const std::string & sVectorInputName) = 0; + + /** + * IFunctionGradientNode::GetVectorInputName - Retrieves the name of the referenced vector input + * @return the name of the vector input (float3) of the referenced function + */ + virtual std::string GetVectorInputName() = 0; + + /** + * IFunctionGradientNode::GetOutputVector - Retrieves the normalized gradient output + * @return the output port for the normalized gradient + */ + virtual IImplicitPort * GetOutputVector() = 0; + + /** + * IFunctionGradientNode::GetOutputGradient - Retrieves the raw gradient output + * @return the output port for the raw gradient + */ + virtual IImplicitPort * GetOutputGradient() = 0; + + /** + * IFunctionGradientNode::GetOutputMagnitude - Retrieves the gradient magnitude output + * @return the output port for the gradient magnitude + */ + virtual IImplicitPort * GetOutputMagnitude() = 0; + +}; + +typedef IBaseSharedPtr PIFunctionGradientNode; + + +/************************************************************************************************************************* + Class interface for NormalizeDistanceNode +**************************************************************************************************************************/ + +class INormalizeDistanceNode : public virtual IImplicitNode { +public: + /** + * INormalizeDistanceNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x817D2E566E73AA8FUL; // First 64 bits of SHA1 of a string: "Lib3MF::NormalizeDistanceNode" + } + + /** + * INormalizeDistanceNode::GetInputFunctionID - Retrieves the input for the function id + * @return the input port for the function + */ + virtual IImplicitPort * GetInputFunctionID() = 0; + + /** + * INormalizeDistanceNode::GetInputPos - Retrieves the input for the position + * @return the input port for the position (vector) + */ + virtual IImplicitPort * GetInputPos() = 0; + + /** + * INormalizeDistanceNode::GetInputStep - Retrieves the input for the finite difference step + * @return the input port for the finite difference step + */ + virtual IImplicitPort * GetInputStep() = 0; + + /** + * INormalizeDistanceNode::SetScalarOutputName - Sets the name of the referenced scalar output + * @param[in] sScalarOutputName - the name of the scalar output of the referenced function + */ + virtual void SetScalarOutputName(const std::string & sScalarOutputName) = 0; + + /** + * INormalizeDistanceNode::GetScalarOutputName - Retrieves the name of the referenced scalar output + * @return the name of the scalar output of the referenced function + */ + virtual std::string GetScalarOutputName() = 0; + + /** + * INormalizeDistanceNode::SetVectorInputName - Sets the name of the referenced vector input + * @param[in] sVectorInputName - the name of the vector input (float3) of the referenced function + */ + virtual void SetVectorInputName(const std::string & sVectorInputName) = 0; + + /** + * INormalizeDistanceNode::GetVectorInputName - Retrieves the name of the referenced vector input + * @return the name of the vector input (float3) of the referenced function + */ + virtual std::string GetVectorInputName() = 0; + + /** + * INormalizeDistanceNode::GetOutputResult - Retrieves the normalized result output + * @return the output port for the normalized distance + */ + virtual IImplicitPort * GetOutputResult() = 0; + +}; + +typedef IBaseSharedPtr PINormalizeDistanceNode; + + /************************************************************************************************************************* Class interface for FunctionCallNode **************************************************************************************************************************/ @@ -5381,6 +5582,33 @@ class IImplicitFunction : public virtual IFunction { */ virtual IUnsignedMeshNode * AddUnsignedMeshNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) = 0; + /** + * IImplicitFunction::AddBeamLatticeNode - Add a BeamLatticeNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + virtual IBeamLatticeNode * AddBeamLatticeNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) = 0; + + /** + * IImplicitFunction::AddFunctionGradientNode - Add a FunctionGradientNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + virtual IFunctionGradientNode * AddFunctionGradientNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) = 0; + + /** + * IImplicitFunction::AddNormalizeDistanceNode - Add a NormalizeDistanceNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + virtual INormalizeDistanceNode * AddNormalizeDistanceNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) = 0; + /** * IImplicitFunction::AddFunctionCallNode - Add a FunctionCallNode * @param[in] sIdentifier - the identifier of the node diff --git a/Autogenerated/Source/lib3mf_interfacewrapper.cpp b/Autogenerated/Source/lib3mf_interfacewrapper.cpp index 6c03b78df..62735781a 100644 --- a/Autogenerated/Source/lib3mf_interfacewrapper.cpp +++ b/Autogenerated/Source/lib3mf_interfacewrapper.cpp @@ -24,12 +24,12 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha. +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. Abstract: This is an autogenerated C++ implementation file in order to allow easy development of the 3MF Library. The functions in this file need to be implemented. It needs to be generated only once. -Interface version: 2.4.1 +Interface version: 2.5.0 */ @@ -14146,6 +14146,916 @@ Lib3MFResult lib3mf_unsignedmeshnode_getoutputdistance(Lib3MF_UnsignedMeshNode p } +/************************************************************************************************************************* + Class implementation for BeamLatticeNode +**************************************************************************************************************************/ +Lib3MFResult lib3mf_beamlatticenode_getinputbeamlattice(Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_ImplicitPort * pBeamLattice) +{ + IBase* pIBaseClass = (IBase *)pBeamLatticeNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLatticeNode, "BeamLatticeNode", "GetInputBeamLattice"); + } + if (pBeamLattice == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseBeamLattice(nullptr); + IBeamLatticeNode* pIBeamLatticeNode = dynamic_cast(pIBaseClass); + if (!pIBeamLatticeNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseBeamLattice = pIBeamLatticeNode->GetInputBeamLattice(); + + *pBeamLattice = (IBase*)(pBaseBeamLattice); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("BeamLattice", *pBeamLattice); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_beamlatticenode_getinputpos(Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_ImplicitPort * pPos) +{ + IBase* pIBaseClass = (IBase *)pBeamLatticeNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLatticeNode, "BeamLatticeNode", "GetInputPos"); + } + if (pPos == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBasePos(nullptr); + IBeamLatticeNode* pIBeamLatticeNode = dynamic_cast(pIBaseClass); + if (!pIBeamLatticeNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBasePos = pIBeamLatticeNode->GetInputPos(); + + *pPos = (IBase*)(pBasePos); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Pos", *pPos); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_beamlatticenode_getoutputdistance(Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_ImplicitPort * pDistance) +{ + IBase* pIBaseClass = (IBase *)pBeamLatticeNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLatticeNode, "BeamLatticeNode", "GetOutputDistance"); + } + if (pDistance == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseDistance(nullptr); + IBeamLatticeNode* pIBeamLatticeNode = dynamic_cast(pIBaseClass); + if (!pIBeamLatticeNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseDistance = pIBeamLatticeNode->GetOutputDistance(); + + *pDistance = (IBase*)(pBaseDistance); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Distance", *pDistance); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_beamlatticenode_setaccuraterange(Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_double dAccurateRange) +{ + IBase* pIBaseClass = (IBase *)pBeamLatticeNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLatticeNode, "BeamLatticeNode", "SetAccurateRange"); + pJournalEntry->addDoubleParameter("AccurateRange", dAccurateRange); + } + IBeamLatticeNode* pIBeamLatticeNode = dynamic_cast(pIBaseClass); + if (!pIBeamLatticeNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIBeamLatticeNode->SetAccurateRange(dAccurateRange); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_beamlatticenode_getaccuraterange(Lib3MF_BeamLatticeNode pBeamLatticeNode, Lib3MF_double * pAccurateRange) +{ + IBase* pIBaseClass = (IBase *)pBeamLatticeNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLatticeNode, "BeamLatticeNode", "GetAccurateRange"); + } + if (pAccurateRange == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBeamLatticeNode* pIBeamLatticeNode = dynamic_cast(pIBaseClass); + if (!pIBeamLatticeNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pAccurateRange = pIBeamLatticeNode->GetAccurateRange(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addDoubleResult("AccurateRange", *pAccurateRange); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for FunctionGradientNode +**************************************************************************************************************************/ +Lib3MFResult lib3mf_functiongradientnode_getinputfunctionid(Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pFunction) +{ + IBase* pIBaseClass = (IBase *)pFunctionGradientNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunctionGradientNode, "FunctionGradientNode", "GetInputFunctionID"); + } + if (pFunction == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseFunction(nullptr); + IFunctionGradientNode* pIFunctionGradientNode = dynamic_cast(pIBaseClass); + if (!pIFunctionGradientNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseFunction = pIFunctionGradientNode->GetInputFunctionID(); + + *pFunction = (IBase*)(pBaseFunction); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Function", *pFunction); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_functiongradientnode_getinputpos(Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pPos) +{ + IBase* pIBaseClass = (IBase *)pFunctionGradientNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunctionGradientNode, "FunctionGradientNode", "GetInputPos"); + } + if (pPos == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBasePos(nullptr); + IFunctionGradientNode* pIFunctionGradientNode = dynamic_cast(pIBaseClass); + if (!pIFunctionGradientNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBasePos = pIFunctionGradientNode->GetInputPos(); + + *pPos = (IBase*)(pBasePos); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Pos", *pPos); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_functiongradientnode_getinputstep(Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pStep) +{ + IBase* pIBaseClass = (IBase *)pFunctionGradientNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunctionGradientNode, "FunctionGradientNode", "GetInputStep"); + } + if (pStep == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseStep(nullptr); + IFunctionGradientNode* pIFunctionGradientNode = dynamic_cast(pIBaseClass); + if (!pIFunctionGradientNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseStep = pIFunctionGradientNode->GetInputStep(); + + *pStep = (IBase*)(pBaseStep); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Step", *pStep); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_functiongradientnode_setscalaroutputname(Lib3MF_FunctionGradientNode pFunctionGradientNode, const char * pScalarOutputName) +{ + IBase* pIBaseClass = (IBase *)pFunctionGradientNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunctionGradientNode, "FunctionGradientNode", "SetScalarOutputName"); + pJournalEntry->addStringParameter("ScalarOutputName", pScalarOutputName); + } + if (pScalarOutputName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sScalarOutputName(pScalarOutputName); + IFunctionGradientNode* pIFunctionGradientNode = dynamic_cast(pIBaseClass); + if (!pIFunctionGradientNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIFunctionGradientNode->SetScalarOutputName(sScalarOutputName); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_functiongradientnode_getscalaroutputname(Lib3MF_FunctionGradientNode pFunctionGradientNode, const Lib3MF_uint32 nScalarOutputNameBufferSize, Lib3MF_uint32* pScalarOutputNameNeededChars, char * pScalarOutputNameBuffer) +{ + IBase* pIBaseClass = (IBase *)pFunctionGradientNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunctionGradientNode, "FunctionGradientNode", "GetScalarOutputName"); + } + if ( (!pScalarOutputNameBuffer) && !(pScalarOutputNameNeededChars) ) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sScalarOutputName(""); + IFunctionGradientNode* pIFunctionGradientNode = dynamic_cast(pIBaseClass); + if (!pIFunctionGradientNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + bool isCacheCall = (pScalarOutputNameBuffer == nullptr); + if (isCacheCall) { + sScalarOutputName = pIFunctionGradientNode->GetScalarOutputName(); + + pIFunctionGradientNode->_setCache (new ParameterCache_1 (sScalarOutputName)); + } + else { + auto cache = dynamic_cast*> (pIFunctionGradientNode->_getCache ()); + if (cache == nullptr) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + cache->retrieveData (sScalarOutputName); + pIFunctionGradientNode->_setCache (nullptr); + } + + if (pScalarOutputNameNeededChars) + *pScalarOutputNameNeededChars = (Lib3MF_uint32) (sScalarOutputName.size()+1); + if (pScalarOutputNameBuffer) { + if (sScalarOutputName.size() >= nScalarOutputNameBufferSize) + throw ELib3MFInterfaceException (LIB3MF_ERROR_BUFFERTOOSMALL); + for (size_t iScalarOutputName = 0; iScalarOutputName < sScalarOutputName.size(); iScalarOutputName++) + pScalarOutputNameBuffer[iScalarOutputName] = sScalarOutputName[iScalarOutputName]; + pScalarOutputNameBuffer[sScalarOutputName.size()] = 0; + } + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addStringResult("ScalarOutputName", sScalarOutputName.c_str()); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_functiongradientnode_setvectorinputname(Lib3MF_FunctionGradientNode pFunctionGradientNode, const char * pVectorInputName) +{ + IBase* pIBaseClass = (IBase *)pFunctionGradientNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunctionGradientNode, "FunctionGradientNode", "SetVectorInputName"); + pJournalEntry->addStringParameter("VectorInputName", pVectorInputName); + } + if (pVectorInputName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sVectorInputName(pVectorInputName); + IFunctionGradientNode* pIFunctionGradientNode = dynamic_cast(pIBaseClass); + if (!pIFunctionGradientNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIFunctionGradientNode->SetVectorInputName(sVectorInputName); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_functiongradientnode_getvectorinputname(Lib3MF_FunctionGradientNode pFunctionGradientNode, const Lib3MF_uint32 nVectorInputNameBufferSize, Lib3MF_uint32* pVectorInputNameNeededChars, char * pVectorInputNameBuffer) +{ + IBase* pIBaseClass = (IBase *)pFunctionGradientNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunctionGradientNode, "FunctionGradientNode", "GetVectorInputName"); + } + if ( (!pVectorInputNameBuffer) && !(pVectorInputNameNeededChars) ) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sVectorInputName(""); + IFunctionGradientNode* pIFunctionGradientNode = dynamic_cast(pIBaseClass); + if (!pIFunctionGradientNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + bool isCacheCall = (pVectorInputNameBuffer == nullptr); + if (isCacheCall) { + sVectorInputName = pIFunctionGradientNode->GetVectorInputName(); + + pIFunctionGradientNode->_setCache (new ParameterCache_1 (sVectorInputName)); + } + else { + auto cache = dynamic_cast*> (pIFunctionGradientNode->_getCache ()); + if (cache == nullptr) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + cache->retrieveData (sVectorInputName); + pIFunctionGradientNode->_setCache (nullptr); + } + + if (pVectorInputNameNeededChars) + *pVectorInputNameNeededChars = (Lib3MF_uint32) (sVectorInputName.size()+1); + if (pVectorInputNameBuffer) { + if (sVectorInputName.size() >= nVectorInputNameBufferSize) + throw ELib3MFInterfaceException (LIB3MF_ERROR_BUFFERTOOSMALL); + for (size_t iVectorInputName = 0; iVectorInputName < sVectorInputName.size(); iVectorInputName++) + pVectorInputNameBuffer[iVectorInputName] = sVectorInputName[iVectorInputName]; + pVectorInputNameBuffer[sVectorInputName.size()] = 0; + } + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addStringResult("VectorInputName", sVectorInputName.c_str()); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_functiongradientnode_getoutputvector(Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pVector) +{ + IBase* pIBaseClass = (IBase *)pFunctionGradientNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunctionGradientNode, "FunctionGradientNode", "GetOutputVector"); + } + if (pVector == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseVector(nullptr); + IFunctionGradientNode* pIFunctionGradientNode = dynamic_cast(pIBaseClass); + if (!pIFunctionGradientNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseVector = pIFunctionGradientNode->GetOutputVector(); + + *pVector = (IBase*)(pBaseVector); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Vector", *pVector); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_functiongradientnode_getoutputgradient(Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pGradient) +{ + IBase* pIBaseClass = (IBase *)pFunctionGradientNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunctionGradientNode, "FunctionGradientNode", "GetOutputGradient"); + } + if (pGradient == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseGradient(nullptr); + IFunctionGradientNode* pIFunctionGradientNode = dynamic_cast(pIBaseClass); + if (!pIFunctionGradientNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseGradient = pIFunctionGradientNode->GetOutputGradient(); + + *pGradient = (IBase*)(pBaseGradient); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Gradient", *pGradient); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_functiongradientnode_getoutputmagnitude(Lib3MF_FunctionGradientNode pFunctionGradientNode, Lib3MF_ImplicitPort * pMagnitude) +{ + IBase* pIBaseClass = (IBase *)pFunctionGradientNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunctionGradientNode, "FunctionGradientNode", "GetOutputMagnitude"); + } + if (pMagnitude == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseMagnitude(nullptr); + IFunctionGradientNode* pIFunctionGradientNode = dynamic_cast(pIBaseClass); + if (!pIFunctionGradientNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseMagnitude = pIFunctionGradientNode->GetOutputMagnitude(); + + *pMagnitude = (IBase*)(pBaseMagnitude); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Magnitude", *pMagnitude); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for NormalizeDistanceNode +**************************************************************************************************************************/ +Lib3MFResult lib3mf_normalizedistancenode_getinputfunctionid(Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pFunction) +{ + IBase* pIBaseClass = (IBase *)pNormalizeDistanceNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pNormalizeDistanceNode, "NormalizeDistanceNode", "GetInputFunctionID"); + } + if (pFunction == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseFunction(nullptr); + INormalizeDistanceNode* pINormalizeDistanceNode = dynamic_cast(pIBaseClass); + if (!pINormalizeDistanceNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseFunction = pINormalizeDistanceNode->GetInputFunctionID(); + + *pFunction = (IBase*)(pBaseFunction); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Function", *pFunction); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_normalizedistancenode_getinputpos(Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pPos) +{ + IBase* pIBaseClass = (IBase *)pNormalizeDistanceNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pNormalizeDistanceNode, "NormalizeDistanceNode", "GetInputPos"); + } + if (pPos == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBasePos(nullptr); + INormalizeDistanceNode* pINormalizeDistanceNode = dynamic_cast(pIBaseClass); + if (!pINormalizeDistanceNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBasePos = pINormalizeDistanceNode->GetInputPos(); + + *pPos = (IBase*)(pBasePos); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Pos", *pPos); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_normalizedistancenode_getinputstep(Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pStep) +{ + IBase* pIBaseClass = (IBase *)pNormalizeDistanceNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pNormalizeDistanceNode, "NormalizeDistanceNode", "GetInputStep"); + } + if (pStep == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseStep(nullptr); + INormalizeDistanceNode* pINormalizeDistanceNode = dynamic_cast(pIBaseClass); + if (!pINormalizeDistanceNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseStep = pINormalizeDistanceNode->GetInputStep(); + + *pStep = (IBase*)(pBaseStep); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Step", *pStep); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_normalizedistancenode_setscalaroutputname(Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const char * pScalarOutputName) +{ + IBase* pIBaseClass = (IBase *)pNormalizeDistanceNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pNormalizeDistanceNode, "NormalizeDistanceNode", "SetScalarOutputName"); + pJournalEntry->addStringParameter("ScalarOutputName", pScalarOutputName); + } + if (pScalarOutputName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sScalarOutputName(pScalarOutputName); + INormalizeDistanceNode* pINormalizeDistanceNode = dynamic_cast(pIBaseClass); + if (!pINormalizeDistanceNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pINormalizeDistanceNode->SetScalarOutputName(sScalarOutputName); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_normalizedistancenode_getscalaroutputname(Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const Lib3MF_uint32 nScalarOutputNameBufferSize, Lib3MF_uint32* pScalarOutputNameNeededChars, char * pScalarOutputNameBuffer) +{ + IBase* pIBaseClass = (IBase *)pNormalizeDistanceNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pNormalizeDistanceNode, "NormalizeDistanceNode", "GetScalarOutputName"); + } + if ( (!pScalarOutputNameBuffer) && !(pScalarOutputNameNeededChars) ) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sScalarOutputName(""); + INormalizeDistanceNode* pINormalizeDistanceNode = dynamic_cast(pIBaseClass); + if (!pINormalizeDistanceNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + bool isCacheCall = (pScalarOutputNameBuffer == nullptr); + if (isCacheCall) { + sScalarOutputName = pINormalizeDistanceNode->GetScalarOutputName(); + + pINormalizeDistanceNode->_setCache (new ParameterCache_1 (sScalarOutputName)); + } + else { + auto cache = dynamic_cast*> (pINormalizeDistanceNode->_getCache ()); + if (cache == nullptr) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + cache->retrieveData (sScalarOutputName); + pINormalizeDistanceNode->_setCache (nullptr); + } + + if (pScalarOutputNameNeededChars) + *pScalarOutputNameNeededChars = (Lib3MF_uint32) (sScalarOutputName.size()+1); + if (pScalarOutputNameBuffer) { + if (sScalarOutputName.size() >= nScalarOutputNameBufferSize) + throw ELib3MFInterfaceException (LIB3MF_ERROR_BUFFERTOOSMALL); + for (size_t iScalarOutputName = 0; iScalarOutputName < sScalarOutputName.size(); iScalarOutputName++) + pScalarOutputNameBuffer[iScalarOutputName] = sScalarOutputName[iScalarOutputName]; + pScalarOutputNameBuffer[sScalarOutputName.size()] = 0; + } + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addStringResult("ScalarOutputName", sScalarOutputName.c_str()); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_normalizedistancenode_setvectorinputname(Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const char * pVectorInputName) +{ + IBase* pIBaseClass = (IBase *)pNormalizeDistanceNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pNormalizeDistanceNode, "NormalizeDistanceNode", "SetVectorInputName"); + pJournalEntry->addStringParameter("VectorInputName", pVectorInputName); + } + if (pVectorInputName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sVectorInputName(pVectorInputName); + INormalizeDistanceNode* pINormalizeDistanceNode = dynamic_cast(pIBaseClass); + if (!pINormalizeDistanceNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pINormalizeDistanceNode->SetVectorInputName(sVectorInputName); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_normalizedistancenode_getvectorinputname(Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, const Lib3MF_uint32 nVectorInputNameBufferSize, Lib3MF_uint32* pVectorInputNameNeededChars, char * pVectorInputNameBuffer) +{ + IBase* pIBaseClass = (IBase *)pNormalizeDistanceNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pNormalizeDistanceNode, "NormalizeDistanceNode", "GetVectorInputName"); + } + if ( (!pVectorInputNameBuffer) && !(pVectorInputNameNeededChars) ) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sVectorInputName(""); + INormalizeDistanceNode* pINormalizeDistanceNode = dynamic_cast(pIBaseClass); + if (!pINormalizeDistanceNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + bool isCacheCall = (pVectorInputNameBuffer == nullptr); + if (isCacheCall) { + sVectorInputName = pINormalizeDistanceNode->GetVectorInputName(); + + pINormalizeDistanceNode->_setCache (new ParameterCache_1 (sVectorInputName)); + } + else { + auto cache = dynamic_cast*> (pINormalizeDistanceNode->_getCache ()); + if (cache == nullptr) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + cache->retrieveData (sVectorInputName); + pINormalizeDistanceNode->_setCache (nullptr); + } + + if (pVectorInputNameNeededChars) + *pVectorInputNameNeededChars = (Lib3MF_uint32) (sVectorInputName.size()+1); + if (pVectorInputNameBuffer) { + if (sVectorInputName.size() >= nVectorInputNameBufferSize) + throw ELib3MFInterfaceException (LIB3MF_ERROR_BUFFERTOOSMALL); + for (size_t iVectorInputName = 0; iVectorInputName < sVectorInputName.size(); iVectorInputName++) + pVectorInputNameBuffer[iVectorInputName] = sVectorInputName[iVectorInputName]; + pVectorInputNameBuffer[sVectorInputName.size()] = 0; + } + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addStringResult("VectorInputName", sVectorInputName.c_str()); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_normalizedistancenode_getoutputresult(Lib3MF_NormalizeDistanceNode pNormalizeDistanceNode, Lib3MF_ImplicitPort * pResult) +{ + IBase* pIBaseClass = (IBase *)pNormalizeDistanceNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pNormalizeDistanceNode, "NormalizeDistanceNode", "GetOutputResult"); + } + if (pResult == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseResult(nullptr); + INormalizeDistanceNode* pINormalizeDistanceNode = dynamic_cast(pIBaseClass); + if (!pINormalizeDistanceNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseResult = pINormalizeDistanceNode->GetOutputResult(); + + *pResult = (IBase*)(pBaseResult); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Result", *pResult); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + /************************************************************************************************************************* Class implementation for FunctionCallNode **************************************************************************************************************************/ @@ -17116,6 +18026,150 @@ Lib3MFResult lib3mf_implicitfunction_addunsignedmeshnode(Lib3MF_ImplicitFunction } } +Lib3MFResult lib3mf_implicitfunction_addbeamlatticenode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_BeamLatticeNode * pNode) +{ + IBase* pIBaseClass = (IBase *)pImplicitFunction; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddBeamLatticeNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); + } + if (pIdentifier == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseNode = pIImplicitFunction->AddBeamLatticeNode(sIdentifier, sDisplayName, sTag); + + *pNode = (IBase*)(pBaseNode); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Node", *pNode); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_implicitfunction_addfunctiongradientnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_FunctionGradientNode * pNode) +{ + IBase* pIBaseClass = (IBase *)pImplicitFunction; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddFunctionGradientNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); + } + if (pIdentifier == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseNode = pIImplicitFunction->AddFunctionGradientNode(sIdentifier, sDisplayName, sTag); + + *pNode = (IBase*)(pBaseNode); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Node", *pNode); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_implicitfunction_addnormalizedistancenode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_NormalizeDistanceNode * pNode) +{ + IBase* pIBaseClass = (IBase *)pImplicitFunction; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddNormalizeDistanceNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); + } + if (pIdentifier == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseNode = pIImplicitFunction->AddNormalizeDistanceNode(sIdentifier, sDisplayName, sTag); + + *pNode = (IBase*)(pBaseNode); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Node", *pNode); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + Lib3MFResult lib3mf_implicitfunction_addfunctioncallnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_FunctionCallNode * pNode) { IBase* pIBaseClass = (IBase *)pImplicitFunction; @@ -24089,6 +25143,52 @@ Lib3MFResult Lib3MF::Impl::Lib3MF_GetProcAddress (const char * pProcName, void * *ppProcAddress = (void*) &lib3mf_unsignedmeshnode_getinputpos; if (sProcName == "lib3mf_unsignedmeshnode_getoutputdistance") *ppProcAddress = (void*) &lib3mf_unsignedmeshnode_getoutputdistance; + if (sProcName == "lib3mf_beamlatticenode_getinputbeamlattice") + *ppProcAddress = (void*) &lib3mf_beamlatticenode_getinputbeamlattice; + if (sProcName == "lib3mf_beamlatticenode_getinputpos") + *ppProcAddress = (void*) &lib3mf_beamlatticenode_getinputpos; + if (sProcName == "lib3mf_beamlatticenode_getoutputdistance") + *ppProcAddress = (void*) &lib3mf_beamlatticenode_getoutputdistance; + if (sProcName == "lib3mf_beamlatticenode_setaccuraterange") + *ppProcAddress = (void*) &lib3mf_beamlatticenode_setaccuraterange; + if (sProcName == "lib3mf_beamlatticenode_getaccuraterange") + *ppProcAddress = (void*) &lib3mf_beamlatticenode_getaccuraterange; + if (sProcName == "lib3mf_functiongradientnode_getinputfunctionid") + *ppProcAddress = (void*) &lib3mf_functiongradientnode_getinputfunctionid; + if (sProcName == "lib3mf_functiongradientnode_getinputpos") + *ppProcAddress = (void*) &lib3mf_functiongradientnode_getinputpos; + if (sProcName == "lib3mf_functiongradientnode_getinputstep") + *ppProcAddress = (void*) &lib3mf_functiongradientnode_getinputstep; + if (sProcName == "lib3mf_functiongradientnode_setscalaroutputname") + *ppProcAddress = (void*) &lib3mf_functiongradientnode_setscalaroutputname; + if (sProcName == "lib3mf_functiongradientnode_getscalaroutputname") + *ppProcAddress = (void*) &lib3mf_functiongradientnode_getscalaroutputname; + if (sProcName == "lib3mf_functiongradientnode_setvectorinputname") + *ppProcAddress = (void*) &lib3mf_functiongradientnode_setvectorinputname; + if (sProcName == "lib3mf_functiongradientnode_getvectorinputname") + *ppProcAddress = (void*) &lib3mf_functiongradientnode_getvectorinputname; + if (sProcName == "lib3mf_functiongradientnode_getoutputvector") + *ppProcAddress = (void*) &lib3mf_functiongradientnode_getoutputvector; + if (sProcName == "lib3mf_functiongradientnode_getoutputgradient") + *ppProcAddress = (void*) &lib3mf_functiongradientnode_getoutputgradient; + if (sProcName == "lib3mf_functiongradientnode_getoutputmagnitude") + *ppProcAddress = (void*) &lib3mf_functiongradientnode_getoutputmagnitude; + if (sProcName == "lib3mf_normalizedistancenode_getinputfunctionid") + *ppProcAddress = (void*) &lib3mf_normalizedistancenode_getinputfunctionid; + if (sProcName == "lib3mf_normalizedistancenode_getinputpos") + *ppProcAddress = (void*) &lib3mf_normalizedistancenode_getinputpos; + if (sProcName == "lib3mf_normalizedistancenode_getinputstep") + *ppProcAddress = (void*) &lib3mf_normalizedistancenode_getinputstep; + if (sProcName == "lib3mf_normalizedistancenode_setscalaroutputname") + *ppProcAddress = (void*) &lib3mf_normalizedistancenode_setscalaroutputname; + if (sProcName == "lib3mf_normalizedistancenode_getscalaroutputname") + *ppProcAddress = (void*) &lib3mf_normalizedistancenode_getscalaroutputname; + if (sProcName == "lib3mf_normalizedistancenode_setvectorinputname") + *ppProcAddress = (void*) &lib3mf_normalizedistancenode_setvectorinputname; + if (sProcName == "lib3mf_normalizedistancenode_getvectorinputname") + *ppProcAddress = (void*) &lib3mf_normalizedistancenode_getvectorinputname; + if (sProcName == "lib3mf_normalizedistancenode_getoutputresult") + *ppProcAddress = (void*) &lib3mf_normalizedistancenode_getoutputresult; if (sProcName == "lib3mf_functioncallnode_getinputfunctionid") *ppProcAddress = (void*) &lib3mf_functioncallnode_getinputfunctionid; if (sProcName == "lib3mf_nodeiterator_getcurrent") @@ -24215,6 +25315,12 @@ Lib3MFResult Lib3MF::Impl::Lib3MF_GetProcAddress (const char * pProcName, void * *ppProcAddress = (void*) &lib3mf_implicitfunction_addmeshnode; if (sProcName == "lib3mf_implicitfunction_addunsignedmeshnode") *ppProcAddress = (void*) &lib3mf_implicitfunction_addunsignedmeshnode; + if (sProcName == "lib3mf_implicitfunction_addbeamlatticenode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addbeamlatticenode; + if (sProcName == "lib3mf_implicitfunction_addfunctiongradientnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addfunctiongradientnode; + if (sProcName == "lib3mf_implicitfunction_addnormalizedistancenode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addnormalizedistancenode; if (sProcName == "lib3mf_implicitfunction_addfunctioncallnode") *ppProcAddress = (void*) &lib3mf_implicitfunction_addfunctioncallnode; if (sProcName == "lib3mf_implicitfunction_getnodes") diff --git a/Autogenerated/Source/lib3mf_types.hpp b/Autogenerated/Source/lib3mf_types.hpp index 12bc83060..2ae400ad6 100644 --- a/Autogenerated/Source/lib3mf_types.hpp +++ b/Autogenerated/Source/lib3mf_types.hpp @@ -24,12 +24,12 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-alpha. +This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.1-develop. Abstract: This is an autogenerated C++-Header file with basic types in order to allow an easy use of the 3MF Library -Interface version: 2.4.1 +Interface version: 2.5.0 */ @@ -83,8 +83,8 @@ typedef void * Lib3MF_pvoid; **************************************************************************************************************************/ #define LIB3MF_VERSION_MAJOR 2 -#define LIB3MF_VERSION_MINOR 4 -#define LIB3MF_VERSION_MICRO 1 +#define LIB3MF_VERSION_MINOR 5 +#define LIB3MF_VERSION_MICRO 0 #define LIB3MF_VERSION_PRERELEASEINFO "" #define LIB3MF_VERSION_BUILDINFO "" @@ -309,6 +309,9 @@ typedef Lib3MFHandle Lib3MF_ConstVecNode; typedef Lib3MFHandle Lib3MF_ConstMatNode; typedef Lib3MFHandle Lib3MF_MeshNode; typedef Lib3MFHandle Lib3MF_UnsignedMeshNode; +typedef Lib3MFHandle Lib3MF_BeamLatticeNode; +typedef Lib3MFHandle Lib3MF_FunctionGradientNode; +typedef Lib3MFHandle Lib3MF_NormalizeDistanceNode; typedef Lib3MFHandle Lib3MF_FunctionCallNode; typedef Lib3MFHandle Lib3MF_NodeIterator; typedef Lib3MFHandle Lib3MF_Function; @@ -359,7 +362,8 @@ namespace Lib3MF { Other = 0, Model = 1, Support = 2, - SolidSupport = 3 + SolidSupport = 3, + Surface = 4 }; enum class eTextureType : Lib3MF_int32 { @@ -473,11 +477,11 @@ namespace Lib3MF { MatVecMultiplication = 14, /** Multiplies a matrix with a vector */ Transpose = 15, /** Transposes a matrix */ Inverse = 16, /** Computes the inverse of a matrix */ - Sinus = 17, /** Calculates the sinus */ - Cosinus = 18, /** Calculates the cosinus */ + Sinus = 17, /** Calculates the sine */ + Cosinus = 18, /** Calculates the cosine */ Tan = 19, /** Calculates the tangent */ - ArcSin = 20, /** Calculates the arcsinus */ - ArcCos = 21, /** Calculates the arccosinus */ + ArcSin = 20, /** Calculates the arcsine */ + ArcCos = 21, /** Calculates the arccosine */ ArcTan = 22, /** Calculates the arctangent */ ArcTan2 = 23, /** Calculates the arctangent */ Min = 24, /** Calculates the minimum of two values */ @@ -487,9 +491,9 @@ namespace Lib3MF { Pow = 28, /** Calculates the power A^B */ Sqrt = 29, /** Calculates the square root */ Exp = 30, /** Exponential function */ - Log = 31, /** Natural logarithmus */ - Log2 = 32, /** Logarithmus to the base 2 */ - Log10 = 33, /** Logarithmus to the base 10 */ + Log = 31, /** Natural logarithm */ + Log2 = 32, /** Logarithm to the base 2 */ + Log10 = 33, /** Logarithm to the base 10 */ Select = 34, /** If A is less than B returns C, else D */ Clamp = 35, /** Clamps the input value to min and max */ Sinh = 36, /** Calculates the hyperbolic sine */ @@ -504,9 +508,12 @@ namespace Lib3MF { Mesh = 45, /** Calculates the signed distance to a mesh */ Length = 46, /** Calculates the length of a vector */ ConstResourceID = 47, /** Selects a resource (function, mesh etc.) */ - VectorFromScalar = 48, /** Creates a vector from one scalar values */ + VectorFromScalar = 48, /** Creates a vector from one scalar value */ UnsignedMesh = 49, /** Calculates the unsigned distance to a mesh */ - Mod = 50 /** Calculates the modulo of two values (same behaviour as glsl mod) */ + Mod = 50, /** Calculates the modulo of two values (same behaviour as glsl mod) */ + BeamLattice = 51, /** Calculates the signed distance to a beam lattice */ + FunctionGradient = 52, /** Calculates the gradient of a function */ + NormalizeDistance = 53 /** Normalizes a distance field */ }; /** diff --git a/AutomaticComponentToolkit/_githash_act.txt b/AutomaticComponentToolkit/_githash_act.txt index 68935dbe4..9c4a173e1 100644 --- a/AutomaticComponentToolkit/_githash_act.txt +++ b/AutomaticComponentToolkit/_githash_act.txt @@ -1,2 +1,2 @@ -7e4f1fc0dd3523c807427b4efc0db165bdb1a936 -https://github.com/Autodesk/AutomaticComponentToolkit/releases/tag/v1.8.0-alpha \ No newline at end of file +5f800d355908a6f7156c45c69d2cb02572911b31 +https://github.com/Autodesk/AutomaticComponentToolkit/tree/refs/heads/develop \ No newline at end of file diff --git a/AutomaticComponentToolkit/act.arm.linux32 b/AutomaticComponentToolkit/act.arm.linux32 index c621583aa..bd27dfa5e 100755 Binary files a/AutomaticComponentToolkit/act.arm.linux32 and b/AutomaticComponentToolkit/act.arm.linux32 differ diff --git a/AutomaticComponentToolkit/act.arm.linux64 b/AutomaticComponentToolkit/act.arm.linux64 index bb7df5aad..0dba48f89 100755 Binary files a/AutomaticComponentToolkit/act.arm.linux64 and b/AutomaticComponentToolkit/act.arm.linux64 differ diff --git a/AutomaticComponentToolkit/act.darwin b/AutomaticComponentToolkit/act.darwin index af2fa872b..c7ee561d1 100755 Binary files a/AutomaticComponentToolkit/act.darwin and b/AutomaticComponentToolkit/act.darwin differ diff --git a/AutomaticComponentToolkit/act.linux32 b/AutomaticComponentToolkit/act.linux32 index 7f3432c37..526ae84fd 100755 Binary files a/AutomaticComponentToolkit/act.linux32 and b/AutomaticComponentToolkit/act.linux32 differ diff --git a/AutomaticComponentToolkit/act.linux64 b/AutomaticComponentToolkit/act.linux64 index 699c3fd7e..ed13c7722 100755 Binary files a/AutomaticComponentToolkit/act.linux64 and b/AutomaticComponentToolkit/act.linux64 differ diff --git a/AutomaticComponentToolkit/act.win32.exe b/AutomaticComponentToolkit/act.win32.exe index 0fb0bd78e..c9345596b 100755 Binary files a/AutomaticComponentToolkit/act.win32.exe and b/AutomaticComponentToolkit/act.win32.exe differ diff --git a/AutomaticComponentToolkit/act.win64.exe b/AutomaticComponentToolkit/act.win64.exe index 295d92769..2f4a1aa21 100755 Binary files a/AutomaticComponentToolkit/act.win64.exe and b/AutomaticComponentToolkit/act.win64.exe differ diff --git a/AutomaticComponentToolkit/lib3mf.xml b/AutomaticComponentToolkit/lib3mf.xml index f1af626af..b6ea8ab0a 100644 --- a/AutomaticComponentToolkit/lib3mf.xml +++ b/AutomaticComponentToolkit/lib3mf.xml @@ -1,5 +1,5 @@ - + @@ -33,12 +33,15 @@ - + + + + @@ -149,6 +152,7 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CI/integration_test.py b/CI/integration_test.py index dbfb7bb3f..fd619d169 100644 --- a/CI/integration_test.py +++ b/CI/integration_test.py @@ -63,6 +63,9 @@ def ExtractInfo(execCommand, fileName): root = os.path.dirname(os.path.realpath(__file__)) + if "LIB3MF_STRICT_READER" not in os.environ: + os.environ["LIB3MF_STRICT_READER"] = "1" + execCommand = os.path.join(root, "Example_ExtractInfo") print("Execute once for testing") diff --git a/CMakeLists.txt b/CMakeLists.txt index c6a317909..eca17957b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.0) +cmake_minimum_required (VERSION 3.10) cmake_policy(SET CMP0054 NEW) cmake_policy(SET CMP0048 NEW) @@ -7,11 +7,12 @@ cmake_policy(SET CMP0048 NEW) set_property(GLOBAL PROPERTY USE_FOLDERS ON) include(GNUInstallDirs) +include(CMakePackageConfigHelpers) # Define Version set(LIB3MF_VERSION_MAJOR 2) # increase on every backward-compatibility breaking change of the API -set(LIB3MF_VERSION_MINOR 4) # increase on every backward compatible change of the API -set(LIB3MF_VERSION_MICRO 1) # increase on on every change that does not alter the API +set(LIB3MF_VERSION_MINOR 5) # increase on every backward compatible change of the API +set(LIB3MF_VERSION_MICRO 0) # increase on on every change that does not alter the API set(LIB3MF_VERSION_PRERELEASE "") # denotes pre-release information of a version of lib3mf set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version") project(lib3mf @@ -19,6 +20,11 @@ project(lib3mf DESCRIPTION "An implementation of the 3D Manufacturing Format file standard" ) +# macOS: ensure zlib includes (affects ALL targets incl. Tests) +if(APPLE) + add_compile_definitions(Z_HAVE_UNISTD_H=1) +endif() + find_program(buildcache_program buildcache) if(buildcache_program) set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${buildcache_program}") @@ -26,36 +32,62 @@ endif() set(CMAKE_INSTALL_BINDIR bin CACHE PATH "directory for installing binary files") set(CMAKE_INSTALL_LIBDIR lib CACHE PATH "directory for installing library files") -set(CMAKE_INSTALL_INCLUDEDIR include/lib3mf CACHE PATH "directory for installing header files") +set(CMAKE_INSTALL_INCLUDEDIR include CACHE PATH "directory for installing header files") + +# Build lib3mf as shared by default, but do not implicitly switch third-party +# dependencies (which often key off BUILD_SHARED_LIBS) to shared as well. +set(_lib3mf_build_shared_default ON) +if(DEFINED BUILD_SHARED_LIBS) + set(_lib3mf_build_shared_default "${BUILD_SHARED_LIBS}") +endif() +option(LIB3MF_BUILD_SHARED "Build lib3mf as shared library" ${_lib3mf_build_shared_default}) +unset(_lib3mf_build_shared_default) +option(LIB3MF_BUILD_WASM "Build JavaScript/WebAssembly embind bindings from ACT generated sources" OFF) option(USE_INCLUDED_ZLIB "Use included zlib" ON) option(USE_INCLUDED_LIBZIP "Use included libzip" ON) option(USE_INCLUDED_SSL "Use included libressl" ON) +option(USE_INCLUDED_CPPBASE64 "Use included cpp-base64 sources" ON) +option(USE_INCLUDED_FASTFLOAT "Use included fast_float headers" ON) option(BUILD_FOR_CODECOVERAGE "Build for code coverage analysis" OFF) option(STRIP_BINARIES "Strip binaries (on non-apple)" ON) option(USE_PLATFORM_UUID "Use UUID geneator that is provided by the OS (always ON for Windows)" OFF) +if (LIB3MF_BUILD_WASM) + if (NOT EMSCRIPTEN) + message(FATAL_ERROR "LIB3MF_BUILD_WASM requires the Emscripten toolchain. Configure with emcmake.") + endif() + if (LIB3MF_BUILD_SHARED) + message(STATUS "LIB3MF_BUILD_WASM forces LIB3MF_BUILD_SHARED=OFF for static linking into the WASM module.") + set(LIB3MF_BUILD_SHARED OFF CACHE BOOL "Build lib3mf as shared library" FORCE) + endif() +endif() + add_compile_options($<$:/MP>) set (CMAKE_CXX_STANDARD 17) -if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") - # using GCC - add_definitions(-DBUILD_DLL) - add_compile_options(-Wall) - if (CMAKE_BUILD_TYPE MATCHES DEBUG) - add_compile_options(-g) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -Og") - else() + if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + # using GCC + if (LIB3MF_BUILD_SHARED) + add_definitions(-DBUILD_DLL) + endif() + add_compile_options(-Wall) + if (CMAKE_BUILD_TYPE MATCHES DEBUG) + add_compile_options(-g) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -Og") + else() SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -O2") endif(CMAKE_BUILD_TYPE MATCHES DEBUG) -elseif ("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin") - # using GCC - add_definitions(-DBUILD_DLL) - add_compile_options(-Wall) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -O2") - set(CMAKE_MACOSX_RPATH ON) -endif() + elseif ("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin") + # using GCC + if (LIB3MF_BUILD_SHARED) + add_definitions(-DBUILD_DLL) + endif() + add_compile_options(-Wall) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -O2") + set(CMAKE_MACOSX_RPATH ON) + endif() if (${MSVC}) # using Visual Studio C++ @@ -122,11 +154,17 @@ endif() ######################################################### -# Shared library -add_library(${PROJECT_NAME} SHARED ${SRCS_COMMON} ${HDRS_COMMON} - ${ACT_GENERATED_SOURCE} - ${VERSION_FILES_OUTPUTLOCATION} -) +if (LIB3MF_BUILD_SHARED) + add_library(${PROJECT_NAME} SHARED ${SRCS_COMMON} ${HDRS_COMMON} + ${ACT_GENERATED_SOURCE} + ${VERSION_FILES_OUTPUTLOCATION} + ) +else() + add_library(${PROJECT_NAME} STATIC ${SRCS_COMMON} ${HDRS_COMMON} + ${ACT_GENERATED_SOURCE} + ${VERSION_FILES_OUTPUTLOCATION} + ) +endif() if (${MSVC}) # using Visual Studio C++ @@ -159,6 +197,10 @@ add_definitions(-DFASTFLOAT_ALLOWS_LEADING_PLUS=1) target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR_AUTOGENERATED}/Source) target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/Include/API) target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/Include) +target_include_directories(${PROJECT_NAME} PUBLIC + $ + $ +) if (USE_INCLUDED_LIBZIP) # Something goes here to check if submodules exist and initialize the submodules if it does not @@ -177,49 +219,120 @@ if (USE_INCLUDED_LIBZIP) # create libzip autogenerated platform specific headers if(NOT EXISTS ${CMAKE_BINARY_DIR}/libzip) + set(LIBZIP_CONFIGURE_ARGS + "-DZLIB_INCLUDE_DIR=${CMAKE_CURRENT_SOURCE_DIR}/submodules/zlib" + "-DZLIB_LIBRARY=zlibstatic" + "-DENABLE_COMMONCRYPTO=OFF" + "-DENABLE_GNUTLS=OFF" + "-DENABLE_MBEDTLS=OFF" + "-DENABLE_OPENSSL=OFF" + "-DENABLE_WINDOWS_CRYPTO=OFF" + "-DENABLE_BZIP2=OFF" + "-DENABLE_LZMA=OFF" + "-DENABLE_ZSTD=OFF" + "-DBUILD_TOOLS=OFF" + "-DBUILD_REGRESS=OFF" + "-DBUILD_EXAMPLES=OFF" + "-DBUILD_DOC=OFF" + "-DBUILD_SHARED_LIBS=OFF" + "-DLIBZIP_DO_INSTALL=OFF" + ) + if(EMSCRIPTEN) + # Avoid libzip's legacy endian probe failing during cross-compilation. + list(APPEND LIBZIP_CONFIGURE_ARGS "-DCMAKE_C_BYTE_ORDER=LITTLE_ENDIAN") + endif() execute_process( - COMMAND ${CMAKE_COMMAND} "-DZLIB_INCLUDE_DIR=${CMAKE_CURRENT_SOURCE_DIR}/submodules/zlib" - "-DZLIB_LIBRARY=zlibstatic" "-DENABLE_COMMONCRYPTO=OFF" "-DENABLE_GNUTLS=OFF" "-DENABLE_MBEDTLS=OFF" - "-DENABLE_OPENSSL=OFF" "-DENABLE_WINDOWS_CRYPTO=OFF" - "-DENABLE_BZIP2=OFF" "-DENABLE_LZMA=OFF" "-DENABLE_ZSTD=OFF" - "-DBUILD_TOOLS=OFF" "-DBUILD_REGRESS=OFF" - "-DBUILD_EXAMPLES=OFF" "-DBUILD_DOC=OFF" "-DBUILD_SHARED_LIBS=OFF" "-DLIBZIP_DO_INSTALL=OFF" + COMMAND ${CMAKE_COMMAND} ${LIBZIP_CONFIGURE_ARGS} "-S" "${CMAKE_CURRENT_SOURCE_DIR}/submodules/libzip" "-B" "${CMAKE_CURRENT_BINARY_DIR}/libzip" RESULT_VARIABLE CMD_ERROR OUTPUT_QUIET) MESSAGE( STATUS "CMD_ERROR:" ${CMD_ERROR}) + unset(LIBZIP_CONFIGURE_ARGS) endif() target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/libzip) - if (UNIX OR MINGW) + if ((UNIX OR MINGW) AND NOT EMSCRIPTEN) target_compile_options(${PROJECT_NAME} PRIVATE "-DHAVE_FSEEKO") target_compile_options(${PROJECT_NAME} PRIVATE "-DHAVE_FTELLO") target_compile_options(${PROJECT_NAME} PRIVATE "-DHAVE_STRCASECMP") target_compile_options(${PROJECT_NAME} PRIVATE "-DHAVE_UNISTD_H") endif() + if (EMSCRIPTEN) + target_compile_definitions(${PROJECT_NAME} PRIVATE SIZEOF_OFF_T=8 SIZEOF_SIZE_T=4) + endif() else() - find_package(PkgConfig REQUIRED) - pkg_check_modules(LIBZIP REQUIRED libzip) - target_link_libraries(${PROJECT_NAME} ${LIBZIP_LIBRARIES}) + set(_lib3mf_external_link_visibility PRIVATE) + if (NOT LIB3MF_BUILD_SHARED) + set(_lib3mf_external_link_visibility PUBLIC) + endif() + + find_package(libzip CONFIG QUIET) + if (TARGET libzip::zip) + target_link_libraries(${PROJECT_NAME} ${_lib3mf_external_link_visibility} libzip::zip) + else() + find_package(PkgConfig REQUIRED) + pkg_check_modules(LIBZIP REQUIRED libzip) + target_include_directories(${PROJECT_NAME} PRIVATE ${LIBZIP_INCLUDE_DIRS}) + target_link_directories(${PROJECT_NAME} PRIVATE ${LIBZIP_LIBRARY_DIRS}) + target_link_libraries(${PROJECT_NAME} ${_lib3mf_external_link_visibility} ${LIBZIP_LIBRARIES}) + endif() + + unset(_lib3mf_external_link_visibility) endif() if (USE_INCLUDED_ZLIB) target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/Libraries/zlib/Include) + + if(APPLE OR EMSCRIPTEN) + # Ensure zlib includes unistd.h where needed (e.g. macOS, Emscripten). + target_compile_definitions(${PROJECT_NAME} PRIVATE Z_HAVE_UNISTD_H=1) + endif() + else() - find_package(PkgConfig REQUIRED) - pkg_check_modules(ZLIB REQUIRED zlib) - target_link_libraries(${PROJECT_NAME} ${ZLIB_LIBRARIES}) + set(_lib3mf_external_link_visibility PRIVATE) + if (NOT LIB3MF_BUILD_SHARED) + set(_lib3mf_external_link_visibility PUBLIC) + endif() + + find_package(ZLIB QUIET) + if (TARGET ZLIB::ZLIB) + target_link_libraries(${PROJECT_NAME} ${_lib3mf_external_link_visibility} ZLIB::ZLIB) + else() + find_package(PkgConfig REQUIRED) + pkg_check_modules(ZLIB REQUIRED zlib) + target_include_directories(${PROJECT_NAME} PRIVATE ${ZLIB_INCLUDE_DIRS}) + target_link_directories(${PROJECT_NAME} PRIVATE ${ZLIB_LIBRARY_DIRS}) + target_link_libraries(${PROJECT_NAME} ${_lib3mf_external_link_visibility} ${ZLIB_LIBRARIES}) + endif() + + unset(_lib3mf_external_link_visibility) endif() -target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/submodules/fast_float/include) +if (USE_INCLUDED_CPPBASE64) + target_compile_definitions(${PROJECT_NAME} PRIVATE LIB3MF_USE_INCLUDED_CPPBASE64=1) +else() + find_path(CPPBASE64_INCLUDE_DIR NAMES base64.h PATH_SUFFIXES cpp-base64 REQUIRED) + find_file(CPPBASE64_SOURCE_FILE NAMES base64.cpp PATH_SUFFIXES cpp-base64 REQUIRED) + target_include_directories(${PROJECT_NAME} PRIVATE ${CPPBASE64_INCLUDE_DIR}) + target_sources(${PROJECT_NAME} PRIVATE ${CPPBASE64_SOURCE_FILE}) +endif() + +if (USE_INCLUDED_FASTFLOAT) + target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/submodules/fast_float/include) +else() + find_package(FastFloat CONFIG REQUIRED) + target_link_libraries(${PROJECT_NAME} PRIVATE FastFloat::fast_float) +endif() set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "" IMPORT_PREFIX "" ) -# This makes sure symbols are exported -target_compile_options(${PROJECT_NAME} PRIVATE "-D__LIB3MF_EXPORTS") +# This makes sure symbols are exported (shared builds only) +if (LIB3MF_BUILD_SHARED) + target_compile_options(${PROJECT_NAME} PRIVATE "-D__LIB3MF_EXPORTS") +endif() # The following two properties are crucial to reduce the number of undesirably exported symbols set_target_properties(${PROJECT_NAME} PROPERTIES C_VISIBILITY_PRESET hidden) set_target_properties(${PROJECT_NAME} PROPERTIES CXX_VISIBILITY_PRESET hidden) @@ -228,17 +341,23 @@ set_target_properties(${PROJECT_NAME} PROPERTIES VISIBILITY_INLINES_HIDDEN ON) set(STARTUPPROJECT ${PROJECT_NAME}) ######################################################### -if (UNIX OR MINGW) +if (${MSVC}) + # wd4996 masks the deprecated-warning + target_compile_options(${PROJECT_NAME} PUBLIC "$<$:/Od;/Ob0;/sdl;/W3;/WX;/FC;/wd4996>") + target_compile_options(${PROJECT_NAME} PUBLIC "$<$:/O2;/sdl;/WX;/Oi;/Gy;/FC;/wd4996>") +elseif ((UNIX OR MINGW) AND LIB3MF_BUILD_SHARED) # Uncomment the following to put the version info into the .so-file. set_target_properties(${PROJECT_NAME} PROPERTIES VERSION "${LIB3MF_VERSION_MAJOR}.${LIB3MF_VERSION_MINOR}.${LIB3MF_VERSION_MICRO}.${BUILD_NUMBER}") set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION "${LIB3MF_VERSION_MAJOR}") + target_compile_options(${PROJECT_NAME} PRIVATE -Wno-incompatible-pointer-types) if (STRIP_BINARIES AND NOT APPLE) set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS -s) endif() -else() - # wd4996 masks the deprecated-warning - target_compile_options(${PROJECT_NAME} PUBLIC "$<$:/Od;/Ob0;/sdl;/W3;/WX;/FC;/wd4996>") - target_compile_options(${PROJECT_NAME} PUBLIC "$<$:/O2;/sdl;/WX;/Oi;/Gy;/FC;/wd4996>") +endif() + +# Static build usability (e.g. linking into shared libs) +if (NOT LIB3MF_BUILD_SHARED) + set_target_properties(${PROJECT_NAME} PROPERTIES POSITION_INDEPENDENT_CODE ON) endif() ## UUID @@ -248,7 +367,7 @@ if(WIN32) else() if (USE_PLATFORM_UUID) if (APPLE) - target_compile_definitions(${PROJECT_NAME} PRIVATE GUID_CFUUID) + target_compile_definitions(${PROJECT_NAME} PRIVATE GUID_CFUUID HAVE_UNISTD_H=1) target_link_libraries(${PROJECT_NAME} "-framework Foundation") else() target_compile_definitions(${PROJECT_NAME} PRIVATE GUID_LIBUUID) @@ -260,17 +379,70 @@ else() endif(WIN32) configure_file(lib3mf.pc.in lib3mf.pc @ONLY) +set(LIB3MF_CONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/lib3mf") +configure_package_config_file( + cmake/lib3mfConfig.cmake.in + "${CMAKE_CURRENT_BINARY_DIR}/lib3mfConfig.cmake" + INSTALL_DESTINATION "${LIB3MF_CONFIG_INSTALL_DIR}" +) +write_basic_package_version_file( + "${CMAKE_CURRENT_BINARY_DIR}/lib3mfConfigVersion.cmake" + VERSION "${PROJECT_VERSION}" + COMPATIBILITY SameMajorVersion +) install(FILES ${CMAKE_BINARY_DIR}/lib3mf.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) -install(FILES cmake/lib3mfConfig.cmake - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/lib3mf) +install(FILES + "${CMAKE_CURRENT_BINARY_DIR}/lib3mfConfig.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/lib3mfConfigVersion.cmake" + DESTINATION "${LIB3MF_CONFIG_INSTALL_DIR}" +) install(TARGETS ${PROJECT_NAME} + EXPORT lib3mfTargets ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") +install(EXPORT lib3mfTargets + FILE lib3mfTargets.cmake + NAMESPACE lib3mf:: + DESTINATION "${LIB3MF_CONFIG_INSTALL_DIR}" +) install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR_AUTOGENERATED}/Bindings DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") +if (LIB3MF_BUILD_WASM) + set(LIB3MF_WASM_BINDINGS_SOURCE "${CMAKE_CURRENT_SOURCE_DIR_AUTOGENERATED}/Bindings/WASM/lib3mf_bindings.cpp") + if (NOT EXISTS "${LIB3MF_WASM_BINDINGS_SOURCE}") + message(FATAL_ERROR "Missing ACT-generated WASM bindings source: ${LIB3MF_WASM_BINDINGS_SOURCE}") + endif() + + add_executable(lib3mf_wasm ${LIB3MF_WASM_BINDINGS_SOURCE}) + target_include_directories(lib3mf_wasm PRIVATE ${CMAKE_CURRENT_SOURCE_DIR_AUTOGENERATED}/Bindings) + target_link_libraries(lib3mf_wasm PRIVATE ${PROJECT_NAME}) + set_target_properties(lib3mf_wasm PROPERTIES OUTPUT_NAME "lib3mf" SUFFIX ".js") + target_link_options(lib3mf_wasm PRIVATE + "-sWASM=1" + "-sMODULARIZE=1" + "-sEXPORT_ES6=1" + "-sUSE_ES6_IMPORT_META=1" + "-sENVIRONMENT=web,worker,node" + "-sINITIAL_MEMORY=1073741824" + "-sALLOW_MEMORY_GROWTH=1" + "-sMAXIMUM_MEMORY=4294967296" + "-sFORCE_FILESYSTEM=1" + "-sEXPORTED_RUNTIME_METHODS=['FS','ccall','cwrap']" + "--bind" + "-sEXCEPTION_CATCHING_ALLOWED=['*']" + "-sASSERTIONS=1" + "--no-entry" + ) +endif() + ######################################################### -option(LIB3MF_TESTS "Switch whether the tests of lib3mf should be build" ON) +set(_lib3mf_tests_default ON) +if(EMSCRIPTEN OR LIB3MF_BUILD_WASM) + set(_lib3mf_tests_default OFF) +endif() +option(LIB3MF_TESTS "Switch whether the tests of lib3mf should be build" ${_lib3mf_tests_default}) +unset(_lib3mf_tests_default) message("LIB3MF_TESTS ... " ${LIB3MF_TESTS}) if(LIB3MF_TESTS) @@ -299,8 +471,12 @@ set(CPACK_PACKAGE_VERSION_PATCH "${LIB3MF_VERSION_MICRO}") set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64") set(CPACK_PACKAGE_CONTACT "lib3mf@3mf.io") set(CPACK_DEBIAN_PACKAGE_MAINTAINER "3MF Consortium") -set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}") -set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-Source") +set(LIB3MF_VERSION_FULL "${CPACK_PACKAGE_VERSION}") +if (DEFINED LIB3MF_VERSION_PRERELEASE AND NOT "${LIB3MF_VERSION_PRERELEASE}" STREQUAL "") + set(LIB3MF_VERSION_FULL "${LIB3MF_VERSION_FULL}-${LIB3MF_VERSION_PRERELEASE}") +endif() +set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${LIB3MF_VERSION_FULL}-${CMAKE_SYSTEM_NAME}") +set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${LIB3MF_VERSION_FULL}-Source") ######################################################### include(CPack) diff --git a/CMakePresets.json b/CMakePresets.json index dffe08f11..3b93ba150 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -1,4 +1,5 @@ { + "version": 3, "configurePresets": [ { "name": "windows-base", @@ -47,7 +48,135 @@ "CMAKE_BUILD_TYPE": "RelWithDebInfo", "CMAKE_CXX_FLAGS_DEBUG": "/Z7" } + }, + { + "name": "linux-base", + "displayName": "Linux Base (Ninja)", + "description": "Base preset for Linux using Ninja.", + "generator": "Ninja", + "binaryDir": "${sourceDir}/build/${presetName}", + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Linux" + }, + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release", + "CMAKE_INSTALL_PREFIX": "/usr/local", + "LIB3MF_TESTS": "ON", + "USE_INCLUDED_ZLIB": "OFF", + "USE_INCLUDED_LIBZIP": "OFF", + "USE_INCLUDED_SSL": "OFF" + } + }, + { + "name": "linux-debug", + "displayName": "Linux Debug", + "description": "Debug build on Linux with tests enabled.", + "inherits": "linux-base", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug" + } + }, + { + "name": "linux-relwithdebinfo", + "displayName": "Linux RelWithDebInfo", + "description": "RelWithDebInfo build on Linux with tests enabled.", + "inherits": "linux-base", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "RelWithDebInfo" + } + }, + { + "name": "linux-release", + "displayName": "Linux Release", + "description": "Release build on Linux with tests enabled.", + "inherits": "linux-base", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } } ], - "version": 3 + "buildPresets": [ + { + "name": "x64-debug", + "displayName": "Build (Windows x64 Debug)", + "configurePreset": "x64-debug" + }, + { + "name": "x64-release", + "displayName": "Build (Windows x64 Release)", + "configurePreset": "x64-release" + }, + { + "name": "x64-release-debug", + "displayName": "Build (Windows x64 Release with Debug)", + "configurePreset": "x64-release-debug" + }, + { + "name": "linux-debug", + "displayName": "Build (Linux Debug)", + "configurePreset": "linux-debug" + }, + { + "name": "linux-relwithdebinfo", + "displayName": "Build (Linux RelWithDebInfo)", + "configurePreset": "linux-relwithdebinfo" + }, + { + "name": "linux-release", + "displayName": "Build (Linux Release)", + "configurePreset": "linux-release" + } + ], + "testPresets": [ + { + "name": "x64-debug", + "displayName": "Test (Windows x64 Debug)", + "configurePreset": "x64-debug", + "output": { + "outputOnFailure": true + } + }, + { + "name": "x64-release", + "displayName": "Test (Windows x64 Release)", + "configurePreset": "x64-release", + "output": { + "outputOnFailure": true + } + }, + { + "name": "x64-release-debug", + "displayName": "Test (Windows x64 Release with Debug)", + "configurePreset": "x64-release-debug", + "output": { + "outputOnFailure": true + } + }, + { + "name": "linux-debug", + "displayName": "Test (Linux Debug)", + "configurePreset": "linux-debug", + "output": { + "outputOnFailure": true + } + }, + { + "name": "linux-relwithdebinfo", + "displayName": "Test (Linux RelWithDebInfo)", + "configurePreset": "linux-relwithdebinfo", + "output": { + "outputOnFailure": true + } + }, + { + "name": "linux-release", + "displayName": "Test (Linux Release)", + "configurePreset": "linux-release", + "output": { + "outputOnFailure": true + } + } + ] } \ No newline at end of file diff --git a/Documentation/conf.py b/Documentation/conf.py index 8af33efa5..4bb2b41fb 100644 --- a/Documentation/conf.py +++ b/Documentation/conf.py @@ -22,7 +22,7 @@ author = '3MF Consortium' # The full version, including alpha/beta/rc tags -release = 'v2.4.1' +release = 'v2.5.0' master_doc = 'index' diff --git a/Documentation/index.rst b/Documentation/index.rst index 15b7ba3b3..03db22d99 100644 --- a/Documentation/index.rst +++ b/Documentation/index.rst @@ -1,7 +1,7 @@ .. lib3mf documentation master file ********************************************* -lib3mf v2.4.1 documentation +lib3mf v2.5.0 documentation ********************************************* .. image:: https://github.com/3MFConsortium/lib3mf/workflows/Build/badge.svg?branch=master @@ -12,7 +12,7 @@ lib3mf v2.4.1 documentation :target: https://readthedocs.org/projects/lib3mf/ :alt: Documentation Status -.. image:: https://img.shields.io/static/v1.svg?label=lib3mf&message=v2.4.1&color=green +.. image:: https://img.shields.io/static/v1.svg?label=lib3mf&message=v2.3.2&color=green :alt: Version .. image:: https://img.shields.io/static/v1.svg?label=platform&message=windows%20%7C%20macos%20%7C%20linux&color=lightgrey @@ -27,7 +27,7 @@ lib3mf v2.4.1 documentation :language: bash -Welcome! This is the documentation for lib3mf v2.4.1. +Welcome! This is the documentation for lib3mf v2.5.0. lib3mf is an implementation of the 3D Manufacturing Format file standard. diff --git a/Documentation/source/Cpp/lib3mf-types.rst b/Documentation/source/Cpp/lib3mf-types.rst index f2667a6de..02b575994 100644 --- a/Documentation/source/Cpp/lib3mf-types.rst +++ b/Documentation/source/Cpp/lib3mf-types.rst @@ -64,6 +64,7 @@ Enumerations .. cpp:enumerator:: Model = 1 .. cpp:enumerator:: Support = 2 .. cpp:enumerator:: SolidSupport = 3 + .. cpp:enumerator:: Surface = 4 .. cpp:enum-class:: eTextureType : Lib3MF_int32 @@ -96,12 +97,12 @@ Enumerations .. cpp:enumerator:: Inside = 1 .. cpp:enumerator:: Outside = 2 - .. cpp:enum-class:: eBeamLatticeBallMode : Lib3MF_int32 + .. cpp:enum-class:: eBeamLatticeBallMode : Lib3MF_int32 - .. cpp:enumerator:: None = 0 + .. cpp:enumerator:: BeamLatticeBallModeNone = 0 .. cpp:enumerator:: Mixed = 1 .. cpp:enumerator:: All = 2 - + .. cpp:enum-class:: eProgressIdentifier : Lib3MF_int32 .. cpp:enumerator:: QUERYCANCELED = 0 @@ -135,6 +136,97 @@ Enumerations .. cpp:enumerator:: Mix = 1 .. cpp:enumerator:: Multiply = 2 + .. cpp:enum-class:: eChannelName : Lib3MF_int32 + + .. cpp:enumerator:: Red = 0 + .. cpp:enumerator:: Green = 1 + .. cpp:enumerator:: Blue = 2 + .. cpp:enumerator:: Alpha = 3 + + .. cpp:enum-class:: eCompositionMethod : Lib3MF_int32 + + .. cpp:enumerator:: WeightedSum = 0 + .. cpp:enumerator:: Multiply = 1 + .. cpp:enumerator:: Min = 2 + .. cpp:enumerator:: Max = 3 + .. cpp:enumerator:: Mask = 4 + + .. cpp:enum-class:: eCompositionSpace : Lib3MF_int32 + + .. cpp:enumerator:: Raw = 0 + .. cpp:enumerator:: LinearColor = 1 + + .. cpp:enum-class:: eImplicitNodeType : Lib3MF_int32 + + .. cpp:enumerator:: Addition = 0 + .. cpp:enumerator:: Subtraction = 1 + .. cpp:enumerator:: Multiplication = 2 + .. cpp:enumerator:: Division = 3 + .. cpp:enumerator:: Constant = 4 + .. cpp:enumerator:: ConstVec = 5 + .. cpp:enumerator:: ConstMat = 6 + .. cpp:enumerator:: ComposeVector = 7 + .. cpp:enumerator:: DecomposeVector = 8 + .. cpp:enumerator:: ComposeMatrix = 9 + .. cpp:enumerator:: MatrixFromColumns = 10 + .. cpp:enumerator:: MatrixFromRows = 11 + .. cpp:enumerator:: Dot = 12 + .. cpp:enumerator:: Cross = 13 + .. cpp:enumerator:: MatVecMultiplication = 14 + .. cpp:enumerator:: Transpose = 15 + .. cpp:enumerator:: Inverse = 16 + .. cpp:enumerator:: Sinus = 17 + .. cpp:enumerator:: Cosinus = 18 + .. cpp:enumerator:: Tan = 19 + .. cpp:enumerator:: ArcSin = 20 + .. cpp:enumerator:: ArcCos = 21 + .. cpp:enumerator:: ArcTan = 22 + .. cpp:enumerator:: ArcTan2 = 23 + .. cpp:enumerator:: Min = 24 + .. cpp:enumerator:: Max = 25 + .. cpp:enumerator:: Abs = 26 + .. cpp:enumerator:: Fmod = 27 + .. cpp:enumerator:: Pow = 28 + .. cpp:enumerator:: Sqrt = 29 + .. cpp:enumerator:: Exp = 30 + .. cpp:enumerator:: Log = 31 + .. cpp:enumerator:: Log2 = 32 + .. cpp:enumerator:: Log10 = 33 + .. cpp:enumerator:: Select = 34 + .. cpp:enumerator:: Clamp = 35 + .. cpp:enumerator:: Sinh = 36 + .. cpp:enumerator:: Cosh = 37 + .. cpp:enumerator:: Tanh = 38 + .. cpp:enumerator:: Round = 39 + .. cpp:enumerator:: Ceil = 40 + .. cpp:enumerator:: Floor = 41 + .. cpp:enumerator:: Sign = 42 + .. cpp:enumerator:: Fract = 43 + .. cpp:enumerator:: FunctionCall = 44 + .. cpp:enumerator:: Mesh = 45 + .. cpp:enumerator:: Length = 46 + .. cpp:enumerator:: ConstResourceID = 47 + .. cpp:enumerator:: VectorFromScalar = 48 + .. cpp:enumerator:: UnsignedMesh = 49 + .. cpp:enumerator:: Mod = 50 + .. cpp:enumerator:: BeamLattice = 51 + .. cpp:enumerator:: FunctionGradient = 52 + .. cpp:enumerator:: NormalizeDistance = 53 + + .. cpp:enum-class:: eImplicitPortType : Lib3MF_int32 + + .. cpp:enumerator:: Scalar = 0 + .. cpp:enumerator:: Vector = 1 + .. cpp:enumerator:: Matrix = 2 + .. cpp:enumerator:: ResourceID = 3 + + .. cpp:enum-class:: eImplicitNodeConfiguration : Lib3MF_int32 + + .. cpp:enumerator:: Default = 0 + .. cpp:enumerator:: ScalarToScalar = 1 + .. cpp:enumerator:: VectorToVector = 2 + .. cpp:enumerator:: MatrixToMatrix = 3 + .. cpp:enum-class:: eEncryptionAlgorithm : Lib3MF_int32 .. cpp:enumerator:: AES256_GCM = 1 @@ -251,6 +343,17 @@ Structs .. cpp:member:: Lib3MF_uint32 m_Index .. cpp:member:: Lib3MF_double m_Radius + + + .. cpp:struct:: sVector + + .. cpp:member:: Lib3MF_double m_Coordinates[3] + + + .. cpp:struct:: sMatrix4x4 + + .. cpp:member:: Lib3MF_double m_Field[4][4] + Function types diff --git a/Documentation/source/Cpp/lib3mf.rst b/Documentation/source/Cpp/lib3mf.rst index 27dc4c4fe..4045874a2 100644 --- a/Documentation/source/Cpp/lib3mf.rst +++ b/Documentation/source/Cpp/lib3mf.rst @@ -53,14 +53,14 @@ The wrapper class CWrapper :returns: returns an empty model instance - .. cpp:function:: void Release(CBase * pInstance) + .. cpp:function:: void Release(classParam pInstance) releases shared ownership of an object instance :param pInstance: the object instance to release - .. cpp:function:: void Acquire(CBase * pInstance) + .. cpp:function:: void Acquire(classParam pInstance) acquires shared ownership of an object instance @@ -74,7 +74,7 @@ The wrapper class CWrapper :param sJournalPath: File name of the journal file - .. cpp:function:: bool GetLastError(CBase * pInstance, std::string & sLastErrorString) + .. cpp:function:: bool GetLastError(classParam pInstance, std::string & sLastErrorString) Retrieves the last error string of an instance @@ -83,6 +83,13 @@ The wrapper class CWrapper :returns: Returns if the instance has a last error. + .. cpp:function:: Lib3MF_pvoid GetSymbolLookupMethod() + + Returns the address of the SymbolLookupMethod + + :returns: Address of the SymbolAddressMethod + + .. cpp:function:: void RetrieveProgressMessage(const eProgressIdentifier eTheProgressIdentifier, std::string & sProgressMessage) Return an English text for a progress identifier.|Note: this is the only function you can call from your callback function. diff --git a/Documentation/source/Cpp/lib3mf_AbsNode.rst b/Documentation/source/Cpp/lib3mf_AbsNode.rst new file mode 100644 index 000000000..24eacafcc --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_AbsNode.rst @@ -0,0 +1,16 @@ + +CAbsNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CAbsNode : public COneInputNode + + Calculates the absolute value + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PAbsNode + + Shared pointer to CAbsNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_AdditionNode.rst b/Documentation/source/Cpp/lib3mf_AdditionNode.rst new file mode 100644 index 000000000..7c7ba3739 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_AdditionNode.rst @@ -0,0 +1,16 @@ + +CAdditionNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CAdditionNode : public CTwoInputNode + + Adds two values (scalar or vector) + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PAdditionNode + + Shared pointer to CAdditionNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_ArcCosNode.rst b/Documentation/source/Cpp/lib3mf_ArcCosNode.rst new file mode 100644 index 000000000..58db95be5 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_ArcCosNode.rst @@ -0,0 +1,16 @@ + +CArcCosNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CArcCosNode : public COneInputNode + + Calculates the arccosinus + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PArcCosNode + + Shared pointer to CArcCosNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_ArcSinNode.rst b/Documentation/source/Cpp/lib3mf_ArcSinNode.rst new file mode 100644 index 000000000..5d05650a2 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_ArcSinNode.rst @@ -0,0 +1,16 @@ + +CArcSinNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CArcSinNode : public COneInputNode + + Calculates the arcsinus + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PArcSinNode + + Shared pointer to CArcSinNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_ArcTan2Node.rst b/Documentation/source/Cpp/lib3mf_ArcTan2Node.rst new file mode 100644 index 000000000..ec8af65ec --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_ArcTan2Node.rst @@ -0,0 +1,16 @@ + +CArcTan2Node +==================================================================================================== + + +.. cpp:class:: Lib3MF::CArcTan2Node : public CTwoInputNode + + Calculates the arctangent with two arguments + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PArcTan2Node + + Shared pointer to CArcTan2Node to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_ArcTanNode.rst b/Documentation/source/Cpp/lib3mf_ArcTanNode.rst new file mode 100644 index 000000000..2fe19210a --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_ArcTanNode.rst @@ -0,0 +1,16 @@ + +CArcTanNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CArcTanNode : public COneInputNode + + Calculates the arctangent + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PArcTanNode + + Shared pointer to CArcTanNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_Attachment.rst b/Documentation/source/Cpp/lib3mf_Attachment.rst index b09cf9308..2dffde576 100644 --- a/Documentation/source/Cpp/lib3mf_Attachment.rst +++ b/Documentation/source/Cpp/lib3mf_Attachment.rst @@ -54,11 +54,21 @@ CAttachment .. cpp:function:: void ReadFromFile(const std::string & sFileName) - Reads an attachment from a file. + Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer methods. :param sFileName: file to read from. + .. cpp:function:: void ReadFromCallback(const ReadCallback pTheReadCallback, const Lib3MF_uint64 nStreamSize, const SeekCallback pTheSeekCallback, const Lib3MF_pvoid pUserData) + + Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer methods. + + :param pTheReadCallback: Callback to call for reading a data chunk + :param nStreamSize: number of bytes the callback returns + :param pTheSeekCallback: Callback to call for seeking in the stream. + :param pUserData: Userdata that is passed to the callback function + + .. cpp:function:: Lib3MF_uint64 GetStreamSize() Retrieves the size of the attachment stream @@ -75,7 +85,7 @@ CAttachment .. cpp:function:: void ReadFromBuffer(const CInputVector & BufferBuffer) - Reads an attachment from a memory buffer + Reads an attachment from a memory buffer. This buffer is immediately read (in contrast to the ReadFromCallback and ReadFromFile-methods). :param BufferBuffer: Buffer to read from diff --git a/Documentation/source/Cpp/lib3mf_Base.rst b/Documentation/source/Cpp/lib3mf_Base.rst index 306afb1bb..a77975764 100644 --- a/Documentation/source/Cpp/lib3mf_Base.rst +++ b/Documentation/source/Cpp/lib3mf_Base.rst @@ -10,6 +10,13 @@ CBase + .. cpp:function:: Lib3MF_uint64 ClassTypeId() + + Get Class Type Id + + :returns: Class type as a 64 bits integer + + .. cpp:type:: std::shared_ptr Lib3MF::PBase Shared pointer to CBase to easily allow reference counting. diff --git a/Documentation/source/Cpp/lib3mf_BeamLattice.rst b/Documentation/source/Cpp/lib3mf_BeamLattice.rst index 0dd03ac5e..96b4b85ab 100644 --- a/Documentation/source/Cpp/lib3mf_BeamLattice.rst +++ b/Documentation/source/Cpp/lib3mf_BeamLattice.rst @@ -53,11 +53,11 @@ CBeamLattice Sets the representation-mesh for the beamlattice of this mesh. :param nUniqueResourceID: the UniqueResourceID of the representation mesh-object. This mesh-object has to be defined before setting the representation. - - - .. cpp:function:: void GetBallOptions(eBeamLatticeBallMode & eBallMode, Lib3MF_double & dBallRadius) - Returns the ball mode and the default ball radius for the beamlattice of this mesh.Returns the ball mode and the default ball radius for the beamlattice of this mesh. + + .. cpp:function:: void GetBallOptions(eBeamLatticeBallMode & eBallMode, Lib3MF_double & dBallRadius) + + Returns the ball mode and the default ball radius for the beamlattice of this mesh. :param eBallMode: contains the ball mode of this mesh :param dBallRadius: default ball radius of balls for the beamlattice @@ -70,6 +70,7 @@ CBeamLattice :param eBallMode: contains the ball mode of this mesh :param dBallRadius: default ball radius of balls for the beamlattice + .. cpp:function:: Lib3MF_uint32 GetBeamCount() Returns the beam count of a mesh object. @@ -115,7 +116,7 @@ CBeamLattice :param BeamInfoBuffer: contains information of all beams - .. cpp:function:: Lib3MF_uint32 GetBallCount() + .. cpp:function:: Lib3MF_uint32 GetBallCount() Returns the ball count of a mesh object. @@ -150,7 +151,7 @@ CBeamLattice Sets all ball indices and radii of a mesh object. - :param BallInfoBuffer: contains information of a number of balls + :param BallInfoBuffer: contains information of a number of balls .. cpp:function:: void GetBalls(std::vector & BallInfoBuffer) diff --git a/Documentation/source/Cpp/lib3mf_BeamLatticeNode.rst b/Documentation/source/Cpp/lib3mf_BeamLatticeNode.rst new file mode 100644 index 000000000..2c6877a0d --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_BeamLatticeNode.rst @@ -0,0 +1,51 @@ + +CBeamLatticeNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CBeamLatticeNode : public CImplicitNode + + Signed distance to beam lattice + + + + + .. cpp:function:: PImplicitPort GetInputBeamLattice() + + Retrieves the input for the model resource id of the beam lattice + + :returns: the input port for the model resource id of the beam lattice (mesh with beamlattice extension) + + + .. cpp:function:: PImplicitPort GetInputPos() + + Retrieves the input for the position + + :returns: the input port for the position + + + .. cpp:function:: PImplicitPort GetOutputDistance() + + Retrieves the output + + :returns: the output port for the signed distance to the beam lattice + + + .. cpp:function:: void SetAccurateRange(const Lib3MF_double dAccurateRange) + + Sets the accurate range for distance computation + + :param dAccurateRange: the accurate range in model units + + + .. cpp:function:: Lib3MF_double GetAccurateRange() + + Retrieves the accurate range for distance computation + + :returns: the accurate range in model units + + +.. cpp:type:: std::shared_ptr Lib3MF::PBeamLatticeNode + + Shared pointer to CBeamLatticeNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_CeilNode.rst b/Documentation/source/Cpp/lib3mf_CeilNode.rst new file mode 100644 index 000000000..f3dcb245b --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_CeilNode.rst @@ -0,0 +1,16 @@ + +CCeilNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CCeilNode : public COneInputNode + + Rounds a scalar value up to the nearest integer + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PCeilNode + + Shared pointer to CCeilNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_ClampNode.rst b/Documentation/source/Cpp/lib3mf_ClampNode.rst new file mode 100644 index 000000000..b00fc8795 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_ClampNode.rst @@ -0,0 +1,30 @@ + +CClampNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CClampNode : public COneInputNode + + Clamps the input value to min and max + + + + + .. cpp:function:: PImplicitPort GetInputMin() + + Retrieves the input for the lower limit + + :returns: the input for the lower limit + + + .. cpp:function:: PImplicitPort GetInputMax() + + Retrieves the input for the upper limit + + :returns: the input for the upper limit + + +.. cpp:type:: std::shared_ptr Lib3MF::PClampNode + + Shared pointer to CClampNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_ComponentsObject.rst b/Documentation/source/Cpp/lib3mf_ComponentsObject.rst index fe39e78e7..16cfb57eb 100644 --- a/Documentation/source/Cpp/lib3mf_ComponentsObject.rst +++ b/Documentation/source/Cpp/lib3mf_ComponentsObject.rst @@ -10,7 +10,7 @@ CComponentsObject - .. cpp:function:: PComponent AddComponent(CObject * pObjectResource, const sTransform & Transform) + .. cpp:function:: PComponent AddComponent(classParam pObjectResource, const sTransform & Transform) Adds a new component to a components object. diff --git a/Documentation/source/Cpp/lib3mf_ComposeMatrixNode.rst b/Documentation/source/Cpp/lib3mf_ComposeMatrixNode.rst new file mode 100644 index 000000000..614632ba5 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_ComposeMatrixNode.rst @@ -0,0 +1,135 @@ + +CComposeMatrixNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CComposeMatrixNode : public CImplicitNode + + Composes a 4x4 matrix from 16 scalar values + + + + + .. cpp:function:: PImplicitPort GetInputM00() + + Retrieves the input for the element 0 0 + + :returns: the input for the m00 element + + + .. cpp:function:: PImplicitPort GetInputM01() + + Retrieves the input for the element 0 1 + + :returns: the input for the m01 element + + + .. cpp:function:: PImplicitPort GetInputM02() + + Retrieves the input for the element 0 2 + + :returns: the input for the m02 element + + + .. cpp:function:: PImplicitPort GetInputM03() + + Retrieves the input for the element 0 3 + + :returns: the input for the m03 element + + + .. cpp:function:: PImplicitPort GetInputM10() + + Retrieves the input for the element 1 0 + + :returns: the input for the m10 element + + + .. cpp:function:: PImplicitPort GetInputM11() + + Retrieves the input for the element 1 1 + + :returns: the input for the m11 element + + + .. cpp:function:: PImplicitPort GetInputM12() + + Retrieves the input for the element 1 2 + + :returns: the input for the m12 element + + + .. cpp:function:: PImplicitPort GetInputM13() + + Retrieves the input for the element 1 3 + + :returns: the input for the m13 element + + + .. cpp:function:: PImplicitPort GetInputM20() + + Retrieves the input for the element 2 0 + + :returns: the input for the m20 element + + + .. cpp:function:: PImplicitPort GetInputM21() + + Retrieves the input for the element 2 1 + + :returns: + + + .. cpp:function:: PImplicitPort GetInputM22() + + Retrieves the input for the element 2 2 + + :returns: the input for the m22 element + + + .. cpp:function:: PImplicitPort GetInputM23() + + Retrieves the input for the element 2 3 + + :returns: the input for the m23 element + + + .. cpp:function:: PImplicitPort GetInputM30() + + Retrieves the input for the element 3 0 + + :returns: the input for the m30 element + + + .. cpp:function:: PImplicitPort GetInputM31() + + Retrieves the input for the element 3 1 + + :returns: the input for the m31 element + + + .. cpp:function:: PImplicitPort GetInputM32() + + Retrieves the input for the element 3 2 + + :returns: the input for the m32 element + + + .. cpp:function:: PImplicitPort GetInputM33() + + Retrieves the input for the element 3 3 + + :returns: the input for the m33 element + + + .. cpp:function:: PImplicitPort GetOutputResult() + + Retrieves the output + + :returns: the output + + +.. cpp:type:: std::shared_ptr Lib3MF::PComposeMatrixNode + + Shared pointer to CComposeMatrixNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_ComposeVectorNode.rst b/Documentation/source/Cpp/lib3mf_ComposeVectorNode.rst new file mode 100644 index 000000000..dbb624fbf --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_ComposeVectorNode.rst @@ -0,0 +1,44 @@ + +CComposeVectorNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CComposeVectorNode : public CImplicitNode + + Creates a vector from three scalar values + + + + + .. cpp:function:: PImplicitPort GetInputX() + + Retrieves the input for the x component + + :returns: the input for the x component + + + .. cpp:function:: PImplicitPort GetInputY() + + Retrieves the input for the y component + + :returns: the input for the y component + + + .. cpp:function:: PImplicitPort GetInputZ() + + Retrieves the input for the z component + + :returns: the input for the z component + + + .. cpp:function:: PImplicitPort GetOutputResult() + + Retrieves the output + + :returns: the output + + +.. cpp:type:: std::shared_ptr Lib3MF::PComposeVectorNode + + Shared pointer to CComposeVectorNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_ConstMatNode.rst b/Documentation/source/Cpp/lib3mf_ConstMatNode.rst new file mode 100644 index 000000000..24fc03cc0 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_ConstMatNode.rst @@ -0,0 +1,37 @@ + +CConstMatNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CConstMatNode : public CImplicitNode + + Constant matrix + + + + + .. cpp:function:: void SetMatrix(const sMatrix4x4 & Value) + + Sets the matrix value of the node + + :param Value: the value + + + .. cpp:function:: sMatrix4x4 GetMatrix() + + Retrieves the matrix value of the node + + :returns: the matrix + + + .. cpp:function:: PImplicitPort GetOutputMatrix() + + Retrieves the output + + :returns: the output + + +.. cpp:type:: std::shared_ptr Lib3MF::PConstMatNode + + Shared pointer to CConstMatNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_ConstVecNode.rst b/Documentation/source/Cpp/lib3mf_ConstVecNode.rst new file mode 100644 index 000000000..0347b680e --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_ConstVecNode.rst @@ -0,0 +1,37 @@ + +CConstVecNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CConstVecNode : public CImplicitNode + + Constant vector + + + + + .. cpp:function:: void SetVector(const sVector & Value) + + Sets the vector value of the node + + :param Value: the value + + + .. cpp:function:: sVector GetVector() + + Retrieves the vector value of the node + + :returns: the value + + + .. cpp:function:: PImplicitPort GetOutputVector() + + Retrieves the output + + :returns: the output + + +.. cpp:type:: std::shared_ptr Lib3MF::PConstVecNode + + Shared pointer to CConstVecNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_ConstantNode.rst b/Documentation/source/Cpp/lib3mf_ConstantNode.rst new file mode 100644 index 000000000..91150f49f --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_ConstantNode.rst @@ -0,0 +1,37 @@ + +CConstantNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CConstantNode : public CImplicitNode + + Constant value + + + + + .. cpp:function:: void SetConstant(const Lib3MF_double dValue) + + Sets the constant value of the node + + :param dValue: the value + + + .. cpp:function:: Lib3MF_double GetConstant() + + Retrieves the constant value of the node + + :returns: the value + + + .. cpp:function:: PImplicitPort GetOutputValue() + + Retrieves the output + + :returns: the output + + +.. cpp:type:: std::shared_ptr Lib3MF::PConstantNode + + Shared pointer to CConstantNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_CosNode.rst b/Documentation/source/Cpp/lib3mf_CosNode.rst new file mode 100644 index 000000000..1a5ae4910 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_CosNode.rst @@ -0,0 +1,16 @@ + +CCosNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CCosNode : public COneInputNode + + Calculates the cosinus + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PCosNode + + Shared pointer to CCosNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_CoshNode.rst b/Documentation/source/Cpp/lib3mf_CoshNode.rst new file mode 100644 index 000000000..bacf6b0a0 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_CoshNode.rst @@ -0,0 +1,16 @@ + +CCoshNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CCoshNode : public COneInputNode + + Calculates the hyperbolic cosine + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PCoshNode + + Shared pointer to CCoshNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_CrossNode.rst b/Documentation/source/Cpp/lib3mf_CrossNode.rst new file mode 100644 index 000000000..629998e03 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_CrossNode.rst @@ -0,0 +1,16 @@ + +CCrossNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CCrossNode : public CTwoInputNode + + Calculates the cross product of two vector values + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PCrossNode + + Shared pointer to CCrossNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_DecomposeVectorNode.rst b/Documentation/source/Cpp/lib3mf_DecomposeVectorNode.rst new file mode 100644 index 000000000..9465e1589 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_DecomposeVectorNode.rst @@ -0,0 +1,44 @@ + +CDecomposeVectorNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CDecomposeVectorNode : public CImplicitNode + + Decomposes a vector into three scalar values + + + + + .. cpp:function:: PImplicitPort GetInputA() + + Retrieves the input + + :returns: the input port for the vector to decompose + + + .. cpp:function:: PImplicitPort GetOutputX() + + Retrieves the output for the x component + + :returns: the output for the x component + + + .. cpp:function:: PImplicitPort GetOutputY() + + Retrieves the output for the y component + + :returns: the output for the y component + + + .. cpp:function:: PImplicitPort GetOutputZ() + + Retrieves the output for the z component + + :returns: the output for the z component + + +.. cpp:type:: std::shared_ptr Lib3MF::PDecomposeVectorNode + + Shared pointer to CDecomposeVectorNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_DivisionNode.rst b/Documentation/source/Cpp/lib3mf_DivisionNode.rst new file mode 100644 index 000000000..b63fcfbd2 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_DivisionNode.rst @@ -0,0 +1,16 @@ + +CDivisionNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CDivisionNode : public CTwoInputNode + + Divides two values (scalar or vector) + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PDivisionNode + + Shared pointer to CDivisionNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_DotNode.rst b/Documentation/source/Cpp/lib3mf_DotNode.rst new file mode 100644 index 000000000..84558689b --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_DotNode.rst @@ -0,0 +1,16 @@ + +CDotNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CDotNode : public CTwoInputNode + + Calculates the dot product of two vector values + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PDotNode + + Shared pointer to CDotNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_ExpNode.rst b/Documentation/source/Cpp/lib3mf_ExpNode.rst new file mode 100644 index 000000000..400bb499f --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_ExpNode.rst @@ -0,0 +1,16 @@ + +CExpNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CExpNode : public COneInputNode + + Exponential function + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PExpNode + + Shared pointer to CExpNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_FloorNode.rst b/Documentation/source/Cpp/lib3mf_FloorNode.rst new file mode 100644 index 000000000..c67dd8db6 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_FloorNode.rst @@ -0,0 +1,16 @@ + +CFloorNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CFloorNode : public COneInputNode + + Rounds a scalar value down to the nearest integer + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PFloorNode + + Shared pointer to CFloorNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_FmodNode.rst b/Documentation/source/Cpp/lib3mf_FmodNode.rst new file mode 100644 index 000000000..83e396d7b --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_FmodNode.rst @@ -0,0 +1,16 @@ + +CFmodNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CFmodNode : public CTwoInputNode + + Calculates the modulo of two values (C fmod) + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PFmodNode + + Shared pointer to CFmodNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_FractNode.rst b/Documentation/source/Cpp/lib3mf_FractNode.rst new file mode 100644 index 000000000..c14bbdf41 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_FractNode.rst @@ -0,0 +1,16 @@ + +CFractNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CFractNode : public COneInputNode + + Returns the fractional part + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PFractNode + + Shared pointer to CFractNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_Function.rst b/Documentation/source/Cpp/lib3mf_Function.rst new file mode 100644 index 000000000..22c93ad17 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_Function.rst @@ -0,0 +1,94 @@ + +CFunction +==================================================================================================== + + +.. cpp:class:: Lib3MF::CFunction : public CResource + + + + + + + .. cpp:function:: std::string GetDisplayName() + + Retrieves the display name of the function + + :returns: the display name + + + .. cpp:function:: void SetDisplayName(const std::string & sDisplayName) + + Sets the display name of the function + + :param sDisplayName: the display name + + + .. cpp:function:: PImplicitPort AddInput(const std::string & sIdentifier, const std::string & sDisplayName, const eImplicitPortType eType) + + Add an input + + :param sIdentifier: the identifier of the input + :param sDisplayName: the display name of the input + :param eType: the type of the input + :returns: The added input port + + + .. cpp:function:: PImplicitPortIterator GetInputs() + + Retrieves the inputs + + :returns: iterator for the list of inputs + + + .. cpp:function:: void RemoveInput(classParam pInput) + + Removes an input + + :param pInput: The input to be removed + + + .. cpp:function:: PImplicitPort AddOutput(const std::string & sIdentifier, const std::string & sDisplayName, const eImplicitPortType eType) + + Add an output + + :param sIdentifier: the identifier of the output + :param sDisplayName: the display name of the output + :param eType: the type of the input + :returns: The added input port + + + .. cpp:function:: PImplicitPortIterator GetOutputs() + + Retrieves the outputs + + :returns: iterator for the outputs + + + .. cpp:function:: void RemoveOutput(classParam pOutput) + + Removes an output + + :param pOutput: The output to be removed + + + .. cpp:function:: PImplicitPort FindInput(const std::string & sIdentifier) + + Retrieves an input + + :param sIdentifier: the identifier of the input + :returns: the input port + + + .. cpp:function:: PImplicitPort FindOutput(const std::string & sIdentifier) + + Retrieves an output + + :param sIdentifier: the identifier of the output + :returns: the output port + + +.. cpp:type:: std::shared_ptr Lib3MF::PFunction + + Shared pointer to CFunction to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_FunctionCallNode.rst b/Documentation/source/Cpp/lib3mf_FunctionCallNode.rst new file mode 100644 index 000000000..6239b29ba --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_FunctionCallNode.rst @@ -0,0 +1,23 @@ + +CFunctionCallNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CFunctionCallNode : public CImplicitNode + + Function call + + + + + .. cpp:function:: PImplicitPort GetInputFunctionID() + + Retrieves the input for the function id + + :returns: the input port for the function + + +.. cpp:type:: std::shared_ptr Lib3MF::PFunctionCallNode + + Shared pointer to CFunctionCallNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_FunctionFromImage3D.rst b/Documentation/source/Cpp/lib3mf_FunctionFromImage3D.rst new file mode 100644 index 000000000..722e9257f --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_FunctionFromImage3D.rst @@ -0,0 +1,90 @@ + +CFunctionFromImage3D +==================================================================================================== + + +.. cpp:class:: Lib3MF::CFunctionFromImage3D : public CFunction + + + + + + + .. cpp:function:: PImage3D GetImage3D() + + Returns the selected 3D image. + + :returns: image instance + + + .. cpp:function:: void SetImage3D(classParam pImage3D) + + Sets the 3D image of the selector. + + :param pImage3D: image instance + + + .. cpp:function:: void SetFilter(const eTextureFilter eFilter) + + Sets the texture filter of the selector. + + :param eFilter: texture filter + + + .. cpp:function:: eTextureFilter GetFilter() + + Returns the texture filter of the selector. + + :returns: texture filter + + + .. cpp:function:: void SetTileStyles(const eTextureTileStyle eTileStyleU, const eTextureTileStyle eTileStyleV, const eTextureTileStyle eTileStyleW) + + Sets the tile styles of the selector. + + :param eTileStyleU: tile style in U + :param eTileStyleV: tile style in V + :param eTileStyleW: tile style in W + + + .. cpp:function:: void GetTileStyles(eTextureTileStyle & eTileStyleU, eTextureTileStyle & eTileStyleV, eTextureTileStyle & eTileStyleW) + + Retrieves the tile styles of the selector. + + :param eTileStyleU: tile style in U + :param eTileStyleV: tile style in V + :param eTileStyleW: tile style in W + + + .. cpp:function:: Lib3MF_double GetOffset() + + returns the offset value for the pixel values in the Image3D + + :returns: the offset value for the pixel values in the Image3D + + + .. cpp:function:: void SetOffset(const Lib3MF_double dOffset) + + Sets the offset value for the pixel values in the Image3D + + :param dOffset: the offset value for the pixel values in the Image3D + + + .. cpp:function:: Lib3MF_double GetScale() + + returns the scale value for the pixel values in the Image3D + + :returns: the scale value for the pixel values in the Image3D + + + .. cpp:function:: void SetScale(const Lib3MF_double dScale) + + Sets the scale value for the pixel values in the Image3D + + :param dScale: the scale value for the pixel values in the Image3D + + +.. cpp:type:: std::shared_ptr Lib3MF::PFunctionFromImage3D + + Shared pointer to CFunctionFromImage3D to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_FunctionGradientNode.rst b/Documentation/source/Cpp/lib3mf_FunctionGradientNode.rst new file mode 100644 index 000000000..4da92a279 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_FunctionGradientNode.rst @@ -0,0 +1,86 @@ + +CFunctionGradientNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CFunctionGradientNode : public CImplicitNode + + Gradient of a function + + + + + .. cpp:function:: PImplicitPort GetInputFunctionID() + + Retrieves the input for the function id + + :returns: the input port for the function + + + .. cpp:function:: PImplicitPort GetInputPos() + + Retrieves the input for the position + + :returns: the input port for the position + + + .. cpp:function:: PImplicitPort GetInputStep() + + Retrieves the input for the finite difference step + + :returns: the input port for the finite difference step + + + .. cpp:function:: void SetScalarOutputName(const std::string & sScalarOutputName) + + Sets the name of the referenced scalar output + + :param sScalarOutputName: the name of the scalar output of the referenced function + + + .. cpp:function:: std::string GetScalarOutputName() + + Retrieves the name of the referenced scalar output + + :returns: the name of the scalar output of the referenced function + + + .. cpp:function:: void SetVectorInputName(const std::string & sVectorInputName) + + Sets the name of the referenced vector input + + :param sVectorInputName: the name of the vector input (float3) of the referenced function + + + .. cpp:function:: std::string GetVectorInputName() + + Retrieves the name of the referenced vector input + + :returns: the name of the vector input (float3) of the referenced function + + + .. cpp:function:: PImplicitPort GetOutputNormalizedGradient() + + Retrieves the normalized gradient output + + :returns: the output port for the normalized gradient + + + .. cpp:function:: PImplicitPort GetOutputGradient() + + Retrieves the raw gradient output + + :returns: the output port for the raw gradient + + + .. cpp:function:: PImplicitPort GetOutputMagnitude() + + Retrieves the gradient magnitude output + + :returns: the output port for the gradient magnitude + + +.. cpp:type:: std::shared_ptr Lib3MF::PFunctionGradientNode + + Shared pointer to CFunctionGradientNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_FunctionIterator.rst b/Documentation/source/Cpp/lib3mf_FunctionIterator.rst new file mode 100644 index 000000000..18e492e08 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_FunctionIterator.rst @@ -0,0 +1,23 @@ + +CFunctionIterator +==================================================================================================== + + +.. cpp:class:: Lib3MF::CFunctionIterator : public CResourceIterator + + + + + + + .. cpp:function:: PFunction GetCurrentFunction() + + Returns the Function the iterator points at. + + :returns: returns the Function instance. + + +.. cpp:type:: std::shared_ptr Lib3MF::PFunctionIterator + + Shared pointer to CFunctionIterator to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_FunctionReference.rst b/Documentation/source/Cpp/lib3mf_FunctionReference.rst new file mode 100644 index 000000000..c102ab3a1 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_FunctionReference.rst @@ -0,0 +1,86 @@ + +CFunctionReference +==================================================================================================== + + +.. cpp:class:: Lib3MF::CFunctionReference : public CBase + + + + + + + .. cpp:function:: Lib3MF_uint32 GetFunctionResourceID() + + Returns the UniqueResourceID of the Function. Only functions with a 'pos'-input are allowed. + + :returns: returns the UniqueResourceID. + + + .. cpp:function:: void SetFunctionResourceID(const Lib3MF_uint32 nUniqueResourceID) + + Sets the UniqueResourceID to refer to. + + :param nUniqueResourceID: UniqueResourceID of the function + + + .. cpp:function:: sTransform GetTransform() + + Returns the transformation matrix into the coordinate system of the referenced Function. + + :returns: the transformation matrix + + + .. cpp:function:: void SetTransform(const sTransform & Transform) + + Sets the transformation matrix into the coordinate system of the referenced Function. + + :param Transform: new transformation matrix + + + .. cpp:function:: std::string GetChannelName() + + Returns the name of the function output channel to use. + + :returns: the name of the function output channel + + + .. cpp:function:: void SetChannelName(const std::string & sChannelName) + + Sets the name of the function output channel to use. + + :param sChannelName: new name of the function output channel + + + .. cpp:function:: void SetMinFeatureSize(const Lib3MF_double dMinFeatureSize) + + Sets the minimal feature size as a hint for the function evaluator + + :param dMinFeatureSize: minimal feature size + + + .. cpp:function:: Lib3MF_double GetMinFeatureSize() + + Returns the minimal feature size as a hint for the function evaluator + + :returns: minimal feature size + + + .. cpp:function:: void SetFallBackValue(const Lib3MF_double dFallBackValue) + + Sets the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). + + :param dFallBackValue: fallback value + + + .. cpp:function:: Lib3MF_double GetFallBackValue() + + Returns the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). + + :returns: fallback value + + +.. cpp:type:: std::shared_ptr Lib3MF::PFunctionReference + + Shared pointer to CFunctionReference to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_Image3D.rst b/Documentation/source/Cpp/lib3mf_Image3D.rst new file mode 100644 index 000000000..7ac1b79e8 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_Image3D.rst @@ -0,0 +1,37 @@ + +CImage3D +==================================================================================================== + + +.. cpp:class:: Lib3MF::CImage3D : public CResource + + + + + + + .. cpp:function:: std::string GetName() + + returns the name of this Image3D + + :returns: the name of this Image3D + + + .. cpp:function:: void SetName(const std::string & sName) + + sets a new name of this Image3D + + :param sName: the new name of this Image3D + + + .. cpp:function:: bool IsImageStack() + + Retrieves, if this Image3D is a ImageStack + + :returns: returns, whether the Image3D is an ImageStack + + +.. cpp:type:: std::shared_ptr Lib3MF::PImage3D + + Shared pointer to CImage3D to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_Image3DIterator.rst b/Documentation/source/Cpp/lib3mf_Image3DIterator.rst new file mode 100644 index 000000000..7247c7891 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_Image3DIterator.rst @@ -0,0 +1,23 @@ + +CImage3DIterator +==================================================================================================== + + +.. cpp:class:: Lib3MF::CImage3DIterator : public CResourceIterator + + + + + + + .. cpp:function:: PImage3D GetCurrentImage3D() + + Returns the Image3D the iterator points at. + + :returns: returns the Image3D instance. + + +.. cpp:type:: std::shared_ptr Lib3MF::PImage3DIterator + + Shared pointer to CImage3DIterator to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_ImageStack.rst b/Documentation/source/Cpp/lib3mf_ImageStack.rst new file mode 100644 index 000000000..8c963f636 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_ImageStack.rst @@ -0,0 +1,96 @@ + +CImageStack +==================================================================================================== + + +.. cpp:class:: Lib3MF::CImageStack : public CImage3D + + + + + + + .. cpp:function:: Lib3MF_uint32 GetRowCount() + + Retrieves the number of rows in each image of this image3d + + :returns: number of rows + + + .. cpp:function:: void SetRowCount(const Lib3MF_uint32 nRowCount) + + Sets the number of rows in each image of this image3d + + :param nRowCount: number of rows + + + .. cpp:function:: Lib3MF_uint32 GetColumnCount() + + Retrieves the number of columns in each image of this image3d + + :returns: number of columns + + + .. cpp:function:: void SetColumnCount(const Lib3MF_uint32 nColumnCount) + + Sets the number of columns in each image of this image3d + + :param nColumnCount: number of columns + + + .. cpp:function:: Lib3MF_uint32 GetSheetCount() + + Retrieves the number of images in the stack. + + :returns: number of images + + + .. cpp:function:: PAttachment GetSheet(const Lib3MF_uint32 nIndex) + + Retrieves a sheet of the stack. Raises an error if sheet is not set. + + :param nIndex: index of the image (0-based) + :returns: attachment containing the image + + + .. cpp:function:: void SetSheet(const Lib3MF_uint32 nIndex, classParam pSheet) + + Sets a sheet to an existing attachment. + + :param nIndex: index of the image (0-based) + :param pSheet: attachment containing the image + + + .. cpp:function:: PAttachment CreateEmptySheet(const Lib3MF_uint32 nIndex, const std::string & sPath) + + Creates a new sheet attachment with empty data. + + :param nIndex: index of the image (0-based) + :param sPath: path of part in the package + :returns: attachment containing the image + + + .. cpp:function:: PAttachment CreateSheetFromBuffer(const Lib3MF_uint32 nIndex, const std::string & sPath, const CInputVector & DataBuffer) + + Creates a new sheet attachment from a memory buffer. + + :param nIndex: index of the image (0-based) + :param sPath: path of part in the package + :param DataBuffer: binary image data + :returns: attachment containing the image + + + .. cpp:function:: PAttachment CreateSheetFromFile(const Lib3MF_uint32 nIndex, const std::string & sPath, const std::string & sFileName) + + Creates a new sheet attachment from a file on disk. + + :param nIndex: index of the image (0-based) + :param sPath: path of part in the package + :param sFileName: file name to read from + :returns: attachment containing the image + + +.. cpp:type:: std::shared_ptr Lib3MF::PImageStack + + Shared pointer to CImageStack to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_ImplicitFunction.rst b/Documentation/source/Cpp/lib3mf_ImplicitFunction.rst new file mode 100644 index 000000000..410ec0790 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_ImplicitFunction.rst @@ -0,0 +1,635 @@ + +CImplicitFunction +==================================================================================================== + + +.. cpp:class:: Lib3MF::CImplicitFunction : public CFunction + + + + + + + .. cpp:function:: std::string GetIdentifier() + + Retrieves the identifier of the function + + :returns: the identifier + + + .. cpp:function:: void SetIdentifier(const std::string & sIdentifier) + + Sets the identifier of the function + + :param sIdentifier: the identifier + + + .. cpp:function:: PImplicitNode AddNode(const eImplicitNodeType eNodeType, const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + + Add a node + + :param eNodeType: the type of the node + :param sIdentifier: the identifier of the node + :param eConfiguration: the configuration of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PSinNode AddSinNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + + Add a SinNode + + :param sIdentifier: the identifier of the node + :param eConfiguration: the configuration of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PCosNode AddCosNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + + Add a CosNode + + :param sIdentifier: the identifier of the node + :param eConfiguration: the configuration of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PTanNode AddTanNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + + Add a TanNode + + :param sIdentifier: the identifier of the node + :param eConfiguration: the configuration of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PArcSinNode AddArcSinNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + + Add a ArcSinNode + + :param sIdentifier: the identifier of the node + :param eConfiguration: the configuration of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PArcCosNode AddArcCosNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + + Add a ArcCosNode + + :param sIdentifier: the identifier of the node + :param eConfiguration: the configuration of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PArcTan2Node AddArcTan2Node(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + + Add a ArcTan2Node + + :param sIdentifier: the identifier of the node + :param eConfiguration: the configuration of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PSinhNode AddSinhNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + + Add a SinhNode + + :param sIdentifier: the identifier of the node + :param eConfiguration: the configuration of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PCoshNode AddCoshNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + + Add a CoshNode + + :param sIdentifier: the identifier of the node + :param eConfiguration: the configuration of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PTanhNode AddTanhNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + + Add a TanhNode + + :param sIdentifier: the identifier of the node + :param eConfiguration: the configuration of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PRoundNode AddRoundNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + + Add a RoundNode + + :param sIdentifier: the identifier of the node + :param eConfiguration: the configuration of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PCeilNode AddCeilNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + + Add a CeilNode + + :param sIdentifier: the identifier of the node + :param eConfiguration: the configuration of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PFloorNode AddFloorNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + + Add a FloorNode + + :param sIdentifier: the identifier of the node + :param eConfiguration: the configuration of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PSignNode AddSignNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + + Add a SignNode + + :param sIdentifier: the identifier of the node + :param eConfiguration: the configuration of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PFractNode AddFractNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + + Add a FractNode + + :param sIdentifier: the identifier of the node + :param eConfiguration: the configuration of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PAbsNode AddAbsNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + + Add a AbsNode + + :param sIdentifier: the identifier of the node + :param eConfiguration: the configuration of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PExpNode AddExpNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + + Add a ExpNode + + :param sIdentifier: the identifier of the node + :param eConfiguration: the configuration of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PLogNode AddLogNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + + Add a LogNode + + :param sIdentifier: the identifier of the node + :param eConfiguration: the configuration of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PLog2Node AddLog2Node(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + + Add a Log2Node + + :param sIdentifier: the identifier of the node + :param eConfiguration: the configuration of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PLog10Node AddLog10Node(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + + Add a Log10Node + + :param sIdentifier: the identifier of the node + :param eConfiguration: the configuration of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PLengthNode AddLengthNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) + + Add a LengthNode + + :param sIdentifier: the identifier of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PTransposeNode AddTransposeNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + + Add a TransposeNode + + :param sIdentifier: the identifier of the node + :param eConfiguration: the configuration of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PInverseNode AddInverseNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) + + Add a InverseNode + + :param sIdentifier: the identifier of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PSqrtNode AddSqrtNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + + Add a SqrtNode + + :param sIdentifier: the identifier of the node + :param eConfiguration: the configuration of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PResourceIdNode AddResourceIdNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) + + Add a ResourceIdNode + + :param sIdentifier: the identifier of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PAdditionNode AddAdditionNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + + Add an AdditionNode + + :param sIdentifier: the identifier of the node + :param eConfiguration: the configuration of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PSubtractionNode AddSubtractionNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + + Add a SubtractionNode + + :param sIdentifier: the identifier of the node + :param eConfiguration: the configuration of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PMultiplicationNode AddMultiplicationNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + + Add a MultiplicationNode + + :param sIdentifier: the identifier of the node + :param eConfiguration: the configuration of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PDivisionNode AddDivisionNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + + Add a DivisionNode + + :param sIdentifier: the identifier of the node + :param eConfiguration: the configuration of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PDotNode AddDotNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) + + Add a DotNode + + :param sIdentifier: the identifier of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PCrossNode AddCrossNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) + + Add a CrossNode + + :param sIdentifier: the identifier of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PMatVecMultiplicationNode AddMatVecMultiplicationNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) + + Add a MatVecMultiplicationNode + + :param sIdentifier: the identifier of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PMinNode AddMinNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + + Add a MinNode + + :param sIdentifier: the identifier of the node + :param eConfiguration: the configuration of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PMaxNode AddMaxNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + + Add a MaxNode + + :param sIdentifier: the identifier of the node + :param eConfiguration: the configuration of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PFmodNode AddFmodNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + + Add a FmodNode + + :param sIdentifier: the identifier of the node + :param eConfiguration: the configuration of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PPowNode AddPowNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + + Add a PowNode + + :param sIdentifier: the identifier of the node + :param eConfiguration: the configuration of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PSelectNode AddSelectNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + + Add a SelectNode + + :param sIdentifier: the identifier of the node + :param eConfiguration: the configuration of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PClampNode AddClampNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + + Add a ClampNode + + :param sIdentifier: the identifier of the node + :param eConfiguration: the configuration of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PComposeVectorNode AddComposeVectorNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) + + Add a ComposeVectorNode + + :param sIdentifier: the identifier of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PVectorFromScalarNode AddVectorFromScalarNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) + + Add a VectorFromScalar + + :param sIdentifier: the identifier of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PDecomposeVectorNode AddDecomposeVectorNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) + + Add a DecomposeVectorNode + + :param sIdentifier: the identifier of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PComposeMatrixNode AddComposeMatrixNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) + + Add a ComposeMatrixNode + + :param sIdentifier: the identifier of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PMatrixFromRowsNode AddMatrixFromRowsNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) + + Add a MatrixFromRowsNode + + :param sIdentifier: the identifier of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PMatrixFromColumnsNode AddMatrixFromColumnsNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) + + Add a MatrixFromColumnsNode + + :param sIdentifier: the identifier of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PConstantNode AddConstantNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) + + Add a ConstantNode + + :param sIdentifier: the identifier of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PConstVecNode AddConstVecNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) + + Add a ConstVecNode + + :param sIdentifier: the identifier of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PConstMatNode AddConstMatNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) + + Add a ConstMatNode + + :param sIdentifier: the identifier of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PMeshNode AddMeshNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) + + Add a MeshNode + + :param sIdentifier: the identifier of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PUnsignedMeshNode AddUnsignedMeshNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) + + Add a UnsignedMeshNode + + :param sIdentifier: the identifier of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PBeamLatticeNode AddBeamLatticeNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) + + Add a BeamLatticeNode + + :param sIdentifier: the identifier of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PFunctionGradientNode AddFunctionGradientNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) + + Add a FunctionGradientNode + + :param sIdentifier: the identifier of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PNormalizeDistanceNode AddNormalizeDistanceNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) + + Add a NormalizeDistanceNode + + :param sIdentifier: the identifier of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PFunctionCallNode AddFunctionCallNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) + + Add a FunctionCallNode + + :param sIdentifier: the identifier of the node + :param sDisplayName: the display name of the node + :param sTag: the tag of the node + :returns: the added node + + + .. cpp:function:: PNodeIterator GetNodes() + + Retrieves the nodes + + :returns: iterator for the list of nodes + + + .. cpp:function:: void RemoveNode(classParam pNode) + + Removes a node + + :param pNode: The node to be removed + + + .. cpp:function:: void AddLink(classParam pSource, classParam pTarget) + + Add a link + + :param pSource: the source port + :param pTarget: the target port + + + .. cpp:function:: void AddLinkByNames(const std::string & sSource, const std::string & sTarget) + + Add a link + + :param sSource: name of the source port in the format nodename.portname + :param sTarget: name of the target port in the format nodename.portname + + + .. cpp:function:: void Clear() + + Clears the function + + + + .. cpp:function:: void SortNodesTopologically() + + Sorts the nodes topologically + + + +.. cpp:type:: std::shared_ptr Lib3MF::PImplicitFunction + + Shared pointer to CImplicitFunction to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_ImplicitNode.rst b/Documentation/source/Cpp/lib3mf_ImplicitNode.rst new file mode 100644 index 000000000..916d405e6 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_ImplicitNode.rst @@ -0,0 +1,120 @@ + +CImplicitNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CImplicitNode : public CBase + + + + + + + .. cpp:function:: std::string GetIdentifier() + + Retrieves the identifier of the node + + :returns: the identifier + + + .. cpp:function:: void SetIdentifier(const std::string & sIdentifier) + + Sets the identifier of the node + + :param sIdentifier: the identifier + + + .. cpp:function:: std::string GetDisplayName() + + Retrieves the display name of the node + + :returns: the display name + + + .. cpp:function:: void SetDisplayName(const std::string & sDisplayName) + + Sets the display name of the node + + :param sDisplayName: the display name + + + .. cpp:function:: std::string GetTag() + + Retrieves the tag of the node + + :returns: the tag + + + .. cpp:function:: void SetTag(const std::string & sTag) + + Sets the tag of the node + + :param sTag: the tag + + + .. cpp:function:: eImplicitNodeType GetNodeType() + + Retrieves the type of the node + + :returns: the type of the node + + + .. cpp:function:: PImplicitPort AddInput(const std::string & sIdentifier, const std::string & sDisplayName) + + Add an input + + :param sIdentifier: the identifier of the input + :param sDisplayName: the display name of the input + :returns: + + + .. cpp:function:: PImplicitPortIterator GetInputs() + + Retrieves the inputs + + :returns: the iterator for the inputs + + + .. cpp:function:: PImplicitPort AddOutput(const std::string & sIdentifier, const std::string & sDisplayName) + + Add an output + + :param sIdentifier: the identifier of the output + :param sDisplayName: the display name of the output + :returns: + + + .. cpp:function:: PImplicitPortIterator GetOutputs() + + Retrieves the outputs + + :returns: the iterator the outputs + + + .. cpp:function:: PImplicitPort FindInput(const std::string & sIdentifier) + + Retrieves an input + + :param sIdentifier: the identifier of the input + :returns: the input port + + + .. cpp:function:: PImplicitPort FindOutput(const std::string & sIdentifier) + + Retrieves an output + + :param sIdentifier: the identifier of the output + :returns: the output port + + + .. cpp:function:: bool AreTypesValid() + + Checks if the types of the input and output ports are valid for the node type + + :returns: true, if the types are valid + + +.. cpp:type:: std::shared_ptr Lib3MF::PImplicitNode + + Shared pointer to CImplicitNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_ImplicitPort.rst b/Documentation/source/Cpp/lib3mf_ImplicitPort.rst new file mode 100644 index 000000000..624c915fc --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_ImplicitPort.rst @@ -0,0 +1,72 @@ + +CImplicitPort +==================================================================================================== + + +.. cpp:class:: Lib3MF::CImplicitPort : public CBase + + + + + + + .. cpp:function:: std::string GetIdentifier() + + Retrieves the identifier of the port + + :returns: the identifier + + + .. cpp:function:: void SetIdentifier(const std::string & sIdentifier) + + Sets the identifier of the port + + :param sIdentifier: the identifier + + + .. cpp:function:: std::string GetDisplayName() + + Retrieves the display name of the port + + :returns: the display name + + + .. cpp:function:: void SetDisplayName(const std::string & sDisplayName) + + Sets the display name of the port + + :param sDisplayName: the display name + + + .. cpp:function:: void SetType(const eImplicitPortType eImplicitPortType) + + Sets the type of the port + + :param eImplicitPortType: the type + + + .. cpp:function:: eImplicitPortType GetType() + + Retrieves the type of the port + + :returns: the type + + + .. cpp:function:: std::string GetReference() + + Retrieves the reference of the port, only used for input ports + + :returns: the reference + + + .. cpp:function:: void SetReference(const std::string & sReference) + + Sets the reference of the port, only used for input ports + + :param sReference: the reference + + +.. cpp:type:: std::shared_ptr Lib3MF::PImplicitPort + + Shared pointer to CImplicitPort to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_ImplicitPortIterator.rst b/Documentation/source/Cpp/lib3mf_ImplicitPortIterator.rst new file mode 100644 index 000000000..7af7a56c0 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_ImplicitPortIterator.rst @@ -0,0 +1,23 @@ + +CImplicitPortIterator +==================================================================================================== + + +.. cpp:class:: Lib3MF::CImplicitPortIterator : public CIterator + + + + + + + .. cpp:function:: PImplicitPort GetCurrent() + + Returns the current element + + :returns: The current element + + +.. cpp:type:: std::shared_ptr Lib3MF::PImplicitPortIterator + + Shared pointer to CImplicitPortIterator to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_InverseNode.rst b/Documentation/source/Cpp/lib3mf_InverseNode.rst new file mode 100644 index 000000000..4572fad08 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_InverseNode.rst @@ -0,0 +1,16 @@ + +CInverseNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CInverseNode : public COneInputNode + + Computes the inverse of a matrix + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PInverseNode + + Shared pointer to CInverseNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_Iterator.rst b/Documentation/source/Cpp/lib3mf_Iterator.rst new file mode 100644 index 000000000..1133a9daf --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_Iterator.rst @@ -0,0 +1,37 @@ + +CIterator +==================================================================================================== + + +.. cpp:class:: Lib3MF::CIterator : public CBase + + + + + + + .. cpp:function:: bool MoveNext() + + Iterates to the next item in the list. + + :returns: Iterates to the next item in the list. + + + .. cpp:function:: bool MovePrevious() + + Iterates to the previous item in the list. + + :returns: Iterates to the previous item in the list. + + + .. cpp:function:: Lib3MF_uint64 Count() + + Returns the number of items the iterator captures. + + :returns: returns the number of items the iterator captures. + + +.. cpp:type:: std::shared_ptr Lib3MF::PIterator + + Shared pointer to CIterator to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_KeyStore.rst b/Documentation/source/Cpp/lib3mf_KeyStore.rst index a60c35630..42a880bc8 100644 --- a/Documentation/source/Cpp/lib3mf_KeyStore.rst +++ b/Documentation/source/Cpp/lib3mf_KeyStore.rst @@ -35,7 +35,7 @@ CKeyStore :returns: The consumer instance - .. cpp:function:: void RemoveConsumer(CConsumer * pConsumer) + .. cpp:function:: void RemoveConsumer(classParam pConsumer) Removes a consumer from the keystore @@ -72,14 +72,14 @@ CKeyStore :returns: The resource data group instance - .. cpp:function:: void RemoveResourceDataGroup(CResourceDataGroup * pResourceDataGroup) + .. cpp:function:: void RemoveResourceDataGroup(classParam pResourceDataGroup) Removes a resource data group :param pResourceDataGroup: The resource data group instance - .. cpp:function:: PResourceDataGroup FindResourceDataGroup(CPackagePart * pPartPath) + .. cpp:function:: PResourceDataGroup FindResourceDataGroup(classParam pPartPath) Finds a resource data group that contains a particular resourcedata @@ -87,7 +87,7 @@ CKeyStore :returns: The data resource instance - .. cpp:function:: PResourceData AddResourceData(CResourceDataGroup * pResourceDataGroup, CPackagePart * pPartPath, const eEncryptionAlgorithm eAlgorithm, const eCompression eCompression, const CInputVector & AdditionalAuthenticationDataBuffer) + .. cpp:function:: PResourceData AddResourceData(classParam pResourceDataGroup, classParam pPartPath, const eEncryptionAlgorithm eAlgorithm, const eCompression eCompression, const CInputVector & AdditionalAuthenticationDataBuffer) Add resourcedata to resourcedatagroup element @@ -99,14 +99,14 @@ CKeyStore :returns: The data resource instance - .. cpp:function:: void RemoveResourceData(CResourceData * pResourceData) + .. cpp:function:: void RemoveResourceData(classParam pResourceData) Removes a resource data :param pResourceData: The resource data to be removed - .. cpp:function:: PResourceData FindResourceData(CPackagePart * pResourcePath) + .. cpp:function:: PResourceData FindResourceData(classParam pResourcePath) Finds a resource data on this resource group diff --git a/Documentation/source/Cpp/lib3mf_LengthNode.rst b/Documentation/source/Cpp/lib3mf_LengthNode.rst new file mode 100644 index 000000000..fe1b9e065 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_LengthNode.rst @@ -0,0 +1,16 @@ + +CLengthNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CLengthNode : public COneInputNode + + Calculates the length of a vector + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PLengthNode + + Shared pointer to CLengthNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_LevelSet.rst b/Documentation/source/Cpp/lib3mf_LevelSet.rst new file mode 100644 index 000000000..ac3c01632 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_LevelSet.rst @@ -0,0 +1,128 @@ + +CLevelSet +==================================================================================================== + + +.. cpp:class:: Lib3MF::CLevelSet : public CObject + + + + + + + .. cpp:function:: PFunction GetFunction() + + Returns the function that is used as boundary shape. + + :returns: the function to use as boundary shape + + + .. cpp:function:: void SetFunction(classParam pTheFunction) + + Sets the function to use as boundary shape. + + :param pTheFunction: the function to use as boundary shape + + + .. cpp:function:: sTransform GetTransform() + + Returns the transformation matrix into the coordinate system of the referenced Function. + + :returns: the transformation matrix + + + .. cpp:function:: void SetTransform(const sTransform & Transform) + + Sets the transformation matrix into the coordinate system of the referenced Function. + + :param Transform: new transformation matrix + + + .. cpp:function:: std::string GetChannelName() + + Returns the name of the function output channel to use. + + :returns: the name of the function output channel + + + .. cpp:function:: void SetChannelName(const std::string & sChannelName) + + Sets the name of the function output channel to use. + + :param sChannelName: new name of the function output channel + + + .. cpp:function:: void SetMinFeatureSize(const Lib3MF_double dMinFeatureSize) + + Sets the minimal feature size as a hint for the function evaluator + + :param dMinFeatureSize: minimal feature size + + + .. cpp:function:: Lib3MF_double GetMinFeatureSize() + + Returns the minimal feature size as a hint for the function evaluator + + :returns: minimal feature size + + + .. cpp:function:: void SetFallBackValue(const Lib3MF_double dFallBackValue) + + Sets the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). + + :param dFallBackValue: fallback value + + + .. cpp:function:: Lib3MF_double GetFallBackValue() + + Returns the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). + + :returns: fallback value + + + .. cpp:function:: void SetMeshBBoxOnly(const bool bMeshBBoxOnly) + + If set only the bounding box of the mesh is intersected with the boundary + + :param bMeshBBoxOnly: If set only the bounding box of the mesh is intersected with the boundary + + + .. cpp:function:: bool GetMeshBBoxOnly() + + If set only the bounding box of the mesh is intersected with the boundary + + :returns: If set only the bounding box of the mesh is intersected with the boundary + + + .. cpp:function:: void SetMesh(classParam pTheMesh) + + Sets the mesh to use as evaluation domain + + :param pTheMesh: The mesh + + + .. cpp:function:: PMeshObject GetMesh() + + Returns the mesh that is used as evaluation domain + + :returns: The mesh + + + .. cpp:function:: PVolumeData GetVolumeData() + + Retrieves the VolumeData this Object. + + :returns: the VolumeData of this Object + + + .. cpp:function:: void SetVolumeData(classParam pTheVolumeData) + + Sets the VolumeData of this LevelSet. + + :param pTheVolumeData: the VolumeData of this MeshObject + + +.. cpp:type:: std::shared_ptr Lib3MF::PLevelSet + + Shared pointer to CLevelSet to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_LevelSetIterator.rst b/Documentation/source/Cpp/lib3mf_LevelSetIterator.rst new file mode 100644 index 000000000..39b0c6758 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_LevelSetIterator.rst @@ -0,0 +1,23 @@ + +CLevelSetIterator +==================================================================================================== + + +.. cpp:class:: Lib3MF::CLevelSetIterator : public CResourceIterator + + + + + + + .. cpp:function:: PLevelSet GetCurrentLevelSet() + + Returns the LevelSet the iterator points at. + + :returns: returns the MeshObject instance. + + +.. cpp:type:: std::shared_ptr Lib3MF::PLevelSetIterator + + Shared pointer to CLevelSetIterator to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_Log10Node.rst b/Documentation/source/Cpp/lib3mf_Log10Node.rst new file mode 100644 index 000000000..52030158a --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_Log10Node.rst @@ -0,0 +1,16 @@ + +CLog10Node +==================================================================================================== + + +.. cpp:class:: Lib3MF::CLog10Node : public COneInputNode + + Logarithmus to the base 10 + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PLog10Node + + Shared pointer to CLog10Node to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_Log2Node.rst b/Documentation/source/Cpp/lib3mf_Log2Node.rst new file mode 100644 index 000000000..96575cde7 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_Log2Node.rst @@ -0,0 +1,16 @@ + +CLog2Node +==================================================================================================== + + +.. cpp:class:: Lib3MF::CLog2Node : public COneInputNode + + Logarithmus to the base 2 + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PLog2Node + + Shared pointer to CLog2Node to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_LogNode.rst b/Documentation/source/Cpp/lib3mf_LogNode.rst new file mode 100644 index 000000000..33000dd63 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_LogNode.rst @@ -0,0 +1,16 @@ + +CLogNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CLogNode : public COneInputNode + + Natural logarithmus + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PLogNode + + Shared pointer to CLogNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_MatVecMultiplicationNode.rst b/Documentation/source/Cpp/lib3mf_MatVecMultiplicationNode.rst new file mode 100644 index 000000000..c04f5a549 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_MatVecMultiplicationNode.rst @@ -0,0 +1,16 @@ + +CMatVecMultiplicationNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CMatVecMultiplicationNode : public CTwoInputNode + + Multiplies a matrix with a vector + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PMatVecMultiplicationNode + + Shared pointer to CMatVecMultiplicationNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_MaterialMapping.rst b/Documentation/source/Cpp/lib3mf_MaterialMapping.rst new file mode 100644 index 000000000..736325858 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_MaterialMapping.rst @@ -0,0 +1,16 @@ + +CMaterialMapping +==================================================================================================== + + +.. cpp:class:: Lib3MF::CMaterialMapping : public CFunctionReference + + + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PMaterialMapping + + Shared pointer to CMaterialMapping to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_MatrixFromColumnsNode.rst b/Documentation/source/Cpp/lib3mf_MatrixFromColumnsNode.rst new file mode 100644 index 000000000..676952ca8 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_MatrixFromColumnsNode.rst @@ -0,0 +1,51 @@ + +CMatrixFromColumnsNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CMatrixFromColumnsNode : public CImplicitNode + + Composes a 4x4 matrix from four column vectors A,B,C,D + + + + + .. cpp:function:: PImplicitPort GetInputA() + + Retrieves the input for the first column + + :returns: the input for the first column + + + .. cpp:function:: PImplicitPort GetInputB() + + Retrieves the input for the second column + + :returns: the input for the second column + + + .. cpp:function:: PImplicitPort GetInputC() + + Retrieves the input for the third column + + :returns: the input for the third column + + + .. cpp:function:: PImplicitPort GetInputD() + + Retrieves the input for the fourth column + + :returns: the input for the fourth column + + + .. cpp:function:: PImplicitPort GetOutputResult() + + Retrieves the output + + :returns: the output + + +.. cpp:type:: std::shared_ptr Lib3MF::PMatrixFromColumnsNode + + Shared pointer to CMatrixFromColumnsNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_MatrixFromRowsNode.rst b/Documentation/source/Cpp/lib3mf_MatrixFromRowsNode.rst new file mode 100644 index 000000000..40ebb7685 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_MatrixFromRowsNode.rst @@ -0,0 +1,51 @@ + +CMatrixFromRowsNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CMatrixFromRowsNode : public CImplicitNode + + Composes a 4x4 matrix from four row vectors A,B,C,D + + + + + .. cpp:function:: PImplicitPort GetInputA() + + Retrieves the input for the first row + + :returns: the input for the first row + + + .. cpp:function:: PImplicitPort GetInputB() + + Retrieves the input for the second row + + :returns: the input for the second row + + + .. cpp:function:: PImplicitPort GetInputC() + + Retrieves the input for the third row + + :returns: the input for the third row + + + .. cpp:function:: PImplicitPort GetInputD() + + Retrieves the input for the fourth row + + :returns: the input for the fourth row + + + .. cpp:function:: PImplicitPort GetOutputResult() + + Retrieves the output + + :returns: the output + + +.. cpp:type:: std::shared_ptr Lib3MF::PMatrixFromRowsNode + + Shared pointer to CMatrixFromRowsNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_MaxNode.rst b/Documentation/source/Cpp/lib3mf_MaxNode.rst new file mode 100644 index 000000000..c3d142892 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_MaxNode.rst @@ -0,0 +1,16 @@ + +CMaxNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CMaxNode : public CTwoInputNode + + Calculates the maximum of two values + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PMaxNode + + Shared pointer to CMaxNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_MeshNode.rst b/Documentation/source/Cpp/lib3mf_MeshNode.rst new file mode 100644 index 000000000..096d96cb4 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_MeshNode.rst @@ -0,0 +1,37 @@ + +CMeshNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CMeshNode : public CImplicitNode + + Signed distance to mesh + + + + + .. cpp:function:: PImplicitPort GetInputMesh() + + Retrieves the input for the model resource id of the mesh + + :returns: the input port for the model resource id of the mesh + + + .. cpp:function:: PImplicitPort GetInputPos() + + Retrieves the input for the position + + :returns: the input port for the position + + + .. cpp:function:: PImplicitPort GetOutputDistance() + + Retrieves the output + + :returns: the output port for the signed distance to the mesh + + +.. cpp:type:: std::shared_ptr Lib3MF::PMeshNode + + Shared pointer to CMeshNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_MeshObject.rst b/Documentation/source/Cpp/lib3mf_MeshObject.rst index 00cea2dd9..53e009acc 100644 --- a/Documentation/source/Cpp/lib3mf_MeshObject.rst +++ b/Documentation/source/Cpp/lib3mf_MeshObject.rst @@ -161,6 +161,60 @@ CMeshObject :returns: the BeamLattice within this MeshObject + .. cpp:function:: PVolumeData GetVolumeData() + + Retrieves the VolumeData of this MeshObject. + + :returns: the VolumeData of this MeshObject + + + .. cpp:function:: void SetVolumeData(classParam pTheVolumeData) + + Sets the VolumeData of this MeshObject. + + :param pTheVolumeData: the VolumeData of this MeshObject + + + .. cpp:function:: PTriangleSet AddTriangleSet(const std::string & sIdentifier, const std::string & sName) + + Adds a new triangle set. + + :param sIdentifier: the new identifier. MUST be unique within the mesh. MUST NOT be an empty string + :param sName: the human readable name. MUST NOT be an empty string + :returns: the new Triangle Set Instance. + + + .. cpp:function:: bool HasTriangleSet(const std::string & sIdentifier) + + Checks if a triangle set exists. + + :param sIdentifier: the identifier to be found. + :returns: flag if the triangles set exists. + + + .. cpp:function:: PTriangleSet FindTriangleSet(const std::string & sIdentifier) + + Finds a new triangle set by identifier. Fails if not existing. + + :param sIdentifier: the identifier to be found. + :returns: the triangle Set Instance. + + + .. cpp:function:: Lib3MF_uint32 GetTriangleSetCount() + + Returns number of triangle sets. + + :returns: the number of triangle sets of this mesh. + + + .. cpp:function:: PTriangleSet GetTriangleSet(const Lib3MF_uint32 nIndex) + + Returns a specific triangle set by index. + + :param nIndex: the index of the triangle set. + :returns: the triangle Set Instance. + + .. cpp:type:: std::shared_ptr Lib3MF::PMeshObject Shared pointer to CMeshObject to easily allow reference counting. diff --git a/Documentation/source/Cpp/lib3mf_MetaDataGroup.rst b/Documentation/source/Cpp/lib3mf_MetaDataGroup.rst index 466b68cee..6645b87c0 100644 --- a/Documentation/source/Cpp/lib3mf_MetaDataGroup.rst +++ b/Documentation/source/Cpp/lib3mf_MetaDataGroup.rst @@ -41,7 +41,7 @@ CMetaDataGroup :param nIndex: Index of the metadata to remove - .. cpp:function:: void RemoveMetaData(CMetaData * pTheMetaData) + .. cpp:function:: void RemoveMetaData(classParam pTheMetaData) removes metadata from the model. @@ -56,7 +56,7 @@ CMetaDataGroup :param sName: the name of the metadata :param sValue: the value of the metadata :param sType: the type of the metadata - :param bMustPreserve: shuold the metadata be preserved + :param bMustPreserve: should the metadata be preserved :returns: a new instance of the metadata diff --git a/Documentation/source/Cpp/lib3mf_MinNode.rst b/Documentation/source/Cpp/lib3mf_MinNode.rst new file mode 100644 index 000000000..fa3cc0c6c --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_MinNode.rst @@ -0,0 +1,16 @@ + +CMinNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CMinNode : public CTwoInputNode + + Calculates the minimum of two values + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PMinNode + + Shared pointer to CMinNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_ModNode.rst b/Documentation/source/Cpp/lib3mf_ModNode.rst new file mode 100644 index 000000000..5e7cf71f5 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_ModNode.rst @@ -0,0 +1,16 @@ + +CModNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CModNode : public CTwoInputNode + + Calculates the modulo of two values (GLSL mod) + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PModNode + + Shared pointer to CModNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_Model.rst b/Documentation/source/Cpp/lib3mf_Model.rst index 40726b357..d29144139 100644 --- a/Documentation/source/Cpp/lib3mf_Model.rst +++ b/Documentation/source/Cpp/lib3mf_Model.rst @@ -69,6 +69,14 @@ CModel :returns: string identifier for the file type + .. cpp:function:: PResource GetResourceByID(const Lib3MF_uint32 nUniqueResourceID) + + finds a model resource by its UniqueResourceID + + :param nUniqueResourceID: UniqueResourceID + :returns: returns the resource instance + + .. cpp:function:: PTexture2D GetTexture2DByID(const Lib3MF_uint32 nUniqueResourceID) finds a model texture by its UniqueResourceID @@ -149,6 +157,14 @@ CModel :returns: returns the slicestack instance + .. cpp:function:: PLevelSet GetLevelSetByID(const Lib3MF_uint32 nUniqueResourceID) + + finds a level set object by its UniqueResourceID + + :param nUniqueResourceID: UniqueResourceID + :returns: returns the level set object instance + + .. cpp:function:: std::string GetBuildUUID(bool & bHasUUID) returns, whether a build has a UUID and, if true, the build's UUID @@ -255,6 +271,13 @@ CModel :returns: returns the iterator instance. + .. cpp:function:: PImage3DIterator GetImage3Ds() + + creates a resource iterator instance with all image3d resources. + + :returns: returns the iterator instance. + + .. cpp:function:: PModel MergeToModel() Merges all components and objects which are referenced by a build item into a mesh. The memory is duplicated and a new model is created. @@ -262,6 +285,13 @@ CModel :returns: returns the merged model instance + .. cpp:function:: void MergeFromModel(classParam pModelInstance) + + Merges the given model into this model. + + :param pModelInstance: model to be merged + + .. cpp:function:: PMeshObject AddMeshObject() adds an empty mesh object to the model. @@ -284,7 +314,7 @@ CModel :returns: returns the new slicestack instance - .. cpp:function:: PTexture2D AddTexture2DFromAttachment(CAttachment * pTextureAttachment) + .. cpp:function:: PTexture2D AddTexture2DFromAttachment(classParam pTextureAttachment) adds a texture2d resource to the model. Its path is given by that of an existing attachment. @@ -306,7 +336,7 @@ CModel :returns: returns the new ColorGroup instance. - .. cpp:function:: PTexture2DGroup AddTexture2DGroup(CTexture2D * pTexture2DInstance) + .. cpp:function:: PTexture2DGroup AddTexture2DGroup(classParam pTexture2DInstance) adds an empty Texture2DGroup resource to the model. @@ -314,7 +344,7 @@ CModel :returns: returns the new Texture2DGroup instance. - .. cpp:function:: PCompositeMaterials AddCompositeMaterials(CBaseMaterialGroup * pBaseMaterialGroupInstance) + .. cpp:function:: PCompositeMaterials AddCompositeMaterials(classParam pBaseMaterialGroupInstance) adds an empty CompositeMaterials resource to the model. @@ -329,7 +359,25 @@ CModel :returns: returns the new MultiPropertyGroup instance. - .. cpp:function:: PBuildItem AddBuildItem(CObject * pObject, const sTransform & Transform) + .. cpp:function:: PImageStack AddImageStack(const Lib3MF_uint32 nColumnCount, const Lib3MF_uint32 nRowCount, const Lib3MF_uint32 nSheetCount) + + creates a new 3D Image Resource + + :param nColumnCount: the number of columns in each sheet. + :param nRowCount: the number of rows in each sheet. + :param nSheetCount: the number of sheets in the image stack. + :returns: returns the new ImageStack instance + + + .. cpp:function:: PImageStack GetImageStackByID(const Lib3MF_uint32 nUniqueResourceID) + + finds an ImageStack object by its UniqueResourceID + + :param nUniqueResourceID: UniqueResourceID + :returns: returns the image stack instance + + + .. cpp:function:: PBuildItem AddBuildItem(classParam pObject, const sTransform & Transform) adds a build item to the model. @@ -338,7 +386,7 @@ CModel :returns: returns the build item instance. - .. cpp:function:: void RemoveBuildItem(CBuildItem * pBuildItemInstance) + .. cpp:function:: void RemoveBuildItem(classParam pBuildItemInstance) removes a build item from the model @@ -361,7 +409,7 @@ CModel :returns: Instance of the attachment object - .. cpp:function:: void RemoveAttachment(CAttachment * pAttachmentInstance) + .. cpp:function:: void RemoveAttachment(classParam pAttachmentInstance) Removes attachment from the model. @@ -448,6 +496,56 @@ CModel :returns: The package keystore + .. cpp:function:: PFunctionIterator GetFunctions() + + creates a resource iterator for all functions + + :returns: returns the resource iterator + + + .. cpp:function:: PImplicitFunction AddImplicitFunction() + + adds a function described by nodes to the model + + :returns: returns the function instance + + + .. cpp:function:: PFunctionFromImage3D AddFunctionFromImage3D(classParam pImage3DInstance) + + adds a function defined by an image3d to the model + + :param pImage3DInstance: the Image3D-instance used for this function + :returns: returns the function instance + + + .. cpp:function:: PVolumeData AddVolumeData() + + adds a volume data resource to the model. + + :returns: returns the new volume data instance. + + + .. cpp:function:: PLevelSet AddLevelSet() + + adds an empty boundary shape object to the model. + + :returns: returns the mesh object instance + + + .. cpp:function:: PLevelSetIterator GetLevelSets() + + creates a resource iterator instance with all boundary shape resources. + + :returns: returns the iterator instance. + + + .. cpp:function:: void RemoveResource(classParam pResource) + + Removes a resource from the model + + :param pResource: The resource to remove + + .. cpp:type:: std::shared_ptr Lib3MF::PModel Shared pointer to CModel to easily allow reference counting. diff --git a/Documentation/source/Cpp/lib3mf_MultiplicationNode.rst b/Documentation/source/Cpp/lib3mf_MultiplicationNode.rst new file mode 100644 index 000000000..78d827ff0 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_MultiplicationNode.rst @@ -0,0 +1,16 @@ + +CMultiplicationNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CMultiplicationNode : public CTwoInputNode + + Multiplies two values (scalar or vector) + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PMultiplicationNode + + Shared pointer to CMultiplicationNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_NodeIterator.rst b/Documentation/source/Cpp/lib3mf_NodeIterator.rst new file mode 100644 index 000000000..b344906b3 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_NodeIterator.rst @@ -0,0 +1,23 @@ + +CNodeIterator +==================================================================================================== + + +.. cpp:class:: Lib3MF::CNodeIterator : public CIterator + + + + + + + .. cpp:function:: PImplicitNode GetCurrent() + + Returns the current element + + :returns: The current element + + +.. cpp:type:: std::shared_ptr Lib3MF::PNodeIterator + + Shared pointer to CNodeIterator to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_NormalizeDistanceNode.rst b/Documentation/source/Cpp/lib3mf_NormalizeDistanceNode.rst new file mode 100644 index 000000000..58fb3d6de --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_NormalizeDistanceNode.rst @@ -0,0 +1,72 @@ + +CNormalizeDistanceNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CNormalizeDistanceNode : public CImplicitNode + + Normalized signed distance from referenced function + + + + + .. cpp:function:: PImplicitPort GetInputFunctionID() + + Retrieves the input for the function id + + :returns: the input port for the function + + + .. cpp:function:: PImplicitPort GetInputPos() + + Retrieves the input for the position + + :returns: the input port for the position (vector) + + + .. cpp:function:: PImplicitPort GetInputStep() + + Retrieves the input for the finite difference step + + :returns: the input port for the finite difference step + + + .. cpp:function:: void SetScalarOutputName(const std::string & sScalarOutputName) + + Sets the name of the referenced scalar output + + :param sScalarOutputName: the name of the scalar output of the referenced function + + + .. cpp:function:: std::string GetScalarOutputName() + + Retrieves the name of the referenced scalar output + + :returns: the name of the scalar output of the referenced function + + + .. cpp:function:: void SetVectorInputName(const std::string & sVectorInputName) + + Sets the name of the referenced vector input + + :param sVectorInputName: the name of the vector input (float3) of the referenced function + + + .. cpp:function:: std::string GetVectorInputName() + + Retrieves the name of the referenced vector input + + :returns: the name of the vector input (float3) of the referenced function + + + .. cpp:function:: PImplicitPort GetOutputResult() + + Retrieves the normalized result output + + :returns: the output port for the normalized distance + + +.. cpp:type:: std::shared_ptr Lib3MF::PNormalizeDistanceNode + + Shared pointer to CNormalizeDistanceNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_Object.rst b/Documentation/source/Cpp/lib3mf_Object.rst index 4f497cc10..b425764c1 100644 --- a/Documentation/source/Cpp/lib3mf_Object.rst +++ b/Documentation/source/Cpp/lib3mf_Object.rst @@ -66,6 +66,13 @@ CObject :returns: returns, whether the object is a components object + .. cpp:function:: bool IsLevelSetObject() + + Retrieves, if an object is a level set object + + :returns: returns, whether the object is a level set object + + .. cpp:function:: bool IsValid() Retrieves, if the object is valid according to the core spec. For mesh objects, we distinguish between the type attribute of the object:In case of object type other, this always means false.In case of object type model or solidsupport, this means, if the mesh suffices all requirements of the core spec chapter 4.1.In case of object type support or surface, this always means true.A component objects is valid if and only if it contains at least one component and all child components are valid objects. @@ -73,7 +80,7 @@ CObject :returns: returns whether the object is a valid object description - .. cpp:function:: void SetAttachmentAsThumbnail(CAttachment * pAttachment) + .. cpp:function:: void SetAttachmentAsThumbnail(classParam pAttachment) Use an existing attachment as thumbnail for this object @@ -157,7 +164,7 @@ CObject :returns: returns the slicestack instance - .. cpp:function:: void AssignSliceStack(CSliceStack * pSliceStackInstance) + .. cpp:function:: void AssignSliceStack(classParam pSliceStackInstance) assigns a slicestack to the object diff --git a/Documentation/source/Cpp/lib3mf_OneInputNode.rst b/Documentation/source/Cpp/lib3mf_OneInputNode.rst new file mode 100644 index 000000000..f6ad910fe --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_OneInputNode.rst @@ -0,0 +1,30 @@ + +COneInputNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::COneInputNode : public CImplicitNode + + Node with one input + + + + + .. cpp:function:: PImplicitPort GetInputA() + + Retrieves the input + + :returns: the input + + + .. cpp:function:: PImplicitPort GetOutputResult() + + Retrieves the output + + :returns: the output + + +.. cpp:type:: std::shared_ptr Lib3MF::POneInputNode + + Shared pointer to COneInputNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_PowNode.rst b/Documentation/source/Cpp/lib3mf_PowNode.rst new file mode 100644 index 000000000..917afb6a2 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_PowNode.rst @@ -0,0 +1,16 @@ + +CPowNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CPowNode : public CTwoInputNode + + Calculates the power A by B + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PPowNode + + Shared pointer to CPowNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_Resource.rst b/Documentation/source/Cpp/lib3mf_Resource.rst index 28156d560..d30576ed2 100644 --- a/Documentation/source/Cpp/lib3mf_Resource.rst +++ b/Documentation/source/Cpp/lib3mf_Resource.rst @@ -31,7 +31,7 @@ CResource :returns: the PackagePart within which this resource resides. - .. cpp:function:: void SetPackagePart(CPackagePart * pPackagePart) + .. cpp:function:: void SetPackagePart(classParam pPackagePart) Sets the new PackagePart within which this resource resides diff --git a/Documentation/source/Cpp/lib3mf_ResourceDataGroup.rst b/Documentation/source/Cpp/lib3mf_ResourceDataGroup.rst index eef15ab28..3b83e6cab 100644 --- a/Documentation/source/Cpp/lib3mf_ResourceDataGroup.rst +++ b/Documentation/source/Cpp/lib3mf_ResourceDataGroup.rst @@ -17,7 +17,7 @@ CResourceDataGroup :returns: The new resourcedatagroup keyuuid. - .. cpp:function:: PAccessRight AddAccessRight(CConsumer * pConsumer, const eWrappingAlgorithm eWrappingAlgorithm, const eMgfAlgorithm eMgfAlgorithm, const eDigestMethod eDigestMethod) + .. cpp:function:: PAccessRight AddAccessRight(classParam pConsumer, const eWrappingAlgorithm eWrappingAlgorithm, const eMgfAlgorithm eMgfAlgorithm, const eDigestMethod eDigestMethod) Add accessright to resourcedatagroup element @@ -28,7 +28,7 @@ CResourceDataGroup :returns: The acess right instance - .. cpp:function:: PAccessRight FindAccessRightByConsumer(CConsumer * pConsumer) + .. cpp:function:: PAccessRight FindAccessRightByConsumer(classParam pConsumer) Finds the AccessRight associated with a Consumer @@ -36,7 +36,7 @@ CResourceDataGroup :returns: The AcessRight instance - .. cpp:function:: void RemoveAccessRight(CConsumer * pConsumer) + .. cpp:function:: void RemoveAccessRight(classParam pConsumer) Removes access from a Consumer on this resource data group diff --git a/Documentation/source/Cpp/lib3mf_ResourceIdNode.rst b/Documentation/source/Cpp/lib3mf_ResourceIdNode.rst new file mode 100644 index 000000000..2b1632f6e --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_ResourceIdNode.rst @@ -0,0 +1,37 @@ + +CResourceIdNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CResourceIdNode : public CImplicitNode + + Resource ID + + + + + .. cpp:function:: void SetResource(classParam pResource) + + Sets the Resource that the resourceid attribute of the node will point to + + :param pResource: the resource + + + .. cpp:function:: PResource GetResource() + + Retrieves the resource of the node + + :returns: the resource + + + .. cpp:function:: PImplicitPort GetOutputValue() + + Retrieves the output + + :returns: the output + + +.. cpp:type:: std::shared_ptr Lib3MF::PResourceIdNode + + Shared pointer to CResourceIdNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_RoundNode.rst b/Documentation/source/Cpp/lib3mf_RoundNode.rst new file mode 100644 index 000000000..9cee926bf --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_RoundNode.rst @@ -0,0 +1,16 @@ + +CRoundNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CRoundNode : public COneInputNode + + Rounds a scalar value to the nearest integer + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PRoundNode + + Shared pointer to CRoundNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_SelectNode.rst b/Documentation/source/Cpp/lib3mf_SelectNode.rst new file mode 100644 index 000000000..5ddf94904 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_SelectNode.rst @@ -0,0 +1,37 @@ + +CSelectNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CSelectNode : public COneInputNode + + If A is less B returns C, else D + + + + + .. cpp:function:: PImplicitPort GetInputB() + + Retrieves the second input + + :returns: the second input + + + .. cpp:function:: PImplicitPort GetInputC() + + Retrieves the third input + + :returns: the third input + + + .. cpp:function:: PImplicitPort GetInputD() + + Retrieves the fourth input + + :returns: the fourth input + + +.. cpp:type:: std::shared_ptr Lib3MF::PSelectNode + + Shared pointer to CSelectNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_SignNode.rst b/Documentation/source/Cpp/lib3mf_SignNode.rst new file mode 100644 index 000000000..600d856de --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_SignNode.rst @@ -0,0 +1,16 @@ + +CSignNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CSignNode : public COneInputNode + + Returns the sign + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PSignNode + + Shared pointer to CSignNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_SinNode.rst b/Documentation/source/Cpp/lib3mf_SinNode.rst new file mode 100644 index 000000000..d660aa172 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_SinNode.rst @@ -0,0 +1,16 @@ + +CSinNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CSinNode : public COneInputNode + + Calculates the sinus + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PSinNode + + Shared pointer to CSinNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_SinhNode.rst b/Documentation/source/Cpp/lib3mf_SinhNode.rst new file mode 100644 index 000000000..763bfa8f7 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_SinhNode.rst @@ -0,0 +1,16 @@ + +CSinhNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CSinhNode : public COneInputNode + + Calculates the hyperbolic sine + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PSinhNode + + Shared pointer to CSinhNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_SliceStack.rst b/Documentation/source/Cpp/lib3mf_SliceStack.rst index 50494d405..ad540fd53 100644 --- a/Documentation/source/Cpp/lib3mf_SliceStack.rst +++ b/Documentation/source/Cpp/lib3mf_SliceStack.rst @@ -47,7 +47,7 @@ CSliceStack :returns: the number of slicereferences - .. cpp:function:: void AddSliceStackReference(CSliceStack * pTheSliceStack) + .. cpp:function:: void AddSliceStackReference(classParam pTheSliceStack) Adds another existing slicestack as sliceref in this slicestack diff --git a/Documentation/source/Cpp/lib3mf_SqrtNode.rst b/Documentation/source/Cpp/lib3mf_SqrtNode.rst new file mode 100644 index 000000000..3a351dabb --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_SqrtNode.rst @@ -0,0 +1,16 @@ + +CSqrtNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CSqrtNode : public COneInputNode + + Calculates the square root + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PSqrtNode + + Shared pointer to CSqrtNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_SubtractionNode.rst b/Documentation/source/Cpp/lib3mf_SubtractionNode.rst new file mode 100644 index 000000000..e7837b3b3 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_SubtractionNode.rst @@ -0,0 +1,16 @@ + +CSubtractionNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CSubtractionNode : public CTwoInputNode + + Subtracts two values (scalar or vector) + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PSubtractionNode + + Shared pointer to CSubtractionNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_TanNode.rst b/Documentation/source/Cpp/lib3mf_TanNode.rst new file mode 100644 index 000000000..8edee45d1 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_TanNode.rst @@ -0,0 +1,16 @@ + +CTanNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CTanNode : public COneInputNode + + Calculates the tangent + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PTanNode + + Shared pointer to CTanNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_TanhNode.rst b/Documentation/source/Cpp/lib3mf_TanhNode.rst new file mode 100644 index 000000000..48f88c824 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_TanhNode.rst @@ -0,0 +1,16 @@ + +CTanhNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CTanhNode : public COneInputNode + + Calculates the hyperbolic tangent + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PTanhNode + + Shared pointer to CTanhNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_Texture2D.rst b/Documentation/source/Cpp/lib3mf_Texture2D.rst index 69d57e526..e95155a93 100644 --- a/Documentation/source/Cpp/lib3mf_Texture2D.rst +++ b/Documentation/source/Cpp/lib3mf_Texture2D.rst @@ -17,7 +17,7 @@ CTexture2D :returns: attachment that holds the texture's image information. - .. cpp:function:: void SetAttachment(CAttachment * pAttachment) + .. cpp:function:: void SetAttachment(classParam pAttachment) Sets the texture's package path to the path of the attachment. diff --git a/Documentation/source/Cpp/lib3mf_TransposeNode.rst b/Documentation/source/Cpp/lib3mf_TransposeNode.rst new file mode 100644 index 000000000..5572b0ce6 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_TransposeNode.rst @@ -0,0 +1,16 @@ + +CTransposeNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CTransposeNode : public COneInputNode + + Transposes a matrix + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PTransposeNode + + Shared pointer to CTransposeNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_TriangleSet.rst b/Documentation/source/Cpp/lib3mf_TriangleSet.rst new file mode 100644 index 000000000..c9525cb78 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_TriangleSet.rst @@ -0,0 +1,107 @@ + +CTriangleSet +==================================================================================================== + + +.. cpp:class:: Lib3MF::CTriangleSet : public CBase + + + + + + + .. cpp:function:: void SetName(const std::string & sName) + + sets the name of the triangle set + + :param sName: the new name + + + .. cpp:function:: std::string GetName() + + returns the name of the triangle set + + :returns: returns the name + + + .. cpp:function:: void SetIdentifier(const std::string & sIdentifier) + + sets the identifier of the triangle set. + + :param sIdentifier: the new identifier. MUST be unique within the mesh. MUST NOT be an empty string + + + .. cpp:function:: std::string GetIdentifier() + + returns the identifier of the triangle set + + :returns: returns the identifier + + + .. cpp:function:: void AddTriangle(const Lib3MF_uint32 nTriangleIndex) + + adds a triangle to the set. Does nothing if triangle is already in the set. + + :param nTriangleIndex: Triangle index to add. MUST be between 0 and TriangleCount - 1. + + + .. cpp:function:: void RemoveTriangle(const Lib3MF_uint32 nTriangleIndex) + + removes a triangle from the set + + :param nTriangleIndex: Triangle index to remove. MUST be between 0 and TriangleCount - 1. + + + .. cpp:function:: void Clear() + + clears all triangles from the list + + + + .. cpp:function:: void SetTriangleList(const CInputVector & TriangleIndicesBuffer) + + Sets all triangles in the list, while clearing old values. Duplicates will be merged. + + :param TriangleIndicesBuffer: Triangle indices to add. Every element MUST be between 0 and TriangleCount - 1. + + + .. cpp:function:: void GetTriangleList(std::vector & TriangleIndicesBuffer) + + Retrieves all the triangles in the TriangleSet + + :param TriangleIndicesBuffer: retrieves the indices of the triangles in this TriangleSet + + + .. cpp:function:: void AddTriangleList(const CInputVector & TriangleIndicesBuffer) + + Adds multiple triangles in the list. Duplicates will be merged. + + :param TriangleIndicesBuffer: Triangle indices to add. Every element MUST be between 0 and TriangleCount - 1. + + + .. cpp:function:: void Merge(classParam pOtherTriangleSet, const bool bDeleteOther) + + Merges another Triangle set. + + :param pOtherTriangleSet: Other triangle set to merge. + :param bDeleteOther: Flag if other triangle set is getting removed. + + + .. cpp:function:: void DeleteSet() + + Deletes the whole set from the mesh. + + + + .. cpp:function:: PTriangleSet Duplicate(const std::string & sIdentifier) + + Duplicates the set in the mesh. + + :param sIdentifier: the new identifier. MUST be unique within the mesh. MUST NOT be an empty string + :returns: Copy of the triangle set. + + +.. cpp:type:: std::shared_ptr Lib3MF::PTriangleSet + + Shared pointer to CTriangleSet to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_TwoInputNode.rst b/Documentation/source/Cpp/lib3mf_TwoInputNode.rst new file mode 100644 index 000000000..7160ef1be --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_TwoInputNode.rst @@ -0,0 +1,23 @@ + +CTwoInputNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CTwoInputNode : public COneInputNode + + Node + + + + + .. cpp:function:: PImplicitPort GetInputB() + + Retrieves the second input + + :returns: the second input + + +.. cpp:type:: std::shared_ptr Lib3MF::PTwoInputNode + + Shared pointer to CTwoInputNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_UnsignedMeshNode.rst b/Documentation/source/Cpp/lib3mf_UnsignedMeshNode.rst new file mode 100644 index 000000000..ac7dfe30b --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_UnsignedMeshNode.rst @@ -0,0 +1,37 @@ + +CUnsignedMeshNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CUnsignedMeshNode : public CImplicitNode + + Unsigned distance to mesh + + + + + .. cpp:function:: PImplicitPort GetInputMesh() + + Retrieves the input for the model resource id of the mesh + + :returns: the input port for the model resource id of the mesh + + + .. cpp:function:: PImplicitPort GetInputPos() + + Retrieves the input for the position + + :returns: the input port for the position + + + .. cpp:function:: PImplicitPort GetOutputDistance() + + Retrieves the output + + :returns: the output port for the unsigned distance to the mesh + + +.. cpp:type:: std::shared_ptr Lib3MF::PUnsignedMeshNode + + Shared pointer to CUnsignedMeshNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_VectorFromScalarNode.rst b/Documentation/source/Cpp/lib3mf_VectorFromScalarNode.rst new file mode 100644 index 000000000..b8a2a664b --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_VectorFromScalarNode.rst @@ -0,0 +1,16 @@ + +CVectorFromScalarNode +==================================================================================================== + + +.. cpp:class:: Lib3MF::CVectorFromScalarNode : public COneInputNode + + Creates a vector from one scalar values + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PVectorFromScalarNode + + Shared pointer to CVectorFromScalarNode to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_VolumeData.rst b/Documentation/source/Cpp/lib3mf_VolumeData.rst new file mode 100644 index 000000000..818ce52a6 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_VolumeData.rst @@ -0,0 +1,88 @@ + +CVolumeData +==================================================================================================== + + +.. cpp:class:: Lib3MF::CVolumeData : public CResource + + + + + + + .. cpp:function:: PVolumeDataComposite GetComposite() + + Returns the VolumeDataComposite of this VolumeData instance + + :returns: filled with the VolumeDataComposite of this VolumeData instance. + + + .. cpp:function:: PVolumeDataComposite CreateNewComposite() + + Creates a new VolumeDataComposite for this VolumeData instance + + :returns: The new VolumeDataComposite of this VolumeData instance. + + + .. cpp:function:: void RemoveComposite() + + Removes the VolumeDataComposite of this VolumeData instance + + + + .. cpp:function:: PVolumeDataColor GetColor() + + Returns the VolumeDataColor of this VolumeData instance + + :returns: filled with the VolumeDataColor of this VolumeData instance. + + + .. cpp:function:: PVolumeDataColor CreateNewColor(classParam pTheFunction) + + Creates a new VolumeDataColor for this VolumeData instance + + :param pTheFunction: Function used in this element + :returns: The new VolumeDataColor of this VolumeData instance. + + + .. cpp:function:: void RemoveColor() + + Removes the VolumeDataColor of this VolumeData instance + + + + .. cpp:function:: Lib3MF_uint32 GetPropertyCount() + + Returns the number of VolumeDataProperty + + :returns: the number of VolumeDataProperty-elements within this VolumeData + + + .. cpp:function:: PVolumeDataProperty GetProperty(const Lib3MF_uint32 nIndex) + + Returns the VolumeDataProperty at a given Index + + :param nIndex: the index of the VolumeDataProperty to be returned. + :returns: the VolumeDataProperty at the given index. + + + .. cpp:function:: PVolumeDataProperty AddPropertyFromFunction(const std::string & sName, classParam pTheFunction) + + Adds a new VolumeDataProperty from a Function + + :param sName: the qualified name (namespace+name) of the Property + :param pTheFunction: Function used in this element + :returns: the newly created VolumeDataProperty. + + + .. cpp:function:: void RemoveProperty(const Lib3MF_uint32 nIndex) + + Removes the VolumeDataProperty with a given index + + :param nIndex: the index of the VolumeDataProperty to be removed. + + +.. cpp:type:: std::shared_ptr Lib3MF::PVolumeData + + Shared pointer to CVolumeData to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_VolumeDataColor.rst b/Documentation/source/Cpp/lib3mf_VolumeDataColor.rst new file mode 100644 index 000000000..27840b063 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_VolumeDataColor.rst @@ -0,0 +1,16 @@ + +CVolumeDataColor +==================================================================================================== + + +.. cpp:class:: Lib3MF::CVolumeDataColor : public CFunctionReference + + + + + + +.. cpp:type:: std::shared_ptr Lib3MF::PVolumeDataColor + + Shared pointer to CVolumeDataColor to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_VolumeDataComposite.rst b/Documentation/source/Cpp/lib3mf_VolumeDataComposite.rst new file mode 100644 index 000000000..4d0e80908 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_VolumeDataComposite.rst @@ -0,0 +1,60 @@ + +CVolumeDataComposite +==================================================================================================== + + +.. cpp:class:: Lib3MF::CVolumeDataComposite : public CBase + + + + + + + .. cpp:function:: PBaseMaterialGroup GetBaseMaterialGroup() + + Returns the BaseMaterialGroup used within this volume data item + + :returns: The BaseMaterialGroup instance of this VolumeDataComposite element + + + .. cpp:function:: void SetBaseMaterialGroup(classParam pBaseMaterialGroupInstance) + + Sets the BaseMaterialGroup to use within this volume data item. + + :param pBaseMaterialGroupInstance: The new BaseMaterialGroup instance of this VolumeDataComposite element + + + .. cpp:function:: Lib3MF_uint32 GetMaterialMappingCount() + + Returns the number of material mappings of this VolumeDataComposite element + + :returns: the number of material mappings. + + + .. cpp:function:: PMaterialMapping GetMaterialMapping(const Lib3MF_uint32 nIndex) + + Returns MaterialMapping with given index + + :param nIndex: Index of the MaterialMapping in question. + :returns: MaterialMapping used in this element + + + .. cpp:function:: PMaterialMapping AddMaterialMapping(const sTransform & Transform) + + Adds a MaterialMapping + + :param Transform: new transformation matrix + :returns: The new MaterialMapping + + + .. cpp:function:: void RemoveMaterialMapping(const Lib3MF_uint32 nIndex) + + Removes the MaterialMapping with given index + + :param nIndex: The index of the MaterialMapping to be removed. + + +.. cpp:type:: std::shared_ptr Lib3MF::PVolumeDataComposite + + Shared pointer to CVolumeDataComposite to easily allow reference counting. + diff --git a/Documentation/source/Cpp/lib3mf_VolumeDataProperty.rst b/Documentation/source/Cpp/lib3mf_VolumeDataProperty.rst new file mode 100644 index 000000000..da385d543 --- /dev/null +++ b/Documentation/source/Cpp/lib3mf_VolumeDataProperty.rst @@ -0,0 +1,37 @@ + +CVolumeDataProperty +==================================================================================================== + + +.. cpp:class:: Lib3MF::CVolumeDataProperty : public CFunctionReference + + + + + + + .. cpp:function:: std::string GetName() + + Gets the qualified name of this property. + + :returns: The qualified name of this property. + + + .. cpp:function:: void SetIsRequired(const bool bIsRequired) + + Sets whether this property is required to process this 3MF document instance. + + :param bIsRequired: New value for whether this property is required to process this 3MF document instance. + + + .. cpp:function:: bool IsRequired() + + Returns whether this property is required to process this 3MF document instance. + + :returns: Is this property required to process this 3MF document instance? + + +.. cpp:type:: std::shared_ptr Lib3MF::PVolumeDataProperty + + Shared pointer to CVolumeDataProperty to easily allow reference counting. + diff --git a/Include/API/lib3mf_beamlatticenode.hpp b/Include/API/lib3mf_beamlatticenode.hpp new file mode 100644 index 000000000..fcaf4acaf --- /dev/null +++ b/Include/API/lib3mf_beamlatticenode.hpp @@ -0,0 +1,98 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CBeamLatticeNode + +*/ + + +#ifndef __LIB3MF_BEAMLATTICENODE +#define __LIB3MF_BEAMLATTICENODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_implicitnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CBeamLatticeNode +**************************************************************************************************************************/ + +class CBeamLatticeNode : public virtual IBeamLatticeNode, public virtual CImplicitNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + + /** + * Put additional public members here. They will not be visible in the external API. + */ + + CBeamLatticeNode(NMR::PModelImplicitNode pImplicitNode); + + /** + * Public member functions to implement. + */ + + IImplicitPort * GetInputBeamLattice() override; + + IImplicitPort * GetInputPos() override; + + IImplicitPort * GetOutputDistance() override; + + void SetAccurateRange(const Lib3MF_double dAccurateRange) override; + + Lib3MF_double GetAccurateRange() override; + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_BEAMLATTICENODE diff --git a/Include/API/lib3mf_functiongradientnode.hpp b/Include/API/lib3mf_functiongradientnode.hpp new file mode 100644 index 000000000..fa65ed0c6 --- /dev/null +++ b/Include/API/lib3mf_functiongradientnode.hpp @@ -0,0 +1,108 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CFunctionGradientNode + +*/ + + +#ifndef __LIB3MF_FUNCTIONGRADIENTNODE +#define __LIB3MF_FUNCTIONGRADIENTNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_implicitnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CFunctionGradientNode +**************************************************************************************************************************/ + +class CFunctionGradientNode : public virtual IFunctionGradientNode, public virtual CImplicitNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + + /** + * Put additional public members here. They will not be visible in the external API. + */ + + CFunctionGradientNode(NMR::PModelImplicitNode pImplicitNode); + + /** + * Public member functions to implement. + */ + + IImplicitPort * GetInputFunctionID() override; + + IImplicitPort * GetInputPos() override; + + IImplicitPort * GetInputStep() override; + + void SetScalarOutputName(const std::string & sScalarOutputName) override; + + std::string GetScalarOutputName() override; + + void SetVectorInputName(const std::string & sVectorInputName) override; + + std::string GetVectorInputName() override; + + IImplicitPort * GetOutputVector() override; + + IImplicitPort * GetOutputGradient() override; + + IImplicitPort * GetOutputMagnitude() override; + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_FUNCTIONGRADIENTNODE diff --git a/Include/API/lib3mf_implicitfunction.hpp b/Include/API/lib3mf_implicitfunction.hpp index ec009b86e..e569a63f1 100644 --- a/Include/API/lib3mf_implicitfunction.hpp +++ b/Include/API/lib3mf_implicitfunction.hpp @@ -744,6 +744,39 @@ namespace Lib3MF const std::string& sIdentifier, const std::string& sDisplayName, const std::string& sTag) override; + /** + * IImplicitFunction::AddBeamLatticeNode - Add a BeamLatticeNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + IBeamLatticeNode* AddBeamLatticeNode( + const std::string& sIdentifier, const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddFunctionGradientNode - Add a FunctionGradientNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + IFunctionGradientNode* AddFunctionGradientNode( + const std::string& sIdentifier, const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddNormalizeDistanceNode - Add a NormalizeDistanceNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + INormalizeDistanceNode* AddNormalizeDistanceNode( + const std::string& sIdentifier, const std::string& sDisplayName, + const std::string& sTag) override; + /** * IImplicitFunction::GetNodes - Retrieves the nodes * @return the accessor to the nodes diff --git a/Include/API/lib3mf_normalizedistancenode.hpp b/Include/API/lib3mf_normalizedistancenode.hpp new file mode 100644 index 000000000..8bb53358b --- /dev/null +++ b/Include/API/lib3mf_normalizedistancenode.hpp @@ -0,0 +1,104 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CNormalizeDistanceNode + +*/ + + +#ifndef __LIB3MF_NORMALIZEDISTANCENODE +#define __LIB3MF_NORMALIZEDISTANCENODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_implicitnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CNormalizeDistanceNode +**************************************************************************************************************************/ + +class CNormalizeDistanceNode : public virtual INormalizeDistanceNode, public virtual CImplicitNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + + /** + * Put additional public members here. They will not be visible in the external API. + */ + + CNormalizeDistanceNode(NMR::PModelImplicitNode pImplicitNode); + + /** + * Public member functions to implement. + */ + + IImplicitPort * GetInputFunctionID() override; + + IImplicitPort * GetInputPos() override; + + IImplicitPort * GetInputStep() override; + + void SetScalarOutputName(const std::string & sScalarOutputName) override; + + std::string GetScalarOutputName() override; + + void SetVectorInputName(const std::string & sVectorInputName) override; + + std::string GetVectorInputName() override; + + IImplicitPort * GetOutputResult() override; + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_NORMALIZEDISTANCENODE diff --git a/Include/Common/NMR_StringUtils.h b/Include/Common/NMR_StringUtils.h index 4cafe3a76..b32bc76a1 100644 --- a/Include/Common/NMR_StringUtils.h +++ b/Include/Common/NMR_StringUtils.h @@ -37,7 +37,7 @@ and Exception-safe #include "Common/NMR_Types.h" #include "Common/NMR_Local.h" -#include +#include #include #include diff --git a/Include/Model/Classes/NMR_ModelConstants.h b/Include/Model/Classes/NMR_ModelConstants.h index b110fd649..7403f0e5e 100644 --- a/Include/Model/Classes/NMR_ModelConstants.h +++ b/Include/Model/Classes/NMR_ModelConstants.h @@ -80,6 +80,7 @@ These are given by the 3MF Standard #define XML_3MF_NAMESPACE_MATERIALSPEC "http://schemas.microsoft.com/3dmanufacturing/material/2015/02" #define XML_3MF_NAMESPACE_PRODUCTIONSPEC "http://schemas.microsoft.com/3dmanufacturing/production/2015/06" #define XML_3MF_NAMESPACE_BEAMLATTICESPEC "http://schemas.microsoft.com/3dmanufacturing/beamlattice/2017/02" +#define XML_3MF_NAMESPACE_BEAMLATTICEBALLSSPEC "http://schemas.microsoft.com/3dmanufacturing/beamlattice/balls/2020/07" #define XML_3MF_NAMESPACE_TRIANGLESETS "http://schemas.microsoft.com/3dmanufacturing/trianglesets/2021/07" #define XML_3MF_NAMESPACE_SLICESPEC "http://schemas.microsoft.com/3dmanufacturing/slice/2015/07" #define XML_3MF_NAMESPACE_SECURECONTENTSPEC "http://schemas.microsoft.com/3dmanufacturing/securecontent/2019/04" @@ -91,6 +92,7 @@ These are given by the 3MF Standard #define XML_3MF_NAMESPACEPREFIX_MATERIAL "m" #define XML_3MF_NAMESPACEPREFIX_PRODUCTION "p" #define XML_3MF_NAMESPACEPREFIX_BEAMLATTICE "b" +#define XML_3MF_NAMESPACEPREFIX_BEAMLATTICEBALLS "b2" #define XML_3MF_NAMESPACEPREFIX_SLICE "s" #define XML_3MF_NAMESPACEPREFIX_SECURECONTENT "sc" #define XML_3MF_NAMESPACEPREFIX_VOLUMETRIC "v" @@ -287,6 +289,9 @@ These are given by the 3MF Standard #define XML_3MF_ATTRIBUTE_IMPLICIT_PORT_ID "identifier" #define XML_3MF_ATTRIBUTE_IMPLICIT_PORT_DISPLAY_NAME "displayname" #define XML_3MF_ATTRIBUTE_IMPLICIT_PORT_REFERENCE "ref" +#define XML_3MF_ATTRIBUTE_IMPLICIT_NODE_ACCURATERANGE "accuraterange" +#define XML_3MF_ATTRIBUTE_IMPLICIT_NODE_SCALAROUTPUT "scalaroutput" +#define XML_3MF_ATTRIBUTE_IMPLICIT_NODE_VECTORINPUT "vectorinput" #define XML_3MF_ELEMENT_IMPLICIT_PORT_TYPE_SCALAR "scalar" #define XML_3MF_ELEMENT_IMPLICIT_PORT_TYPE_VECTOR "vector" #define XML_3MF_ELEMENT_IMPLICIT_PORT_TYPE_MATRIX "matrix" diff --git a/Include/Model/Classes/NMR_ModelImplicitNode.h b/Include/Model/Classes/NMR_ModelImplicitNode.h index ca010c614..acaca85fe 100644 --- a/Include/Model/Classes/NMR_ModelImplicitNode.h +++ b/Include/Model/Classes/NMR_ModelImplicitNode.h @@ -64,6 +64,11 @@ namespace NMR // resource ID that is unique in the scope of a model to reference mesh objects, functions etc. ModelResourceID m_modelResourceID; + // Attributes specific to new nodes + double m_accurateRange = 0.0; // For BeamLatticeNode + std::string m_scalarOutputName; // For FunctionGradient and NormalizeDistance + std::string m_vectorInputName; // For FunctionGradient and NormalizeDistance + CModelImplicitFunction * m_parent = nullptr; // ID of the node in the graph, used for the topological sort @@ -114,6 +119,16 @@ namespace NMR ModelResourceID getModelResourceID() const; PModelResource getResource() const; + // BeamLatticeNode attribute + void setAccurateRange(double accurateRange); + double getAccurateRange() const; + + // FunctionGradient and NormalizeDistance attributes + void setScalarOutputName(const std::string& name); + std::string getScalarOutputName() const; + void setVectorInputName(const std::string& name); + std::string getVectorInputName() const; + bool arePortsValid() const; void setGraphID(GraphID id); diff --git a/Include/Model/Writer/v100/NMR_ModelWriterNode100_Mesh.h b/Include/Model/Writer/v100/NMR_ModelWriterNode100_Mesh.h index 072de84c3..6b7c5178f 100644 --- a/Include/Model/Writer/v100/NMR_ModelWriterNode100_Mesh.h +++ b/Include/Model/Writer/v100/NMR_ModelWriterNode100_Mesh.h @@ -50,12 +50,12 @@ This is the class for exporting the 3mf mesh node. #define MODELWRITERMESH100_TRIANGLELINESTARTLENGTH 14 #define MODELWRITERMESH100_BEAMLATTICE_BEAMLINESTART " +#include "lib3mf_dynamic.h" + +#ifndef _WIN32 +#define printf_s printf +#endif + +#ifndef LIB3MF_LIBRARY_LOCATION +#ifdef _WIN32 +#define LIB3MF_LIBRARY_LOCATION "lib3mf.dll" +#elif defined(__APPLE__) +#define LIB3MF_LIBRARY_LOCATION "./lib3mf.2.dylib" +#else +#define LIB3MF_LIBRARY_LOCATION "./lib3mf.so.2" +#endif +#endif + +static int fail(const char *message, Lib3MFResult code) { + printf_s("%s (%d)\n", message, (int) code); + return (int) code; +} + +int main() { + sLib3MFDynamicWrapperTable wrapperTable; + Lib3MFResult result; + Lib3MF_uint32 major, minor, micro; + + result = InitLib3MFWrapperTable(&wrapperTable); + if (result != LIB3MF_SUCCESS) { + return fail("Failed to initialize wrapper table", result); + } + + result = LoadLib3MFWrapperTable(&wrapperTable, LIB3MF_LIBRARY_LOCATION); + if (result != LIB3MF_SUCCESS) { + return fail("Failed to load lib3mf library", result); + } + + result = wrapperTable.m_GetLibraryVersion(&major, &minor, µ); + if (result != LIB3MF_SUCCESS) { + ReleaseLib3MFWrapperTable(&wrapperTable); + return fail("Failed to query version", result); + } + + printf_s("Lib3MF.Version = %u.%u.%u\n", major, minor, micro); + ReleaseLib3MFWrapperTable(&wrapperTable); + return 0; +} + diff --git a/SDK/CPackExamples/CDynamic/Source/Version.cpp b/SDK/CPackExamples/CDynamic/Source/Version.cpp new file mode 100644 index 000000000..0111cbb0a --- /dev/null +++ b/SDK/CPackExamples/CDynamic/Source/Version.cpp @@ -0,0 +1,41 @@ +#include +#include "lib3mf_dynamic.h" + +#ifndef _WIN32 +#define printf_s printf +#endif + +#ifndef LIB3MF_LIBRARY_LOCATION +#error "LIB3MF_LIBRARY_LOCATION is expected from lib3mf CDynamic package config" +#endif + +static int fail(const char *message, Lib3MFResult code) { + printf_s("%s (%d)\n", message, (int) code); + return (int) code; +} + +int main() { + sLib3MFDynamicWrapperTable wrapperTable; + Lib3MFResult result; + Lib3MF_uint32 major, minor, micro; + + result = InitLib3MFWrapperTable(&wrapperTable); + if (result != LIB3MF_SUCCESS) { + return fail("Failed to initialize wrapper table", result); + } + + result = LoadLib3MFWrapperTable(&wrapperTable, LIB3MF_LIBRARY_LOCATION); + if (result != LIB3MF_SUCCESS) { + return fail("Failed to load lib3mf library", result); + } + + result = wrapperTable.m_GetLibraryVersion(&major, &minor, µ); + if (result != LIB3MF_SUCCESS) { + ReleaseLib3MFWrapperTable(&wrapperTable); + return fail("Failed to query version", result); + } + + printf_s("Lib3MF.Version = %u.%u.%u\n", major, minor, micro); + ReleaseLib3MFWrapperTable(&wrapperTable); + return 0; +} diff --git a/SDK/CPackExamples/Cpp/GenerateVS2022.bat b/SDK/CPackExamples/Cpp/GenerateVS2022.bat new file mode 100644 index 000000000..1706555ea --- /dev/null +++ b/SDK/CPackExamples/Cpp/GenerateVS2022.bat @@ -0,0 +1,10 @@ +@echo off +set startingDir=%CD% + +set basepath=%~dp0 +set builddir=%basepath%\build +if not exist %builddir% (mkdir %builddir%) +cd %builddir% +cmake -G "Visual Studio 17 2022" .. %* + +cd %startingDir% \ No newline at end of file diff --git a/SDK/CPackExamples/Cpp/Source/ExtractInfo.cpp b/SDK/CPackExamples/Cpp/Source/ExtractInfo.cpp index 661cd30f2..8dec165ab 100644 --- a/SDK/CPackExamples/Cpp/Source/ExtractInfo.cpp +++ b/SDK/CPackExamples/Cpp/Source/ExtractInfo.cpp @@ -32,6 +32,8 @@ ExtractInfo.cpp : 3MF Read Example #include #include #include +#include +#include #include "lib3mf_implicit.hpp" @@ -180,7 +182,7 @@ void ShowComponentsObjectInformation(PComponentsObject componentsObject) } -void ExtractInfoExample(std::string sFileName) { +void ExtractInfoExample(const std::string& sFileName, bool strictMode) { PWrapper wrapper = CWrapper::loadLibrary(); std::cout << "------------------------------------------------------------------" << std::endl; @@ -193,8 +195,9 @@ void ExtractInfoExample(std::string sFileName) { // Import Model from 3MF File { PReader reader = model->QueryReader("3mf"); - // And deactivate the strict mode (default is "false", anyway. This just demonstrates where/how to use it). - reader->SetStrictModeActive(false); + reader->SetStrictModeActive(strictMode); + if (strictMode) + std::cout << "Strict reader mode enabled" << std::endl; reader->ReadFromFile(sFileName); for (Lib3MF_uint32 iWarning = 0; iWarning < reader->GetWarningCount(); iWarning++) { @@ -251,15 +254,48 @@ void ExtractInfoExample(std::string sFileName) { int main(int argc, char** argv) { - // Parse Arguments - if (argc != 2) { - std::cout << "Usage: " << std::endl; - std::cout << "ExtractInfo.exe model.3mf" << std::endl; - return 0; - } - - try { - ExtractInfoExample(argv[1]); + bool strictMode = false; + if(const char* envStrict = std::getenv("LIB3MF_STRICT_READER")) + { + std::string value(envStrict); + value.erase( + std::remove_if(value.begin(), value.end(), + [](unsigned char c) { return std::isspace(c); }), + value.end()); + std::transform(value.begin(), value.end(), value.begin(), + [](unsigned char c) + { return static_cast(std::tolower(c)); }); + if(!value.empty() && value != "0" && value != "false" && value != "off") + strictMode = true; + } + + int fileArgIndex = -1; + for(int i = 1; i < argc; ++i) + { + std::string arg = argv[i]; + if(arg == "--strict") + { + strictMode = true; + continue; + } + if(!arg.empty() && arg[0] == '-') + { + std::cout << "Unknown option: " << arg << std::endl; + return 1; + } + fileArgIndex = i; + break; + } + + if(fileArgIndex < 0 || fileArgIndex != argc - 1) + { + std::cout << "Usage: " << std::endl; + std::cout << "ExtractInfo.exe [--strict] model.3mf" << std::endl; + return 0; + } + + try { + ExtractInfoExample(argv[fileArgIndex], strictMode); } catch (ELib3MFException &e) { std::cout << e.what() << std::endl; diff --git a/SDK/CPackExamples/CppDynamic/GenerateVS2022.bat b/SDK/CPackExamples/CppDynamic/GenerateVS2022.bat new file mode 100644 index 000000000..dbc8e54c1 --- /dev/null +++ b/SDK/CPackExamples/CppDynamic/GenerateVS2022.bat @@ -0,0 +1,10 @@ +@echo off +set startingDir=%CD% + +set basepath=%~dp0 +set builddir=%basepath%\build +if not exist %builddir% (mkdir %builddir%) +cd %builddir% +cmake -G "Visual Studio 17 2022" .. %* + +cd %startingDir% diff --git a/SDK/CPackExamples/CppDynamic/Source/ExtractInfo.cpp b/SDK/CPackExamples/CppDynamic/Source/ExtractInfo.cpp index 0a96b29f4..7959ea1f9 100644 --- a/SDK/CPackExamples/CppDynamic/Source/ExtractInfo.cpp +++ b/SDK/CPackExamples/CppDynamic/Source/ExtractInfo.cpp @@ -32,9 +32,15 @@ ExtractInfo.cpp : 3MF Read Example #include #include #include +#include +#include #include "lib3mf_dynamic.hpp" +#ifndef LIB3MF_LIBRARY_LOCATION +#error "LIB3MF_LIBRARY_LOCATION is expected from lib3mf CppDynamic package config" +#endif + using namespace Lib3MF; @@ -180,12 +186,11 @@ void ShowComponentsObjectInformation(PComponentsObject componentsObject) } -void ExtractInfoExample(std::string sFileName) { +void ExtractInfoExample(const std::string& sFileName, bool strictMode) { std::cout << "------------------------------------------------------------------" << std::endl; std::cout << "3MF Read example" << std::endl; - - std::string libpath = ("."); // TODO: put the location of the Lib3MF-library file here. - auto wrapper = Lib3MF::CWrapper::loadLibrary(LIB3MF_LIBRARY_LOCATION); // TODO: add correct suffix of the library + + auto wrapper = Lib3MF::CWrapper::loadLibrary(LIB3MF_LIBRARY_LOCATION); printVersion(wrapper); std::cout << "------------------------------------------------------------------" << std::endl; @@ -195,8 +200,9 @@ void ExtractInfoExample(std::string sFileName) { // Import Model from 3MF File { PReader reader = model->QueryReader("3mf"); - // And deactivate the strict mode (default is "false", anyway. This just demonstrates where/how to use it). - reader->SetStrictModeActive(false); + reader->SetStrictModeActive(strictMode); + if (strictMode) + std::cout << "Strict reader mode enabled" << std::endl; reader->ReadFromFile(sFileName); for (Lib3MF_uint32 iWarning = 0; iWarning < reader->GetWarningCount(); iWarning++) { @@ -253,15 +259,38 @@ void ExtractInfoExample(std::string sFileName) { int main(int argc, char** argv) { - // Parse Arguments - if (argc != 2) { + bool strictMode = false; + if (const char* envStrict = std::getenv("LIB3MF_STRICT_READER")) { + std::string value(envStrict); + value.erase(std::remove_if(value.begin(), value.end(), [](unsigned char c) { return std::isspace(c); }), value.end()); + std::transform(value.begin(), value.end(), value.begin(), [](unsigned char c) { return static_cast(std::tolower(c)); }); + if (!value.empty() && value != "0" && value != "false" && value != "off") + strictMode = true; + } + + int fileArgIndex = -1; + for (int i = 1; i < argc; ++i) { + std::string arg = argv[i]; + if (arg == "--strict") { + strictMode = true; + continue; + } + if (!arg.empty() && arg[0] == '-') { + std::cout << "Unknown option: " << arg << std::endl; + return 1; + } + fileArgIndex = i; + break; + } + + if (fileArgIndex < 0 || fileArgIndex != argc - 1) { std::cout << "Usage: " << std::endl; - std::cout << "ExtractInfo.exe model.3mf" << std::endl; + std::cout << "ExtractInfo.exe [--strict] model.3mf" << std::endl; return 0; } - + try { - ExtractInfoExample(argv[1]); + ExtractInfoExample(argv[fileArgIndex], strictMode); } catch (ELib3MFException &e) { std::cout << e.what() << std::endl; diff --git a/SDK/Examples/CDynamic/CMakeLists.txt b/SDK/Examples/CDynamic/CMakeLists.txt index 042ce7d63..9eff0bd47 100644 --- a/SDK/Examples/CDynamic/CMakeLists.txt +++ b/SDK/Examples/CDynamic/CMakeLists.txt @@ -53,7 +53,7 @@ endif() set(CMAKE_CURRENT_BINDING_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../Bindings/CDynamic) SET_SOURCE_FILES_PROPERTIES("${CMAKE_CURRENT_BINDING_DIR}/lib3mf_dynamic.cc" PROPERTIES LANGUAGE C) add_executable(Lib3MFExample_CDynamic - "${CMAKE_CURRENT_SOURCE_DIR}/source/Lib3MF_example.c" + "${CMAKE_CURRENT_SOURCE_DIR}/Source/Lib3MF_example.c" "${CMAKE_CURRENT_BINDING_DIR}/lib3mf_dynamic.cc" ) diff --git a/SDK/Examples/CDynamic/Source/Lib3MF_example.c b/SDK/Examples/CDynamic/Source/Lib3MF_example.c index 0df185779..60cf42cfa 100644 --- a/SDK/Examples/CDynamic/Source/Lib3MF_example.c +++ b/SDK/Examples/CDynamic/Source/Lib3MF_example.c @@ -37,6 +37,19 @@ Interface version: 2.2.0 #include #include "lib3mf_dynamic.h" +#ifndef _WIN32 +#define printf_s printf +#endif + +#ifndef LSUFFIXOUT +#ifdef _WIN32 +#define LSUFFIXOUT ".dll" +#elif defined(__APPLE__) +#define LSUFFIXOUT ".2.dylib" +#else +#define LSUFFIXOUT ".so.2" +#endif +#endif void releaseWrapper(sLib3MFDynamicWrapperTable* pWrapperTable) { Lib3MFResult eResult = ReleaseLib3MFWrapperTable(pWrapperTable); @@ -47,8 +60,11 @@ void releaseWrapper(sLib3MFDynamicWrapperTable* pWrapperTable) { int main() { - // TODO: put the path and ending of the Lib3MF library file here: - const char* libpath = "lib3mf.dll"; +#ifdef _WIN32 + const char* libpath = "lib3mf" LSUFFIXOUT; +#else + const char* libpath = "./lib3mf" LSUFFIXOUT; +#endif sLib3MFDynamicWrapperTable sWrapperTable; Lib3MFResult eResult = LIB3MF_SUCCESS; @@ -100,7 +116,7 @@ int main() return eResult; } if (bHasInfo && (nBufferRequired > 0)) { - theString = malloc(sizeof(Lib3MF_uint8)*(nBufferRequired)); + theString = malloc(sizeof(Lib3MF_uint8) * (nBufferRequired + 1)); theString[nBufferRequired] = 0; eResult = sWrapperTable.m_GetBuildInformation(&bHasInfo, nBufferRequired, &nBufferRequired, theString); if (LIB3MF_SUCCESS != eResult) { @@ -124,4 +140,3 @@ int main() return 0; } - diff --git a/SDK/Examples/Cpp/CMakeLists.txt b/SDK/Examples/Cpp/CMakeLists.txt index b2d79be75..e8311bd17 100644 --- a/SDK/Examples/Cpp/CMakeLists.txt +++ b/SDK/Examples/Cpp/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.5) set(CMAKE_CXX_STANDARD 17) diff --git a/SDK/Examples/Cpp/GenerateVS2022.bat b/SDK/Examples/Cpp/GenerateVS2022.bat new file mode 100644 index 000000000..dbc8e54c1 --- /dev/null +++ b/SDK/Examples/Cpp/GenerateVS2022.bat @@ -0,0 +1,10 @@ +@echo off +set startingDir=%CD% + +set basepath=%~dp0 +set builddir=%basepath%\build +if not exist %builddir% (mkdir %builddir%) +cd %builddir% +cmake -G "Visual Studio 17 2022" .. %* + +cd %startingDir% diff --git a/SDK/Examples/Cpp/Source/ExtractInfo.cpp b/SDK/Examples/Cpp/Source/ExtractInfo.cpp index 661cd30f2..f9fe017a7 100644 --- a/SDK/Examples/Cpp/Source/ExtractInfo.cpp +++ b/SDK/Examples/Cpp/Source/ExtractInfo.cpp @@ -32,6 +32,8 @@ ExtractInfo.cpp : 3MF Read Example #include #include #include +#include +#include #include "lib3mf_implicit.hpp" @@ -180,7 +182,7 @@ void ShowComponentsObjectInformation(PComponentsObject componentsObject) } -void ExtractInfoExample(std::string sFileName) { +void ExtractInfoExample(const std::string& sFileName, bool strictMode) { PWrapper wrapper = CWrapper::loadLibrary(); std::cout << "------------------------------------------------------------------" << std::endl; @@ -193,8 +195,9 @@ void ExtractInfoExample(std::string sFileName) { // Import Model from 3MF File { PReader reader = model->QueryReader("3mf"); - // And deactivate the strict mode (default is "false", anyway. This just demonstrates where/how to use it). - reader->SetStrictModeActive(false); + reader->SetStrictModeActive(strictMode); + if (strictMode) + std::cout << "Strict reader mode enabled" << std::endl; reader->ReadFromFile(sFileName); for (Lib3MF_uint32 iWarning = 0; iWarning < reader->GetWarningCount(); iWarning++) { @@ -251,15 +254,38 @@ void ExtractInfoExample(std::string sFileName) { int main(int argc, char** argv) { - // Parse Arguments - if (argc != 2) { + bool strictMode = false; + if (const char* envStrict = std::getenv("LIB3MF_STRICT_READER")) { + std::string value(envStrict); + value.erase(std::remove_if(value.begin(), value.end(), [](unsigned char c) { return std::isspace(c); }), value.end()); + std::transform(value.begin(), value.end(), value.begin(), [](unsigned char c) { return static_cast(std::tolower(c)); }); + if (!value.empty() && value != "0" && value != "false" && value != "off") + strictMode = true; + } + + int fileArgIndex = -1; + for (int i = 1; i < argc; ++i) { + std::string arg = argv[i]; + if (arg == "--strict") { + strictMode = true; + continue; + } + if (!arg.empty() && arg[0] == '-') { + std::cout << "Unknown option: " << arg << std::endl; + return 1; + } + fileArgIndex = i; + break; + } + + if (fileArgIndex < 0 || fileArgIndex != argc - 1) { std::cout << "Usage: " << std::endl; - std::cout << "ExtractInfo.exe model.3mf" << std::endl; + std::cout << "ExtractInfo.exe [--strict] model.3mf" << std::endl; return 0; } - + try { - ExtractInfoExample(argv[1]); + ExtractInfoExample(argv[fileArgIndex], strictMode); } catch (ELib3MFException &e) { std::cout << e.what() << std::endl; diff --git a/SDK/Examples/CppDynamic/GenerateVS2022.bat b/SDK/Examples/CppDynamic/GenerateVS2022.bat new file mode 100644 index 000000000..1706555ea --- /dev/null +++ b/SDK/Examples/CppDynamic/GenerateVS2022.bat @@ -0,0 +1,10 @@ +@echo off +set startingDir=%CD% + +set basepath=%~dp0 +set builddir=%basepath%\build +if not exist %builddir% (mkdir %builddir%) +cd %builddir% +cmake -G "Visual Studio 17 2022" .. %* + +cd %startingDir% \ No newline at end of file diff --git a/SDK/Examples/CppDynamic/Source/ExtractInfo.cpp b/SDK/Examples/CppDynamic/Source/ExtractInfo.cpp index d869d311a..c730769f2 100644 --- a/SDK/Examples/CppDynamic/Source/ExtractInfo.cpp +++ b/SDK/Examples/CppDynamic/Source/ExtractInfo.cpp @@ -32,6 +32,8 @@ ExtractInfo.cpp : 3MF Read Example #include #include #include +#include +#include #include "lib3mf_dynamic.hpp" @@ -180,7 +182,7 @@ void ShowComponentsObjectInformation(PComponentsObject componentsObject) } -void ExtractInfoExample(std::string sFileName) { +void ExtractInfoExample(const std::string& sFileName, bool strictMode) { std::cout << "------------------------------------------------------------------" << std::endl; std::cout << "3MF Read example" << std::endl; @@ -195,8 +197,9 @@ void ExtractInfoExample(std::string sFileName) { // Import Model from 3MF File { PReader reader = model->QueryReader("3mf"); - // And deactivate the strict mode (default is "false", anyway. This just demonstrates where/how to use it). - reader->SetStrictModeActive(false); + reader->SetStrictModeActive(strictMode); + if (strictMode) + std::cout << "Strict reader mode enabled" << std::endl; reader->ReadFromFile(sFileName); for (Lib3MF_uint32 iWarning = 0; iWarning < reader->GetWarningCount(); iWarning++) { @@ -253,15 +256,38 @@ void ExtractInfoExample(std::string sFileName) { int main(int argc, char** argv) { - // Parse Arguments - if (argc != 2) { + bool strictMode = false; + if (const char* envStrict = std::getenv("LIB3MF_STRICT_READER")) { + std::string value(envStrict); + value.erase(std::remove_if(value.begin(), value.end(), [](unsigned char c) { return std::isspace(c); }), value.end()); + std::transform(value.begin(), value.end(), value.begin(), [](unsigned char c) { return static_cast(std::tolower(c)); }); + if (!value.empty() && value != "0" && value != "false" && value != "off") + strictMode = true; + } + + int fileArgIndex = -1; + for (int i = 1; i < argc; ++i) { + std::string arg = argv[i]; + if (arg == "--strict") { + strictMode = true; + continue; + } + if (!arg.empty() && arg[0] == '-') { + std::cout << "Unknown option: " << arg << std::endl; + return 1; + } + fileArgIndex = i; + break; + } + + if (fileArgIndex < 0 || fileArgIndex != argc - 1) { std::cout << "Usage: " << std::endl; - std::cout << "ExtractInfo.exe model.3mf" << std::endl; + std::cout << "ExtractInfo.exe [--strict] model.3mf" << std::endl; return 0; } - + try { - ExtractInfoExample(argv[1]); + ExtractInfoExample(argv[fileArgIndex], strictMode); } catch (ELib3MFException &e) { std::cout << e.what() << std::endl; diff --git a/SDK/GenerateSDK.py b/SDK/GenerateSDK.py new file mode 100644 index 000000000..873be812a --- /dev/null +++ b/SDK/GenerateSDK.py @@ -0,0 +1,183 @@ +#!/usr/bin/env python3 +import os +import sys +import shutil +import subprocess +from pathlib import Path +from zipfile import ZipFile, ZIP_DEFLATED + +import urllib.request + + +def failed(msg: str, code: int = 1) -> None: + print(msg, file=sys.stderr) + raise SystemExit(code) + + +def run_git(args: list[str]) -> str: + try: + out = subprocess.check_output(["git", *args], stderr=subprocess.STDOUT) + return out.decode("utf-8", errors="replace").strip() + except subprocess.CalledProcessError as e: + failed(f"git failed: {' '.join(args)}\n{e.output.decode('utf-8', errors='replace')}") + + +def ensure_dir(p: Path, err_msg: str) -> None: + try: + p.mkdir(parents=True, exist_ok=True) + except Exception as e: + failed(f"{err_msg}: {e}") + + +def copy_tree(src: Path, dst: Path) -> None: + if not src.exists(): + failed(f"Missing path: {src}") + if src.is_dir(): + # Python 3.8+: dirs_exist_ok + shutil.copytree(src, dst, dirs_exist_ok=True) + else: + ensure_dir(dst.parent, f"Error creating folder {dst.parent}") + shutil.copy2(src, dst) + + +def download_file(url: str, out_path: Path, timeout_sec: int = 90) -> None: + ensure_dir(out_path.parent, f"Error creating folder {out_path.parent}") + req = urllib.request.Request(url, headers={"User-Agent": "lib3mf-sdk-packager/1.0"}) + try: + with urllib.request.urlopen(req, timeout=timeout_sec) as r, open(out_path, "wb") as f: + shutil.copyfileobj(r, f) + except Exception as e: + failed(f"Error downloading {url} -> {out_path}: {e}") + + +def obtain_library_cmd(location: str, platform: str, ext: str, subdir: str, artifacts_dir: Path) -> None: + out_path = artifacts_dir / subdir / f"lib3mf.{ext}" + if location == "remote": + buildserver = os.environ.get("BUILDSERVER", "") + if not buildserver: + failed("BUILDSERVER env var is not set (required for LOCATION=remote).") + + url = f"{buildserver}/artifact/artifacts/lib3mf_{platform}.{ext}" + print(f"curl -s --retry 5 -m90 {url} -o {out_path}") + # emulate: --retry 5, -m 90 + last_err = None + for _ in range(5): + try: + download_file(url, out_path, timeout_sec=90) + last_err = None + break + except SystemExit as e: + last_err = e + if last_err is not None: + raise last_err + + fs = out_path.stat().st_size if out_path.exists() else 0 + if fs < 1000: + failed(f"Error obtaining latest lib3mf.{ext}. File size too small.") + else: + src = Path(location) / f"lib3mf_{platform}.{ext}" + if not src.exists(): + failed(f"Error obtaining latest lib3mf.{ext}: missing {src}") + ensure_dir(out_path.parent, f"Error creating {subdir}-folder") + try: + shutil.copy2(src, out_path) + except Exception as e: + failed(f"Error obtaining latest lib3mf.{ext}: {e}") + + +def write_version_txt(artifacts_dir: Path) -> None: + version_txt = artifacts_dir / "version.txt" + print(f"VERSIONTXT = {version_txt}") + + build_number = os.environ.get("BUILD_NUMBER", "") + git_branch_env = os.environ.get("GIT_BRANCH", "") + + # bash logic: if [ -n "${GIT_BRANCH#*/}" ] then use it else use git branch + # Equivalent: if splitting by "/" yields something non-empty after the first "/" + git_branch_trimmed = "" + if "/" in git_branch_env: + git_branch_trimmed = git_branch_env.split("/", 1)[1] + else: + git_branch_trimmed = "" + + if git_branch_trimmed: + git_branch = git_branch_trimmed + else: + git_branch = run_git(["rev-parse", "--abbrev-ref", "HEAD"]) + + git_rev = run_git(["rev-parse", "HEAD"]) + + try: + with open(version_txt, "w", encoding="utf-8") as f: + f.write("[Lib3MF_SDK]\n") + f.write(f"BuildNumber = {build_number}\n") + f.write(f"GITBranch = {git_branch}\n") + f.write(f"GITRevision = {git_rev}\n") + except Exception as e: + failed(f"Error writing {version_txt}: {e}") + + +def zip_dir_contents(src_dir: Path, zip_path: Path) -> None: + # Matches: zip -r OUTFILE SDKARTIFACTS/* + try: + if zip_path.exists(): + zip_path.unlink() + with ZipFile(zip_path, "w", compression=ZIP_DEFLATED) as z: + for p in sorted(src_dir.rglob("*")): + if p.is_file(): + z.write(p, p.relative_to(src_dir)) + except Exception as e: + failed(f"Error zipping SDK: {e}") + + +def main(argv: list[str]) -> int: + sdk_artifacts = Path("lib3mf_sdk") + location = argv[1] if len(argv) > 1 and argv[1] else "remote" + outfile = Path(argv[2]) if len(argv) > 2 and argv[2] else Path("lib3mf_sdk.zip") + + print(f"Clean artifacts-folder {sdk_artifacts}") + if sdk_artifacts.exists(): + shutil.rmtree(sdk_artifacts) + ensure_dir(sdk_artifacts, "Error creating artifacts-folder") + + print("Copy License, Readme, Examples and Bindings") + + # cat ../LICENSE > License.txt & cat Credits.txt >> License.txt + license_src = Path("../LICENSE") + credits_src = Path("Credits.txt") + license_dst = sdk_artifacts / "License.txt" + + if not license_src.exists(): + failed(f"Missing {license_src}") + if not credits_src.exists(): + failed(f"Missing {credits_src}") + + try: + license_dst.write_bytes(license_src.read_bytes() + credits_src.read_bytes()) + except Exception as e: + failed(f"Error creating {license_dst}: {e}") + + copy_tree(Path("Readme.md"), sdk_artifacts / "Readme.md") + copy_tree(Path("Examples"), sdk_artifacts / "Examples") + copy_tree(Path("../Autogenerated/Bindings"), sdk_artifacts / "Bindings") + + print("Obtain binaries") + ensure_dir(sdk_artifacts / "Bin", "Error creating Bin-folder") + ensure_dir(sdk_artifacts / "Lib", "Error creating Lib-folder") + + obtain_library_cmd(location, "linux64", "so", "Bin", sdk_artifacts) + obtain_library_cmd(location, "win64", "dll", "Bin", sdk_artifacts) + obtain_library_cmd(location, "darwin", "dylib", "Bin", sdk_artifacts) + obtain_library_cmd(location, "win64", "lib", "Lib", sdk_artifacts) + + print("Generate version.txt") + write_version_txt(sdk_artifacts) + + print("Zip SDK artifacts") + zip_dir_contents(sdk_artifacts, outfile) + + return 0 + + +if __name__ == "__main__": + raise SystemExit(main(sys.argv)) \ No newline at end of file diff --git a/SDK/GenerateSDK.sh b/SDK/GenerateSDK.sh deleted file mode 100644 index 1d3772477..000000000 --- a/SDK/GenerateSDK.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/bash -export SDKARTIFACTS=lib3mf_sdk - -if [ -n "$1" ]; then - export LOCATION="$1" -else - export LOCATION="remote" -fi - -if [ -n "$2" ]; then - export OUTFILE=$2 -else - export OUTFILE="lib3mf_sdk.zip" -fi - -function failed { - echo "$1" 1>&2 - exit 1; -} - -echo Clean artifacts-folder $SDKARTIFACTS -rm -rf $SDKARTIFACTS -mkdir $SDKARTIFACTS - -echo Copy License, Readme, Examples and Bindings -cat ../LICENSE > $SDKARTIFACTS/License.txt & cat Credits.txt >> $SDKARTIFACTS/License.txt -cp -r Readme.md $SDKARTIFACTS -cp -r Examples $SDKARTIFACTS/Examples -cp -r ../Autogenerated/Bindings $SDKARTIFACTS - -# download from readthedocs or build locally using sphinx -# cp ../Lib3MF-1.pdf $SDKARTIFACTS/Doc/. - -echo Obtain binaries -mkdir -p $SDKARTIFACTS/Bin || failed "Error creating Bin-folder" -mkdir -p $SDKARTIFACTS/Lib || failed "Error creating Lib-folder" - -function obtainlibrarycmd { - if [ "$LOCATION" == "remote" ]; then - echo curl -s --retry 5 -m90 ${BUILDSERVER}/artifact/artifacts/lib3mf_$1.$2 -o $SDKARTIFACTS/$3/lib3mf.$2 || failed "Error obtaining latest lib3mf.$2" - curl -s --retry 5 -m90 ${BUILDSERVER}/artifact/artifacts/lib3mf_$1.$2 -o $SDKARTIFACTS/$3/lib3mf.$2 || failed "Error obtaining latest lib3mf.$2" - FS=`stat --printf="%s" $SDKARTIFACTS/$3/lib3mf.$2` - if [ "$FS" -lt "1000" ]; then - failed "Error obtaining latest lib3mf.$2. File size too small." - fi - else - cp $LOCATION/lib3mf_$1.$2 $SDKARTIFACTS/$3/lib3mf.$2 || failed "Error obtaining latest lib3mf.$2" - fi -} - -obtainlibrarycmd "linux64" "so" "Bin" -obtainlibrarycmd "win64" "dll" "Bin" -obtainlibrarycmd "darwin" "dylib" "Bin" -obtainlibrarycmd "win64" "lib" "Lib" - -echo Generate version.txt -VERSIONTXT="$SDKARTIFACTS/version.txt" -echo VERSIONTXT = $VERSIONTXT -echo "[Lib3MF_SDK]" > $VERSIONTXT -echo "BuildNumber = "$BUILD_NUMBER >> $VERSIONTXT -if [ -n "${GIT_BRANCH#*/}" ]; then - echo "GITBranch = ${GIT_BRANCH#*/}" >> $VERSIONTXT -else - echo "GITBranch = "`git rev-parse --abbrev-ref HEAD` >> $VERSIONTXT -fi -echo "GITRevision = "`git rev-parse HEAD` >> $VERSIONTXT - -echo Zip SDK artifacts -zip -r $OUTFILE $SDKARTIFACTS/* || failed "Error zipping SDK" diff --git a/SDK/GenerateSDK_github.py b/SDK/GenerateSDK_github.py new file mode 100644 index 000000000..aa4bfef22 --- /dev/null +++ b/SDK/GenerateSDK_github.py @@ -0,0 +1,158 @@ +#!/usr/bin/env python3 +import sys +import shutil +import subprocess +from pathlib import Path +from zipfile import ZipFile, ZIP_DEFLATED + + +def failed(msg: str, code: int = 1) -> None: + print(msg, file=sys.stderr) + raise SystemExit(code) + + +def ensure_dir(p: Path, err_msg: str) -> None: + try: + p.mkdir(parents=True, exist_ok=True) + except Exception as e: + failed(f"{err_msg}: {e}") + + +def run_git(args: list[str]) -> str: + try: + out = subprocess.check_output(["git", *args], stderr=subprocess.STDOUT) + return out.decode("utf-8", errors="replace").strip() + except subprocess.CalledProcessError as e: + failed(f"git failed: {' '.join(args)}\n{e.output.decode('utf-8', errors='replace')}") + + +def copy_file(src: Path, dst: Path, err_msg: str) -> None: + if not src.exists(): + failed(f"{err_msg}: missing {src}") + ensure_dir(dst.parent, f"Error creating folder {dst.parent}") + try: + shutil.copy2(src, dst) + except Exception as e: + failed(f"{err_msg}: {e}") + + +def copy_tree(src: Path, dst: Path) -> None: + if not src.exists(): + failed(f"Missing path: {src}") + if src.is_dir(): + shutil.copytree(src, dst, dirs_exist_ok=True) + else: + ensure_dir(dst.parent, f"Error creating folder {dst.parent}") + shutil.copy2(src, dst) + + +def find_macos_dylib(location: Path) -> Path: + candidate = location / "lib3mf.dylib" + if candidate.exists(): + if candidate.is_file(): + return candidate + if candidate.is_dir(): + libs = sorted(candidate.glob("lib3mf*.dylib")) + for lib in libs: + if lib.is_file(): + return lib + for lib in sorted(location.glob("lib3mf*.dylib")): + if lib.is_file(): + return lib + for lib in sorted(location.rglob("lib3mf*.dylib")): + if lib.is_file(): + return lib + failed("Unable to find a macOS lib3mf*.dylib binary in the build artifacts.") + + +def zip_dir_contents(src_dir: Path, zip_path: Path) -> None: + # Matches: cd $SDKARTIFACT && zip -r ../$OUTFILE ./* + try: + zip_path.parent.mkdir(parents=True, exist_ok=True) + if zip_path.exists(): + zip_path.unlink() + + with ZipFile(zip_path, "w", compression=ZIP_DEFLATED) as z: + for p in sorted(src_dir.rglob("*")): + if p.is_file(): + z.write(p, p.relative_to(src_dir)) + except Exception as e: + failed(f"Error zipping SDK: {e}") + + +def main() -> int: + sdk_artifact = Path("build/lib3mf_sdk") + sdk_source = Path("SDK") + location = Path("build") + outfile = Path("lib3mf_sdk.zip") + + print(f"Clean artifacts-folder {sdk_artifact}") + if sdk_artifact.exists(): + shutil.rmtree(sdk_artifact) + ensure_dir(sdk_artifact, "Error creating artifacts-folder") + + print("Copy License, Readme, Examples and Bindings") + license_src = Path("LICENSE") + credits_src = sdk_source / "Credits.txt" + license_dst = sdk_artifact / "License.txt" + + if not license_src.exists(): + failed(f"Missing {license_src}") + if not credits_src.exists(): + failed(f"Missing {credits_src}") + + try: + license_dst.write_bytes(license_src.read_bytes() + credits_src.read_bytes()) + except Exception as e: + failed(f"Error creating {license_dst}: {e}") + + copy_tree(sdk_source / "Readme.md", sdk_artifact / "Readme.md") + copy_tree(sdk_source / "Examples", sdk_artifact / "Examples") + copy_tree(Path("Autogenerated/Bindings"), sdk_artifact / "Bindings") + + ensure_dir(sdk_artifact / "Bin", "Error creating Bin-folder") + ensure_dir(sdk_artifact / "Lib", "Error creating Lib-folder") + + print("Copy binaries") + copy_file(location / "lib3mf.dll" / "lib3mf.dll", + sdk_artifact / "Bin" / "lib3mf.dll", + "Error copying binary") + + copy_file(location / "lib3mf.so" / "lib3mf.so.2", + sdk_artifact / "Bin" / "lib3mf.so", + "Error copying binary") + + mac_lib = find_macos_dylib(location) + copy_file(mac_lib, sdk_artifact / "Bin" / "lib3mf.dylib", "Error copying binary") + + copy_file(location / "lib3mf.lib" / "lib3mf.lib", + sdk_artifact / "Lib" / "lib3mf.lib", + "Error copying binary") + + print("Generate version.txt") + version_txt = sdk_artifact / "version.txt" + print(f"VERSIONTXT = {version_txt}") + + git_head = run_git(["rev-parse", "HEAD"]) + git_branch = run_git(["rev-parse", "--abbrev-ref", "HEAD"]) + + try: + with open(version_txt, "w", encoding="utf-8") as f: + f.write("[lib3mf_sdk]\n") + # keeping bash semantics exactly (it wrote HEAD hash as BuildNumber) + f.write(f"BuildNumber = {git_head}\n") + f.write(f"GITBranch = {git_branch}\n") + f.write(f"GITRevision = {git_head}\n") + except Exception as e: + failed(f"Error writing {version_txt}: {e}") + + print("Zip SDK artifacts") + # bash zips to build/lib3mf_sdk.zip (because it cd's into SDKARTIFACT) + zip_path = sdk_artifact.parent / outfile + zip_dir_contents(sdk_artifact, zip_path) + + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/SDK/GenerateSDK_github.sh b/SDK/GenerateSDK_github.sh deleted file mode 100644 index 2cfa65275..000000000 --- a/SDK/GenerateSDK_github.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -export SDKARTIFACT=build/lib3mf_sdk -export SDKSOURCE=SDK - -export LOCATION="build" - -export OUTFILE="lib3mf_sdk.zip" - -function failed { - echo "$1" 1>&2 - exit 1; -} - -echo Clean artifacts-folder $SDKARTIFACT -rm -rf $SDKARTIFACT -mkdir $SDKARTIFACT - -echo Copy License, Readme, Examples and Bindings -cat LICENSE > $SDKARTIFACT/License.txt & cat $SDKSOURCE/Credits.txt >> $SDKARTIFACT/License.txt -cp $SDKSOURCE/Readme.md $SDKARTIFACT -cp -r $SDKSOURCE/Examples $SDKARTIFACT/Examples -cp -r Autogenerated/Bindings $SDKARTIFACT - -# download from readthedocs or build locally using sphinx -# cp ../Lib3MF-1.pdf $SDKARTIFACT/Doc/. - -mkdir -p $SDKARTIFACT/Bin || failed "Error creating Bin-folder" -mkdir -p $SDKARTIFACT/Lib || failed "Error creating Lib-folder" - - -echo Copy binaries -cp $LOCATION/lib3mf.dll/lib3mf.dll $SDKARTIFACT/Bin/ || failed "Error copying binary" -cp $LOCATION/lib3mf.so/lib3mf.so.2 $SDKARTIFACT/Bin/lib3mf.so || failed "Error copying binary" -cp $LOCATION/lib3mf.dylib/lib3mf.2.4.1.0.dylib $SDKARTIFACT/Bin/lib3mf.dylib || failed "Error copying binary" -cp $LOCATION/lib3mf.lib/lib3mf.lib $SDKARTIFACT/Lib/ || failed "Error copying binary" - -echo Generate version.txt -VERSIONTXT="$SDKARTIFACT/version.txt" -echo VERSIONTXT = $VERSIONTXT -echo "[lib3mf_sdk]" > $VERSIONTXT -echo "BuildNumber = "`git rev-parse HEAD` >> $VERSIONTXT -echo "GITBranch = "`git rev-parse --abbrev-ref HEAD` >> $VERSIONTXT -echo "GITRevision = "`git rev-parse HEAD` >> $VERSIONTXT - -echo Zip SDK artifacts -cd $SDKARTIFACT -zip -r ../$OUTFILE ./* || failed "Error zipping SDK" \ No newline at end of file diff --git a/Source/API/lib3mf.cpp b/Source/API/lib3mf.cpp index 64be066b1..aa436d78f 100644 --- a/Source/API/lib3mf.cpp +++ b/Source/API/lib3mf.cpp @@ -102,6 +102,24 @@ void CWrapper::GetSpecificationVersion (const std::string & sSpecificationURL, b nMicro = NMR_SPECVERSION_SECURECONTENT_MICRO; bIsSupported = true; } + else if (!sSpecificationURL.compare(std::string(XML_3MF_NAMESPACE_TRIANGLESETS))) { + nMajor = NMR_SPECVERSION_TRIANGLESETS_MAJOR; + nMinor = NMR_SPECVERSION_TRIANGLESETS_MINOR; + nMicro = NMR_SPECVERSION_TRIANGLESETS_MICRO; + bIsSupported = true; + } + else if (!sSpecificationURL.compare(std::string(XML_3MF_NAMESPACE_VOLUMETRICSPEC))) { + nMajor = NMR_SPECVERSION_VOLUMETRIC_MAJOR; + nMinor = NMR_SPECVERSION_VOLUMETRIC_MINOR; + nMicro = NMR_SPECVERSION_VOLUMETRIC_MICRO; + bIsSupported = true; + } + else if (!sSpecificationURL.compare(std::string(XML_3MF_NAMESPACE_IMPLICITSPEC))) { + nMajor = NMR_SPECVERSION_IMPLICIT_MAJOR; + nMinor = NMR_SPECVERSION_IMPLICIT_MINOR; + nMicro = NMR_SPECVERSION_IMPLICIT_MICRO; + bIsSupported = true; + } else { bIsSupported = false; } diff --git a/Source/API/lib3mf_beamlatticenode.cpp b/Source/API/lib3mf_beamlatticenode.cpp new file mode 100644 index 000000000..70bc415b8 --- /dev/null +++ b/Source/API/lib3mf_beamlatticenode.cpp @@ -0,0 +1,74 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CBeamLatticeNode + +*/ + +#include "lib3mf_beamlatticenode.hpp" +#include "lib3mf_interfaceexception.hpp" +#include "lib3mf_implicitport.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CBeamLatticeNode +**************************************************************************************************************************/ + +CBeamLatticeNode::CBeamLatticeNode(NMR::PModelImplicitNode pImplicitNode) + : CImplicitNode{pImplicitNode} +{ + m_pImplicitNode = pImplicitNode; +} + +IImplicitPort * CBeamLatticeNode::GetInputBeamLattice() +{ + return FindInputOrThrow("beamlattice"); +} + +IImplicitPort * CBeamLatticeNode::GetInputPos() +{ + return FindInputOrThrow("pos"); +} + +IImplicitPort * CBeamLatticeNode::GetOutputDistance() +{ + return FindOutputOrThrow("distance"); +} + +void CBeamLatticeNode::SetAccurateRange(const Lib3MF_double dAccurateRange) +{ + m_pImplicitNode->setAccurateRange(dAccurateRange); +} + +Lib3MF_double CBeamLatticeNode::GetAccurateRange() +{ + return m_pImplicitNode->getAccurateRange(); +} + diff --git a/Source/API/lib3mf_functiongradientnode.cpp b/Source/API/lib3mf_functiongradientnode.cpp new file mode 100644 index 000000000..84424faac --- /dev/null +++ b/Source/API/lib3mf_functiongradientnode.cpp @@ -0,0 +1,99 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CFunctionGradientNode + +*/ + +#include "lib3mf_functiongradientnode.hpp" +#include "lib3mf_interfaceexception.hpp" +#include "lib3mf_implicitport.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CFunctionGradientNode +**************************************************************************************************************************/ + +CFunctionGradientNode::CFunctionGradientNode(NMR::PModelImplicitNode pImplicitNode) + : CImplicitNode{pImplicitNode} +{ + m_pImplicitNode = pImplicitNode; +} + +IImplicitPort * CFunctionGradientNode::GetInputFunctionID() +{ + return FindInputOrThrow("functionID"); +} + +IImplicitPort * CFunctionGradientNode::GetInputPos() +{ + return FindInputOrThrow("pos"); +} + +IImplicitPort * CFunctionGradientNode::GetInputStep() +{ + return FindInputOrThrow("step"); +} + +void CFunctionGradientNode::SetScalarOutputName(const std::string & sScalarOutputName) +{ + m_pImplicitNode->setScalarOutputName(sScalarOutputName); +} + +std::string CFunctionGradientNode::GetScalarOutputName() +{ + return m_pImplicitNode->getScalarOutputName(); +} + +void CFunctionGradientNode::SetVectorInputName(const std::string & sVectorInputName) +{ + m_pImplicitNode->setVectorInputName(sVectorInputName); +} + +std::string CFunctionGradientNode::GetVectorInputName() +{ + return m_pImplicitNode->getVectorInputName(); +} + +IImplicitPort * CFunctionGradientNode::GetOutputVector() +{ + return FindOutputOrThrow("vector"); +} + +IImplicitPort * CFunctionGradientNode::GetOutputGradient() +{ + return FindOutputOrThrow("gradient"); +} + +IImplicitPort * CFunctionGradientNode::GetOutputMagnitude() +{ + return FindOutputOrThrow("magnitude"); +} + diff --git a/Source/API/lib3mf_implicitfunction.cpp b/Source/API/lib3mf_implicitfunction.cpp index e371b82a1..dd86dcf29 100644 --- a/Source/API/lib3mf_implicitfunction.cpp +++ b/Source/API/lib3mf_implicitfunction.cpp @@ -81,6 +81,9 @@ Abstract: This is a stub class definition of CImplicitFunction #include "lib3mf_tannode.hpp" #include "lib3mf_transposenode.hpp" #include "lib3mf_unsignedmeshnode.hpp" +#include "lib3mf_beamlatticenode.hpp" +#include "lib3mf_functiongradientnode.hpp" +#include "lib3mf_normalizedistancenode.hpp" #include "lib3mf_vectorfromscalarnode.hpp" // Include custom headers here. @@ -661,6 +664,39 @@ IUnsignedMeshNode * CImplicitFunction::AddUnsignedMeshNode(const std::string & s return new CUnsignedMeshNode(newNode); } +IBeamLatticeNode* CImplicitFunction::AddBeamLatticeNode(const std::string& sIdentifier, + const std::string& sDisplayName, + const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::BeamLattice, + Lib3MF::eImplicitNodeConfiguration::Default, + sIdentifier, sDisplayName, sTag); + return new CBeamLatticeNode(newNode); +} + +IFunctionGradientNode* CImplicitFunction::AddFunctionGradientNode(const std::string& sIdentifier, + const std::string& sDisplayName, + const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::FunctionGradient, + Lib3MF::eImplicitNodeConfiguration::Default, + sIdentifier, sDisplayName, sTag); + return new CFunctionGradientNode(newNode); +} + +INormalizeDistanceNode* CImplicitFunction::AddNormalizeDistanceNode(const std::string& sIdentifier, + const std::string& sDisplayName, + const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::NormalizeDistance, + Lib3MF::eImplicitNodeConfiguration::Default, + sIdentifier, sDisplayName, sTag); + return new CNormalizeDistanceNode(newNode); +} + IFunctionCallNode* CImplicitFunction::AddFunctionCallNode( const std::string& sIdentifier, const std::string& sDisplayName, const std::string& sTag) diff --git a/Source/API/lib3mf_implicitnode.cpp b/Source/API/lib3mf_implicitnode.cpp index aa96490c5..59daa6570 100644 --- a/Source/API/lib3mf_implicitnode.cpp +++ b/Source/API/lib3mf_implicitnode.cpp @@ -83,7 +83,9 @@ IImplicitPort* Lib3MF::Impl::CImplicitNode::FindInputOrThrow( auto pPort = FindInput(sIdentifier); if (!pPort) { - throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM); + std::string errorMsg = "Input port '" + sIdentifier + "' not found on node '" + + m_pImplicitNode->getIdentifier() + "'"; + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM, errorMsg); } return pPort; } @@ -94,7 +96,9 @@ IImplicitPort* Lib3MF::Impl::CImplicitNode::FindOutputOrThrow( auto pPort = FindOutput(sIdentifier); if (!pPort) { - throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM); + std::string errorMsg = "Output port '" + sIdentifier + "' not found on node '" + + m_pImplicitNode->getIdentifier() + "'"; + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM, errorMsg); } return pPort; } diff --git a/Source/API/lib3mf_nodeiterator.cpp b/Source/API/lib3mf_nodeiterator.cpp index 52b994214..18f7ce57f 100644 --- a/Source/API/lib3mf_nodeiterator.cpp +++ b/Source/API/lib3mf_nodeiterator.cpp @@ -83,6 +83,9 @@ Abstract: This is a stub class definition of CNodeIterator #include "lib3mf_unsignedmeshnode.hpp" #include "lib3mf_vectorfromscalarnode.hpp" #include "lib3mf_modnode.hpp" +#include "lib3mf_beamlatticenode.hpp" +#include "lib3mf_functiongradientnode.hpp" +#include "lib3mf_normalizedistancenode.hpp" using namespace Lib3MF::Impl; @@ -98,7 +101,7 @@ IImplicitNode * CNodeIterator::GetCurrent() auto pNode = implicitNodeFromModelImplicitNode(pModelNode); if (!pNode) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM); - return pNode; + return pNode; } // enum class eImplicitNodeType : Lib3MF_int32 { @@ -263,6 +266,12 @@ IImplicitNode* Lib3MF::Impl::CNodeIterator::implicitNodeFromModelImplicitNode( return new CResourceIdNode(pNode); case eImplicitNodeType::Mod: return new CModNode(pNode); + case eImplicitNodeType::BeamLattice: + return new CBeamLatticeNode(pNode); + case eImplicitNodeType::FunctionGradient: + return new CFunctionGradientNode(pNode); + case eImplicitNodeType::NormalizeDistance: + return new CNormalizeDistanceNode(pNode); default: throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM); diff --git a/Source/API/lib3mf_normalizedistancenode.cpp b/Source/API/lib3mf_normalizedistancenode.cpp new file mode 100644 index 000000000..dd84f081a --- /dev/null +++ b/Source/API/lib3mf_normalizedistancenode.cpp @@ -0,0 +1,89 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CNormalizeDistanceNode + +*/ + +#include "lib3mf_normalizedistancenode.hpp" +#include "lib3mf_interfaceexception.hpp" +#include "lib3mf_implicitport.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CNormalizeDistanceNode +**************************************************************************************************************************/ + +CNormalizeDistanceNode::CNormalizeDistanceNode(NMR::PModelImplicitNode pImplicitNode) + : CImplicitNode{pImplicitNode} +{ + m_pImplicitNode = pImplicitNode; +} + +IImplicitPort * CNormalizeDistanceNode::GetInputFunctionID() +{ + return FindInputOrThrow("functionID"); +} + +IImplicitPort * CNormalizeDistanceNode::GetInputPos() +{ + return FindInputOrThrow("pos"); +} + +IImplicitPort * CNormalizeDistanceNode::GetInputStep() +{ + return FindInputOrThrow("step"); +} + +void CNormalizeDistanceNode::SetScalarOutputName(const std::string & sScalarOutputName) +{ + m_pImplicitNode->setScalarOutputName(sScalarOutputName); +} + +std::string CNormalizeDistanceNode::GetScalarOutputName() +{ + return m_pImplicitNode->getScalarOutputName(); +} + +void CNormalizeDistanceNode::SetVectorInputName(const std::string & sVectorInputName) +{ + m_pImplicitNode->setVectorInputName(sVectorInputName); +} + +std::string CNormalizeDistanceNode::GetVectorInputName() +{ + return m_pImplicitNode->getVectorInputName(); +} + +IImplicitPort * CNormalizeDistanceNode::GetOutputResult() +{ + return FindOutputOrThrow("result"); +} + diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 27973c844..ba48cbee5 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -12,7 +12,10 @@ if (USE_INCLUDED_ZLIB) file(GLOB ZLIB_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "Libraries/zlib/Source/*.c") endif() -file (GLOB CPPBASE64_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "Libraries/cpp-base64/Source/*.cpp") +set(CPPBASE64_FILES "") +if (USE_INCLUDED_CPPBASE64) + file (GLOB CPPBASE64_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "Libraries/cpp-base64/Source/*.cpp") +endif() # sources set(SRCS_PLATFORM diff --git a/Source/Common/NMR_Exception.cpp b/Source/Common/NMR_Exception.cpp index 706f8bb83..7d3761862 100644 --- a/Source/Common/NMR_Exception.cpp +++ b/Source/Common/NMR_Exception.cpp @@ -560,7 +560,7 @@ namespace NMR { } } - CNMRException::CNMRException(_In_ nfError errorcode) : m_errorcode(errorcode), std::exception() + CNMRException::CNMRException(_In_ nfError errorcode) : std::exception(), m_errorcode(errorcode) { m_message = errorCodeToMessage(errorcode); } diff --git a/Source/Model/Classes/NMR_ImplicitNodeTypes.cpp b/Source/Model/Classes/NMR_ImplicitNodeTypes.cpp index 6d2599f50..983620d15 100644 --- a/Source/Model/Classes/NMR_ImplicitNodeTypes.cpp +++ b/Source/Model/Classes/NMR_ImplicitNodeTypes.cpp @@ -363,6 +363,37 @@ namespace NMR {"mesh", eImplicitPortType::ResourceID}}, Out{{"distance", eImplicitPortType::Scalar}}}, }}}, + {eImplicitNodeType::BeamLattice, + {"beamlattice", + { + InputOutputRule{ + Lib3MF::eImplicitNodeConfiguration::Default, + In{{"pos", eImplicitPortType::Vector}, + {"beamlattice", eImplicitPortType::ResourceID}}, + Out{{"distance", eImplicitPortType::Scalar}}}, + }}}, + {eImplicitNodeType::FunctionGradient, + {"functiongradient", + { + InputOutputRule{ + Lib3MF::eImplicitNodeConfiguration::Default, + In{{"functionID", eImplicitPortType::ResourceID}, + {"pos", eImplicitPortType::Vector}, + {"step", eImplicitPortType::Scalar}}, + Out{{"vector", eImplicitPortType::Vector}, + {"gradient", eImplicitPortType::Vector}, + {"magnitude", eImplicitPortType::Scalar}}}, + }}}, + {eImplicitNodeType::NormalizeDistance, + {"normalizedistance", + { + InputOutputRule{ + Lib3MF::eImplicitNodeConfiguration::Default, + In{{"functionID", eImplicitPortType::ResourceID}, + {"pos", eImplicitPortType::Vector}, + {"step", eImplicitPortType::Scalar}}, + Out{{"result", eImplicitPortType::Scalar}}}, + }}}, {eImplicitNodeType::FunctionCall, {"functioncall", {InputOutputRule{ diff --git a/Source/Model/Classes/NMR_Model.cpp b/Source/Model/Classes/NMR_Model.cpp index 65b5d45f0..32e58c37f 100644 --- a/Source/Model/Classes/NMR_Model.cpp +++ b/Source/Model/Classes/NMR_Model.cpp @@ -403,8 +403,6 @@ namespace NMR { // Retrieve a unique Resource ID ModelResourceID CModel::generateResourceID() { - ModelResourceID highestID = 0; - if(m_ResourceMap.empty()) { return 1; diff --git a/Source/Model/Classes/NMR_ModelImplicitFunction.cpp b/Source/Model/Classes/NMR_ModelImplicitFunction.cpp index 448ccb208..dd5f96841 100644 --- a/Source/Model/Classes/NMR_ModelImplicitFunction.cpp +++ b/Source/Model/Classes/NMR_ModelImplicitFunction.cpp @@ -360,7 +360,6 @@ namespace NMR if (sourceNode) { auto const& sourceNodeIdentifier = sourceNode->getIdentifier(); - auto const& sourcePortIdentifier = sourcePort->getIdentifier(); graph::Identifier const sourceIndex = identifierToIndex[sourceNodeIdentifier]; graph::Identifier const targetIndex = identifierToIndex[node->getIdentifier()]; if (sourceIndex >= graph.getSize()) diff --git a/Source/Model/Classes/NMR_ModelImplicitNode.cpp b/Source/Model/Classes/NMR_ModelImplicitNode.cpp index 1735a79e0..626f4b7d4 100644 --- a/Source/Model/Classes/NMR_ModelImplicitNode.cpp +++ b/Source/Model/Classes/NMR_ModelImplicitNode.cpp @@ -155,13 +155,15 @@ namespace NMR void NMR::CModelImplicitNode::setConstant(double value) { if (m_type != Lib3MF::eImplicitNodeType::Constant) - throw CNMRException(NMR_ERROR_INVALIDPARAM); + throw CNMRException(NMR_ERROR_INVALIDPARAM, + "setConstant can only be called on Constant nodes"); m_constant = value; } double CModelImplicitNode::getConstant() const { if (m_type != Lib3MF::eImplicitNodeType::Constant) - throw CNMRException(NMR_ERROR_INVALIDPARAM); + throw CNMRException(NMR_ERROR_INVALIDPARAM, + "getConstant can only be called on Constant nodes"); return m_constant; } @@ -169,48 +171,56 @@ namespace NMR void NMR::CModelImplicitNode::setVector(const Lib3MF::sVector & value) { if (m_type != Lib3MF::eImplicitNodeType::ConstVec) - throw CNMRException(NMR_ERROR_INVALIDPARAM); + throw CNMRException(NMR_ERROR_INVALIDPARAM, + "setVector can only be called on ConstVec nodes"); m_vector = std::unique_ptr(new Lib3MF::sVector(value)); } Lib3MF::sVector CModelImplicitNode::getVector() const { if (m_type != Lib3MF::eImplicitNodeType::ConstVec) - throw CNMRException(NMR_ERROR_INVALIDPARAM); + throw CNMRException(NMR_ERROR_INVALIDPARAM, + "getVector can only be called on ConstVec nodes"); if (!m_vector) - throw CNMRException(NMR_ERROR_INVALIDPARAM); + throw CNMRException(NMR_ERROR_INVALIDPARAM, + "getVector: vector value not initialized"); return *m_vector; } void CModelImplicitNode::setMatrix(const Lib3MF::sMatrix4x4 & value) { if (m_type != Lib3MF::eImplicitNodeType::ConstMat) - throw CNMRException(NMR_ERROR_INVALIDPARAM); + throw CNMRException(NMR_ERROR_INVALIDPARAM, + "setMatrix can only be called on ConstMat nodes"); m_matrix = std::unique_ptr(new Lib3MF::sMatrix4x4(value)); } Lib3MF::sMatrix4x4 CModelImplicitNode::getMatrix() const { if (m_type != Lib3MF::eImplicitNodeType::ConstMat) - throw CNMRException(NMR_ERROR_INVALIDPARAM); + throw CNMRException(NMR_ERROR_INVALIDPARAM, + "getMatrix can only be called on ConstMat nodes"); if (!m_matrix) - throw CNMRException(NMR_ERROR_INVALIDPARAM); + throw CNMRException(NMR_ERROR_INVALIDPARAM, + "getMatrix: matrix value not initialized"); return *m_matrix; } void CModelImplicitNode::setModelResourceID(ModelResourceID resourceID) { if (m_type != Lib3MF::eImplicitNodeType::ConstResourceID) - throw CNMRException(NMR_ERROR_INVALIDPARAM); + throw CNMRException(NMR_ERROR_INVALIDPARAM, + "setModelResourceID can only be called on ConstResourceID nodes"); m_modelResourceID = resourceID; } ModelResourceID CModelImplicitNode::getModelResourceID() const { if (m_type != Lib3MF::eImplicitNodeType::ConstResourceID) - throw CNMRException(NMR_ERROR_INVALIDPARAM); + throw CNMRException(NMR_ERROR_INVALIDPARAM, + "getModelResourceID can only be called on ConstResourceID nodes"); return m_modelResourceID; } @@ -232,6 +242,58 @@ namespace NMR return model->findResource(model->currentPath(), m_modelResourceID); } + void CModelImplicitNode::setAccurateRange(double accurateRange) + { + if (m_type != Lib3MF::eImplicitNodeType::BeamLattice) + throw CNMRException(NMR_ERROR_INVALIDPARAM, + "setAccurateRange can only be called on BeamLattice nodes"); + m_accurateRange = std::max(0.0, accurateRange); // Clamp to >= 0.0 per schema + } + + double CModelImplicitNode::getAccurateRange() const + { + if (m_type != Lib3MF::eImplicitNodeType::BeamLattice) + throw CNMRException(NMR_ERROR_INVALIDPARAM, + "getAccurateRange can only be called on BeamLattice nodes"); + return m_accurateRange; + } + + void CModelImplicitNode::setScalarOutputName(const std::string& name) + { + if (m_type != Lib3MF::eImplicitNodeType::FunctionGradient && + m_type != Lib3MF::eImplicitNodeType::NormalizeDistance) + throw CNMRException(NMR_ERROR_INVALIDPARAM, + "setScalarOutputName can only be called on FunctionGradient or NormalizeDistance nodes"); + m_scalarOutputName = name; + } + + std::string CModelImplicitNode::getScalarOutputName() const + { + if (m_type != Lib3MF::eImplicitNodeType::FunctionGradient && + m_type != Lib3MF::eImplicitNodeType::NormalizeDistance) + throw CNMRException(NMR_ERROR_INVALIDPARAM, + "getScalarOutputName can only be called on FunctionGradient or NormalizeDistance nodes"); + return m_scalarOutputName; + } + + void CModelImplicitNode::setVectorInputName(const std::string& name) + { + if (m_type != Lib3MF::eImplicitNodeType::FunctionGradient && + m_type != Lib3MF::eImplicitNodeType::NormalizeDistance) + throw CNMRException(NMR_ERROR_INVALIDPARAM, + "setVectorInputName can only be called on FunctionGradient or NormalizeDistance nodes"); + m_vectorInputName = name; + } + + std::string CModelImplicitNode::getVectorInputName() const + { + if (m_type != Lib3MF::eImplicitNodeType::FunctionGradient && + m_type != Lib3MF::eImplicitNodeType::NormalizeDistance) + throw CNMRException(NMR_ERROR_INVALIDPARAM, + "getVectorInputName can only be called on FunctionGradient or NormalizeDistance nodes"); + return m_vectorInputName; + } + bool CModelImplicitNode::arePortsValid() const { return m_parent->getNodeTypes().arePortsValidForNode(*this); diff --git a/Source/Model/Classes/NMR_ModelLevelSetObject.cpp b/Source/Model/Classes/NMR_ModelLevelSetObject.cpp index 59eb36387..48593725c 100644 --- a/Source/Model/Classes/NMR_ModelLevelSetObject.cpp +++ b/Source/Model/Classes/NMR_ModelLevelSetObject.cpp @@ -189,6 +189,7 @@ namespace NMR if (m_pVolumeData) { + dependencies.push_back(m_pVolumeData->getPackageResourceID()); // concatenate dependencies auto volumeDataDependencies = m_pVolumeData->getDependencies(); dependencies.insert(dependencies.end(), volumeDataDependencies.begin(), volumeDataDependencies.end()); diff --git a/Source/Model/Reader/BeamLattice1702/NMR_ModelReaderNode_BeamLattice1702_Ball.cpp b/Source/Model/Reader/BeamLattice1702/NMR_ModelReaderNode_BeamLattice1702_Ball.cpp index 0d8d4b578..abb926f07 100644 --- a/Source/Model/Reader/BeamLattice1702/NMR_ModelReaderNode_BeamLattice1702_Ball.cpp +++ b/Source/Model/Reader/BeamLattice1702/NMR_ModelReaderNode_BeamLattice1702_Ball.cpp @@ -47,7 +47,10 @@ namespace NMR { return eModelBeamLatticeBallMode::MODELBEAMLATTICEBALLMODE_MIXED; if (strcmp(ballModeStr, XML_3MF_BEAMLATTICE_BALLMODE_ALL) == 0) return eModelBeamLatticeBallMode::MODELBEAMLATTICEBALLMODE_ALL; - return eModelBeamLatticeBallMode::MODELBEAMLATTICEBALLMODE_NONE; + if (strcmp(ballModeStr, XML_3MF_BEAMLATTICE_BALLMODE_NONE) == 0) + return eModelBeamLatticeBallMode::MODELBEAMLATTICEBALLMODE_NONE; + // Invalid ballmode value + throw CNMRException(NMR_ERROR_BEAMLATTICEINVALIDATTRIBUTE); } CModelReaderNode_BeamLattice1702_Ball::CModelReaderNode_BeamLattice1702_Ball(_In_ CModel* pModel, _In_ PModelWarnings pWarnings) diff --git a/Source/Model/Reader/BeamLattice1702/NMR_ModelReaderNode_BeamLattice1702_Balls.cpp b/Source/Model/Reader/BeamLattice1702/NMR_ModelReaderNode_BeamLattice1702_Balls.cpp index 9aeb5b447..093d14f3a 100644 --- a/Source/Model/Reader/BeamLattice1702/NMR_ModelReaderNode_BeamLattice1702_Balls.cpp +++ b/Source/Model/Reader/BeamLattice1702/NMR_ModelReaderNode_BeamLattice1702_Balls.cpp @@ -76,7 +76,7 @@ namespace NMR { __NMRASSERT(pXMLReader); __NMRASSERT(pNameSpace); - if (strcmp(pNameSpace, XML_3MF_NAMESPACE_BEAMLATTICESPEC) == 0) { + if ((strcmp(pNameSpace, XML_3MF_NAMESPACE_BEAMLATTICESPEC) == 0) || (strcmp(pNameSpace, XML_3MF_NAMESPACE_BEAMLATTICEBALLSSPEC) == 0)) { if (strcmp(pChildName, XML_3MF_ELEMENT_BALL) == 0) { // Parse XML PModelReaderNode_BeamLattice1702_Ball pXMLNode = std::make_shared(m_pModel, m_pWarnings); diff --git a/Source/Model/Reader/BeamLattice1702/NMR_ModelReaderNode_BeamLattice1702_BeamLattice.cpp b/Source/Model/Reader/BeamLattice1702/NMR_ModelReaderNode_BeamLattice1702_BeamLattice.cpp index 37c2ce3c0..4c0a0dc8d 100644 --- a/Source/Model/Reader/BeamLattice1702/NMR_ModelReaderNode_BeamLattice1702_BeamLattice.cpp +++ b/Source/Model/Reader/BeamLattice1702/NMR_ModelReaderNode_BeamLattice1702_BeamLattice.cpp @@ -93,7 +93,7 @@ namespace NMR { void CModelReaderNode_BeamLattice1702_BeamLattice::validateBallOptions(_In_ PModelWarnings pWarnings) { if (m_pMesh->getBeamLatticeBallMode() != eModelBeamLatticeBallMode::MODELBEAMLATTICEBALLMODE_NONE) { - if (m_pMesh->getDefaultBallRadius() <= 0 && m_pMesh->getDefaultBallRadius() >= XML_3MF_MAXIMUMCOORDINATEVALUE) { + if (m_pMesh->getDefaultBallRadius() <= 0 || m_pMesh->getDefaultBallRadius() >= XML_3MF_MAXIMUMCOORDINATEVALUE) { pWarnings->addException(CNMRException(NMR_ERROR_BEAMLATTICEINVALIDATTRIBUTE), mrwInvalidOptionalValue); } } @@ -161,8 +161,27 @@ namespace NMR { void CModelReaderNode_BeamLattice1702_BeamLattice::OnNSAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue, _In_z_ const nfChar * pNameSpace) { - + __NMRASSERT(pAttributeName); + __NMRASSERT(pAttributeValue); + __NMRASSERT(pNameSpace); + // Accept namespaced ball attributes (balls extension namespace) + if (strcmp(pNameSpace, XML_3MF_NAMESPACE_BEAMLATTICEBALLSSPEC) == 0) { + if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_BEAMLATTICE_BALLMODE) == 0) { + m_pMesh->setBeamLatticeBallMode(stringToBallMode(pAttributeValue)); + } + else if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_BEAMLATTICE_BALLRADIUS) == 0) { + nfDouble dValue = fnStringToDouble(pAttributeValue); + if (std::isnan(dValue) || (dValue <= 0) || (dValue > XML_3MF_MAXIMUMCOORDINATEVALUE)) + throw CNMRException(NMR_ERROR_BEAMLATTICEINVALIDATTRIBUTE); + m_dDefaultBallRadius = dValue; + m_pMesh->setDefaultBallRadius(dValue); + } + else + m_pWarnings->addException(CNMRException(NMR_ERROR_NAMESPACE_INVALID_ATTRIBUTE), mrwInvalidOptionalValue); + } + else + m_pWarnings->addException(CNMRException(NMR_ERROR_NAMESPACE_INVALID_ATTRIBUTE), mrwInvalidOptionalValue); } void CModelReaderNode_BeamLattice1702_BeamLattice::OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader) @@ -171,7 +190,7 @@ namespace NMR { __NMRASSERT(pXMLReader); __NMRASSERT(pNameSpace); - if (strcmp(pNameSpace, XML_3MF_NAMESPACE_BEAMLATTICESPEC) == 0) { + if ((strcmp(pNameSpace, XML_3MF_NAMESPACE_BEAMLATTICESPEC) == 0) || (strcmp(pNameSpace, XML_3MF_NAMESPACE_BEAMLATTICEBALLSSPEC) == 0)) { if (strcmp(pChildName, XML_3MF_ELEMENT_BEAMS) == 0) { PModelReaderNode pXMLNode = std::make_shared(m_pModel, m_pMesh, m_dDefaultRadius, m_eDefaultCapMode, m_pWarnings); diff --git a/Source/Model/Reader/NMR_ModelReaderNode_ModelBase.cpp b/Source/Model/Reader/NMR_ModelReaderNode_ModelBase.cpp index 3fa8cf31e..a421891f7 100644 --- a/Source/Model/Reader/NMR_ModelReaderNode_ModelBase.cpp +++ b/Source/Model/Reader/NMR_ModelReaderNode_ModelBase.cpp @@ -85,6 +85,7 @@ namespace NMR { strcmp(sExtensionURI.c_str(), XML_3MF_NAMESPACE_PRODUCTIONSPEC) != 0 && strcmp(sExtensionURI.c_str(), XML_3MF_NAMESPACE_SLICESPEC) != 0 && strcmp(sExtensionURI.c_str(), XML_3MF_NAMESPACE_BEAMLATTICESPEC) != 0 && + strcmp(sExtensionURI.c_str(), XML_3MF_NAMESPACE_BEAMLATTICEBALLSSPEC) != 0 && strcmp(sExtensionURI.c_str(), XML_3MF_NAMESPACE_SECURECONTENTSPEC) != 0 && strcmp(sExtensionURI.c_str(), XML_3MF_NAMESPACE_VOLUMETRICSPEC) != 0 && strcmp(sExtensionURI.c_str(), XML_3MF_NAMESPACE_IMPLICITSPEC) != 0 diff --git a/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Node.cpp b/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Node.cpp index 36d072f29..9be55c852 100644 --- a/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Node.cpp +++ b/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Node.cpp @@ -147,6 +147,25 @@ namespace NMR m_pImplicitNode->setModelResourceID(std::stoi(pAttributeValue)); } } + else if (m_pImplicitNode->getNodeType() == Lib3MF::eImplicitNodeType::BeamLattice) + { + if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_IMPLICIT_NODE_ACCURATERANGE) == 0) + { + m_pImplicitNode->setAccurateRange(strtod(pAttributeValue, nullptr)); + } + } + else if (m_pImplicitNode->getNodeType() == Lib3MF::eImplicitNodeType::FunctionGradient || + m_pImplicitNode->getNodeType() == Lib3MF::eImplicitNodeType::NormalizeDistance) + { + if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_IMPLICIT_NODE_SCALAROUTPUT) == 0) + { + m_pImplicitNode->setScalarOutputName(pAttributeValue); + } + else if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_IMPLICIT_NODE_VECTORINPUT) == 0) + { + m_pImplicitNode->setVectorInputName(pAttributeValue); + } + } } void NMR::CModelReaderNode_Implicit_Node::OnNSChildElement(_In_z_ const nfChar * pChildName, diff --git a/Source/Model/Writer/NMR_ModelWriterNode_Implicit.cpp b/Source/Model/Writer/NMR_ModelWriterNode_Implicit.cpp index b718bd400..19dd22119 100644 --- a/Source/Model/Writer/NMR_ModelWriterNode_Implicit.cpp +++ b/Source/Model/Writer/NMR_ModelWriterNode_Implicit.cpp @@ -149,6 +149,22 @@ namespace NMR } } + else if (node.getNodeType() == Lib3MF::eImplicitNodeType::BeamLattice) + { + // Only write accuraterange if non-zero (default is 0.0) + double accurateRange = node.getAccurateRange(); + if (accurateRange != 0.0) + { + writeDoubleAttribute(XML_3MF_ATTRIBUTE_IMPLICIT_NODE_ACCURATERANGE, accurateRange); + } + } + else if (node.getNodeType() == Lib3MF::eImplicitNodeType::FunctionGradient || + node.getNodeType() == Lib3MF::eImplicitNodeType::NormalizeDistance) + { + // These attributes are required per schema + writeStringAttribute(XML_3MF_ATTRIBUTE_IMPLICIT_NODE_SCALAROUTPUT, node.getScalarOutputName()); + writeStringAttribute(XML_3MF_ATTRIBUTE_IMPLICIT_NODE_VECTORINPUT, node.getVectorInputName()); + } bool const isNodeWithoutInputs = node.getNodeType() == Lib3MF::eImplicitNodeType::Constant || node.getNodeType() == Lib3MF::eImplicitNodeType::ConstVec || diff --git a/Source/Model/Writer/v100/NMR_ModelWriterNode100_Mesh.cpp b/Source/Model/Writer/v100/NMR_ModelWriterNode100_Mesh.cpp index 6894fd12e..633cee214 100644 --- a/Source/Model/Writer/v100/NMR_ModelWriterNode100_Mesh.cpp +++ b/Source/Model/Writer/v100/NMR_ModelWriterNode100_Mesh.cpp @@ -51,7 +51,7 @@ This is the class for exporting the 3mf mesh node. namespace NMR { CModelWriterNode100_Mesh::CModelWriterNode100_Mesh(_In_ CModelMeshObject * pModelMeshObject, _In_ CXmlWriter * pXMLWriter, _In_ PProgressMonitor pProgressMonitor, - _In_ PMeshInformation_PropertyIndexMapping pPropertyIndexMapping, _In_ int nPosAfterDecPoint, _In_ nfBool bWriteMaterialExtension, _In_ nfBool bWriteBeamLatticeExtension, _In_ nfBool bWriteVolumetricExtension, _In_ nfBool bWriteTriangleSetExtension) + _In_ PMeshInformation_PropertyIndexMapping pPropertyIndexMapping, _In_ int nPosAfterDecPoint, _In_ nfBool bWriteMaterialExtension, _In_ nfBool bWriteBeamLatticeExtension, _In_ nfBool bWriteBeamLatticeBallsExtension, _In_ nfBool bWriteVolumetricExtension, _In_ nfBool bWriteTriangleSetExtension) :CModelWriterNode_ModelBase(pModelMeshObject->getModel(), pXMLWriter, pProgressMonitor), m_nPosAfterDecPoint(nPosAfterDecPoint), m_nPutDoubleFactor((nfInt64)(pow(10, CModelWriterNode100_Mesh::m_nPosAfterDecPoint))) { __NMRASSERT(pModelMeshObject != nullptr); @@ -60,6 +60,7 @@ namespace NMR { m_bWriteMaterialExtension = bWriteMaterialExtension; m_bWriteBeamLatticeExtension = bWriteBeamLatticeExtension; + m_bWriteBeamLatticeBallsExtension = bWriteBeamLatticeBallsExtension; m_bWriteVolumetricExtension = bWriteVolumetricExtension; m_bWriteTriangleSetExtension = bWriteTriangleSetExtension; @@ -366,7 +367,7 @@ namespace NMR { // write beamlattice: balls // Only if there is at least 1 ball if (bWriteBallsElement) { - writeStartElementWithPrefix(XML_3MF_ELEMENT_BALLS, XML_3MF_NAMESPACEPREFIX_BEAMLATTICE); + writeStartElementWithPrefix(XML_3MF_ELEMENT_BALLS, XML_3MF_NAMESPACEPREFIX_BEAMLATTICEBALLS); for (nBallIndex = 0; nBallIndex < nBallCount; nBallIndex++) { // write beamlattice: ball MESHBALL * pMeshBall = pMesh->getBall(nBallIndex); diff --git a/Source/Model/Writer/v100/NMR_ModelWriterNode100_Model.cpp b/Source/Model/Writer/v100/NMR_ModelWriterNode100_Model.cpp index fc586f66d..53b659e42 100644 --- a/Source/Model/Writer/v100/NMR_ModelWriterNode100_Model.cpp +++ b/Source/Model/Writer/v100/NMR_ModelWriterNode100_Model.cpp @@ -78,6 +78,7 @@ namespace NMR { m_bWriteMaterialExtension = true; m_bWriteProductionExtension = true; m_bWriteBeamLatticeExtension = true; + m_bWriteBeamLatticeBallsExtension = false; m_bWriteSliceExtension = true; m_bWriteSecureContentExtension = true; m_bWriteTriangleSetExtension = true; @@ -131,6 +132,9 @@ namespace NMR { { std::string sLanguage = m_pModel->getLanguage(); + // Detect required extensions before writing namespace declarations + detectRequiredExtensions(); + writeStartElementWithNamespace(XML_3MF_ELEMENT_MODEL, PACKAGE_XMLNS_100); writeStringAttribute(XML_3MF_ATTRIBUTE_MODEL_UNIT, m_pModel->getUnitString()); @@ -158,6 +162,16 @@ namespace NMR { } } + if (m_bWriteBeamLatticeBallsExtension) { + writeConstPrefixedStringAttribute(XML_3MF_ATTRIBUTE_XMLNS, XML_3MF_NAMESPACEPREFIX_BEAMLATTICEBALLS, XML_3MF_NAMESPACE_BEAMLATTICEBALLSSPEC); + + if (m_pModel->RequireExtension(XML_3MF_NAMESPACE_BEAMLATTICEBALLSSPEC)) { + if (sRequiredExtensions.size() > 0) + sRequiredExtensions = sRequiredExtensions + " "; + sRequiredExtensions = sRequiredExtensions + XML_3MF_NAMESPACEPREFIX_BEAMLATTICEBALLS; + } + } + if (m_bWriteSliceExtension) { writeConstPrefixedStringAttribute(XML_3MF_ATTRIBUTE_XMLNS, XML_3MF_NAMESPACEPREFIX_SLICE, XML_3MF_NAMESPACE_SLICESPEC); if (m_pModel->RequireExtension(XML_3MF_NAMESPACE_SLICESPEC)) { @@ -609,11 +623,13 @@ namespace NMR { if(pMeshObject) { + // Beam lattice balls namespace need already determined in detectRequiredExtensions() + CModelWriterNode100_Mesh ModelWriter_Mesh( pMeshObject, m_pXMLWriter, m_pProgressMonitor, m_pPropertyIndexMapping, m_nDecimalPrecision, m_bWriteMaterialExtension, m_bWriteBeamLatticeExtension, - m_bWriteVolumetricExtension, m_bWriteTriangleSetExtension); + m_bWriteBeamLatticeBallsExtension, m_bWriteVolumetricExtension, m_bWriteTriangleSetExtension); ModelWriter_Mesh.writeToXML(); } @@ -1229,4 +1245,35 @@ namespace NMR { writeFullEndElement(); } + void CModelWriterNode100_Model::detectRequiredExtensions() + { + // Scan all mesh objects to detect if balls are present + std::list objectList = m_pModel->getSortedObjectList(); + + for(auto iIterator = objectList.begin(); iIterator != objectList.end(); iIterator++) + { + CModelObject *pObject = *iIterator; + if (!pObject) + { + continue; + } + + // Check if object is a mesh Object with beam lattice + CModelMeshObject *pMeshObject = dynamic_cast(pObject); + if(pMeshObject) + { + CMesh * pMesh = pMeshObject->getMesh(); + if (pMesh) { + nfUint32 nBallCount = pMesh->getBallCount(); + eModelBeamLatticeBallMode eBallMode = pMesh->getBeamLatticeBallMode(); + + if (nBallCount > 0 || eBallMode != eModelBeamLatticeBallMode::MODELBEAMLATTICEBALLMODE_NONE) { + m_bWriteBeamLatticeBallsExtension = true; + break; // Found balls, no need to continue scanning + } + } + } + } + } + } diff --git a/Source/Model/Writer/v100/NMR_ResourceDependencySorter.cpp b/Source/Model/Writer/v100/NMR_ResourceDependencySorter.cpp index b7e39678e..b95597913 100644 --- a/Source/Model/Writer/v100/NMR_ResourceDependencySorter.cpp +++ b/Source/Model/Writer/v100/NMR_ResourceDependencySorter.cpp @@ -32,6 +32,8 @@ sorting them topologically. #include "Model/Writer/v100/NMR_ResourceDependencySorter.h" +#include + #include "Common/Graph/DirectedGraph.h" #include "Common/Graph/GraphAlgorithms.h" #include "Model/Classes/NMR_Model.h" @@ -122,4 +124,4 @@ namespace NMR return m_resourceIDToIndex.at(resourceID); } -} // namespace NMR \ No newline at end of file +} // namespace NMR diff --git a/Tests/CPP_Bindings/CMakeLists.txt b/Tests/CPP_Bindings/CMakeLists.txt index ffdceb7a8..bb5b2d0b4 100644 --- a/Tests/CPP_Bindings/CMakeLists.txt +++ b/Tests/CPP_Bindings/CMakeLists.txt @@ -15,6 +15,7 @@ set(SRCS_UNITTEST ./Source/ColorGroup.cpp ./Source/CompositeMaterials.cpp ./Source/EncryptionMethods.cpp + ./Source/ImplicitNodes.test.cpp ./Source/MeshObject.cpp ./Source/MetaData.cpp ./Source/MetaDataGroup.cpp @@ -38,6 +39,7 @@ set(SRCS_UNITTEST ./Source/UnitTest_Utilities.cpp ./Source/v093.cpp ./Source/Volumetric.cpp + ./Source/ZipBuffer.cpp ./Source/Wrapper.cpp ./Source/Writer.cpp ./Source/TriangleSets.cpp @@ -55,6 +57,15 @@ target_include_directories(${TESTNAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR_AUTOGENERATED}/Bindings/Cpp ) +if (USE_INCLUDED_ZLIB) + file(GLOB TEST_ZLIB_FILES "${CMAKE_SOURCE_DIR}/Libraries/zlib/Source/*.c") + target_sources(${TESTNAME} PRIVATE ${TEST_ZLIB_FILES}) + target_include_directories(${TESTNAME} PRIVATE ${CMAKE_SOURCE_DIR}/Libraries/zlib/Include) +else() + find_package(ZLIB REQUIRED) + target_link_libraries(${TESTNAME} PRIVATE ZLIB::ZLIB) +endif() + # pthreads Needed for googletest if (LINUX) set(THREADS_PREFER_PTHREAD_FLAG ON) @@ -62,7 +73,14 @@ find_package(Threads REQUIRED) target_link_libraries(${TESTNAME} PRIVATE Threads::Threads) endif() -target_link_libraries(${TESTNAME} PRIVATE ${PROJECT_NAME} ssl crypto) +if (USE_INCLUDED_SSL) + target_include_directories(${TESTNAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../Libraries/libressl/include) + target_link_libraries(${TESTNAME} PRIVATE ${PROJECT_NAME} ssl crypto) +else() + find_package(OpenSSL REQUIRED) + target_include_directories(${TESTNAME} PRIVATE ${OPENSSL_INCLUDE_DIR}) + target_link_libraries(${TESTNAME} PRIVATE ${PROJECT_NAME} ${OPENSSL_LIBRARIES}) +endif() if (WIN32) target_link_libraries(${TESTNAME} PRIVATE ws2_32) @@ -71,7 +89,15 @@ endif() set_target_properties(${TESTNAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/") -add_test(${TESTNAME} ${CMAKE_CURRENT_BINARY_DIR}/${TESTNAME}) +# Enable fine-grained GoogleTest discovery instead of one monolithic test entry +include(GoogleTest) +gtest_discover_tests( + ${TESTNAME} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + DISCOVERY_TIMEOUT 60 + # Avoid re-running discovery on every build unless sources change + PROPERTIES VS_TEST_CATEGORY "CPP_Bindings" +) find_program(VALGRIND "valgrind") if(VALGRIND) diff --git a/Tests/CPP_Bindings/Source/BeamLattice.cpp b/Tests/CPP_Bindings/Source/BeamLattice.cpp index 7ca63dabd..65d50bdb6 100644 --- a/Tests/CPP_Bindings/Source/BeamLattice.cpp +++ b/Tests/CPP_Bindings/Source/BeamLattice.cpp @@ -665,4 +665,36 @@ namespace Lib3MF Read_Attributes_Negative(GetParam()); } + TEST_F(BeamLattice, Read_BallExtension_TestSuite_P_BXX_2021_06) + { + std::string fName("testsuite_P_BXX_2021_06.3mf"); + auto model = wrapper->CreateModel(); + { + auto reader = model->QueryReader("3mf"); + reader->SetStrictModeActive(true); + reader->ReadFromFile(sTestFilesPath + "/" + "BeamLattice" + "/" + fName); + ASSERT_EQ(reader->GetWarningCount(), 0) << "Warnings encountered while reading test suite file."; + } + + Lib3MF_uint64 totalBalls = 0; + Lib3MF_uint64 checkedBallModeMeshes = 0; + auto meshObjects = model->GetMeshObjects(); + while (meshObjects->MoveNext()) { + auto meshObject = meshObjects->GetCurrentMeshObject(); + auto bl = meshObject->BeamLattice(); + if (bl->GetBeamCount() > 0 || bl->GetBallCount() > 0) { + eBeamLatticeBallMode ballMode; double defaultRadius; + bl->GetBallOptions(ballMode, defaultRadius); + if (bl->GetBallCount() > 0) { + checkedBallModeMeshes++; + ASSERT_EQ(ballMode, eBeamLatticeBallMode::All); + ASSERT_NEAR(defaultRadius, 3.0, 1e-7); + } + totalBalls += bl->GetBallCount(); + } + } + ASSERT_EQ(checkedBallModeMeshes, 1u) << "Expected exactly one mesh with ball mode All."; + ASSERT_EQ(totalBalls, 8u) << "Unexpected total ball count."; + } + } diff --git a/Tests/CPP_Bindings/Source/ImplicitNodes.test.cpp b/Tests/CPP_Bindings/Source/ImplicitNodes.test.cpp new file mode 100644 index 000000000..71194d6b5 --- /dev/null +++ b/Tests/CPP_Bindings/Source/ImplicitNodes.test.cpp @@ -0,0 +1,770 @@ +/*++ + +Copyright (C) 2024 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: + +ImplicitNodes.test.cpp: Defines unit tests for new implicit node types +(BeamLattice, FunctionGradient, NormalizeDistance) + +--*/ + +#include "UnitTest_Utilities.h" +#include "lib3mf_implicit.hpp" + +namespace Lib3MF +{ + class ImplicitNodes : public ::testing::Test + { + protected: + virtual void SetUp() + { + if (!helper::directoryExists(OutFolder)) + { + ASSERT_TRUE(CreateDir(OutFolder.c_str())) + << L"Could not create folder."; + } + model = wrapper->CreateModel(); + loadPyramid(); + writer3MF = model->QueryWriter("3mf"); + } + + virtual void TearDown() + { + model.reset(); + writer3MF.reset(); + } + + void loadPyramid() + { + model = wrapper->CreateModel(); + auto reader = model->QueryReader("3mf"); + reader->ReadFromFile(InFolder + "Pyramid.3mf"); + } + + PModel model; + PWriter writer3MF; + + static std::string InFolder; + static std::string OutFolder; + + static void SetUpTestCase() { wrapper = CWrapper::loadLibrary(); } + static PWrapper wrapper; + + PMeshObject GetMesh() + { + auto meshes = model->GetMeshObjects(); + meshes->MoveNext(); + return meshes->GetCurrentMeshObject(); + } + }; + + PWrapper ImplicitNodes::wrapper; + std::string ImplicitNodes::InFolder(sTestFilesPath + "/Volumetric/"); + std::string ImplicitNodes::OutFolder(sOutFilesPath + "/ImplicitNodes/"); + + // ============================================================================ + // BeamLatticeNode Tests + // ============================================================================ + + TEST_F(ImplicitNodes, BeamLatticeNode_Creation_NodeIsAdded) + { + auto function = model->AddImplicitFunction(); + function->SetDisplayName("beamlattice_test"); + + // Create BeamLatticeNode + auto beamLatticeNode = function->AddBeamLatticeNode( + "bl1", "beam lattice", "group_bl"); + + ASSERT_TRUE(beamLatticeNode); + EXPECT_EQ(beamLatticeNode->GetIdentifier(), "bl1"); + EXPECT_EQ(beamLatticeNode->GetDisplayName(), "beam lattice"); + EXPECT_EQ(beamLatticeNode->GetTag(), "group_bl"); + EXPECT_EQ(beamLatticeNode->GetNodeType(), + Lib3MF::eImplicitNodeType::BeamLattice); + + // Check node count + auto nodes = function->GetNodes(); + EXPECT_EQ(nodes->Count(), 1u); + } + + TEST_F(ImplicitNodes, BeamLatticeNode_Ports_CorrectPortsExist) + { + auto function = model->AddImplicitFunction(); + auto beamLatticeNode = function->AddBeamLatticeNode( + "bl1", "beam lattice", "group_bl"); + + // Check inputs + auto inputPos = beamLatticeNode->GetInputPos(); + ASSERT_TRUE(inputPos); + EXPECT_EQ(inputPos->GetType(), Lib3MF::eImplicitPortType::Vector); + + auto inputBeamLattice = beamLatticeNode->GetInputBeamLattice(); + ASSERT_TRUE(inputBeamLattice); + EXPECT_EQ(inputBeamLattice->GetType(), Lib3MF::eImplicitPortType::ResourceID); + + // Check output + auto outputDistance = beamLatticeNode->GetOutputDistance(); + ASSERT_TRUE(outputDistance); + EXPECT_EQ(outputDistance->GetType(), Lib3MF::eImplicitPortType::Scalar); + } + + TEST_F(ImplicitNodes, BeamLatticeNode_AccurateRange_SetGetCorrectly) + { + auto function = model->AddImplicitFunction(); + auto beamLatticeNode = function->AddBeamLatticeNode( + "bl1", "beam lattice", "group_bl"); + + // Default should be 0.0 + EXPECT_DOUBLE_EQ(beamLatticeNode->GetAccurateRange(), 0.0); + + // Set a positive value + beamLatticeNode->SetAccurateRange(5.5); + EXPECT_DOUBLE_EQ(beamLatticeNode->GetAccurateRange(), 5.5); + + // Set zero (valid) + beamLatticeNode->SetAccurateRange(0.0); + EXPECT_DOUBLE_EQ(beamLatticeNode->GetAccurateRange(), 0.0); + } + + TEST_F(ImplicitNodes, BeamLatticeNode_WriteAndRead_SameContent) + { + // Create function with BeamLatticeNode + auto function = model->AddImplicitFunction(); + function->SetDisplayName("beamlattice_function"); + + auto posInput = function->AddInput("pos", "position", + Lib3MF::eImplicitPortType::Vector); + + // Create a beamlattice resource (we'll use a mesh as placeholder) + auto mesh = GetMesh(); + + auto resourceIdNode = function->AddResourceIdNode( + "beamres", "beam resource", "group_bl"); + resourceIdNode->SetResource(mesh.get()); + + auto beamLatticeNode = function->AddBeamLatticeNode( + "bl1", "beam lattice node", "group_bl"); + beamLatticeNode->SetAccurateRange(3.5); + + // Link inputs + auto blInputPos = beamLatticeNode->GetInputPos(); + function->AddLink(posInput, blInputPos); + + auto resOutput = resourceIdNode->GetOutputValue(); + auto blInputBeamLattice = beamLatticeNode->GetInputBeamLattice(); + function->AddLink(resOutput, blInputBeamLattice); + + // Link output + auto output = function->AddOutput("distance", "distance field", + Lib3MF::eImplicitPortType::Scalar); + function->AddLink(beamLatticeNode->GetOutputDistance(), output); + + // Create LevelSet + auto theMesh = GetMesh(); + auto levelSet = model->AddLevelSet(); + levelSet->SetMesh(theMesh); + levelSet->SetFunction(function.get()); + + // Write to file + writer3MF->WriteToFile(ImplicitNodes::OutFolder + "BeamLatticeNode.3mf"); + + // Read and compare + PModel ioModel = wrapper->CreateModel(); + PReader ioReader = ioModel->QueryReader("3mf"); + ioReader->ReadFromFile(ImplicitNodes::OutFolder + "BeamLatticeNode.3mf"); + auto functionIter = ioModel->GetFunctions(); + ASSERT_EQ(functionIter->Count(), 1u); + ASSERT_TRUE(functionIter->MoveNext()); + + auto readFunction = std::dynamic_pointer_cast( + functionIter->GetCurrentFunction()); + ASSERT_NE(readFunction, nullptr); + + helper::compareFunctions(model, function, ioModel, readFunction); + + // Verify BeamLatticeNode specifically + auto nodes = readFunction->GetNodes(); + bool foundBeamLattice = false; + while (nodes->MoveNext()) + { + auto node = nodes->GetCurrent(); + if (node->GetNodeType() == Lib3MF::eImplicitNodeType::BeamLattice) + { + foundBeamLattice = true; + auto blNode = std::dynamic_pointer_cast(node); + ASSERT_NE(blNode, nullptr); + EXPECT_DOUBLE_EQ(blNode->GetAccurateRange(), 3.5); + } + } + EXPECT_TRUE(foundBeamLattice); + } + + TEST_F(ImplicitNodes, BeamLatticeNode_AccurateRangeZero_NotWrittenToFile) + { + // When accuraterange is 0.0, it should not be written to XML + auto function = model->AddImplicitFunction(); + function->SetDisplayName("bl_zero_test"); + + auto posInput = function->AddInput("pos", "position", + Lib3MF::eImplicitPortType::Vector); + auto mesh = GetMesh(); + auto resourceIdNode = function->AddResourceIdNode( + "beamres", "beam resource", "group_bl"); + resourceIdNode->SetResource(mesh.get()); + + auto beamLatticeNode = function->AddBeamLatticeNode( + "bl1", "beam lattice", "group_bl"); + // Don't set accuraterange (default is 0.0) + + function->AddLink(posInput, beamLatticeNode->GetInputPos()); + function->AddLink(resourceIdNode->GetOutputValue(), + beamLatticeNode->GetInputBeamLattice()); + + auto output = function->AddOutput("distance", "distance", + Lib3MF::eImplicitPortType::Scalar); + function->AddLink(beamLatticeNode->GetOutputDistance(), output); + + auto levelSet = model->AddLevelSet(); + levelSet->SetMesh(GetMesh()); + levelSet->SetFunction(function.get()); + + // Write and read + writer3MF->WriteToFile(ImplicitNodes::OutFolder + "BeamLatticeZero.3mf"); + + PModel ioModel = wrapper->CreateModel(); + PReader ioReader = ioModel->QueryReader("3mf"); + ioReader->ReadFromFile(ImplicitNodes::OutFolder + "BeamLatticeZero.3mf"); + + auto functionIter = ioModel->GetFunctions(); + ASSERT_TRUE(functionIter->MoveNext()); + auto readFunction = std::dynamic_pointer_cast( + functionIter->GetCurrentFunction()); + + auto nodes = readFunction->GetNodes(); + while (nodes->MoveNext()) + { + auto node = nodes->GetCurrent(); + if (node->GetNodeType() == Lib3MF::eImplicitNodeType::BeamLattice) + { + auto blNode = std::dynamic_pointer_cast(node); + ASSERT_NE(blNode, nullptr); + EXPECT_DOUBLE_EQ(blNode->GetAccurateRange(), 0.0); + } + } + } + + // ============================================================================ + // FunctionGradientNode Tests + // ============================================================================ + + TEST_F(ImplicitNodes, FunctionGradientNode_Creation_NodeIsAdded) + { + auto function = model->AddImplicitFunction(); + function->SetDisplayName("functiongradient_test"); + + auto fgNode = function->AddFunctionGradientNode( + "fg1", "function gradient", "group_fg"); + + ASSERT_TRUE(fgNode); + EXPECT_EQ(fgNode->GetIdentifier(), "fg1"); + EXPECT_EQ(fgNode->GetDisplayName(), "function gradient"); + EXPECT_EQ(fgNode->GetTag(), "group_fg"); + EXPECT_EQ(fgNode->GetNodeType(), + Lib3MF::eImplicitNodeType::FunctionGradient); + + auto nodes = function->GetNodes(); + EXPECT_EQ(nodes->Count(), 1u); + } + + TEST_F(ImplicitNodes, FunctionGradientNode_Ports_CorrectPortsExist) + { + auto function = model->AddImplicitFunction(); + auto fgNode = function->AddFunctionGradientNode( + "fg1", "function gradient", "group_fg"); + + // Check inputs + auto inputFunctionID = fgNode->GetInputFunctionID(); + ASSERT_TRUE(inputFunctionID); + EXPECT_EQ(inputFunctionID->GetType(), Lib3MF::eImplicitPortType::ResourceID); + + auto inputPos = fgNode->GetInputPos(); + ASSERT_TRUE(inputPos); + EXPECT_EQ(inputPos->GetType(), Lib3MF::eImplicitPortType::Vector); + + auto inputStep = fgNode->GetInputStep(); + ASSERT_TRUE(inputStep); + EXPECT_EQ(inputStep->GetType(), Lib3MF::eImplicitPortType::Scalar); + + // Check outputs + auto outputVector = fgNode->GetOutputVector(); + ASSERT_TRUE(outputVector); + EXPECT_EQ(outputVector->GetType(), + Lib3MF::eImplicitPortType::Vector); + + auto outputGradient = fgNode->GetOutputGradient(); + ASSERT_TRUE(outputGradient); + EXPECT_EQ(outputGradient->GetType(), Lib3MF::eImplicitPortType::Vector); + + auto outputMagnitude = fgNode->GetOutputMagnitude(); + ASSERT_TRUE(outputMagnitude); + EXPECT_EQ(outputMagnitude->GetType(), Lib3MF::eImplicitPortType::Scalar); + } + + TEST_F(ImplicitNodes, FunctionGradientNode_Attributes_SetGetCorrectly) + { + auto function = model->AddImplicitFunction(); + auto fgNode = function->AddFunctionGradientNode( + "fg1", "function gradient", "group_fg"); + + // Set scalarOutputName + fgNode->SetScalarOutputName("magnitude"); + EXPECT_EQ(fgNode->GetScalarOutputName(), "magnitude"); + + // Set vectorInputName + fgNode->SetVectorInputName("normalizedgradient"); + EXPECT_EQ(fgNode->GetVectorInputName(), "normalizedgradient"); + + // Change values + fgNode->SetScalarOutputName("customScalar"); + fgNode->SetVectorInputName("customVector"); + EXPECT_EQ(fgNode->GetScalarOutputName(), "customScalar"); + EXPECT_EQ(fgNode->GetVectorInputName(), "customVector"); + } + + TEST_F(ImplicitNodes, FunctionGradientNode_WriteAndRead_SameContent) + { + // Create a simple function to reference + auto referencedFunction = model->AddImplicitFunction(); + referencedFunction->SetDisplayName("referenced_function"); + auto refInput = referencedFunction->AddInput("pos", "position", + Lib3MF::eImplicitPortType::Vector); + auto refOutput = referencedFunction->AddOutput("distance", "distance", + Lib3MF::eImplicitPortType::Scalar); + + // Create main function with FunctionGradientNode + auto function = model->AddImplicitFunction(); + function->SetDisplayName("functiongradient_function"); + + auto posInput = function->AddInput("pos", "position", + Lib3MF::eImplicitPortType::Vector); + auto stepInput = function->AddInput("step", "step size", + Lib3MF::eImplicitPortType::Scalar); + + auto funcResNode = function->AddResourceIdNode( + "funcres", "function resource", "group_fg"); + funcResNode->SetResource(referencedFunction.get()); + + auto fgNode = function->AddFunctionGradientNode( + "fg1", "gradient node", "group_fg"); + fgNode->SetScalarOutputName("magnitude"); + fgNode->SetVectorInputName("normalizedgradient"); + + // Link inputs + function->AddLink(funcResNode->GetOutputValue(), + fgNode->GetInputFunctionID()); + function->AddLink(posInput, fgNode->GetInputPos()); + function->AddLink(stepInput, fgNode->GetInputStep()); + + // Link outputs + auto output = function->AddOutput("gradient", "gradient vector", + Lib3MF::eImplicitPortType::Vector); + function->AddLink(fgNode->GetOutputGradient(), output); + + auto levelSet = model->AddLevelSet(); + levelSet->SetMesh(GetMesh()); + levelSet->SetFunction(function.get()); + + // Write to file + writer3MF->WriteToFile(ImplicitNodes::OutFolder + "FunctionGradientNode.3mf"); + + // Read and compare + PModel ioModel = wrapper->CreateModel(); + PReader ioReader = ioModel->QueryReader("3mf"); + ioReader->ReadFromFile(ImplicitNodes::OutFolder + "FunctionGradientNode.3mf"); + + auto functionIter = ioModel->GetFunctions(); + ASSERT_EQ(functionIter->Count(), 2u); + + EXPECT_TRUE(functionIter->MoveNext()); + helper::compareFunctions(model, referencedFunction, ioModel, + functionIter->GetCurrentFunction()); + + EXPECT_TRUE(functionIter->MoveNext()); + auto readFunction = std::dynamic_pointer_cast( + functionIter->GetCurrentFunction()); + ASSERT_NE(readFunction, nullptr); + + helper::compareFunctions(model, function, ioModel, readFunction); + EXPECT_FALSE(functionIter->MoveNext()); + + // Verify FunctionGradientNode specifically + auto nodes = readFunction->GetNodes(); + bool foundFunctionGradient = false; + while (nodes->MoveNext()) + { + auto node = nodes->GetCurrent(); + if (node->GetNodeType() == Lib3MF::eImplicitNodeType::FunctionGradient) + { + foundFunctionGradient = true; + auto fgNode = std::dynamic_pointer_cast(node); + ASSERT_NE(fgNode, nullptr); + EXPECT_EQ(fgNode->GetScalarOutputName(), "magnitude"); + EXPECT_EQ(fgNode->GetVectorInputName(), "normalizedgradient"); + } + } + EXPECT_TRUE(foundFunctionGradient); + } + + TEST_F(ImplicitNodes, FunctionGradientNode_MultipleOutputs_AllAccessible) + { + auto function = model->AddImplicitFunction(); + auto fgNode = function->AddFunctionGradientNode( + "fg1", "function gradient", "group_fg"); + + auto posInput = function->AddInput("pos", "position", + Lib3MF::eImplicitPortType::Vector); + auto stepInput = function->AddInput("step", "step", + Lib3MF::eImplicitPortType::Scalar); + + // Create a dummy function resource + auto refFunc = model->AddImplicitFunction(); + refFunc->SetDisplayName("dummy"); + auto funcResNode = function->AddResourceIdNode("funcres", "func", "g"); + funcResNode->SetResource(refFunc.get()); + + // Link inputs + function->AddLink(funcResNode->GetOutputValue(), + fgNode->GetInputFunctionID()); + function->AddLink(posInput, fgNode->GetInputPos()); + function->AddLink(stepInput, fgNode->GetInputStep()); + + // Use all three outputs + auto outputNormalizedGrad = function->AddOutput( + "normgrad", "normalized gradient", Lib3MF::eImplicitPortType::Vector); + function->AddLink(fgNode->GetOutputVector(), outputNormalizedGrad); + + auto outputGrad = function->AddOutput( + "grad", "gradient", Lib3MF::eImplicitPortType::Vector); + function->AddLink(fgNode->GetOutputGradient(), outputGrad); + + auto outputMag = function->AddOutput( + "mag", "magnitude", Lib3MF::eImplicitPortType::Scalar); + function->AddLink(fgNode->GetOutputMagnitude(), outputMag); + + // Verify outputs exist + auto outputs = function->GetOutputs(); + EXPECT_EQ(outputs->Count(), 3u); + } + + // ============================================================================ + // NormalizeDistanceNode Tests + // ============================================================================ + + TEST_F(ImplicitNodes, NormalizeDistanceNode_Creation_NodeIsAdded) + { + auto function = model->AddImplicitFunction(); + function->SetDisplayName("normalizedistance_test"); + + auto ndNode = function->AddNormalizeDistanceNode( + "nd1", "normalize distance", "group_nd"); + + ASSERT_TRUE(ndNode); + EXPECT_EQ(ndNode->GetIdentifier(), "nd1"); + EXPECT_EQ(ndNode->GetDisplayName(), "normalize distance"); + EXPECT_EQ(ndNode->GetTag(), "group_nd"); + EXPECT_EQ(ndNode->GetNodeType(), + Lib3MF::eImplicitNodeType::NormalizeDistance); + + auto nodes = function->GetNodes(); + EXPECT_EQ(nodes->Count(), 1u); + } + + TEST_F(ImplicitNodes, NormalizeDistanceNode_Ports_CorrectPortsExist) + { + auto function = model->AddImplicitFunction(); + auto ndNode = function->AddNormalizeDistanceNode( + "nd1", "normalize distance", "group_nd"); + + // Check inputs + auto inputFunctionID = ndNode->GetInputFunctionID(); + ASSERT_TRUE(inputFunctionID); + EXPECT_EQ(inputFunctionID->GetType(), Lib3MF::eImplicitPortType::ResourceID); + + auto inputPos = ndNode->GetInputPos(); + ASSERT_TRUE(inputPos); + EXPECT_EQ(inputPos->GetType(), Lib3MF::eImplicitPortType::Vector); + + auto inputStep = ndNode->GetInputStep(); + ASSERT_TRUE(inputStep); + EXPECT_EQ(inputStep->GetType(), Lib3MF::eImplicitPortType::Scalar); + + // Check output + auto outputResult = ndNode->GetOutputResult(); + ASSERT_TRUE(outputResult); + EXPECT_EQ(outputResult->GetType(), Lib3MF::eImplicitPortType::Scalar); + } + + TEST_F(ImplicitNodes, NormalizeDistanceNode_Attributes_SetGetCorrectly) + { + auto function = model->AddImplicitFunction(); + auto ndNode = function->AddNormalizeDistanceNode( + "nd1", "normalize distance", "group_nd"); + + // Set scalarOutputName + ndNode->SetScalarOutputName("result"); + EXPECT_EQ(ndNode->GetScalarOutputName(), "result"); + + // Set vectorInputName + ndNode->SetVectorInputName("gradient"); + EXPECT_EQ(ndNode->GetVectorInputName(), "gradient"); + + // Change values + ndNode->SetScalarOutputName("customOutput"); + ndNode->SetVectorInputName("customInput"); + EXPECT_EQ(ndNode->GetScalarOutputName(), "customOutput"); + EXPECT_EQ(ndNode->GetVectorInputName(), "customInput"); + } + + TEST_F(ImplicitNodes, NormalizeDistanceNode_WriteAndRead_SameContent) + { + // Create a simple function to reference + auto referencedFunction = model->AddImplicitFunction(); + referencedFunction->SetDisplayName("referenced_function"); + auto refInput = referencedFunction->AddInput("pos", "position", + Lib3MF::eImplicitPortType::Vector); + auto refOutput = referencedFunction->AddOutput("distance", "distance", + Lib3MF::eImplicitPortType::Scalar); + + // Create main function with NormalizeDistanceNode + auto function = model->AddImplicitFunction(); + function->SetDisplayName("normalizedistance_function"); + + auto posInput = function->AddInput("pos", "position", + Lib3MF::eImplicitPortType::Vector); + auto stepInput = function->AddInput("step", "step size", + Lib3MF::eImplicitPortType::Scalar); + + auto funcResNode = function->AddResourceIdNode( + "funcres", "function resource", "group_nd"); + funcResNode->SetResource(referencedFunction.get()); + + auto ndNode = function->AddNormalizeDistanceNode( + "nd1", "normalize node", "group_nd"); + ndNode->SetScalarOutputName("result"); + ndNode->SetVectorInputName("gradient"); + + // Link inputs + function->AddLink(funcResNode->GetOutputValue(), + ndNode->GetInputFunctionID()); + function->AddLink(posInput, ndNode->GetInputPos()); + function->AddLink(stepInput, ndNode->GetInputStep()); + + // Link output + auto output = function->AddOutput("normalized", "normalized distance", + Lib3MF::eImplicitPortType::Scalar); + function->AddLink(ndNode->GetOutputResult(), output); + + auto levelSet = model->AddLevelSet(); + levelSet->SetMesh(GetMesh()); + levelSet->SetFunction(function.get()); + + // Write to file + writer3MF->WriteToFile(ImplicitNodes::OutFolder + "NormalizeDistanceNode.3mf"); + + // Read and compare + PModel ioModel = wrapper->CreateModel(); + PReader ioReader = ioModel->QueryReader("3mf"); + ioReader->ReadFromFile(ImplicitNodes::OutFolder + "NormalizeDistanceNode.3mf"); + + auto functionIter = ioModel->GetFunctions(); + ASSERT_EQ(functionIter->Count(), 2u); + + EXPECT_TRUE(functionIter->MoveNext()); + helper::compareFunctions(model, referencedFunction, ioModel, + functionIter->GetCurrentFunction()); + + EXPECT_TRUE(functionIter->MoveNext()); + auto readFunction = std::dynamic_pointer_cast( + functionIter->GetCurrentFunction()); + ASSERT_NE(readFunction, nullptr); + + helper::compareFunctions(model, function, ioModel, readFunction); + EXPECT_FALSE(functionIter->MoveNext()); + + // Verify NormalizeDistanceNode specifically + auto nodes = readFunction->GetNodes(); + bool foundNormalizeDistance = false; + while (nodes->MoveNext()) + { + auto node = nodes->GetCurrent(); + if (node->GetNodeType() == Lib3MF::eImplicitNodeType::NormalizeDistance) + { + foundNormalizeDistance = true; + auto ndNode = std::dynamic_pointer_cast(node); + ASSERT_NE(ndNode, nullptr); + EXPECT_EQ(ndNode->GetScalarOutputName(), "result"); + EXPECT_EQ(ndNode->GetVectorInputName(), "gradient"); + } + } + EXPECT_TRUE(foundNormalizeDistance); + } + + // ============================================================================ + // Combined/Integration Tests + // ============================================================================ + + TEST_F(ImplicitNodes, AllNewNodes_CombinedInFunction_WriteAndRead) + { + // Create a function using all three new node types + auto function = model->AddImplicitFunction(); + function->SetDisplayName("combined_nodes_function"); + + auto posInput = function->AddInput("pos", "position", + Lib3MF::eImplicitPortType::Vector); + + // Create BeamLatticeNode + auto mesh = GetMesh(); + auto beamResNode = function->AddResourceIdNode( + "beamres", "beam resource", "group_combined"); + beamResNode->SetResource(mesh.get()); + + auto blNode = function->AddBeamLatticeNode( + "bl1", "beam lattice", "group_combined"); + blNode->SetAccurateRange(2.5); + function->AddLink(posInput, blNode->GetInputPos()); + function->AddLink(beamResNode->GetOutputValue(), + blNode->GetInputBeamLattice()); + + // Create a reference function for gradient/normalize nodes + auto refFunc = model->AddImplicitFunction(); + refFunc->SetDisplayName("reference_function"); + auto refFuncResNode = function->AddResourceIdNode( + "funcres", "function resource", "group_combined"); + refFuncResNode->SetResource(refFunc.get()); + + auto stepConst = function->AddConstantNode("step", "step value", "group_combined"); + stepConst->SetConstant(0.01); + + // Create FunctionGradientNode + auto fgNode = function->AddFunctionGradientNode( + "fg1", "gradient", "group_combined"); + fgNode->SetScalarOutputName("magnitude"); + fgNode->SetVectorInputName("normalizedgradient"); + function->AddLink(refFuncResNode->GetOutputValue(), + fgNode->GetInputFunctionID()); + function->AddLink(posInput, fgNode->GetInputPos()); + function->AddLink(stepConst->GetOutputValue(), fgNode->GetInputStep()); + + // Create NormalizeDistanceNode + auto ndNode = function->AddNormalizeDistanceNode( + "nd1", "normalize", "group_combined"); + ndNode->SetScalarOutputName("result"); + ndNode->SetVectorInputName("gradient"); + function->AddLink(refFuncResNode->GetOutputValue(), + ndNode->GetInputFunctionID()); + function->AddLink(posInput, ndNode->GetInputPos()); + function->AddLink(stepConst->GetOutputValue(), ndNode->GetInputStep()); + + // Combine outputs + auto addNode = function->AddAdditionNode( + "combine", Lib3MF::eImplicitNodeConfiguration::ScalarToScalar, + "combine results", "group_combined"); + function->AddLink(blNode->GetOutputDistance(), addNode->GetInputA()); + function->AddLink(ndNode->GetOutputResult(), addNode->GetInputB()); + + auto output = function->AddOutput("combined", "combined output", + Lib3MF::eImplicitPortType::Scalar); + function->AddLink(addNode->GetOutputResult(), output); + + auto levelSet = model->AddLevelSet(); + levelSet->SetMesh(GetMesh()); + levelSet->SetFunction(function.get()); + + // Write to file + writer3MF->WriteToFile(ImplicitNodes::OutFolder + "CombinedNewNodes.3mf"); + + // Read and verify + PModel ioModel = wrapper->CreateModel(); + PReader ioReader = ioModel->QueryReader("3mf"); + ioReader->ReadFromFile(ImplicitNodes::OutFolder + "CombinedNewNodes.3mf"); + + auto functionIter = ioModel->GetFunctions(); + ASSERT_EQ(functionIter->Count(), 2u); + + EXPECT_TRUE(functionIter->MoveNext()); + helper::compareFunctions(model, refFunc, ioModel, + functionIter->GetCurrentFunction()); + + EXPECT_TRUE(functionIter->MoveNext()); + auto readFunction = std::dynamic_pointer_cast( + functionIter->GetCurrentFunction()); + ASSERT_NE(readFunction, nullptr); + + helper::compareFunctions(model, function, ioModel, readFunction); + EXPECT_FALSE(functionIter->MoveNext()); + + // Verify all three node types are present + auto nodes = readFunction->GetNodes(); + bool foundBeamLattice = false; + bool foundFunctionGradient = false; + bool foundNormalizeDistance = false; + + while (nodes->MoveNext()) + { + auto node = nodes->GetCurrent(); + auto nodeType = node->GetNodeType(); + + if (nodeType == Lib3MF::eImplicitNodeType::BeamLattice) + { + foundBeamLattice = true; + auto blNode = std::dynamic_pointer_cast(node); + ASSERT_NE(blNode, nullptr); + EXPECT_DOUBLE_EQ(blNode->GetAccurateRange(), 2.5); + } + else if (nodeType == Lib3MF::eImplicitNodeType::FunctionGradient) + { + foundFunctionGradient = true; + auto fgNode = std::dynamic_pointer_cast(node); + ASSERT_NE(fgNode, nullptr); + EXPECT_EQ(fgNode->GetScalarOutputName(), "magnitude"); + EXPECT_EQ(fgNode->GetVectorInputName(), "normalizedgradient"); + } + else if (nodeType == Lib3MF::eImplicitNodeType::NormalizeDistance) + { + foundNormalizeDistance = true; + auto ndNode = std::dynamic_pointer_cast(node); + ASSERT_NE(ndNode, nullptr); + EXPECT_EQ(ndNode->GetScalarOutputName(), "result"); + EXPECT_EQ(ndNode->GetVectorInputName(), "gradient"); + } + } + + EXPECT_TRUE(foundBeamLattice); + EXPECT_TRUE(foundFunctionGradient); + EXPECT_TRUE(foundNormalizeDistance); + } + +} // namespace Lib3MF diff --git a/Tests/CPP_Bindings/Source/UnitTest_EncryptionUtils.cpp b/Tests/CPP_Bindings/Source/UnitTest_EncryptionUtils.cpp index 45a5f7458..a763c2a42 100644 --- a/Tests/CPP_Bindings/Source/UnitTest_EncryptionUtils.cpp +++ b/Tests/CPP_Bindings/Source/UnitTest_EncryptionUtils.cpp @@ -128,9 +128,15 @@ namespace RsaMethods { } void EncryptionCallbacks::cleanup() { +#if OPENSSL_VERSION_NUMBER < 0x10100000L + // OpenSSL < 1.1.0 requires explicit cleanup RAND_cleanup(); EVP_cleanup(); CRYPTO_cleanup_all_ex_data(); +#else + // OpenSSL >= 1.1.0 performs automatic cleanup; these functions are removed + (void)0; +#endif } void EncryptionCallbacks::dataEncryptClientCallback( diff --git a/Tests/CPP_Bindings/Source/Volumetric.cpp b/Tests/CPP_Bindings/Source/Volumetric.cpp index 9c5291ced..2c6ba71a3 100644 --- a/Tests/CPP_Bindings/Source/Volumetric.cpp +++ b/Tests/CPP_Bindings/Source/Volumetric.cpp @@ -32,11 +32,15 @@ Vulometric.cpp: Defines Unittests for the Volumetric extension #include "UnitTest_Utilities.h" #include "lib3mf_implicit.hpp" +#include "ZipBuffer.h" + +#include namespace Lib3MF { namespace helper { + PImplicitFunction createGyroidFunction(CModel& model) { PImplicitFunction gyroidFunction = model.AddImplicitFunction(); @@ -1066,6 +1070,60 @@ namespace Lib3MF EXPECT_EQ(property->GetName(), propertyFromFile->GetName()); } + TEST_F(Volumetric, LevelSet_WritesVolumeDataBeforeLevelSet) + { + model = wrapper->CreateModel(); + auto reader = model->QueryReader("3mf"); + reader->ReadFromFile(InFolder + "Cube.3mf"); + + auto mesh = GetMesh(); + + auto implicitFunction = model->AddImplicitFunction(); + implicitFunction->SetDisplayName("constant levelset"); + + implicitFunction->AddInput( + "pos", "position", Lib3MF::eImplicitPortType::Vector); + + auto constScalarNode = implicitFunction->AddConstantNode( + "constant", "constant", "group_levelset"); + constScalarNode->SetConstant(0.0); + + auto output = implicitFunction->AddOutput( + "shape", "signed distance", Lib3MF::eImplicitPortType::Scalar); + implicitFunction->AddLink(constScalarNode->GetOutputValue(), + output); + + auto levelSetFunction = + std::dynamic_pointer_cast(implicitFunction); + ASSERT_TRUE(levelSetFunction); + + auto volumeData = model->AddVolumeData(); + + auto levelSet = model->AddLevelSet(); + levelSet->SetMesh(mesh); + levelSet->SetFunction(levelSetFunction); + levelSet->SetVolumeData(volumeData); + levelSet->SetChannelName("shape"); + + auto writer = model->QueryWriter("3mf"); + std::vector buffer; + writer->WriteToBuffer(buffer); + + std::string const xml = helper::extractZipEntryFromBuffer(buffer, "3D/3dmodel.model"); + + auto volumeDataPos = xml.find("SetStrictModeActive(true); reader->ReadFromFile(InFolder + "template.3mf"); - auto sourceModelFunctionCount = sourceModel->GetFunctions()->Count(); auto const targetModel = wrapper->CreateModel(); auto targetReader = targetModel->QueryReader("3mf"); targetReader->SetStrictModeActive(true); targetReader->ReadFromFile(InFolder + "Cube.3mf"); - auto previousTargetFunctionCount = targetModel->GetFunctions()->Count(); EXPECT_NO_THROW(targetModel->MergeFromModel(sourceModel.get())); diff --git a/Tests/CPP_Bindings/Source/Volumetric.test.cpp b/Tests/CPP_Bindings/Source/Volumetric.test.cpp deleted file mode 100644 index e69de29bb..000000000 diff --git a/Tests/CPP_Bindings/Source/Wrapper.cpp b/Tests/CPP_Bindings/Source/Wrapper.cpp index 4b2546228..11903a46b 100644 --- a/Tests/CPP_Bindings/Source/Wrapper.cpp +++ b/Tests/CPP_Bindings/Source/Wrapper.cpp @@ -106,6 +106,24 @@ namespace Lib3MF ASSERT_EQ(nMajor, 1); ASSERT_EQ(nMinor, 0); ASSERT_EQ(nMicro, 2); + + Lib3MFTest::wrapper->GetSpecificationVersion("http://schemas.microsoft.com/3dmanufacturing/trianglesets/2021/07", bIsSupported, nMajor, nMinor, nMicro); + ASSERT_TRUE(bIsSupported); + ASSERT_EQ(nMajor, 1); + ASSERT_EQ(nMinor, 3); + ASSERT_EQ(nMicro, 0); + + Lib3MFTest::wrapper->GetSpecificationVersion("http://schemas.3mf.io/3dmanufacturing/volumetric/2022/01", bIsSupported, nMajor, nMinor, nMicro); + ASSERT_TRUE(bIsSupported); + ASSERT_EQ(nMajor, 0); + ASSERT_EQ(nMinor, 8); + ASSERT_EQ(nMicro, 0); + + Lib3MFTest::wrapper->GetSpecificationVersion("http://schemas.3mf.io/3dmanufacturing/implicit/2023/12", bIsSupported, nMajor, nMinor, nMicro); + ASSERT_TRUE(bIsSupported); + ASSERT_EQ(nMajor, 0); + ASSERT_EQ(nMinor, 8); + ASSERT_EQ(nMicro, 0); } TEST(Wrapper, CreateModel) diff --git a/Tests/CPP_Bindings/Source/ZipBuffer.cpp b/Tests/CPP_Bindings/Source/ZipBuffer.cpp new file mode 100644 index 000000000..fa75d8769 --- /dev/null +++ b/Tests/CPP_Bindings/Source/ZipBuffer.cpp @@ -0,0 +1,528 @@ +#include "ZipBuffer.h" + +#include + +#include +#include +#include +#include +#include + +namespace Lib3MF +{ + namespace helper + { + namespace + { + constexpr std::uint32_t kLocalFileHeaderSignature = 0x04034b50u; + constexpr std::uint32_t kCentralDirectorySignature = 0x02014b50u; + constexpr std::uint32_t kEndOfCentralDirectorySignature = + 0x06054b50u; + constexpr std::uint32_t kZip64EndOfCentralDirectorySignature = + 0x06064b50u; + constexpr std::uint32_t + kZip64EndOfCentralDirectoryLocatorSignature = 0x07064b50u; + + std::uint16_t readUInt16(const std::vector& data, + size_t offset) + { + if(offset + 2 > data.size()) + { + throw std::runtime_error( + "ZIP: unexpected end of buffer while reading uint16"); + } + return static_cast( + data[offset] | + (static_cast(data[offset + 1]) << 8U)); + } + + std::uint32_t readUInt32(const std::vector& data, + size_t offset) + { + if(offset + 4 > data.size()) + { + throw std::runtime_error( + "ZIP: unexpected end of buffer while reading uint32"); + } + return static_cast( + data[offset] | + (static_cast(data[offset + 1]) << 8U) | + (static_cast(data[offset + 2]) << 16U) | + (static_cast(data[offset + 3]) << 24U)); + } + + std::uint64_t readUInt64(const std::vector& data, + size_t offset) + { + if(offset + 8 > data.size()) + { + throw std::runtime_error( + "ZIP: unexpected end of buffer while reading uint64"); + } + return static_cast(data[offset]) | + (static_cast(data[offset + 1]) << 8U) | + (static_cast(data[offset + 2]) << 16U) | + (static_cast(data[offset + 3]) << 24U) | + (static_cast(data[offset + 4]) << 32U) | + (static_cast(data[offset + 5]) << 40U) | + (static_cast(data[offset + 6]) << 48U) | + (static_cast(data[offset + 7]) << 56U); + } + + size_t findEndOfCentralDirectory( + const std::vector& data) + { + constexpr size_t kEOCDMinSize = 22; + if(data.size() < kEOCDMinSize) + { + throw std::runtime_error( + "ZIP: buffer too small for end of central directory"); + } + + for(size_t offset = data.size() - kEOCDMinSize;;) + { + if(readUInt32(data, offset) == + kEndOfCentralDirectorySignature) + { + return offset; + } + if(offset == 0) + { + break; + } + --offset; + } + + throw std::runtime_error( + "ZIP: end of central directory not found"); + } + + struct ZipEntryInfo + { + std::uint16_t generalPurposeFlag = 0; + std::uint16_t compressionMethod = 0; + std::uint64_t compressedSize = 0; + std::uint64_t uncompressedSize = 0; + std::uint64_t localHeaderOffset = 0; + std::uint16_t fileNameLength = 0; + std::uint16_t extraFieldLength = 0; + std::uint16_t fileCommentLength = 0; + }; + + ZipEntryInfo readCentralDirectoryEntry( + const std::vector& data, size_t& cursor, + std::string& fileName) + { + if(readUInt32(data, cursor) != kCentralDirectorySignature) + { + throw std::runtime_error( + "ZIP: invalid central directory signature"); + } + + ZipEntryInfo info; + info.generalPurposeFlag = readUInt16(data, cursor + 8); + info.compressionMethod = readUInt16(data, cursor + 10); + auto const compressedSize32 = readUInt32(data, cursor + 20); + auto const uncompressedSize32 = readUInt32(data, cursor + 24); + info.fileNameLength = readUInt16(data, cursor + 28); + info.extraFieldLength = readUInt16(data, cursor + 30); + info.fileCommentLength = readUInt16(data, cursor + 32); + auto const localHeaderOffset32 = readUInt32(data, cursor + 42); + + bool needsZip64Compressed = (compressedSize32 == 0xFFFFFFFFu); + bool needsZip64Uncompressed = + (uncompressedSize32 == 0xFFFFFFFFu); + bool needsZip64Offset = (localHeaderOffset32 == 0xFFFFFFFFu); + + info.compressedSize = compressedSize32; + info.uncompressedSize = uncompressedSize32; + info.localHeaderOffset = localHeaderOffset32; + + size_t const nameOffset = cursor + 46; + size_t const nameEnd = nameOffset + info.fileNameLength; + if(nameEnd > data.size()) + { + throw std::runtime_error( + "ZIP: truncated filename in central directory entry"); + } + + fileName.assign( + reinterpret_cast(&data[nameOffset]), + info.fileNameLength); + + size_t const extraOffset = nameEnd; + size_t const extraEnd = extraOffset + info.extraFieldLength; + if(extraEnd > data.size()) + { + throw std::runtime_error( + "ZIP: extra field exceeds buffer bounds"); + } + + size_t extraCursor = extraOffset; + while(extraCursor + 4 <= extraEnd) + { + auto const headerId = readUInt16(data, extraCursor); + auto const fieldSize = readUInt16(data, extraCursor + 2); + size_t const fieldStart = extraCursor + 4; + size_t const fieldEnd = fieldStart + fieldSize; + if(fieldEnd > extraEnd) + { + throw std::runtime_error("ZIP: malformed extra field"); + } + + if(headerId == 0x0001) + { + size_t fieldCursor = fieldStart; + if(needsZip64Uncompressed) + { + if(fieldCursor + 8 > fieldEnd) + { + throw std::runtime_error( + "ZIP: missing ZIP64 uncompressed size"); + } + info.uncompressedSize = + readUInt64(data, fieldCursor); + fieldCursor += 8; + needsZip64Uncompressed = false; + } + if(needsZip64Compressed) + { + if(fieldCursor + 8 > fieldEnd) + { + throw std::runtime_error( + "ZIP: missing ZIP64 compressed size"); + } + info.compressedSize = readUInt64(data, fieldCursor); + fieldCursor += 8; + needsZip64Compressed = false; + } + if(needsZip64Offset) + { + if(fieldCursor + 8 > fieldEnd) + { + throw std::runtime_error( + "ZIP: missing ZIP64 local header offset"); + } + info.localHeaderOffset = + readUInt64(data, fieldCursor); + fieldCursor += 8; + needsZip64Offset = false; + } + } + + extraCursor = fieldEnd; + } + + if(needsZip64Compressed || needsZip64Uncompressed || + needsZip64Offset) + { + throw std::runtime_error( + "ZIP: ZIP64 extended data missing required values"); + } + + if(extraEnd + info.fileCommentLength > data.size()) + { + throw std::runtime_error( + "ZIP: file comment exceeds buffer bounds"); + } + + cursor = extraEnd + info.fileCommentLength; + if(cursor > data.size()) + { + throw std::runtime_error( + "ZIP: central directory entry exceeds buffer bounds"); + } + + return info; + } + + std::pair + resolveCentralDirectoryZip64(const std::vector& data, + size_t eocdOffset) + { + size_t locatorOffset = std::numeric_limits::max(); + if(eocdOffset >= 20) + { + size_t const candidate = eocdOffset - 20; + if(readUInt32(data, candidate) == + kZip64EndOfCentralDirectoryLocatorSignature) + { + locatorOffset = candidate; + } + } + + if(locatorOffset == std::numeric_limits::max()) + { + size_t const maxScan = + std::min(eocdOffset, static_cast(1024)); + for(size_t back = 4; back <= maxScan; ++back) + { + size_t const offset = eocdOffset - back; + if(readUInt32(data, offset) == + kZip64EndOfCentralDirectoryLocatorSignature) + { + locatorOffset = offset; + break; + } + } + } + + if(locatorOffset == std::numeric_limits::max()) + { + throw std::runtime_error("ZIP: ZIP64 locator not found"); + } + + auto const zip64EocdOffset = + readUInt64(data, locatorOffset + 8); + if(zip64EocdOffset > data.size()) + { + throw std::runtime_error( + "ZIP: ZIP64 EOCD offset outside buffer"); + } + + size_t const zip64EocdPos = + static_cast(zip64EocdOffset); + if(readUInt32(data, zip64EocdPos) != + kZip64EndOfCentralDirectorySignature) + { + throw std::runtime_error( + "ZIP: ZIP64 EOCD signature mismatch"); + } + + auto const centralDirectorySize = + readUInt64(data, zip64EocdPos + 40); + auto const centralDirectoryOffset = + readUInt64(data, zip64EocdPos + 48); + + return {centralDirectorySize, centralDirectoryOffset}; + } + + size_t getLocalDataOffset(const std::vector& data, + const ZipEntryInfo& info) + { + if(info.localHeaderOffset > data.size()) + { + throw std::runtime_error( + "ZIP: local header offset outside buffer"); + } + + size_t const offset = + static_cast(info.localHeaderOffset); + if(offset + 30 > data.size()) + { + throw std::runtime_error( + "ZIP: truncated local file header"); + } + + if(readUInt32(data, offset) != kLocalFileHeaderSignature) + { + throw std::runtime_error( + "ZIP: invalid local file header signature"); + } + + std::uint16_t const fileNameLength = + readUInt16(data, offset + 26); + std::uint16_t const extraFieldLength = + readUInt16(data, offset + 28); + + size_t const dataOffset = + offset + 30 + fileNameLength + extraFieldLength; + if(dataOffset > data.size()) + { + throw std::runtime_error( + "ZIP: local file data exceeds buffer bounds"); + } + + return dataOffset; + } + + std::string decompressDeflate(const Lib3MF_uint8* data, + size_t compressedSize, + size_t uncompressedSize) + { + if(uncompressedSize == 0) + { + return std::string(); + } + + std::string result(uncompressedSize, '\0'); + + z_stream stream; + stream.zalloc = Z_NULL; + stream.zfree = Z_NULL; + stream.opaque = Z_NULL; + stream.next_in = Z_NULL; + stream.avail_in = 0; + stream.next_out = Z_NULL; + stream.avail_out = 0; + + // Use -MAX_WBITS to indicate raw deflate stream (no zlib headers/footers). + int const initResult = inflateInit2(&stream, -MAX_WBITS); + if(initResult != Z_OK) + { + throw std::runtime_error("ZIP: inflateInit2 failed"); + } + + size_t inOffset = 0; + size_t outOffset = 0; + + auto const maxChunk = + static_cast(std::numeric_limits::max()); + + int status = Z_OK; + while(status != Z_STREAM_END) + { + if(stream.avail_in == 0 && inOffset < compressedSize) + { + size_t const remaining = compressedSize - inOffset; + size_t const chunkSize = std::min(remaining, maxChunk); + stream.avail_in = static_cast(chunkSize); + stream.next_in = const_cast( + reinterpret_cast(data + inOffset)); + inOffset += chunkSize; + } + + if(stream.avail_out == 0 && outOffset < uncompressedSize) + { + size_t const remaining = uncompressedSize - outOffset; + size_t const chunkSize = std::min(remaining, maxChunk); + stream.avail_out = static_cast(chunkSize); + stream.next_out = + reinterpret_cast(&result[outOffset]); + outOffset += chunkSize; + } + + status = inflate(&stream, Z_NO_FLUSH); + if(status != Z_OK && status != Z_STREAM_END) + { + inflateEnd(&stream); + throw std::runtime_error("ZIP: inflate failed"); + } + } + + inflateEnd(&stream); + + if(outOffset != uncompressedSize) + { + throw std::runtime_error( + "ZIP: unexpected uncompressed size"); + } + + return result; + } + } // unnamed namespace + + std::string extractZipEntryFromBuffer( + const std::vector& buffer, + const std::string& entryName) + { + auto const eocdOffset = findEndOfCentralDirectory(buffer); + auto const centralDirectorySize32 = + readUInt32(buffer, eocdOffset + 12); + auto const centralDirectoryOffset32 = + readUInt32(buffer, eocdOffset + 16); + + std::uint64_t centralDirectorySize = centralDirectorySize32; + std::uint64_t centralDirectoryOffset = centralDirectoryOffset32; + + if(centralDirectorySize32 == 0xFFFFFFFFu || + centralDirectoryOffset32 == 0xFFFFFFFFu) + { + auto const resolved = + resolveCentralDirectoryZip64(buffer, eocdOffset); + centralDirectorySize = resolved.first; + centralDirectoryOffset = resolved.second; + } + + if(centralDirectoryOffset > buffer.size()) + { + throw std::runtime_error( + "ZIP: central directory offset outside buffer"); + } + + size_t centralDirectoryEnd = buffer.size(); + if(centralDirectorySize != 0) + { + auto const declaredEnd64 = + centralDirectoryOffset + centralDirectorySize; + if(declaredEnd64 < centralDirectoryOffset) + { + throw std::runtime_error( + "ZIP: central directory size overflow"); + } + centralDirectoryEnd = std::min( + centralDirectoryEnd, static_cast(declaredEnd64)); + } + + centralDirectoryEnd = std::min(centralDirectoryEnd, eocdOffset); + + size_t cursor = static_cast(centralDirectoryOffset); + if(cursor > centralDirectoryEnd) + { + throw std::runtime_error( + "ZIP: central directory offset beyond computed end"); + } + + while(cursor < centralDirectoryEnd) + { + std::string currentName; + ZipEntryInfo const entry = + readCentralDirectoryEntry(buffer, cursor, currentName); + if(currentName == entryName) + { + size_t const dataOffset = getLocalDataOffset(buffer, entry); + auto const maxAvailable = buffer.size() - dataOffset; + + if(entry.compressedSize > + static_cast(maxAvailable)) + { + throw std::runtime_error( + "ZIP: entry data exceeds buffer bounds"); + } + + if(entry.compressedSize > + static_cast( + std::numeric_limits::max()) || + entry.uncompressedSize > + static_cast( + std::numeric_limits::max())) + { + throw std::runtime_error( + "ZIP: entry size too large for platform string"); + } + + size_t const compressedSize = + static_cast(entry.compressedSize); + size_t const uncompressedSize = + static_cast(entry.uncompressedSize); + + auto const* dataPtr = &buffer[dataOffset]; + switch(entry.compressionMethod) + { + case 0: + if(uncompressedSize != compressedSize) + { + throw std::runtime_error( + "ZIP: stored entry size mismatch"); + } + { + auto const* start = + reinterpret_cast(dataPtr); + auto const* end = start + uncompressedSize; + return std::string(start, end); + } + case 8: + return decompressDeflate(dataPtr, compressedSize, + uncompressedSize); + default: + throw std::runtime_error( + "ZIP: unsupported compression method"); + } + } + } + + throw std::runtime_error("ZIP: entry not found: " + entryName); + } + + } // namespace helper +} // namespace Lib3MF diff --git a/Tests/CPP_Bindings/Source/ZipBuffer.h b/Tests/CPP_Bindings/Source/ZipBuffer.h new file mode 100644 index 000000000..681480bea --- /dev/null +++ b/Tests/CPP_Bindings/Source/ZipBuffer.h @@ -0,0 +1,16 @@ +#pragma once + +#include +#include + +#include "lib3mf_types.hpp" + +namespace Lib3MF +{ + namespace helper + { + std::string extractZipEntryFromBuffer( + const std::vector& buffer, + const std::string& entryName); + } // namespace helper +} // namespace Lib3MF diff --git a/Tests/TestFiles/BeamLattice/testsuite_P_BXX_2021_06.3mf b/Tests/TestFiles/BeamLattice/testsuite_P_BXX_2021_06.3mf new file mode 100644 index 000000000..cd47e8497 Binary files /dev/null and b/Tests/TestFiles/BeamLattice/testsuite_P_BXX_2021_06.3mf differ diff --git a/cmake/GenerateVS2022_32bit.bat b/cmake/GenerateVS2022_32bit.bat new file mode 100644 index 000000000..a2b6b25c8 --- /dev/null +++ b/cmake/GenerateVS2022_32bit.bat @@ -0,0 +1,10 @@ +@echo off +set startingDir="%CD%" + +set basepath="%~dp0" +set builddir=%basepath%\..\build_32bit +if not exist %builddir% (mkdir %builddir%) +cd %builddir% +cmake -G "Visual Studio 17 2022" -A Win32 .. %* + +cd %startingDir% \ No newline at end of file diff --git a/cmake/lib3mfConfig.cmake b/cmake/lib3mfConfig.cmake index f1305b8f5..9d77e5c8d 100644 --- a/cmake/lib3mfConfig.cmake +++ b/cmake/lib3mfConfig.cmake @@ -21,21 +21,50 @@ foreach(comp ${lib3mf_FIND_COMPONENTS}) endif() endforeach() -# Configure paths based on the selected variant -set(lib3mf_INCLUDE_DIR "${LIB3MF_ROOT_DIR}/include/Bindings/${lib3mf_selected_variant}") +# Configure paths set(lib3mf_LIBRARY_DIR "${LIB3MF_ROOT_DIR}/lib") set(lib3mf_BINARY_DIR "${LIB3MF_ROOT_DIR}/bin") -# Adjust library file name based on platform +# Adjust library file name based on platform (prefer shared, fallback to static) +set(_lib3mf_is_shared TRUE) if(WIN32) - set(lib3mf_LIBRARY "${lib3mf_BINARY_DIR}/lib3mf.dll") - set(lib3mf_LIBRARY_IMPORT "${lib3mf_LIBRARY_DIR}/lib3mf.lib") # For importing symbols + if(EXISTS "${lib3mf_BINARY_DIR}/lib3mf.dll") + set(lib3mf_LIBRARY "${lib3mf_BINARY_DIR}/lib3mf.dll") + set(lib3mf_LIBRARY_IMPORT "${lib3mf_LIBRARY_DIR}/lib3mf.lib") # For importing symbols + elseif(EXISTS "${lib3mf_LIBRARY_DIR}/lib3mf.lib") + set(_lib3mf_is_shared FALSE) + set(lib3mf_LIBRARY "${lib3mf_LIBRARY_DIR}/lib3mf.lib") + endif() elseif(APPLE) - set(lib3mf_LIBRARY "${lib3mf_LIBRARY_DIR}/lib3mf.dylib") + if(EXISTS "${lib3mf_LIBRARY_DIR}/lib3mf.dylib") + set(lib3mf_LIBRARY "${lib3mf_LIBRARY_DIR}/lib3mf.dylib") + elseif(EXISTS "${lib3mf_LIBRARY_DIR}/lib3mf.a") + set(_lib3mf_is_shared FALSE) + set(lib3mf_LIBRARY "${lib3mf_LIBRARY_DIR}/lib3mf.a") + endif() else() # Linux and others - set(lib3mf_LIBRARY "${lib3mf_LIBRARY_DIR}/lib3mf.so") + if(EXISTS "${lib3mf_LIBRARY_DIR}/lib3mf.so") + set(lib3mf_LIBRARY "${lib3mf_LIBRARY_DIR}/lib3mf.so") + elseif(EXISTS "${lib3mf_LIBRARY_DIR}/lib3mf.a") + set(_lib3mf_is_shared FALSE) + set(lib3mf_LIBRARY "${lib3mf_LIBRARY_DIR}/lib3mf.a") + endif() +endif() + +# If the install is static-only, dynamic variants are not practical; fall back with a warning. +if(NOT _lib3mf_is_shared) + if("${lib3mf_selected_variant}" STREQUAL "CDynamic") + message(WARNING "lib3mf: CDynamic requested, but only a static library is available; switching to C.") + set(lib3mf_selected_variant "C") + elseif("${lib3mf_selected_variant}" STREQUAL "CppDynamic") + message(WARNING "lib3mf: CppDynamic requested, but only a static library is available; switching to Cpp.") + set(lib3mf_selected_variant "Cpp") + endif() endif() +# Configure include paths based on the (possibly adjusted) selected variant +set(lib3mf_INCLUDE_DIR "${LIB3MF_ROOT_DIR}/include/Bindings/${lib3mf_selected_variant}") + # Print the chosen variant message("***********************************") message("LIB3MF Chosen Variant : " ${lib3mf_selected_variant}) @@ -63,19 +92,26 @@ if("${lib3mf_selected_variant}" STREQUAL "CppDynamic" OR "${lib3mf_selected_vari ) target_include_directories(lib3mfdynamic INTERFACE "${lib3mf_INCLUDE_DIR}") else() - # Define the imported target for static linking - add_library(lib3mf::lib3mf SHARED IMPORTED) + if(_lib3mf_is_shared) + add_library(lib3mf::lib3mf SHARED IMPORTED) + else() + add_library(lib3mf::lib3mf STATIC IMPORTED) + endif() set_target_properties(lib3mf::lib3mf PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${lib3mf_INCLUDE_DIR}" IMPORTED_LOCATION "${lib3mf_LIBRARY}" ) - if(WIN32) + if(WIN32 AND _lib3mf_is_shared) set_property(TARGET lib3mf::lib3mf PROPERTY IMPORTED_IMPLIB "${lib3mf_LIBRARY_IMPORT}") endif() # Define a custom function to handle library copying function(copy_lib3mf_libraries target) if(TARGET ${target}) + if(NOT _lib3mf_is_shared) + # Static library: nothing to copy at runtime. + return() + endif() if(APPLE) # On macOS, copy .dylib files, preserving symlinks only if they don't already exist in the target directory file(GLOB LIB3MF_FILES "${lib3mf_LIBRARY_DIR}/lib3mf.dylib*") diff --git a/cmake/lib3mfConfig.cmake.in b/cmake/lib3mfConfig.cmake.in index 744c348f6..589422b33 100644 --- a/cmake/lib3mfConfig.cmake.in +++ b/cmake/lib3mfConfig.cmake.in @@ -1,3 +1,135 @@ @PACKAGE_INIT@ -include("${CMAKE_CURRENT_LIST_DIR}/lib3mfTargets.cmake") \ No newline at end of file +include(CMakeFindDependencyMacro) + +if(NOT @USE_INCLUDED_LIBZIP@) + find_dependency(libzip CONFIG) +endif() + +if(NOT @USE_INCLUDED_ZLIB@) + find_dependency(ZLIB) +endif() + +if(NOT @USE_INCLUDED_FASTFLOAT@) + find_dependency(FastFloat CONFIG) +endif() + +include("${CMAKE_CURRENT_LIST_DIR}/lib3mfTargets.cmake") + +if(NOT TARGET lib3mf::lib3mf) + set(${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE) + set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE + "Expected imported target lib3mf::lib3mf was not found in lib3mfTargets.cmake.") + return() +endif() + +get_filename_component(_lib3mf_package_dir "${CMAKE_CURRENT_LIST_DIR}" ABSOLUTE) +get_filename_component(LIB3MF_ROOT_DIR "${_lib3mf_package_dir}/../../.." ABSOLUTE) +set(LIB3MF_CDYNAMIC_ADDITIONAL_SOURCE "${LIB3MF_ROOT_DIR}/include/Bindings/CDynamic/lib3mf_dynamic.cc") + +set(_lib3mf_library_location_definition "LIB3MF_LIBRARY_LOCATION=\"$\"") + +if(NOT TARGET lib3mf::Cpp) + add_library(lib3mf::Cpp INTERFACE IMPORTED) + set_target_properties(lib3mf::Cpp PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${LIB3MF_ROOT_DIR}/include/Bindings/Cpp" + ) + target_link_libraries(lib3mf::Cpp INTERFACE lib3mf::lib3mf) +endif() + +if(NOT TARGET lib3mf::C) + add_library(lib3mf::C INTERFACE IMPORTED) + set_target_properties(lib3mf::C PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${LIB3MF_ROOT_DIR}/include/Bindings/C" + ) + target_link_libraries(lib3mf::C INTERFACE lib3mf::lib3mf) +endif() + +if(NOT TARGET lib3mf::CppDynamic) + add_library(lib3mf::CppDynamic INTERFACE IMPORTED) + set_target_properties(lib3mf::CppDynamic PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${LIB3MF_ROOT_DIR}/include/Bindings/CppDynamic" + INTERFACE_COMPILE_DEFINITIONS "${_lib3mf_library_location_definition}" + ) +endif() + +if(NOT TARGET lib3mf::CDynamic) + add_library(lib3mf::CDynamic INTERFACE IMPORTED) + set_target_properties(lib3mf::CDynamic PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${LIB3MF_ROOT_DIR}/include/Bindings/CDynamic" + INTERFACE_COMPILE_DEFINITIONS "${_lib3mf_library_location_definition}" + INTERFACE_SOURCES "${LIB3MF_CDYNAMIC_ADDITIONAL_SOURCE}" + ) +endif() + +set(lib3mf_known_components C CDynamic Cpp CppDynamic) +foreach(_lib3mf_component IN LISTS lib3mf_known_components) + set(lib3mf_${_lib3mf_component}_FOUND TRUE) +endforeach() + +set(_lib3mf_selected_component Cpp) +foreach(_lib3mf_component IN LISTS lib3mf_FIND_COMPONENTS) + if(_lib3mf_component IN_LIST lib3mf_known_components) + set(_lib3mf_selected_component "${_lib3mf_component}") + break() + endif() +endforeach() + +set(lib3mf_BINDING_COMPONENT "${_lib3mf_selected_component}") +set(lib3mf_LIBRARIES "lib3mf::${_lib3mf_selected_component}") +set(lib3mf_INCLUDE_DIRS "${LIB3MF_ROOT_DIR}/include/Bindings/${_lib3mf_selected_component}") + +foreach(_lib3mf_component IN LISTS lib3mf_FIND_COMPONENTS) + if(NOT _lib3mf_component IN_LIST lib3mf_known_components) + set(lib3mf_${_lib3mf_component}_FOUND FALSE) + endif() +endforeach() + +if(TARGET lib3mf::lib3mf) + set_property(TARGET lib3mf::lib3mf APPEND PROPERTY + INTERFACE_INCLUDE_DIRECTORIES "${LIB3MF_ROOT_DIR}/include/Bindings/${_lib3mf_selected_component}" + ) + if(_lib3mf_selected_component STREQUAL "CppDynamic" OR _lib3mf_selected_component STREQUAL "CDynamic") + set_property(TARGET lib3mf::lib3mf APPEND PROPERTY + INTERFACE_COMPILE_DEFINITIONS "${_lib3mf_library_location_definition}" + ) + endif() + if(_lib3mf_selected_component STREQUAL "CDynamic") + set_property(TARGET lib3mf::lib3mf APPEND PROPERTY + INTERFACE_SOURCES "${LIB3MF_CDYNAMIC_ADDITIONAL_SOURCE}" + ) + endif() +endif() + +if(NOT COMMAND copy_lib3mf_libraries) + function(copy_lib3mf_libraries target) + if(NOT TARGET "${target}") + message(WARNING "copy_lib3mf_libraries: target '${target}' not found.") + return() + endif() + + if(NOT TARGET lib3mf::lib3mf) + message(WARNING "copy_lib3mf_libraries: lib3mf::lib3mf not found.") + return() + endif() + + get_target_property(_lib3mf_imported_type lib3mf::lib3mf TYPE) + if(NOT _lib3mf_imported_type STREQUAL "SHARED_LIBRARY") + return() + endif() + + add_custom_command(TARGET "${target}" POST_BUILD + COMMAND "${CMAKE_COMMAND}" -E copy_if_different + "$" + "$" + COMMENT "Copying lib3mf runtime to output directory" + ) + endfunction() +endif() + +check_required_components(lib3mf) + +unset(_lib3mf_component) +unset(_lib3mf_package_dir) +unset(_lib3mf_selected_component) +unset(_lib3mf_library_location_definition) diff --git a/conanfile.py b/conanfile.py new file mode 100644 index 000000000..7ff2d6994 --- /dev/null +++ b/conanfile.py @@ -0,0 +1,129 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, load +from conan.tools.gnu import PkgConfigDeps +from conan.tools.env import VirtualBuildEnv + +import os +import re + + +class Lib3MFConan(ConanFile): + name = "lib3mf" + license = "BSD-2-Clause" + url = "https://github.com/3MFConsortium/lib3mf" + description = "An implementation of the 3D Manufacturing Format file standard" + topics = ("3mf", "additive-manufacturing", "cad", "serialization") + package_type = "library" + + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "use_platform_uuid": [True, False], + "with_vendored_zlib": [True, False], + "with_vendored_libzip": [True, False], + "with_vendored_ssl": [True, False], + } + default_options = { + "shared": True, + "fPIC": True, + "use_platform_uuid": False, + "with_vendored_zlib": False, + "with_vendored_libzip": False, + "with_vendored_ssl": False, + } + + exports_sources = ( + "Autogenerated/*", + "AutomaticComponentToolkit/*", + "Include/*", + "Libraries/*", + "Source/*", + "submodules/*", + "cmake/*", + "CMakeLists.txt", + "lib3mf.pc.in", + "LICENSE", + "README.md", + ) + + def set_version(self): + cmakelists = load(self, os.path.join(self.recipe_folder, "CMakeLists.txt")) + major = re.search(r"set\(LIB3MF_VERSION_MAJOR\s+(\d+)\)", cmakelists) + minor = re.search(r"set\(LIB3MF_VERSION_MINOR\s+(\d+)\)", cmakelists) + patch = re.search(r"set\(LIB3MF_VERSION_MICRO\s+(\d+)\)", cmakelists) + prerelease = re.search(r'set\(LIB3MF_VERSION_PRERELEASE\s+"([^"]*)"\)', cmakelists) + if not (major and minor and patch): + raise ConanInvalidConfiguration("Could not parse lib3mf version from CMakeLists.txt") + version = f"{major.group(1)}.{minor.group(1)}.{patch.group(1)}" + if prerelease and prerelease.group(1): + version = f"{version}-{prerelease.group(1)}" + self.version = version + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self) + + def requirements(self): + if not self.options.with_vendored_zlib: + self.requires("zlib/[>=1.3 <2]") + if not self.options.with_vendored_libzip: + self.requires("libzip/[>=1.10 <2]") + if not self.options.with_vendored_ssl: + # Optional direct exposure to enable explicit non-vendored SSL selection from consumer profiles. + self.requires("openssl/[>=1.1 <4]") + + def build_requirements(self): + if not self.options.with_vendored_zlib or not self.options.with_vendored_libzip: + self.tool_requires("pkgconf/[>=2.0 <3]") + + def generate(self): + if not self.options.with_vendored_zlib or not self.options.with_vendored_libzip: + pkg = PkgConfigDeps(self) + pkg.generate() + + buildenv = VirtualBuildEnv(self) + buildenv.generate() + + tc = CMakeToolchain(self) + tc.variables["LIB3MF_BUILD_SHARED"] = bool(self.options.shared) + tc.variables["LIB3MF_TESTS"] = False + tc.variables["USE_INCLUDED_ZLIB"] = bool(self.options.with_vendored_zlib) + tc.variables["USE_INCLUDED_LIBZIP"] = bool(self.options.with_vendored_libzip) + tc.variables["USE_INCLUDED_SSL"] = bool(self.options.with_vendored_ssl) + tc.variables["USE_PLATFORM_UUID"] = bool(self.options.use_platform_uuid) + tc.variables["LIB3MF_BUILD_WASM"] = False + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + cmake = CMake(self) + cmake.install() + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "lib3mf") + self.cpp_info.set_property("cmake_target_name", "lib3mf::lib3mf") + if self.settings.os == "Windows": + self.cpp_info.libs = ["lib3mf"] + else: + self.cpp_info.libs = ["3mf"] + self.cpp_info.includedirs = [os.path.join("include", "Bindings", "Cpp")] + self.cpp_info.builddirs = [os.path.join("lib", "cmake", "lib3mf")] + + # Keep legacy generators working. + self.cpp_info.names["cmake_find_package"] = "lib3mf" + self.cpp_info.names["cmake_find_package_multi"] = "lib3mf"