├── .github └── workflows │ ├── build.yml │ ├── bump-homebrew-formula.yml │ └── release-exe.yml ├── .gitignore ├── .readthedocs.yaml ├── CITATION.bib ├── CMakeLists.txt ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── bumpver.toml ├── changelog.md ├── cmake ├── CGAL_Eigen3_support.cmake └── FindGEOS.cmake ├── data ├── cityjson │ ├── csol.json │ ├── cube.json │ ├── cube10.json │ ├── cube2.json │ ├── msol.json │ ├── msol2.json │ ├── nonmanifold.json │ ├── torus.city.json │ ├── twobuildings_m.json │ └── with-errors.json ├── cityjsonseq │ └── 3dbag_b2.city.jsonl ├── gml │ ├── DenHaag_1BwBP.gml │ ├── FZK-Haus_full.gml │ ├── README.txt │ ├── csol1.gml │ ├── csol1b.gml │ ├── csol5.gml │ ├── csol6.gml │ ├── csol7.gml │ ├── dh_1.gml │ ├── msol1.gml │ ├── msol2.gml │ └── msol3.gml ├── obj │ ├── cube.obj │ ├── duplicatevertices.obj │ ├── nonmanifold.gml │ ├── nonmanifold.obj │ ├── nonmanifold.off │ ├── nonmanifold.poly │ └── twocubes.obj ├── parse_poly │ ├── parse_error.poly │ ├── parse_ok.poly │ ├── parse_ok1.poly │ ├── parse_ok2.poly │ ├── parse_ok3.poly │ └── parse_ok4.poly ├── poly │ ├── 104_valid.poly │ ├── Cube14r2.poly │ ├── README.txt │ ├── blocker1.poly │ ├── bunny.poly │ ├── bunny.stl │ ├── bunny_repaired.off │ ├── bunny_repaired.poly │ ├── concave.poly │ ├── cube.obj │ ├── cube.poly │ ├── cube13.poly │ ├── cube14.poly │ ├── cube14r.poly │ ├── cube15.poly │ ├── cube19.poly │ ├── cube22.poly │ ├── cube24.poly │ ├── cube25.poly │ ├── cube26.poly │ ├── cube27.poly │ ├── cube5.off │ ├── cube5.ply │ ├── cube5.poly │ ├── cube6.poly │ ├── cube99.poly │ ├── cube_collapsed.poly │ ├── duplicates2.poly │ ├── house.poly │ ├── house4.poly │ ├── m26.poly │ ├── m41.poly │ ├── p1e-1.poly │ ├── p1e-2.poly │ ├── p1e-3.poly │ ├── p1e-4.poly │ ├── pfold1.poly │ ├── pfold2.poly │ ├── pfold3.poly │ ├── pfold4.poly │ ├── py1.poly │ ├── py11.poly │ ├── snap1e-1.poly │ ├── snap1e-2.poly │ ├── snap1e-3.poly │ ├── socket_.poly │ ├── tahol_.poly │ ├── torus.poly │ ├── torus3.poly │ └── torus4.poly ├── test_cityjson │ ├── cube_v10.city.json │ ├── cube_v11.city.json │ ├── emptygeom.json │ ├── geomtemplate_1.json │ ├── geomtemplate_2.json │ ├── several_lods_invalid.json │ ├── several_lods_valid.json │ └── torus.city.json ├── test_cityjsonl │ ├── a.jsonl │ └── denhaag_random_5.jsonl ├── test_duplicates │ ├── cube_tol_1.json │ ├── cube_tol_1.obj │ └── cube_tol_1.off ├── test_empty │ ├── completely_empty.json │ ├── completely_empty.obj │ ├── completely_empty.off │ ├── empty_primitive.json │ ├── empty_primitive.obj │ ├── empty_primitive.off │ ├── empty_primitive.poly │ └── empty_primitive_1.json ├── test_file_format │ ├── index0.obj │ ├── index901.obj │ ├── invalid_indoorgml_1.gml │ ├── invalid_indoorgml_2.gml │ ├── invalid_json_cityjson.json │ ├── invalid_schema_cityjson_1.json │ └── invalid_schema_cityjson_2.json ├── test_geometry_generic │ ├── 101.poly │ ├── 102.poly │ ├── 104.poly │ ├── 104_1.poly │ ├── 104_2.poly │ ├── 104_3.poly │ ├── 104_4.poly │ ├── 201.poly │ ├── 201_1.poly │ ├── 202.poly │ ├── 203.poly │ ├── 203_1.poly │ ├── 203_2.poly │ ├── 204_1.poly │ ├── 204_valid_1.poly │ ├── 204_valid_2.poly │ ├── 205.poly │ ├── 206.poly │ ├── 206_1.poly │ ├── 207.poly │ ├── 207_1.poly │ ├── 207_2.poly │ ├── 208.poly │ ├── 301.poly │ ├── 301_1.poly │ ├── 302.poly │ ├── 302_1.poly │ ├── 302_2.gml │ ├── 303.poly │ ├── 303_1.poly │ ├── 303_2.poly │ ├── 303_cs.poly │ ├── 304_1.poly │ ├── 304_2.obj │ ├── 305.poly │ ├── 305_1.poly │ ├── 306.poly │ ├── 306_1.poly │ ├── 307.poly │ ├── 307_1.poly │ ├── 401.poly │ ├── 401_1.poly │ ├── 401_2.poly │ ├── 401_3.poly │ ├── 401_4.poly │ ├── 401_5.poly │ ├── 401_6.poly │ ├── 402_in_1.poly │ ├── 403.poly │ ├── 404.poly │ ├── 405.poly │ └── inner_shell.poly ├── test_geometry_specific │ ├── 501.json │ ├── 501_1.json │ ├── 502.json │ ├── 503.json │ ├── 601.json │ └── 601_1.json ├── test_indoorgml │ ├── igml_701.gml │ ├── igml_702.gml │ ├── igml_703_1.gml │ ├── igml_703_2.gml │ ├── igml_704_1.gml │ ├── igml_704_2.gml │ ├── igml_v1.gml │ └── igml_v2.gml ├── test_jsonfg │ ├── building.fg.json │ ├── cubes.fg.json │ ├── e103.fg.json │ └── geojson.json ├── test_metadata.yml ├── test_tu3djson │ ├── cube.json │ ├── cube2.json │ └── cube3.json └── test_valid │ ├── basecube.obj │ ├── basecube.off │ ├── basecube.poly │ ├── basecube_large_coords.poly │ ├── closed_top.poly │ ├── composite_solid.json │ ├── inner_shell.poly │ ├── inner_shell_1.poly │ ├── inner_shell_2.poly │ ├── inner_shell_3.poly │ ├── inner_shell_4.poly │ ├── multi_solid.json │ ├── nearly-collinear.off │ ├── planar.off │ ├── self_fold.obj │ ├── two_objects_1.obj │ ├── two_objects_2.obj │ ├── v104_1.off │ ├── v104_2.off │ └── v405.off ├── demo_lib ├── CMakeLists.txt ├── main.cpp └── readme.md ├── docs ├── README.txt ├── _static │ ├── 104.png │ ├── 104b.png │ ├── 201.png │ ├── 204.png │ ├── 205.png │ ├── 206.png │ ├── 207.png │ ├── 208.png │ ├── 302.png │ ├── 303.png │ ├── 304.png │ ├── 305.png │ ├── 306.png │ ├── 501.png │ ├── 503.png │ ├── errorcodes.graffle │ ├── errorcodes.png │ ├── geomprimitives.afdesign │ ├── geomprimitives.pdf │ ├── geomprimitives.svg │ ├── isoprimitives.afdesign │ ├── isoprimitives.pdf │ ├── isoprimitives.svg │ ├── isosolid.afdesign │ ├── isosolid.pdf │ ├── isosolid.svg │ ├── ogcassertions.png │ ├── orientation.png │ ├── report1.png │ ├── report2.png │ ├── report_diagram.svg │ ├── torus.afdesign │ ├── torus.pdf │ ├── torus.svg │ ├── unitpolygons.afdesign │ ├── unitpolygons.pdf │ ├── unitpolygons.svg │ ├── val3dity-logo.png │ ├── val3dity.png │ ├── valid3d.pdf │ ├── validornot.pdf │ ├── validornot.png │ ├── vbp.pdf │ ├── vcsol.pdf │ ├── vcsol_2.pdf │ ├── vcsol_2.png │ ├── workflow.graffle │ └── workflow.svg ├── conf.py ├── contact.rst ├── definitions.rst ├── errors.rst ├── faq.rst ├── index.rst ├── install.rst ├── requirements.txt └── usage.rst ├── misc └── cli.svg ├── pytest.ini ├── report_browser ├── css │ ├── bootstrap.min.css │ └── main.css ├── img │ ├── val3dity.png │ ├── val3dity2.png │ └── welldone.png ├── index.html └── js │ ├── bc945c94ff.js │ ├── bootstrap.min.js │ ├── data.js │ ├── index.js │ ├── jquery.min.js │ ├── vue.min.js │ └── vue2-filters.min.js ├── src ├── CityObject.cpp ├── CityObject.h ├── CompositeSolid.cpp ├── CompositeSolid.h ├── CompositeSurface.cpp ├── CompositeSurface.h ├── Feature.cpp ├── Feature.h ├── GenericObject.cpp ├── GenericObject.h ├── GeometryTemplate.cpp ├── GeometryTemplate.h ├── IndoorGraph.cpp ├── IndoorGraph.h ├── IndoorModel.cpp ├── IndoorModel.h ├── MultiSolid.cpp ├── MultiSolid.h ├── MultiSurface.cpp ├── MultiSurface.h ├── Primitive.cpp ├── Primitive.h ├── Solid.cpp ├── Solid.h ├── Surface.cpp ├── Surface.h ├── definitions.h ├── geomtools.cpp ├── geomtools.h ├── input.cpp ├── input.h ├── main.cpp ├── val3dity.cpp ├── val3dity.h ├── validate_prim_toporel.cpp ├── validate_prim_toporel.h ├── validate_shell.cpp └── validate_shell.h ├── tests ├── README.md ├── conftest.py ├── test_cityjson.py ├── test_cityjsonl.py ├── test_duplicates.py ├── test_empty_files.py ├── test_file_format.py ├── test_geometry_generic.py ├── test_geometry_specific.py ├── test_indoorgml.py ├── test_jsonfg.py ├── test_metadata.py ├── test_tu3djson.py ├── test_user_input.py └── test_valid.py ├── thirdparty ├── nlohmann-json │ └── json.hpp ├── pugixml │ ├── pugiconfig.hpp │ ├── pugixml.cpp │ └── pugixml.hpp ├── spdlog │ ├── async.h │ ├── async_logger-inl.h │ ├── async_logger.h │ ├── cfg │ │ ├── argv.h │ │ ├── env.h │ │ ├── helpers-inl.h │ │ └── helpers.h │ ├── common-inl.h │ ├── common.h │ ├── details │ │ ├── backtracer-inl.h │ │ ├── backtracer.h │ │ ├── circular_q.h │ │ ├── console_globals.h │ │ ├── file_helper-inl.h │ │ ├── file_helper.h │ │ ├── fmt_helper.h │ │ ├── log_msg-inl.h │ │ ├── log_msg.h │ │ ├── log_msg_buffer-inl.h │ │ ├── log_msg_buffer.h │ │ ├── mpmc_blocking_q.h │ │ ├── null_mutex.h │ │ ├── os-inl.h │ │ ├── os.h │ │ ├── periodic_worker-inl.h │ │ ├── periodic_worker.h │ │ ├── registry-inl.h │ │ ├── registry.h │ │ ├── synchronous_factory.h │ │ ├── tcp_client-windows.h │ │ ├── tcp_client.h │ │ ├── thread_pool-inl.h │ │ ├── thread_pool.h │ │ ├── udp_client-windows.h │ │ ├── udp_client.h │ │ └── windows_include.h │ ├── fmt │ │ ├── bin_to_hex.h │ │ ├── bundled │ │ │ ├── args.h │ │ │ ├── chrono.h │ │ │ ├── color.h │ │ │ ├── compile.h │ │ │ ├── core.h │ │ │ ├── fmt.license.rst │ │ │ ├── format-inl.h │ │ │ ├── format.h │ │ │ ├── locale.h │ │ │ ├── os.h │ │ │ ├── ostream.h │ │ │ ├── printf.h │ │ │ ├── ranges.h │ │ │ ├── std.h │ │ │ └── xchar.h │ │ ├── chrono.h │ │ ├── compile.h │ │ ├── fmt.h │ │ ├── ostr.h │ │ ├── ranges.h │ │ ├── std.h │ │ └── xchar.h │ ├── formatter.h │ ├── fwd.h │ ├── logger-inl.h │ ├── logger.h │ ├── mdc.h │ ├── pattern_formatter-inl.h │ ├── pattern_formatter.h │ ├── sinks │ │ ├── android_sink.h │ │ ├── ansicolor_sink-inl.h │ │ ├── ansicolor_sink.h │ │ ├── base_sink-inl.h │ │ ├── base_sink.h │ │ ├── basic_file_sink-inl.h │ │ ├── basic_file_sink.h │ │ ├── callback_sink.h │ │ ├── daily_file_sink.h │ │ ├── dist_sink.h │ │ ├── dup_filter_sink.h │ │ ├── hourly_file_sink.h │ │ ├── kafka_sink.h │ │ ├── mongo_sink.h │ │ ├── msvc_sink.h │ │ ├── null_sink.h │ │ ├── ostream_sink.h │ │ ├── qt_sinks.h │ │ ├── ringbuffer_sink.h │ │ ├── rotating_file_sink-inl.h │ │ ├── rotating_file_sink.h │ │ ├── sink-inl.h │ │ ├── sink.h │ │ ├── stdout_color_sinks-inl.h │ │ ├── stdout_color_sinks.h │ │ ├── stdout_sinks-inl.h │ │ ├── stdout_sinks.h │ │ ├── syslog_sink.h │ │ ├── systemd_sink.h │ │ ├── tcp_sink.h │ │ ├── udp_sink.h │ │ ├── win_eventlog_sink.h │ │ ├── wincolor_sink-inl.h │ │ └── wincolor_sink.h │ ├── spdlog-inl.h │ ├── spdlog.h │ ├── stopwatch.h │ ├── tweakme.h │ └── version.h └── tclap │ ├── Arg.h │ ├── ArgException.h │ ├── ArgTraits.h │ ├── CmdLine.h │ ├── CmdLineInterface.h │ ├── CmdLineOutput.h │ ├── Constraint.h │ ├── DocBookOutput.h │ ├── HelpVisitor.h │ ├── IgnoreRestVisitor.h │ ├── Makefile.am │ ├── Makefile.in │ ├── MultiArg.h │ ├── MultiSwitchArg.h │ ├── OptionalUnlabeledTracker.h │ ├── StandardTraits.h │ ├── StdOutput.h │ ├── SwitchArg.h │ ├── UnlabeledMultiArg.h │ ├── UnlabeledValueArg.h │ ├── ValueArg.h │ ├── ValuesConstraint.h │ ├── VersionVisitor.h │ ├── Visitor.h │ ├── XorHandler.h │ ├── ZshCompletionOutput.h │ └── sstream.h ├── tools ├── python │ ├── addgmlids.py │ ├── cleanpoly.py │ ├── gml2poly │ │ ├── geomtools.py │ │ ├── gml2poly.py │ │ ├── gmltypes.py │ │ └── val3dity.py │ ├── obj2off.py │ ├── poly2citygml.py │ ├── poly2off.py │ ├── polys2citygml.py │ └── translatepoly.py └── viz3dity │ ├── README.md │ ├── geom_help.py │ ├── screenshot.png │ └── viz3dity.py ├── uid_entrypoint.sh └── vcpkg.json /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | 3 | on: 4 | push: 5 | # branches: [ main, develop ] 6 | pull_request: 7 | workflow_dispatch: 8 | 9 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 10 | jobs: 11 | build-linux: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v4 15 | - name: Install dependencies 16 | run: | 17 | sudo apt-get update 18 | sudo apt-get install libgmp-dev libmpfr-dev libboost-all-dev libeigen3-dev libgeos-dev 19 | - name: Download CGAL 20 | run: | 21 | wget https://github.com/CGAL/cgal/releases/download/v5.6.1/CGAL-5.6.1-library.tar.xz -P ${{ github.workspace }} 22 | cd ${{ github.workspace }} 23 | tar -xvf CGAL-5.6.1-library.tar.xz 24 | - name: Build 25 | run: | 26 | mkdir build && cd build 27 | cmake .. -DCGAL_DIR=${{ github.workspace }}/CGAL-5.6.1 && make -j4 28 | 29 | build-macos: 30 | runs-on: macos-latest 31 | steps: 32 | - uses: actions/checkout@v4 33 | - name: Install dependencies 34 | run: | 35 | brew update 36 | brew upgrade || true 37 | brew install cmake boost cgal eigen geos 38 | - name: Build 39 | run: | 40 | mkdir build && cd build 41 | cmake .. && make -j4 42 | 43 | build-windows: 44 | runs-on: windows-latest 45 | env: 46 | VCPKG_DEFAULT_TRIPLET: x64-windows 47 | VCPKG_INSTALLATION_ROOT: C:\vcpkg 48 | VCPKG_FEATURE_FLAGS: manifests 49 | steps: 50 | - uses: actions/checkout@v4 51 | - name: Build 52 | run: | 53 | vcpkg install 54 | mkdir Release 55 | cd Release 56 | cmake .. -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows 57 | cmake --build . --parallel 4 --config Release 58 | 59 | -------------------------------------------------------------------------------- /.github/workflows/bump-homebrew-formula.yml: -------------------------------------------------------------------------------- 1 | name: Bump Homebrew formula 2 | 3 | on: 4 | release: 5 | types: [ published ] 6 | 7 | jobs: 8 | homebrew: 9 | name: Bump Homebrew formula 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Get the version 13 | id: get_version 14 | run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} 15 | 16 | - name: Update homebrew tap 17 | uses: mislav/bump-homebrew-formula-action@v2.1 18 | with: 19 | formula-name: val3dity 20 | formula-path: Formula/val3dity.rb 21 | homebrew-tap: tudelft3d/homebrew-software 22 | base-branch: master 23 | download-url: https://github.com/tudelft3d/val3dity/archive/${{ steps.get_version.outputs.VERSION }}.tar.gz 24 | commit-message: | 25 | Bumped {{formulaName}} to {{version}} 26 | Created by https://github.com/mislav/bump-homebrew-formula-action 27 | env: 28 | COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }} 29 | -------------------------------------------------------------------------------- /.github/workflows/release-exe.yml: -------------------------------------------------------------------------------- 1 | name: Win CD 2 | 3 | # on: 4 | # push: 5 | # branches: [ main, develop ] 6 | 7 | on: 8 | release: 9 | types: [published] 10 | workflow_dispatch: 11 | 12 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 13 | jobs: 14 | build-windows: 15 | name: Build Windows 16 | runs-on: windows-latest 17 | env: 18 | VCPKG_DEFAULT_TRIPLET: x64-windows 19 | VCPKG_INSTALLATION_ROOT: C:\vcpkg 20 | VCPKG_FEATURE_FLAGS: manifests 21 | steps: 22 | - uses: actions/checkout@v2 23 | - name: Build 24 | run: | 25 | vcpkg install 26 | mkdir Release 27 | cd Release 28 | cmake .. -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows 29 | cmake --build . --parallel 4 --config Release 30 | - name: Package binary files 31 | run: | 32 | cd Release 33 | 7z a val3dity-win64.zip .\Release\* 34 | - name: Upload binary files as artifact 35 | uses: actions/upload-artifact@main 36 | with: 37 | name: val3dity-win64 38 | path: Release/val3dity-win64.zip 39 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Metadata 2 | .DS_Store 3 | 4 | # Subversion 5 | .svn 6 | 7 | # OS specific Makefile 8 | Makefile 9 | 10 | # Compiled sources 11 | *.o 12 | val3dity 13 | 14 | # xcode project 15 | *.xcodeproj 16 | 17 | CMakeFiles 18 | CMakeCache.txt 19 | cmake_install.cmake 20 | 21 | *.pyc 22 | *.log 23 | *.report.txt 24 | 25 | # Visual studio files 26 | vs_build/.vs 27 | *.VC.opendb 28 | *.VC.db 29 | *.exe 30 | *.ilk 31 | *.pdb 32 | *.vcxproj.user 33 | *.lib 34 | x64/ 35 | x86/ 36 | /build 37 | /buildx 38 | /docs/_build 39 | /docs/build 40 | /demo_lib/build/ 41 | tools/viz3dity/.polyscope.ini 42 | tools/viz3dity/imgui.ini 43 | 44 | 45 | # Vagrant 46 | .vagrant/ 47 | 48 | # Balázs (Visual Studio etc) 49 | .vscode/ 50 | .cproject 51 | .project 52 | .pydevproject 53 | .settings/ 54 | /.cache 55 | /buildx 56 | 57 | .idea/ 58 | cmake-build-debug/ -------------------------------------------------------------------------------- /.readthedocs.yaml: -------------------------------------------------------------------------------- 1 | # https://docs.readthedocs.io/en/stable/config-file/v2.html#supported-settings 2 | 3 | version: 2 4 | 5 | 6 | build: 7 | os: "ubuntu-20.04" 8 | tools: 9 | python: "3.11" 10 | 11 | python: 12 | install: 13 | - requirements: docs/requirements.txt 14 | 15 | sphinx: 16 | configuration: docs/conf.py -------------------------------------------------------------------------------- /CITATION.bib: -------------------------------------------------------------------------------- 1 | @article{Ledoux18, 2 | title = {{val3dity}: validation of {3D GIS} primitives according to the international standards}, 3 | author = {Ledoux, Hugo}, 4 | journal = {Open Geospatial Data, Software and Standards}, 5 | year = {2018}, 6 | volume = {3}, 7 | number = {1}, 8 | pages = {1}, 9 | doi = {http://dx.doi.org/10.1186/s40965-018-0043-x} 10 | } 11 | 12 | @article{Ledoux13, 13 | title = {On the validation of solids represented with the international standards for geographic information}, 14 | author = {Ledoux, Hugo}, 15 | journal = {Computer-Aided Civil and Infrastructure Engineering}, 16 | year = {2013}, 17 | volume = {28}, 18 | number = {9}, 19 | pages = {693--706}, 20 | doi = {http://dx.doi.org/10.1111/mice.12043} 21 | } -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | + The GitHub Issues section is the primary communication channel, please post issues, questions, feature requests there. 4 | 5 | + The repository follows the [Gitflow branching model](http://nvie.com/posts/a-successful-git-branching-model/). 6 | 7 | + To contribute **documentation** consider extending, fixing or adjusting the `/docs` and submit a pull request. 8 | 9 | + To contribute **tests**, please follow the instructions the [test README](https://github.com/tudelft3d/val3dity/tree/main/tests). 10 | 11 | + To contribute **code**, please submit a pull request. 12 | -------------------------------------------------------------------------------- /bumpver.toml: -------------------------------------------------------------------------------- 1 | [bumpver] 2 | current_version = "2.5.1" 3 | version_pattern = "MAJOR.MINOR.PATCH[PYTAGNUM]" 4 | commit = false 5 | tag = false 6 | push = false 7 | 8 | [bumpver.file_patterns] 9 | "src/main.cpp" = [ 10 | 'std::string VAL3DITY_VERSION = "{version}";', 11 | ] 12 | "src/val3dity.cpp" = [ 13 | 'std::string VAL3DITY_VERSION = "{version}";', 14 | ] 15 | "docs/conf.py" = [ 16 | "release = u'{version}'", 17 | "version = u'{version}'", 18 | ] 19 | "vcpkg.json" = [ 20 | '"version-string": "{version}"', 21 | ] 22 | -------------------------------------------------------------------------------- /cmake/CGAL_Eigen3_support.cmake: -------------------------------------------------------------------------------- 1 | if(EIGEN3_FOUND AND NOT TARGET CGAL::Eigen3_support) 2 | if(NOT TARGET Threads::Threads) 3 | find_package(Threads REQUIRED) 4 | endif() 5 | add_library(CGAL::Eigen3_support INTERFACE IMPORTED) 6 | set_target_properties(CGAL::Eigen3_support PROPERTIES 7 | INTERFACE_COMPILE_DEFINITIONS "CGAL_EIGEN3_ENABLED" 8 | INTERFACE_INCLUDE_DIRECTORIES "${EIGEN3_INCLUDE_DIR}") 9 | endif() -------------------------------------------------------------------------------- /data/cityjson/cube.json: -------------------------------------------------------------------------------- 1 | { 2 | "CityObjects": { 3 | "id-1": { 4 | "geometry": [ 5 | { 6 | "boundaries": [ 7 | [ 8 | [ 9 | [ 10 | 0, 11 | 3, 12 | 2, 13 | 1 14 | ] 15 | ], 16 | [ 17 | [ 18 | 4, 19 | 5, 20 | 6, 21 | 7 22 | ] 23 | ], 24 | [ 25 | [ 26 | 0, 27 | 1, 28 | 5, 29 | 4 30 | ] 31 | ], 32 | [ 33 | [ 34 | 1, 35 | 2, 36 | 6, 37 | 5 38 | ] 39 | ], 40 | [ 41 | [ 42 | 2, 43 | 3, 44 | 7, 45 | 6 46 | ] 47 | ], 48 | [ 49 | [ 50 | 3, 51 | 0, 52 | 4, 53 | 7 54 | ] 55 | ] 56 | ] 57 | ], 58 | "type": "Solid", 59 | "lod": 1 60 | } 61 | ], 62 | "type": "GenericCityObject" 63 | } 64 | }, 65 | "version": "1.0", 66 | "type": "CityJSON", 67 | "vertices": [ 68 | [ 69 | 0.0, 70 | 0.0, 71 | 0.0 72 | ], 73 | [ 74 | 1.0, 75 | 0.0, 76 | 0.0 77 | ], 78 | [ 79 | 1.0, 80 | 1.0, 81 | 0.0 82 | ], 83 | [ 84 | 0.0, 85 | 1.0, 86 | 0.0 87 | ], 88 | [ 89 | 0.0, 90 | 0.0, 91 | 1.0 92 | ], 93 | [ 94 | 1.0, 95 | 0.0, 96 | 1.0 97 | ], 98 | [ 99 | 1.0, 100 | 1.0, 101 | 1.0 102 | ], 103 | [ 104 | 0.0, 105 | 1.0, 106 | 1.0 107 | ] 108 | ] 109 | } -------------------------------------------------------------------------------- /data/cityjson/cube10.json: -------------------------------------------------------------------------------- 1 | { 2 | "CityObjects": {"id-1": { 3 | "geometry": [{ 4 | "boundaries": [[ 5 | [[ 6 | 4, 7 | 5, 8 | 6, 9 | 7 10 | ]], 11 | [[ 12 | 0, 13 | 1, 14 | 5, 15 | 4 16 | ]], 17 | [[ 18 | 1, 19 | 2, 20 | 6, 21 | 5 22 | ]], 23 | [[ 24 | 2, 25 | 3, 26 | 7, 27 | 6 28 | ]], 29 | [[ 30 | 3, 31 | 0, 32 | 4, 33 | 7 34 | ]] 35 | ]], 36 | "type": "Solid", 37 | "lod": 1 38 | }], 39 | "type": "GenericCityObject" 40 | }}, 41 | "version": "1.0", 42 | "type": "CityJSON", 43 | "vertices": [ 44 | [ 45 | 0, 46 | 0, 47 | 0 48 | ], 49 | [ 50 | 1, 51 | 0, 52 | 0 53 | ], 54 | [ 55 | 1, 56 | 1, 57 | 0 58 | ], 59 | [ 60 | 0, 61 | 1, 62 | 0 63 | ], 64 | [ 65 | 0, 66 | 0, 67 | 1 68 | ], 69 | [ 70 | 1, 71 | 0, 72 | 1 73 | ], 74 | [ 75 | 1, 76 | 1, 77 | 1 78 | ], 79 | [ 80 | 0, 81 | 1, 82 | 1 83 | ] 84 | ] 85 | } -------------------------------------------------------------------------------- /data/cityjson/cube2.json: -------------------------------------------------------------------------------- 1 | { 2 | "CityObjects": { 3 | "id-1": { 4 | "geometry": [ 5 | { 6 | "boundaries": [ 7 | [ 8 | [ 9 | [ 10 | 0, 11 | 3, 12 | 3, 13 | 1 14 | ] 15 | ], 16 | [ 17 | [ 18 | 4, 19 | 5, 20 | 6, 21 | 7 22 | ] 23 | ], 24 | [ 25 | [ 26 | 0, 27 | 1, 28 | 5, 29 | 4 30 | ] 31 | ], 32 | [ 33 | [ 34 | 1, 35 | 2, 36 | 6, 37 | 5 38 | ] 39 | ], 40 | [ 41 | [ 42 | 2, 43 | 3, 44 | 7, 45 | 6 46 | ] 47 | ], 48 | [ 49 | [ 50 | 3, 51 | 0, 52 | 4, 53 | 7 54 | ] 55 | ] 56 | ] 57 | ], 58 | "type": "Solid", 59 | "lod": "1" 60 | } 61 | ], 62 | "type": "GenericCityObject" 63 | } 64 | }, 65 | "version": "2.0", 66 | "type": "CityJSON", 67 | "vertices": [ 68 | [ 69 | 0.0, 70 | 0.0, 71 | 0.0 72 | ], 73 | [ 74 | 1.0, 75 | 0.0, 76 | 0.0 77 | ], 78 | [ 79 | 1.0, 80 | 1.0, 81 | 0.0 82 | ], 83 | [ 84 | 0.0, 85 | 1.0, 86 | 0.0 87 | ], 88 | [ 89 | 0.0, 90 | 0.0, 91 | 1.0 92 | ], 93 | [ 94 | 1.0, 95 | 0.0, 96 | 1.0 97 | ], 98 | [ 99 | 1.0, 100 | 1.0, 101 | 1.0 102 | ], 103 | [ 104 | 0.0, 105 | 1.0, 106 | 1.0 107 | ] 108 | ] 109 | } -------------------------------------------------------------------------------- /data/gml/README.txt: -------------------------------------------------------------------------------- 1 | 2 | # csol1.gml 3 | CompositeSolid with 2 cubes adjacent 4 | valid 5 | 6 | # csol1b.gml 7 | CompositeSolid with 2 cubes adjacent, file w/o CityGML namespace! 8 | a dummy GenericGML is put instead 9 | valid 10 | 11 | 12 | # csol2.gml / 501 13 | CompositeSolid with 3 cubes adjacent 14 | cube 1-2 overlap by 1cm 15 | invalid: 501 16 | 17 | # csol3.gml / 503 18 | CompositeSolid with 3 cubes 19 | cube 1 is not connected to other 20 | invalid: 503 21 | 22 | # csol4.gml / 502 23 | CompositeSolid with 3 cubes 24 | cube 1-2 are identical 25 | invalid: 502 26 | 27 | # csol5.gml 28 | CompositeSolid with 3 cubes 29 | cube 0 has an invalid ring 30 | invalid: 104 31 | 32 | # csol6.gml 33 | CompositeSolid with 2 cubes 34 | cube 0 has a missing face 35 | invalid: 302 36 | 37 | # csol7.gml 38 | CompositeSolid with: (1) cube+py1; (2) py1 filling the void 39 | valid 40 | 41 | # csol8.gml / 501_1 42 | CompositeSolid with: (1) cube+py1; (2) py1 filling the void 43 | but intersection of the two 44 | invalid: 501 45 | 46 | # msol1.gml 47 | MultiSolid with 2 cubes 48 | valid 49 | 50 | # msol2.gml 51 | MultiSolid with 3 cubes adjacent 52 | valid 53 | 54 | # msol3.gml 55 | MultiSolid with 2 cubes 56 | cube 0 has a missing face 57 | invalid: 302 -------------------------------------------------------------------------------- /data/obj/cube.obj: -------------------------------------------------------------------------------- 1 | 2 | v 0.0 0.0 0.0 3 | v 1.0 0.0 0.0 4 | v 1.0 1.0 0.0 5 | v 0.0 1.0 0.0 6 | v 0.0 0.0 1.0 7 | v 1.0 0.0 1.0 8 | v 1.0 1.0 1.0 9 | v 0.0 1.0 1.0 10 | f 1 4 3 2 11 | f 5 6 7 8 12 | f 1 2 6 5 13 | f 2 3 7 6 14 | f 3 4 8 7 15 | 16 | -------------------------------------------------------------------------------- /data/obj/duplicatevertices.obj: -------------------------------------------------------------------------------- 1 | v 0 0 0 2 | v 1 0 0 3 | v 0 1 0 4 | v 1 0 0 5 | v 0 0 1 6 | v 0 1 0 7 | v 0 0 0 8 | v 0 1 0 9 | v 0 0 1 10 | v 0 0 0 11 | v 0 0 1 12 | v 1 0 0 13 | v 0 0 0 14 | v 0 0 1 15 | v -1 0 0 16 | f 1 2 3 17 | f 4 5 6 18 | f 7 8 9 19 | f 10 11 12 20 | f 13 14 15 -------------------------------------------------------------------------------- /data/obj/nonmanifold.obj: -------------------------------------------------------------------------------- 1 | v 0 0 0 2 | v 0 1 0 3 | v 1 1 0 4 | v 1 0 0 5 | v 0 0 1 6 | v 0 1 1 7 | v 1 1 1 8 | v 1 0 1 9 | v 0.5 0.5 1 10 | f 1 2 3 11 | f 1 3 4 12 | f 1 5 6 13 | f 1 6 2 14 | f 1 4 8 15 | f 1 8 5 16 | f 4 3 7 17 | f 4 7 8 18 | f 3 2 6 19 | f 3 6 7 20 | f 5 8 9 21 | f 6 9 7 22 | -------------------------------------------------------------------------------- /data/obj/nonmanifold.off: -------------------------------------------------------------------------------- 1 | OFF 2 | 9 12 0 3 | 0 0 0 4 | 0 1 0 5 | 1 1 0 6 | 1 0 0 7 | 0 0 1 8 | 0 1 1 9 | 1 1 1 10 | 1 0 1 11 | 0.5 0.5 1 12 | 3 0 1 2 13 | 3 0 2 3 14 | 3 0 4 5 15 | 3 0 5 1 16 | 3 0 3 7 17 | 3 0 7 4 18 | 3 3 2 6 19 | 3 3 6 7 20 | 3 2 1 5 21 | 3 2 5 6 22 | 3 4 7 8 23 | 3 5 8 6 -------------------------------------------------------------------------------- /data/obj/nonmanifold.poly: -------------------------------------------------------------------------------- 1 | 9 3 0 0 2 | 0 0 0 0 3 | 1 0 1 0 4 | 2 1 1 0 5 | 3 1 0 0 6 | 4 0 0 1 7 | 5 0 1 1 8 | 6 1 1 1 9 | 7 1 0 1 10 | 8 0.5 0.5 1 11 | 12 0 12 | 1 0 13 | 3 0 1 2 14 | 1 0 15 | 3 0 2 3 16 | 1 0 17 | 3 0 4 5 18 | 1 0 19 | 3 0 5 1 20 | 1 0 21 | 3 0 3 7 22 | 1 0 23 | 3 0 7 4 24 | 1 0 25 | 3 3 2 6 26 | 1 0 27 | 3 3 6 7 28 | 1 0 29 | 3 2 1 5 30 | 1 0 31 | 3 2 5 6 32 | 1 0 33 | 3 4 7 8 34 | 1 0 35 | 3 5 8 6 36 | 0 37 | 0 38 | -------------------------------------------------------------------------------- /data/obj/twocubes.obj: -------------------------------------------------------------------------------- 1 | v 1.00 1.00 -1.00 2 | v 1.00 -1.00 -1.00 3 | v 1.00 1.00 1.00 4 | v 1.00 -1.00 1.00 5 | v -1.00 1.00 -1.00 6 | v -1.00 -1.00 -1.00 7 | v -1.00 1.00 1.00 8 | v -1.00 -1.00 1.00 9 | f 1 5 7 3 10 | f 4 3 7 8 11 | f 8 7 5 12 | f 6 2 4 8 13 | f 2 1 3 4 14 | f 6 5 1 2 15 | o ledoux 16 | f 1 5 7 3 17 | f 4 3 7 8 18 | f 8 7 5 6 19 | f 6 2 4 8 20 | f 2 1 3 4 21 | f 6 5 2 1 -------------------------------------------------------------------------------- /data/parse_poly/parse_error.poly: -------------------------------------------------------------------------------- 1 | 12 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 0.2 0.2 1.0 11 | 9 0.8 0.2 1.0 12 | 10 0.8 0.8 1.0 13 | 11 0.2 0.8 1.0 14 | 6 0 15 | 2 1 0 16 | 4 4 5 6 7 17 | 4 8 9 10 11 18 | 1 0.5 0.5 1.0 19 | 1 0 20 | 4 0 3 2 1 21 | 1 0 22 | 4 0 1 5 4 23 | 1 0 24 | 4 1 2 6 5 25 | 1 0 26 | 4 2 3 7 6 27 | 1 0 28 | 4 3 0 4 7 29 | 0 30 | 0 31 | -------------------------------------------------------------------------------- /data/parse_poly/parse_ok.poly: -------------------------------------------------------------------------------- 1 | 4 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 1 0 7 | 1 0 0 8 | 4 0 3 2 1 9 | 0 10 | 0 11 | -------------------------------------------------------------------------------- /data/parse_poly/parse_ok1.poly: -------------------------------------------------------------------------------- 1 | 8 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.2 0.2 0.0 7 | 5 0.8 0.2 0.0 8 | 6 0.8 0.8 0.0 9 | 7 0.2 0.8 0.0 10 | 1 0 11 | 2 1 12 | 4 0 3 2 1 13 | 4 4 5 6 7 14 | 1 0.5 0.5 0.0 15 | 0 16 | 0 17 | -------------------------------------------------------------------------------- /data/parse_poly/parse_ok2.poly: -------------------------------------------------------------------------------- 1 | 8 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.2 0.2 0.0 7 | 5 0.8 0.2 0.0 8 | 6 0.8 0.8 0.0 9 | 7 0.2 0.8 0.0 10 | 1 0 11 | 2 1 0 12 | 4 0 3 2 1 13 | 4 4 5 6 7 14 | 1 0.5 0.5 0.0 15 | 0 16 | 0 17 | -------------------------------------------------------------------------------- /data/parse_poly/parse_ok3.poly: -------------------------------------------------------------------------------- 1 | 12 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 0.2 0.2 1.0 11 | 9 0.8 0.2 1.0 12 | 10 0.8 0.8 1.0 13 | 11 0.2 0.8 1.0 14 | 6 0 15 | 2 1 16 | 4 4 5 6 7 17 | 4 11 10 9 8 18 | 1 0.5 0.5 1.0 19 | 1 0 20 | 4 0 3 2 1 21 | 1 0 22 | 4 0 1 5 4 23 | 1 0 24 | 4 1 2 6 5 25 | 1 0 26 | 4 2 3 7 6 27 | 1 0 28 | 4 3 0 4 7 29 | 0 30 | 0 31 | -------------------------------------------------------------------------------- /data/parse_poly/parse_ok4.poly: -------------------------------------------------------------------------------- 1 | 12 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 0.2 0.2 1.0 11 | 9 0.8 0.2 1.0 12 | 10 0.8 0.8 1.0 13 | 11 0.2 0.8 1.0 14 | 6 0 15 | 2 1 16 | 4 4 5 6 7 17 | 4 11 10 9 8 18 | 1 0.5 0.5 1.0 19 | 1 0 0 20 | 4 0 3 2 1 21 | 1 0 0 22 | 4 0 1 5 4 23 | 1 0 0 24 | 4 1 2 6 5 25 | 1 0 0 26 | 4 2 3 7 6 27 | 1 0 0 28 | 4 3 0 4 7 29 | 0 30 | 0 31 | -------------------------------------------------------------------------------- /data/poly/104_valid.poly: -------------------------------------------------------------------------------- 1 | 10 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 1.0 0.5 0.0 11 | 9 1.0 0.5 1.0 12 | 8 0 13 | 1 0 14 | 3 4 5 9 15 | 1 0 16 | 3 4 9 7 17 | 1 0 18 | 3 7 9 6 19 | 1 0 20 | 5 0 3 2 8 1 21 | 1 0 22 | 4 0 1 5 4 23 | 1 0 24 | 4 1 8 9 5 25 | 1 0 26 | 4 8 2 6 9 27 | 1 0 28 | 4 2 3 7 6 29 | 1 0 30 | 4 3 0 4 7 31 | 0 32 | 0 33 | -------------------------------------------------------------------------------- /data/poly/Cube14r2.poly: -------------------------------------------------------------------------------- 1 | 18 3 0 0 2 | 0 19.8868 0.0 0.0 3 | 1 19.8868 -14.8257 -21.1888 4 | 2 -19.8868 4.9104 -6.679 5 | 3 19.8868 4.9104 -6.679 6 | 4 -19.8868 24.6464 7.8308 7 | 5 19.8868 24.6464 7.8308 8 | 6 -19.8868 -24.6464 -7.8308 9 | 7 19.8868 -24.6464 -7.8308 10 | 8 -19.8868 -4.9104 6.679 11 | 9 19.8868 -4.9104 6.679 12 | 10 -19.8868 14.8257 21.1888 13 | 11 19.8868 14.8257 21.1888 14 | 12 -19.8868 -19.7361 -14.5098 15 | 13 19.8868 -19.7361 -14.5098 16 | 14 -19.8868 -14.8257 -21.1888 17 | 15 19.8868 19.7361 14.5098 18 | 16 -19.8868 19.7361 14.5098 19 | 17 -19.8868 0.0 0.0 20 | 16 0 21 | 1 0 22 | 4 14 2 3 1 23 | 1 0 24 | 4 2 4 5 3 25 | 1 0 26 | 4 6 7 9 8 27 | 1 0 28 | 4 8 9 11 10 29 | 1 0 30 | 4 14 1 13 12 31 | 1 0 32 | 4 12 13 7 6 33 | 1 0 34 | 4 1 3 0 13 35 | 1 0 36 | 4 3 5 15 0 37 | 1 0 38 | 4 13 0 9 7 39 | 1 0 40 | 4 0 15 11 9 41 | 1 0 42 | 4 5 4 16 15 43 | 1 0 44 | 4 15 16 10 11 45 | 1 0 46 | 4 4 2 17 16 47 | 1 0 48 | 4 2 14 12 17 49 | 1 0 50 | 4 16 17 8 10 51 | 1 0 52 | 4 17 12 6 8 53 | 0 54 | 0 55 | -------------------------------------------------------------------------------- /data/poly/blocker1.poly: -------------------------------------------------------------------------------- 1 | 5 3 0 0 2 | 0 0.0 0.0 0.1 3 | 1 0.0 1.0 0.1 4 | 2 1.0 1.0 0.1 5 | 3 1.0 0.0 0.1 6 | 4 0.5 0.5 0.5 7 | 5 0 8 | 1 0 9 | 4 0 3 2 1 10 | 1 0 11 | 3 0 4 3 12 | 1 0 13 | 3 3 4 2 14 | 1 0 15 | 3 2 4 1 16 | 1 0 17 | 3 1 4 0 18 | 0 19 | 0 -------------------------------------------------------------------------------- /data/poly/bunny.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/data/poly/bunny.stl -------------------------------------------------------------------------------- /data/poly/concave.poly: -------------------------------------------------------------------------------- 1 | 8 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 0.2 0.2 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 0.2 0.2 1.0 9 | 7 0.0 1.0 1.0 10 | 6 0 11 | 1 0 12 | 4 0 3 2 1 13 | 1 0 14 | 4 4 5 6 7 15 | 1 0 16 | 4 0 1 5 4 17 | 1 0 18 | 4 1 2 6 5 19 | 1 0 20 | 4 2 3 7 6 21 | 1 0 22 | 4 3 0 4 7 23 | 0 24 | 0 25 | -------------------------------------------------------------------------------- /data/poly/cube.obj: -------------------------------------------------------------------------------- 1 | 2 | v 0.0 0.0 0.0 3 | v 1.0 0.0 0.0 4 | v 1.0 1.0 0.0 5 | v 0.0 1.0 0.0 6 | v 0.0 0.0 1.0 7 | v 1.0 0.0 1.0 8 | v 1.0 1.0 1.0 9 | v 0.0 1.0 1.0 10 | f 1 4 3 2 11 | f 5 6 7 8 12 | f 1 2 6 5 13 | f 2 3 7 6 14 | f 3 4 8 7 15 | f 4 1 5 8 16 | -------------------------------------------------------------------------------- /data/poly/cube.poly: -------------------------------------------------------------------------------- 1 | 8 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 6 0 11 | 1 0 12 | 4 0 3 2 1 13 | 1 0 14 | 4 4 5 6 7 15 | 1 0 16 | 4 0 1 5 4 17 | 1 0 18 | 4 1 2 6 5 19 | 1 0 20 | 4 2 3 7 6 21 | 1 0 22 | 4 3 0 4 7 23 | 0 24 | 0 25 | -------------------------------------------------------------------------------- /data/poly/cube13.poly: -------------------------------------------------------------------------------- 1 | 12 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 0.2 0.2 1.0 11 | 9 0.8 0.2 1.0 12 | 10 0.8 0.8 1.0 13 | 11 0.2 0.8 1.0 14 | 7 0 15 | 2 1 16 | 4 4 5 6 7 17 | 4 11 10 9 8 18 | 1 0.5 0.5 1.0 19 | 1 0 20 | 4 0 3 2 1 21 | 1 0 22 | 4 0 1 5 4 23 | 1 0 24 | 4 1 2 6 5 25 | 1 0 26 | 4 2 3 7 6 27 | 1 0 28 | 4 3 0 4 7 29 | 1 0 30 | 4 8 9 10 11 31 | 0 32 | 0 33 | -------------------------------------------------------------------------------- /data/poly/cube14.poly: -------------------------------------------------------------------------------- 1 | 8 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 6 0 11 | 1 0 12 | 4 0 1 2 3 13 | 1 0 14 | 4 4 7 6 5 15 | 1 0 16 | 4 0 4 5 1 17 | 1 0 18 | 4 1 5 6 2 19 | 1 0 20 | 4 2 6 7 3 21 | 1 0 22 | 4 0 3 7 4 23 | 0 24 | 0 25 | -------------------------------------------------------------------------------- /data/poly/cube14r.poly: -------------------------------------------------------------------------------- 1 | 8 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.1 0.0 4 | 2 1.1 1.0 0.0 5 | 3 0.5 1.3 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.1 1.0 8 | 6 1.1 1.0 1.0 9 | 7 0.5 1.3 1.0 10 | 6 0 11 | 1 0 12 | 4 0 1 2 3 13 | 1 0 14 | 4 4 7 6 5 15 | 1 0 16 | 4 0 4 5 1 17 | 1 0 18 | 4 1 5 6 2 19 | 1 0 20 | 4 2 6 7 3 21 | 1 0 22 | 4 0 3 7 4 23 | 0 24 | 0 25 | -------------------------------------------------------------------------------- /data/poly/cube15.poly: -------------------------------------------------------------------------------- 1 | 10 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 2.0 2.0 2.0 11 | 9 2.0 3.0 3.0 12 | 7 0 13 | 1 0 14 | 3 2 8 9 15 | 1 0 16 | 4 0 3 2 1 17 | 1 0 18 | 4 4 5 6 7 19 | 1 0 20 | 4 0 1 5 4 21 | 1 0 22 | 4 1 2 6 5 23 | 1 0 24 | 4 2 3 7 6 25 | 1 0 26 | 4 3 0 4 7 27 | 0 28 | 0 -------------------------------------------------------------------------------- /data/poly/cube19.poly: -------------------------------------------------------------------------------- 1 | 12 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 0.2 0.2 1.0 11 | 9 0.8 0.2 1.0 12 | 10 0.8 0.8 1.0 13 | 11 0.2 0.8 1.0 14 | 6 0 15 | 2 1 16 | 4 4 5 6 7 17 | 4 8 9 10 11 18 | 1 0.5 0.5 1.0 19 | 1 0 20 | 4 0 3 2 1 21 | 1 0 22 | 4 0 1 5 4 23 | 1 0 24 | 4 1 2 6 5 25 | 1 0 26 | 4 2 3 7 6 27 | 1 0 28 | 4 3 0 4 7 29 | 0 30 | 0 31 | -------------------------------------------------------------------------------- /data/poly/cube22.poly: -------------------------------------------------------------------------------- 1 | 10 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 1.0 0.5 0.0 11 | 9 1.0 0.5 1.0 12 | 9 0 13 | 1 0 14 | 3 4 5 9 15 | 1 0 16 | 3 4 9 7 17 | 1 0 18 | 3 7 9 6 19 | 1 0 20 | 5 0 3 2 8 1 21 | 1 0 22 | 4 0 1 5 4 23 | 1 0 24 | 4 1 8 9 5 25 | 1 0 26 | 4 8 2 6 9 27 | 1 0 28 | 4 2 3 7 6 29 | 1 0 30 | 4 3 0 4 7 31 | 0 32 | 0 33 | -------------------------------------------------------------------------------- /data/poly/cube24.poly: -------------------------------------------------------------------------------- 1 | 9 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 0.5 0.0 0.0 11 | 6 0 12 | 1 0 13 | 5 0 3 2 1 8 14 | 1 0 15 | 4 4 5 6 7 16 | 1 0 17 | 5 0 8 1 5 4 18 | 1 0 19 | 4 1 2 6 5 20 | 1 0 21 | 4 2 3 7 6 22 | 1 0 23 | 4 3 0 4 7 24 | 0 25 | 0 26 | -------------------------------------------------------------------------------- /data/poly/cube25.poly: -------------------------------------------------------------------------------- 1 | 8 3 0 0 2 | 0 99999990.0 99999990.0 0.0 3 | 1 99999991.0 99999990.0 0.0 4 | 2 99999991.0 99999991.0 0.0 5 | 3 99999990.0 99999991.0 0.0 6 | 4 99999990.0 99999990.0 1.0 7 | 5 99999991.0 99999990.0 1.0 8 | 6 99999991.0 99999991.0 1.0 9 | 7 99999990.0 99999991.0 1.0 10 | 6 0 11 | 1 0 12 | 4 0 3 2 1 13 | 1 0 14 | 4 4 5 6 7 15 | 1 0 16 | 4 0 1 5 4 17 | 1 0 18 | 4 1 2 6 5 19 | 1 0 20 | 4 2 3 7 6 21 | 1 0 22 | 4 3 0 4 7 23 | 0 24 | 0 25 | -------------------------------------------------------------------------------- /data/poly/cube26.poly: -------------------------------------------------------------------------------- 1 | 8 3 0 0 2 | 0 3333399999990.0 3333399999990.0 0.0 3 | 1 3333399999991.0 3333399999990.0 0.0 4 | 2 3333399999991.0 3333399999991.0 0.0 5 | 3 3333399999990.0 3333399999991.0 0.0 6 | 4 3333399999990.0 3333399999990.0 1.0 7 | 5 3333399999991.0 3333399999990.0 1.0 8 | 6 3333399999991.0 3333399999991.0 1.0 9 | 7 3333399999990.0 3333399999991.0 1.0 10 | 6 0 11 | 1 0 12 | 4 0 3 2 1 13 | 1 0 14 | 4 4 5 6 7 15 | 1 0 16 | 4 0 1 5 4 17 | 1 0 18 | 4 1 2 6 5 19 | 1 0 20 | 4 2 3 7 6 21 | 1 0 22 | 4 3 0 4 7 23 | 0 24 | 0 25 | -------------------------------------------------------------------------------- /data/poly/cube27.poly: -------------------------------------------------------------------------------- 1 | 8 3 0 0 2 | 0 0.0 0.0 -100.0 3 | 1 1.0 0.0 -100.0 4 | 2 1.0 1.0 -100.0 5 | 3 0.0 1.0 -100.0 6 | 4 0.0 0.0 100.0 7 | 5 1.0 0.0 100.0 8 | 6 1.0 1.0 100.0 9 | 7 0.0 1.0 100.0 10 | 6 0 11 | 1 0 12 | 4 0 3 2 1 13 | 1 0 14 | 4 4 5 6 7 15 | 1 0 16 | 4 0 1 5 4 17 | 1 0 18 | 4 1 2 6 5 19 | 1 0 20 | 4 2 3 7 6 21 | 1 0 22 | 4 3 0 4 7 23 | 0 24 | 0 25 | -------------------------------------------------------------------------------- /data/poly/cube5.off: -------------------------------------------------------------------------------- 1 | OFF 2 | 16 28 0 3 | 0 0 0 4 | 1 0 0 5 | 1 1 0 6 | 0 1 0 7 | 0 0 1 8 | 1 0 1 9 | 1 1 1 10 | 0 1 1 11 | 0.2 0.2 0.5 12 | 0.8 0.2 0.5 13 | 0.8 0.8 0.5 14 | 0.2 0.8 0.5 15 | 0.2 0.2 1 16 | 0.8 0.2 1 17 | 0.8 0.8 1 18 | 0.2 0.8 1 19 | 3 14 5 6 20 | 3 13 4 5 21 | 3 7 15 6 22 | 3 7 4 15 23 | 3 15 14 6 24 | 3 12 4 13 25 | 3 14 13 5 26 | 3 15 4 12 27 | 3 0 3 2 28 | 3 1 0 2 29 | 3 0 1 5 30 | 3 4 0 5 31 | 3 1 2 6 32 | 3 5 1 6 33 | 3 2 3 7 34 | 3 6 2 7 35 | 3 3 0 4 36 | 3 7 3 4 37 | 3 11 10 14 38 | 3 15 11 14 39 | 3 8 11 15 40 | 3 12 8 15 41 | 3 9 8 12 42 | 3 13 9 12 43 | 3 10 9 13 44 | 3 14 10 13 45 | 3 8 9 10 46 | 3 11 8 10 -------------------------------------------------------------------------------- /data/poly/cube5.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment VCGLIB generated 4 | element vertex 16 5 | property float x 6 | property float y 7 | property float z 8 | element face 28 9 | property list uchar int vertex_indices 10 | end_header 11 | 0 0 0 12 | 1 0 0 13 | 1 1 0 14 | 0 1 0 15 | 0 0 1 16 | 1 0 1 17 | 1 1 1 18 | 0 1 1 19 | 0.2 0.2 0.5 20 | 0.8 0.2 0.5 21 | 0.8 0.8 0.5 22 | 0.2 0.8 0.5 23 | 0.2 0.2 1 24 | 0.8 0.2 1 25 | 0.8 0.8 1 26 | 0.2 0.8 1 27 | 3 14 5 6 28 | 3 13 4 5 29 | 3 7 15 6 30 | 3 7 4 15 31 | 3 15 14 6 32 | 3 12 4 13 33 | 3 14 13 5 34 | 3 15 4 12 35 | 3 0 3 2 36 | 3 1 0 2 37 | 3 0 1 5 38 | 3 4 0 5 39 | 3 1 2 6 40 | 3 5 1 6 41 | 3 2 3 7 42 | 3 6 2 7 43 | 3 3 0 4 44 | 3 7 3 4 45 | 3 11 10 14 46 | 3 15 11 14 47 | 3 8 11 15 48 | 3 12 8 15 49 | 3 9 8 12 50 | 3 13 9 12 51 | 3 10 9 13 52 | 3 14 10 13 53 | 3 8 9 10 54 | 3 11 8 10 55 | -------------------------------------------------------------------------------- /data/poly/cube5.poly: -------------------------------------------------------------------------------- 1 | 16 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 0.2 0.2 0.9 11 | 9 0.8 0.2 0.9 12 | 10 0.8 0.8 0.9 13 | 11 0.2 0.8 0.9 14 | 12 0.2 0.2 1.0 15 | 13 0.8 0.2 1.0 16 | 14 0.8 0.8 1.0 17 | 15 0.2 0.8 1.0 18 | 11 0 19 | 2 1 20 | 4 4 5 6 7 21 | 4 15 14 13 12 22 | 1 0.5 0.5 1.0 23 | 1 0 24 | 4 0 3 2 1 25 | 1 0 26 | 4 0 1 5 4 27 | 1 0 28 | 4 1 2 6 5 29 | 1 0 30 | 4 2 3 7 6 31 | 1 0 32 | 4 3 0 4 7 33 | 1 0 34 | 4 11 10 14 15 35 | 1 0 36 | 4 8 11 15 12 37 | 1 0 38 | 4 9 8 12 13 39 | 1 0 40 | 4 10 9 13 14 41 | 1 0 42 | 4 8 9 10 11 43 | 0 44 | 0 45 | -------------------------------------------------------------------------------- /data/poly/cube6.poly: -------------------------------------------------------------------------------- 1 | 11 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 0.5 0.2 1.0 11 | 9 1.0 0.5 1.0 12 | 10 0.5 0.8 1.0 13 | 7 0 14 | 1 0 15 | 4 0 3 2 1 16 | 2 1 17 | 4 4 5 6 7 18 | 3 10 9 8 19 | 1 0.9 0.5 1.0 20 | 1 0 21 | 4 0 1 5 4 22 | 1 0 23 | 5 1 2 6 9 5 24 | 1 0 25 | 4 2 3 7 6 26 | 1 0 27 | 4 3 0 4 7 28 | 1 0 29 | 3 8 9 10 30 | 0 31 | 0 32 | -------------------------------------------------------------------------------- /data/poly/cube99.poly: -------------------------------------------------------------------------------- 1 | 9 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 0.5 0.0 1.0 11 | 6 0 12 | 1 0 13 | 4 0 3 2 1 14 | 1 0 15 | 5 4 8 5 6 7 16 | 1 0 17 | 5 0 1 5 8 4 18 | 1 0 19 | 4 1 2 6 5 20 | 1 0 21 | 4 2 3 7 6 22 | 1 0 23 | 4 3 0 4 7 24 | 0 25 | 0 26 | -------------------------------------------------------------------------------- /data/poly/cube_collapsed.poly: -------------------------------------------------------------------------------- 1 | 11 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 9.0 0.0 1.0 11 | 9 9.0 9.0 1.0 12 | 10 0.5 0.0 0.0 13 | 6 0 14 | 1 0 15 | 2 0 1 16 | 1 0 17 | 3 0 1 0 18 | 1 0 19 | 4 4 5 6 7 20 | 1 0 21 | 4 4 5 7 6 22 | 1 0 23 | 4 4 8 7 9 24 | 1 0 25 | 5 0 1 2 10 3 26 | 0 27 | 0 28 | -------------------------------------------------------------------------------- /data/poly/duplicates2.poly: -------------------------------------------------------------------------------- 1 | 8 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 6 0 11 | 1 0 12 | 5 0 3 2 1 0 13 | 1 0 14 | 4 4 5 6 7 15 | 1 0 16 | 5 0 1 1 5 4 17 | 1 0 18 | 4 1 2 6 5 19 | 1 0 20 | 4 2 3 7 6 21 | 1 0 22 | 4 3 0 4 7 23 | 0 24 | 0 25 | -------------------------------------------------------------------------------- /data/poly/house.poly: -------------------------------------------------------------------------------- 1 | 9 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 0.5 0.5 1.0 11 | 9 0 12 | 1 0 13 | 4 0 3 2 1 14 | 1 0 15 | 3 4 5 8 16 | 1 0 17 | 3 5 6 8 18 | 1 0 19 | 3 6 7 8 20 | 1 0 21 | 3 7 4 8 22 | 1 0 23 | 4 0 1 5 4 24 | 1 0 25 | 4 1 2 6 5 26 | 1 0 27 | 4 2 3 7 6 28 | 1 0 29 | 4 3 0 4 7 30 | 0 31 | 0 32 | -------------------------------------------------------------------------------- /data/poly/house4.poly: -------------------------------------------------------------------------------- 1 | 9 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 0.5 0.5 1.5 11 | 9 0 12 | 1 0 13 | 4 0 3 2 1 14 | 1 0 15 | 3 4 5 8 16 | 1 0 17 | 3 5 6 8 18 | 1 0 19 | 3 6 7 8 20 | 1 0 21 | 3 7 4 8 22 | 1 0 23 | 4 0 1 5 4 24 | 1 0 25 | 4 1 2 6 5 26 | 1 0 27 | 4 2 3 7 6 28 | 1 0 29 | 4 3 0 4 7 30 | 0 31 | 0 32 | -------------------------------------------------------------------------------- /data/poly/m26.poly: -------------------------------------------------------------------------------- 1 | 26 3 0 0 2 | 0 4424796.05 5482758.25 313.9 3 | 1 4424796.05 5482758.25 316.646 4 | 2 4424792.8 5482758.03 316.646 5 | 3 4424792.8 5482758.03 313.9 6 | 4 4424792.58 5482763.15 313.9 7 | 5 4424792.58 5482763.15 316.734 8 | 6 4424792.54 5482763.15 316.737 9 | 7 4424792.54 5482763.15 313.9 10 | 8 4424795.754 5482763.289 316.646 11 | 9 4424792.582 5482763.114 316.646 12 | 10 4424792.31 5482767.306 321.978 13 | 11 4424797.551 5482767.596 321.978 14 | 12 4424797.32 5482771.74 316.751 15 | 13 4424792.08 5482771.45 316.751 16 | 14 4424795.754 5482763.289 316.688 17 | 15 4424795.754 5482763.289 313.9 18 | 16 4424795.75 5482763.35 313.9 19 | 17 4424795.75 5482763.35 316.765 20 | 18 4424792.582 5482763.114 313.9 21 | 19 4424792.31 5482767.306 313.9 22 | 20 4424792.08 5482771.45 313.9 23 | 21 4424797.32 5482771.74 313.9 24 | 22 4424797.551 5482767.596 313.9 25 | 23 4424797.78 5482763.47 313.9 26 | 24 4424797.78 5482763.47 316.774 27 | 25 4424792.582 5482763.114 316.688 28 | 13 0 29 | 1 0 30 | 4 0 1 2 3 31 | 1 0 32 | 4 4 5 6 7 33 | 1 0 34 | 4 2 1 8 9 35 | 1 0 36 | 4 10 11 12 13 37 | 1 0 38 | 7 14 8 1 0 15 16 17 39 | 1 0 40 | 12 16 15 0 3 18 4 7 19 20 21 22 23 41 | 1 0 42 | 4 23 24 17 16 43 | 1 0 44 | 6 24 23 22 21 12 11 45 | 1 0 46 | 6 19 7 6 10 13 20 47 | 1 0 48 | 4 8 14 25 9 49 | 1 0 50 | 4 20 13 12 21 51 | 1 0 52 | 8 6 5 25 14 17 24 11 10 53 | 1 0 54 | 7 18 3 2 9 25 5 4 55 | 0 56 | 0 57 | -------------------------------------------------------------------------------- /data/poly/m41.poly: -------------------------------------------------------------------------------- 1 | 12 3 0 0 2 | 0 4424759.84 5482624.14 310.6 3 | 1 4424759.22 5482628.26 310.6 4 | 2 4424758.6 5482632.38 310.6 5 | 3 4424763.78 5482633.18 310.6 6 | 4 4424764.405 5482629.06 310.6 7 | 5 4424765.03 5482624.94 310.6 8 | 6 4424758.6 5482632.38 313.802 9 | 7 4424763.78 5482633.18 313.8 10 | 8 4424759.84 5482624.14 313.801 11 | 9 4424759.22 5482628.26 318.88 12 | 10 4424765.03 5482624.94 313.801 13 | 11 4424764.405 5482629.06 318.88 14 | 7 0 15 | 1 0 16 | 6 0 1 2 3 4 5 17 | 1 0 18 | 4 2 6 7 3 19 | 1 0 20 | 6 1 0 8 9 6 2 21 | 1 0 22 | 4 5 10 8 0 23 | 1 0 24 | 6 10 5 4 3 7 11 25 | 1 0 26 | 4 9 11 7 6 27 | 1 0 28 | 4 8 10 11 9 29 | 0 30 | 0 31 | -------------------------------------------------------------------------------- /data/poly/p1e-1.poly: -------------------------------------------------------------------------------- 1 | 8 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.1 10 | 6 0 11 | 1 0 12 | 4 0 3 2 1 13 | 1 0 14 | 4 4 5 6 7 15 | 1 0 16 | 4 0 1 5 4 17 | 1 0 18 | 4 1 2 6 5 19 | 1 0 20 | 4 2 3 7 6 21 | 1 0 22 | 4 3 0 4 7 23 | 0 24 | 0 25 | -------------------------------------------------------------------------------- /data/poly/p1e-2.poly: -------------------------------------------------------------------------------- 1 | 8 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.01 9 | 7 0.0 1.0 1.0 10 | 6 0 11 | 1 0 12 | 4 0 3 2 1 13 | 1 0 14 | 4 4 5 6 7 15 | 1 0 16 | 4 0 1 5 4 17 | 1 0 18 | 4 1 2 6 5 19 | 1 0 20 | 4 2 3 7 6 21 | 1 0 22 | 4 3 0 4 7 23 | 0 24 | 0 25 | -------------------------------------------------------------------------------- /data/poly/p1e-3.poly: -------------------------------------------------------------------------------- 1 | 8 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.001 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 6 0 11 | 1 0 12 | 4 0 3 2 1 13 | 1 0 14 | 4 4 5 6 7 15 | 1 0 16 | 4 0 1 5 4 17 | 1 0 18 | 4 1 2 6 5 19 | 1 0 20 | 4 2 3 7 6 21 | 1 0 22 | 4 3 0 4 7 23 | 0 24 | 0 25 | -------------------------------------------------------------------------------- /data/poly/p1e-4.poly: -------------------------------------------------------------------------------- 1 | 8 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0001 10 | 6 0 11 | 1 0 12 | 4 0 3 2 1 13 | 1 0 14 | 4 4 5 6 7 15 | 1 0 16 | 4 0 1 5 4 17 | 1 0 18 | 4 1 2 6 5 19 | 1 0 20 | 4 2 3 7 6 21 | 1 0 22 | 4 3 0 4 7 23 | 0 24 | 0 25 | -------------------------------------------------------------------------------- /data/poly/pfold1.poly: -------------------------------------------------------------------------------- 1 | 12 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 1.0 0.499 1.001 11 | 9 1.0 0.501 0.999 12 | 10 0.0 0.501 0.999 13 | 11 0.0 0.499 1.001 14 | 6 0 15 | 1 0 16 | 4 0 3 2 1 17 | 1 0 18 | 8 4 5 8 9 6 7 10 11 19 | 1 0 20 | 4 0 1 5 4 21 | 1 0 22 | 6 1 2 6 9 8 5 23 | 1 0 24 | 4 2 3 7 6 25 | 1 0 26 | 6 3 0 4 11 10 7 27 | 0 28 | 0 29 | -------------------------------------------------------------------------------- /data/poly/pfold2.poly: -------------------------------------------------------------------------------- 1 | 12 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 1.0 0.5 1.001 11 | 9 1.0 0.5 0.999 12 | 10 0.0 0.5 0.999 13 | 11 0.0 0.5 1.001 14 | 6 0 15 | 1 0 16 | 4 0 3 2 1 17 | 1 0 18 | 8 4 5 8 9 6 7 10 11 19 | 1 0 20 | 4 0 1 5 4 21 | 1 0 22 | 6 1 2 6 9 8 5 23 | 1 0 24 | 4 2 3 7 6 25 | 1 0 26 | 6 3 0 4 11 10 7 27 | 0 28 | 0 29 | -------------------------------------------------------------------------------- /data/poly/pfold3.poly: -------------------------------------------------------------------------------- 1 | 12 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 1.0 0.49999 1.0001 11 | 9 1.0 0.50001 0.9999 12 | 10 0.0 0.50001 0.9999 13 | 11 0.0 0.49999 1.0001 14 | 6 0 15 | 1 0 16 | 4 0 3 2 1 17 | 1 0 18 | 8 4 5 8 9 6 7 10 11 19 | 1 0 20 | 4 0 1 5 4 21 | 1 0 22 | 6 1 2 6 9 8 5 23 | 1 0 24 | 4 2 3 7 6 25 | 1 0 26 | 6 3 0 4 11 10 7 27 | 0 28 | 0 29 | -------------------------------------------------------------------------------- /data/poly/pfold4.poly: -------------------------------------------------------------------------------- 1 | 12 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 1.0 0.51 1.001 11 | 9 1.0 0.49 0.999 12 | 10 0.0 0.49 0.999 13 | 11 0.0 0.51 1.001 14 | 6 0 15 | 1 0 16 | 4 0 3 2 1 17 | 1 0 18 | 8 4 5 8 9 6 7 10 11 19 | 1 0 20 | 4 0 1 5 4 21 | 1 0 22 | 6 1 2 6 9 8 5 23 | 1 0 24 | 4 2 3 7 6 25 | 1 0 26 | 6 3 0 4 11 10 7 27 | 0 28 | 0 29 | -------------------------------------------------------------------------------- /data/poly/py1.poly: -------------------------------------------------------------------------------- 1 | 4 3 0 0 2 | 0 0.2 0.2 0.2 3 | 1 0.8 0.2 0.2 4 | 2 0.5 0.5 0.2 5 | 3 0.5 0.5 0.9 6 | 4 0 7 | 1 0 8 | 3 0 1 2 9 | 1 0 10 | 3 0 3 1 11 | 1 0 12 | 3 1 3 2 13 | 1 0 14 | 3 0 2 3 15 | 0 16 | 0 -------------------------------------------------------------------------------- /data/poly/py11.poly: -------------------------------------------------------------------------------- 1 | 4 3 0 0 2 | 0 -0.2 -0.2 -0.2 3 | 1 1.8 -0.2 -0.2 4 | 2 1.5 1.5 -0.2 5 | 3 1.5 1.5 1.9 6 | 4 0 7 | 1 0 8 | 3 0 1 2 9 | 1 0 10 | 3 0 3 1 11 | 1 0 12 | 3 1 3 2 13 | 1 0 14 | 3 0 2 3 15 | 0 16 | 0 -------------------------------------------------------------------------------- /data/poly/snap1e-1.poly: -------------------------------------------------------------------------------- 1 | 9 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 0.0 1.1 1.0 11 | 6 0 12 | 1 0 13 | 4 0 3 2 1 14 | 1 0 15 | 4 4 5 6 8 16 | 1 0 17 | 4 0 1 5 4 18 | 1 0 19 | 4 1 2 6 5 20 | 1 0 21 | 4 2 3 7 6 22 | 1 0 23 | 4 3 0 4 7 24 | 0 25 | 0 26 | -------------------------------------------------------------------------------- /data/poly/snap1e-2.poly: -------------------------------------------------------------------------------- 1 | 9 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 0.0 1.01 1.0 11 | 6 0 12 | 1 0 13 | 4 0 3 2 1 14 | 1 0 15 | 4 4 5 6 8 16 | 1 0 17 | 4 0 1 5 4 18 | 1 0 19 | 4 1 2 6 5 20 | 1 0 21 | 4 2 3 7 6 22 | 1 0 23 | 4 3 0 4 7 24 | 0 25 | 0 26 | -------------------------------------------------------------------------------- /data/poly/snap1e-3.poly: -------------------------------------------------------------------------------- 1 | 9 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 0.0 1.001 1.0 11 | 6 0 12 | 1 0 13 | 4 0 3 2 1 14 | 1 0 15 | 4 4 5 6 8 16 | 1 0 17 | 4 0 1 5 4 18 | 1 0 19 | 4 1 2 6 5 20 | 1 0 21 | 4 2 3 7 6 22 | 1 0 23 | 4 3 0 4 7 24 | 0 25 | 0 26 | -------------------------------------------------------------------------------- /data/poly/torus.poly: -------------------------------------------------------------------------------- 1 | 14 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 0.2 0.2 0.0 11 | 9 0.7 0.2 0.0 12 | 10 0.5 0.7 0.0 13 | 11 0.2 0.2 1.0 14 | 12 0.7 0.2 1.0 15 | 13 0.5 0.7 1.0 16 | 9 0 17 | 2 1 18 | 4 0 3 2 1 19 | 3 8 9 10 20 | 1 0.5 0.5 0.0 21 | 2 1 22 | 4 4 5 6 7 23 | 3 11 13 12 24 | 1 0.5 0.5 1.0 25 | 1 0 26 | 4 0 1 5 4 27 | 1 0 28 | 4 1 2 6 5 29 | 1 0 30 | 4 2 3 7 6 31 | 1 0 32 | 4 3 0 4 7 33 | 1 0 34 | 4 10 9 12 13 35 | 1 0 36 | 4 8 10 13 11 37 | 1 0 38 | 4 9 8 11 12 39 | 0 40 | 0 41 | -------------------------------------------------------------------------------- /data/poly/torus3.poly: -------------------------------------------------------------------------------- 1 | 14 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 0.2 0.2 0.0 11 | 9 1.0 0.5 0.0 12 | 10 0.5 0.8 0.0 13 | 11 0.2 0.2 1.0 14 | 12 1.0 0.5 1.0 15 | 13 0.5 0.8 1.0 16 | 10 0 17 | 2 1 18 | 4 0 3 2 1 19 | 3 8 9 10 20 | 1 0.9 0.5 0.0 21 | 2 1 22 | 4 4 5 6 7 23 | 3 11 13 12 24 | 1 0.5 0.5 1.0 25 | 1 0 26 | 4 0 1 5 4 27 | 1 0 28 | 4 1 9 12 5 29 | 1 0 30 | 4 9 2 6 12 31 | 1 0 32 | 4 2 3 7 6 33 | 1 0 34 | 4 3 0 4 7 35 | 1 0 36 | 4 10 9 12 13 37 | 1 0 38 | 4 8 10 13 11 39 | 1 0 40 | 4 9 8 11 12 41 | 0 42 | 0 43 | -------------------------------------------------------------------------------- /data/poly/torus4.poly: -------------------------------------------------------------------------------- 1 | 14 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 0.2 0.2 0.0 11 | 9 1.0 0.5 0.0 12 | 10 0.5 0.8 0.0 13 | 11 0.2 0.2 1.0 14 | 12 1.0 0.5 1.0 15 | 13 0.5 0.8 1.0 16 | 9 0 17 | 2 1 18 | 4 0 3 2 1 19 | 3 8 9 10 20 | 1 0.9 0.5 0.0 21 | 2 1 22 | 4 4 5 6 7 23 | 3 11 13 12 24 | 1 0.5 0.5 1.0 25 | 1 0 26 | 4 0 1 5 4 27 | 1 0 28 | 4 1 2 6 5 29 | 1 0 30 | 4 2 3 7 6 31 | 1 0 32 | 4 3 0 4 7 33 | 1 0 34 | 4 10 9 12 13 35 | 1 0 36 | 4 8 10 13 11 37 | 1 0 38 | 4 9 8 11 12 39 | 0 40 | 0 41 | -------------------------------------------------------------------------------- /data/test_cityjson/cube_v10.city.json: -------------------------------------------------------------------------------- 1 | { 2 | "CityObjects": { 3 | "id-1": { 4 | "geometry": [ 5 | { 6 | "boundaries": [ 7 | [ 8 | [ 9 | [ 10 | 0, 11 | 3, 12 | 2, 13 | 1 14 | ] 15 | ], 16 | [ 17 | [ 18 | 4, 19 | 5, 20 | 6, 21 | 7 22 | ] 23 | ], 24 | [ 25 | [ 26 | 0, 27 | 1, 28 | 5, 29 | 4 30 | ] 31 | ], 32 | [ 33 | [ 34 | 1, 35 | 2, 36 | 6, 37 | 5 38 | ] 39 | ], 40 | [ 41 | [ 42 | 2, 43 | 3, 44 | 7, 45 | 6 46 | ] 47 | ], 48 | [ 49 | [ 50 | 3, 51 | 0, 52 | 4, 53 | 7 54 | ] 55 | ] 56 | ] 57 | ], 58 | "type": "Solid", 59 | "lod": 1 60 | } 61 | ], 62 | "type": "GenericCityObject" 63 | } 64 | }, 65 | "version": "1.0", 66 | "type": "CityJSON", 67 | "vertices": [ 68 | [ 69 | 0.0, 70 | 0.0, 71 | 0.0 72 | ], 73 | [ 74 | 1.0, 75 | 0.0, 76 | 0.0 77 | ], 78 | [ 79 | 1.0, 80 | 1.0, 81 | 0.0 82 | ], 83 | [ 84 | 0.0, 85 | 1.0, 86 | 0.0 87 | ], 88 | [ 89 | 0.0, 90 | 0.0, 91 | 1.0 92 | ], 93 | [ 94 | 1.0, 95 | 0.0, 96 | 1.0 97 | ], 98 | [ 99 | 1.0, 100 | 1.0, 101 | 1.0 102 | ], 103 | [ 104 | 0.0, 105 | 1.0, 106 | 1.0 107 | ] 108 | ] 109 | } -------------------------------------------------------------------------------- /data/test_cityjson/emptygeom.json: -------------------------------------------------------------------------------- 1 | { 2 | "CityObjects": { 3 | "id-1": { 4 | "type": "Building", 5 | "attributes": { 6 | "potatoe": "yeah" 7 | } 8 | } 9 | }, 10 | "version": "1.1", 11 | "type": "CityJSON", 12 | "vertices": [], 13 | "transform": { 14 | "scale": [1.0, 1.0, 1.0], 15 | "translate": [0.0, 0.0, 0.0] 16 | } 17 | } -------------------------------------------------------------------------------- /data/test_duplicates/cube_tol_1.json: -------------------------------------------------------------------------------- 1 | { 2 | "CityObjects": { 3 | "id-1": { 4 | "geometry": [ 5 | { 6 | "boundaries": [ 7 | [ 8 | [ 9 | [ 10 | 0, 11 | 3, 12 | 2, 13 | 1 14 | ] 15 | ], 16 | [ 17 | [ 18 | 4, 19 | 5, 20 | 6, 21 | 8 22 | ] 23 | ], 24 | [ 25 | [ 26 | 0, 27 | 1, 28 | 5, 29 | 4 30 | ] 31 | ], 32 | [ 33 | [ 34 | 1, 35 | 2, 36 | 7, 37 | 5 38 | ] 39 | ], 40 | [ 41 | [ 42 | 2, 43 | 3, 44 | 8, 45 | 6 46 | ] 47 | ], 48 | [ 49 | [ 50 | 3, 51 | 0, 52 | 4, 53 | 8 54 | ] 55 | ] 56 | ] 57 | ], 58 | "type": "Solid", 59 | "lod": 1 60 | } 61 | ], 62 | "type": "GenericCityObject" 63 | } 64 | }, 65 | "version": "1.0", 66 | "type": "CityJSON", 67 | "vertices": [ 68 | [ 69 | 0.0, 70 | 0.0, 71 | 0.0 72 | ], 73 | [ 74 | 1.0, 75 | 0.0, 76 | 0.0 77 | ], 78 | [ 79 | 1.0, 80 | 1.0, 81 | 0.0 82 | ], 83 | [ 84 | 0.0, 85 | 1.0, 86 | 0.0 87 | ], 88 | [ 89 | 0.0, 90 | 0.0, 91 | 1.0 92 | ], 93 | [ 94 | 1.0, 95 | 0.0, 96 | 1.0 97 | ], 98 | [ 99 | 1.0, 100 | 1.0003, 101 | 1.00011 102 | ], 103 | [ 104 | 1.0, 105 | 1.0, 106 | 1.0 107 | ], 108 | [ 109 | 0.0, 110 | 1.0, 111 | 1.0 112 | ] 113 | ] 114 | } -------------------------------------------------------------------------------- /data/test_duplicates/cube_tol_1.obj: -------------------------------------------------------------------------------- 1 | v 0.0 0.0 0.0 2 | v 1.0 0.0 0.0 3 | v 1.0 1.0 0.0 4 | v 0.0 1.0 0.0 5 | v 0.0 0.0 1.0 6 | v 1.0 0.0 1.0 7 | v 1.0 1.0003 1.00011 8 | v 1.0 1.0 1.0 9 | v 0.0 1.0 1.0 10 | f 1 4 3 2 11 | f 5 6 7 9 12 | f 1 2 6 5 13 | f 2 3 8 6 14 | f 3 4 9 7 15 | f 4 1 5 9 16 | -------------------------------------------------------------------------------- /data/test_duplicates/cube_tol_1.off: -------------------------------------------------------------------------------- 1 | OFF 2 | 9 6 0 3 | 0.0 0.0 0.0 4 | 1.0 0.0 0.0 5 | 1.0 1.0 0.0 6 | 0.0 1.0 0.0 7 | 0.0 0.0 1.0 8 | 1.0 0.0 1.0 9 | 1.0 1.0003 1.00011 10 | 1.0 1.0 1.0 11 | 0.0 1.0 1.0 12 | 4 0 3 2 1 13 | 4 4 5 6 8 14 | 4 0 1 5 4 15 | 4 1 2 7 5 16 | 4 2 3 8 6 17 | 4 3 0 4 8 18 | -------------------------------------------------------------------------------- /data/test_empty/completely_empty.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/data/test_empty/completely_empty.json -------------------------------------------------------------------------------- /data/test_empty/completely_empty.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/data/test_empty/completely_empty.obj -------------------------------------------------------------------------------- /data/test_empty/completely_empty.off: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/data/test_empty/completely_empty.off -------------------------------------------------------------------------------- /data/test_empty/empty_primitive.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "CityJSON", 3 | "version": "1.0", 4 | "CityObjects": { 5 | "id-1":{ 6 | "type": "GenericCityObject", 7 | "geometry": [{ 8 | "type": "CompositeSolid", 9 | "lod": 1, 10 | "boundaries": [ 11 | [ 12 | [ [[0, 3, 2, 1]], [[4, 5, 6, 7]], [[0, 1, 5, 4]], [[1, 2, 6, 5]], [[2, 3, 7, 6]], [[3, 0, 4, 7]] ] 13 | ], 14 | [ 15 | ] 16 | ] 17 | }] 18 | } 19 | }, 20 | "vertices": [ 21 | [0.0, 0.0, 0.0], 22 | [1.0, 0.0, 0.0], 23 | [1.0, 1.0, 0.0], 24 | [0.0, 1.0, 0.0], 25 | [0.0, 0.0, 1.0], 26 | [1.0, 0.0, 1.0], 27 | [1.0, 1.0, 1.0], 28 | [0.0, 1.0, 1.0], 29 | [2.0, 0.0, 0.0], 30 | [2.0, 2.0, 0.0], 31 | [2.0, 0.0, 1.0], 32 | [2.0, 2.0, 1.0] 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /data/test_empty/empty_primitive.obj: -------------------------------------------------------------------------------- 1 | 2 | v 0.0 0.0 0.0 3 | v 1.0 0.0 0.0 4 | v 1.0 1.0 0.0 5 | v 0.0 1.0 0.0 6 | v 0.0 0.0 1.0 7 | v 1.0 0.0 1.0 8 | v 1.0 1.0 1.0 9 | v 0.0 1.0 1.0 10 | 11 | -------------------------------------------------------------------------------- /data/test_empty/empty_primitive.off: -------------------------------------------------------------------------------- 1 | OFF 2 | 16 0 0 3 | 0 0 0 4 | 1 0 0 5 | 1 1 0 6 | 0 1 0 7 | 0 0 1 8 | 1 0 1 9 | 1 1 1 10 | 0 1 1 11 | 0.2 0.2 0.5 12 | 0.8 0.2 0.5 13 | 0.8 0.8 0.5 14 | 0.2 0.8 0.5 15 | 0.2 0.2 1 16 | 0.8 0.2 1 17 | 0.8 0.8 1 18 | 0.2 0.8 1 19 | 20 | -------------------------------------------------------------------------------- /data/test_empty/empty_primitive.poly: -------------------------------------------------------------------------------- 1 | 8 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 0 0 11 | 0 12 | 0 13 | -------------------------------------------------------------------------------- /data/test_empty/empty_primitive_1.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "CityJSON", 3 | "version": "0.1", 4 | "CityObjects": { 5 | "id-1":{ 6 | "type": "GenericCityObject", 7 | "geometry": [{ 8 | "type": "CompositeSolid", 9 | "lod": 1, 10 | "boundaries": [ 11 | [ 12 | [ [[0, 3, 2, 1]], [[4, 5, 6, 7]], [[0, 1, 5, 4]], [[1, 2, 6, 5]], [[2, 3, 7, 6]], [[3, 0, 4, 7]] ] 13 | ], 14 | [ [ ] 15 | ] 16 | ] 17 | }] 18 | } 19 | }, 20 | "vertices": [ 21 | [0.0, 0.0, 0.0], 22 | [1.0, 0.0, 0.0], 23 | [1.0, 1.0, 0.0], 24 | [0.0, 1.0, 0.0], 25 | [0.0, 0.0, 1.0], 26 | [1.0, 0.0, 1.0], 27 | [1.0, 1.0, 1.0], 28 | [0.0, 1.0, 1.0], 29 | [2.0, 0.0, 0.0], 30 | [2.0, 2.0, 0.0], 31 | [2.0, 0.0, 1.0], 32 | [2.0, 2.0, 1.0] 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /data/test_file_format/index0.obj: -------------------------------------------------------------------------------- 1 | v 0.0 0.0 0.0 2 | v 1.0 0.0 0.0 3 | v 1.0 1.0 0.0 4 | v 0.0 1.0 0.0 5 | v 0.0 0.0 1.0 6 | v 1.0 0.0 1.0 7 | v 1.0 1.0 1.0 8 | v 0.0 1.0 1.0 9 | f 1 2 3 0 10 | f 5 6 7 8 11 | f 1 2 6 5 12 | f 2 3 7 6 13 | f 3 4 8 7 14 | f 4 1 5 8 15 | -------------------------------------------------------------------------------- /data/test_file_format/index901.obj: -------------------------------------------------------------------------------- 1 | v 0.0 0.0 0.0 2 | v 1.0 0.0 0.0 3 | v 1.0 1.0 0.0 4 | v 0.0 1.0 0.0 5 | v 0.0 0.0 1.0 6 | v 1.0 0.0 1.0 7 | v 1.0 1.0 1.0 8 | v 0.0 1.0 1.0 9 | f 1 4 3 2 10 | f 5 6 7 8 11 | f 1 2 9 5 12 | f 2 3 7 6 13 | f 3 4 8 7 14 | f 4 1 5 8 15 | -------------------------------------------------------------------------------- /data/test_file_format/invalid_json_cityjson.json: -------------------------------------------------------------------------------- 1 | { 2 | "CityObjects": 3 | "id-1": { 4 | "geometry": [ 5 | { 6 | "boundaries": [ 7 | [ 8 | [ 9 | [ 10 | 0, 11 | 1, 12 | 2 13 | ] 14 | ], 15 | [ 16 | [ 17 | 0, 18 | 2, 19 | 3 20 | ] 21 | ], 22 | [ 23 | [ 24 | 2, 25 | 1, 26 | 3 27 | ] 28 | ], 29 | [ 30 | [ 31 | 0, 32 | 3, 33 | 1 34 | ] 35 | ] 36 | ] 37 | ], 38 | "lod": 1, 39 | "type": "Solid" 40 | } 41 | ], 42 | "type": "GenericCityObject" 43 | } 44 | }, 45 | "type": "CityJSON", 46 | "version": "1.0", 47 | "vertices": [ 48 | [ 49 | 0.0, 50 | 0.0, 51 | 0.0 52 | ], 53 | [ 54 | 1.0, 55 | 1.0, 56 | 0.0 57 | ], 58 | [ 59 | 1.0, 60 | 0.0, 61 | 0.0 62 | ], 63 | [ 64 | 1.0, 65 | 0.0, 66 | 1.0 67 | ] 68 | ] 69 | } -------------------------------------------------------------------------------- /data/test_file_format/invalid_schema_cityjson_2.json: -------------------------------------------------------------------------------- 1 | { 2 | "CityObjects": { 3 | "id-1": { 4 | "geometry": [ 5 | { 6 | "boundaries": [ 7 | [ 8 | [ 9 | [ 10 | 0, 11 | 1, 12 | 22 13 | ] 14 | ], 15 | [ 16 | [ 17 | 0, 18 | 2, 19 | 3 20 | ] 21 | ], 22 | [ 23 | [ 24 | 2, 25 | 1, 26 | 3 27 | ] 28 | ], 29 | [ 30 | [ 31 | 0, 32 | 3, 33 | 1 34 | ] 35 | ] 36 | ] 37 | ], 38 | "lod": 1, 39 | "type": "Solid" 40 | } 41 | ], 42 | "type": "GenericCityObject" 43 | } 44 | }, 45 | "type": "CityJSON", 46 | "version": "1.0", 47 | "vertices": [ 48 | [ 49 | 0.0, 50 | 0.0, 51 | 0.0 52 | ], 53 | [ 54 | 1.0, 55 | 1.0, 56 | 0.0 57 | ], 58 | [ 59 | 1.0, 60 | 0.0, 61 | 0.0 62 | ], 63 | [ 64 | 1.0, 65 | 0.0, 66 | 1.0 67 | ] 68 | ] 69 | } -------------------------------------------------------------------------------- /data/test_geometry_generic/101.poly: -------------------------------------------------------------------------------- 1 | 8 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 6 0 11 | 1 0 12 | 2 1 4 13 | 1 0 14 | 1 4 15 | 1 0 16 | 4 0 1 5 4 17 | 1 0 18 | 4 1 2 6 5 19 | 1 0 20 | 4 2 3 7 6 21 | 1 0 22 | 4 3 0 4 7 23 | 0 24 | 0 25 | -------------------------------------------------------------------------------- /data/test_geometry_generic/102.poly: -------------------------------------------------------------------------------- 1 | 8 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 6 0 11 | 1 0 12 | 4 0 3 2 1 13 | 1 0 14 | 4 4 5 6 7 15 | 1 0 16 | 5 0 1 1 5 4 17 | 1 0 18 | 4 1 2 6 5 19 | 1 0 20 | 4 2 3 7 6 21 | 1 0 22 | 4 3 0 4 7 23 | 0 24 | 0 25 | -------------------------------------------------------------------------------- /data/test_geometry_generic/104.poly: -------------------------------------------------------------------------------- 1 | 8 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 6 0 11 | 1 0 12 | 4 0 3 1 2 13 | 1 0 14 | 4 4 5 6 7 15 | 1 0 16 | 4 0 1 5 4 17 | 1 0 18 | 4 1 2 6 5 19 | 1 0 20 | 4 2 3 7 6 21 | 1 0 22 | 4 3 0 4 7 23 | 0 24 | 0 25 | -------------------------------------------------------------------------------- /data/test_geometry_generic/104_1.poly: -------------------------------------------------------------------------------- 1 | 10 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 1.0 0.5 0.0 11 | 9 1.0 0.5 1.0 12 | 8 0 13 | 1 0 14 | 5 4 5 6 7 9 15 | 1 0 16 | 3 4 9 7 17 | 1 0 18 | 5 0 3 2 8 1 19 | 1 0 20 | 4 0 1 5 4 21 | 1 0 22 | 4 1 8 9 5 23 | 1 0 24 | 4 8 2 6 9 25 | 1 0 26 | 4 2 3 7 6 27 | 1 0 28 | 4 3 0 4 7 29 | 0 30 | 0 31 | -------------------------------------------------------------------------------- /data/test_geometry_generic/104_2.poly: -------------------------------------------------------------------------------- 1 | 10 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 1.0 0.5 0.0 11 | 9 1.0 0.5 1.0 12 | 8 0 13 | 1 0 14 | 3 4 5 9 15 | 1 0 16 | 3 4 9 7 17 | 1 0 18 | 3 7 9 6 19 | 1 0 20 | 5 0 3 2 8 1 21 | 1 0 22 | 4 0 1 5 4 23 | 1 0 24 | 6 5 1 8 2 8 9 25 | 1 0 26 | 4 2 3 7 6 27 | 1 0 28 | 4 3 0 4 7 29 | 0 30 | 0 31 | -------------------------------------------------------------------------------- /data/test_geometry_generic/104_3.poly: -------------------------------------------------------------------------------- 1 | 10 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 1.0 0.5 0.0 11 | 9 1.0 0.5 1.0 12 | 7 0 13 | 1 0 14 | 6 6 7 4 5 7 9 15 | 1 0 16 | 5 0 3 2 8 1 17 | 1 0 18 | 4 0 1 5 4 19 | 1 0 20 | 4 1 8 9 5 21 | 1 0 22 | 4 8 2 6 9 23 | 1 0 24 | 4 2 3 7 6 25 | 1 0 26 | 4 3 0 4 7 27 | 0 28 | 0 29 | -------------------------------------------------------------------------------- /data/test_geometry_generic/104_4.poly: -------------------------------------------------------------------------------- 1 | 12 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 1.0 0.5 1.001 11 | 9 1.0 0.5 0.999 12 | 10 0.0 0.5 0.999 13 | 11 0.0 0.5 1.001 14 | 6 0 15 | 1 0 16 | 4 0 3 2 1 17 | 1 0 18 | 8 4 5 8 9 6 7 10 11 19 | 1 0 20 | 4 0 1 5 4 21 | 1 0 22 | 6 1 2 6 9 8 5 23 | 1 0 24 | 4 2 3 7 6 25 | 1 0 26 | 6 3 0 4 11 10 7 27 | 0 28 | 0 29 | -------------------------------------------------------------------------------- /data/test_geometry_generic/201.poly: -------------------------------------------------------------------------------- 1 | 14 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 0.2 0.2 1.0 11 | 9 0.8 0.2 1.0 12 | 10 0.5 0.5 1.0 13 | 11 0.5 0.3 1.0 14 | 12 0.8 0.3 1.0 15 | 13 0.8 0.4 1.0 16 | 7 0 17 | 3 0 18 | 4 4 5 6 7 19 | 3 10 9 8 20 | 3 13 12 11 21 | 1 0 22 | 4 0 3 2 1 23 | 1 0 24 | 4 0 1 5 4 25 | 1 0 26 | 4 1 2 6 5 27 | 1 0 28 | 4 2 3 7 6 29 | 1 0 30 | 4 3 0 4 7 31 | 1 0 32 | 3 8 9 10 33 | 0 34 | 0 35 | -------------------------------------------------------------------------------- /data/test_geometry_generic/201_1.poly: -------------------------------------------------------------------------------- 1 | 7 3 0 0 2 | 0 0.0 0.0 1.0 3 | 1 1.0 0.0 1.0 4 | 2 1.0 1.0 1.0 5 | 3 0.0 1.0 1.0 6 | 4 0.2 0.2 1.0 7 | 5 0.8 0.2 1.0 8 | 6 -0.5 -0.5 1.0 9 | 1 0 10 | 2 0 11 | 4 0 1 2 3 12 | 3 4 5 6 13 | 0 14 | 0 15 | -------------------------------------------------------------------------------- /data/test_geometry_generic/202.poly: -------------------------------------------------------------------------------- 1 | 11 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 0.2 0.2 1.0 11 | 9 0.8 0.2 1.0 12 | 10 0.5 0.5 1.0 13 | 7 0 14 | 3 0 15 | 4 4 5 6 7 16 | 3 10 9 8 17 | 3 10 9 8 18 | 1 0 19 | 4 0 3 2 1 20 | 1 0 21 | 4 0 1 5 4 22 | 1 0 23 | 4 1 2 6 5 24 | 1 0 25 | 4 2 3 7 6 26 | 1 0 27 | 4 3 0 4 7 28 | 1 0 29 | 3 8 9 10 30 | 0 31 | 0 32 | -------------------------------------------------------------------------------- /data/test_geometry_generic/203.poly: -------------------------------------------------------------------------------- 1 | 9 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 0.0 0.5 1.5 11 | 6 0 12 | 1 0 13 | 4 0 3 2 1 14 | 1 0 15 | 5 4 5 6 7 8 16 | 1 0 17 | 4 0 1 5 4 18 | 1 0 19 | 4 1 2 6 5 20 | 1 0 21 | 4 2 3 7 6 22 | 1 0 23 | 5 3 0 4 8 7 24 | 0 25 | 0 26 | -------------------------------------------------------------------------------- /data/test_geometry_generic/203_1.poly: -------------------------------------------------------------------------------- 1 | 16 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 0.2 0.2 1.5 11 | 9 0.8 0.2 1.0 12 | 10 0.8 0.8 1.0 13 | 11 0.2 0.8 1.0 14 | 12 0.2 0.2 0.0 15 | 13 0.8 0.2 0.0 16 | 14 0.8 0.8 0.0 17 | 15 0.2 0.8 0.0 18 | 10 0 19 | 2 1 20 | 4 4 5 6 7 21 | 4 8 11 10 9 22 | 1 0.5 0.5 1.0 23 | 2 1 24 | 4 0 3 2 1 25 | 4 12 13 14 15 26 | 1 0.5 0.5 0.0 27 | 1 0 28 | 4 0 1 5 4 29 | 1 0 30 | 4 1 2 6 5 31 | 1 0 32 | 4 2 3 7 6 33 | 1 0 34 | 4 3 0 4 7 35 | 1 0 36 | 4 13 12 8 9 37 | 1 0 38 | 4 14 13 9 10 39 | 1 0 40 | 4 15 14 10 11 41 | 1 0 42 | 4 12 15 11 8 43 | 1 44 | 1 0.5 0.5 0.5 45 | 0 46 | -------------------------------------------------------------------------------- /data/test_geometry_generic/203_2.poly: -------------------------------------------------------------------------------- 1 | 9 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 0.0 0.5 1.1 11 | 6 0 12 | 1 0 13 | 4 0 3 2 1 14 | 1 0 15 | 5 4 5 6 7 8 16 | 1 0 17 | 4 0 1 5 4 18 | 1 0 19 | 4 1 2 6 5 20 | 1 0 21 | 4 2 3 7 6 22 | 1 0 23 | 5 3 0 4 8 7 24 | 0 25 | 0 26 | -------------------------------------------------------------------------------- /data/test_geometry_generic/204_1.poly: -------------------------------------------------------------------------------- 1 | 12 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 1.0 0.499 1.001 11 | 9 1.0 0.501 0.999 12 | 10 0.0 0.501 0.999 13 | 11 0.0 0.499 1.001 14 | 6 0 15 | 1 0 16 | 4 0 3 2 1 17 | 1 0 18 | 8 4 5 8 9 6 7 10 11 19 | 1 0 20 | 4 0 1 5 4 21 | 1 0 22 | 6 1 2 6 9 8 5 23 | 1 0 24 | 4 2 3 7 6 25 | 1 0 26 | 6 3 0 4 11 10 7 27 | 0 28 | 0 29 | -------------------------------------------------------------------------------- /data/test_geometry_generic/204_valid_1.poly: -------------------------------------------------------------------------------- 1 | 14 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 0.3 0.0 1.0 11 | 9 0.5 0.0 1.00699 12 | 10 0.7 0.0 1.0 13 | 11 0.7 1.0 1.0 14 | 12 0.5 1.0 1.00699 15 | 13 0.3 1.0 1.0 16 | 6 0 17 | 1 0 18 | 4 0 3 2 1 19 | 1 0 20 | 10 4 8 9 10 5 6 11 12 13 7 21 | 1 0 22 | 7 0 1 5 10 9 8 4 23 | 1 0 24 | 4 1 2 6 5 25 | 1 0 26 | 7 2 3 7 13 12 11 6 27 | 1 0 28 | 4 3 0 4 7 29 | 0 30 | 0 31 | -------------------------------------------------------------------------------- /data/test_geometry_generic/204_valid_2.poly: -------------------------------------------------------------------------------- 1 | 14 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 0.3 0.0 1.0 11 | 9 0.5 0.0 0.99301 12 | 10 0.7 0.0 1.0 13 | 11 0.7 1.0 1.0 14 | 12 0.5 1.0 0.99301 15 | 13 0.3 1.0 1.0 16 | 6 0 17 | 1 0 18 | 4 0 3 2 1 19 | 1 0 20 | 10 4 8 9 10 5 6 11 12 13 7 21 | 1 0 22 | 7 0 1 5 10 9 8 4 23 | 1 0 24 | 4 1 2 6 5 25 | 1 0 26 | 7 2 3 7 13 12 11 6 27 | 1 0 28 | 4 3 0 4 7 29 | 0 30 | 0 31 | -------------------------------------------------------------------------------- /data/test_geometry_generic/205.poly: -------------------------------------------------------------------------------- 1 | 11 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 0.2 0.2 1.0 11 | 9 0.8 0.2 1.0 12 | 10 0.5 0.5 1.0 13 | 7 0 14 | 3 0 15 | 4 4 5 6 7 16 | 3 4 8 9 17 | 3 9 10 6 18 | 1 0 19 | 4 0 3 2 1 20 | 1 0 21 | 4 0 1 5 4 22 | 1 0 23 | 4 1 2 6 5 24 | 1 0 25 | 4 2 3 7 6 26 | 1 0 27 | 4 3 0 4 7 28 | 1 0 29 | 3 8 9 10 30 | 0 31 | 0 32 | -------------------------------------------------------------------------------- /data/test_geometry_generic/206.poly: -------------------------------------------------------------------------------- 1 | 12 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 1.2 1.2 1.0 11 | 9 1.8 1.2 1.0 12 | 10 1.8 1.8 1.0 13 | 11 1.2 1.8 1.0 14 | 6 0 15 | 1 0 16 | 4 0 3 2 1 17 | 1 0 18 | 4 0 1 5 4 19 | 1 0 20 | 4 1 2 6 5 21 | 1 0 22 | 4 2 3 7 6 23 | 2 1 24 | 4 4 5 6 7 25 | 4 8 11 10 9 26 | 1 0.5 0.5 1.0 27 | 1 0 28 | 4 3 0 4 7 29 | 0 30 | 0 31 | -------------------------------------------------------------------------------- /data/test_geometry_generic/206_1.poly: -------------------------------------------------------------------------------- 1 | 12 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 1.2 0.0 1.0 11 | 9 1.8 0.0 1.0 12 | 10 1.8 0.6 1.0 13 | 11 1.0 0.6 1.0 14 | 6 0 15 | 1 0 16 | 4 0 3 2 1 17 | 1 0 18 | 4 0 1 5 4 19 | 1 0 20 | 4 1 2 6 5 21 | 1 0 22 | 4 2 3 7 6 23 | 2 1 24 | 4 4 5 6 7 25 | 4 8 11 10 9 26 | 1 0.5 0.5 1.0 27 | 1 0 28 | 4 3 0 4 7 29 | 0 30 | 0 31 | -------------------------------------------------------------------------------- /data/test_geometry_generic/207.poly: -------------------------------------------------------------------------------- 1 | 14 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 0.2 0.2 1.0 11 | 9 0.8 0.2 1.0 12 | 10 0.5 0.5 1.0 13 | 11 0.4 0.25 1.0 14 | 12 0.6 0.25 1.0 15 | 13 0.5 0.4 1.0 16 | 7 0 17 | 3 0 18 | 4 4 5 6 7 19 | 3 10 9 8 20 | 3 13 12 11 21 | 1 0 22 | 4 0 3 2 1 23 | 1 0 24 | 4 0 1 5 4 25 | 1 0 26 | 4 1 2 6 5 27 | 1 0 28 | 4 2 3 7 6 29 | 1 0 30 | 4 3 0 4 7 31 | 1 0 32 | 3 8 9 10 33 | 0 34 | 0 35 | -------------------------------------------------------------------------------- /data/test_geometry_generic/207_1.poly: -------------------------------------------------------------------------------- 1 | 17 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 0.2 0.2 1.0 11 | 9 0.8 0.2 1.0 12 | 10 0.5 0.5 1.0 13 | 11 0.3 0.25 1.0 14 | 12 0.7 0.25 1.0 15 | 13 0.5 0.45 1.0 16 | 14 0.45 0.3 1.0 17 | 15 0.55 0.3 1.0 18 | 16 0.50 0.35 1.0 19 | 7 0 20 | 4 0 21 | 4 4 5 6 7 22 | 3 10 9 8 23 | 3 13 12 11 24 | 3 16 15 14 25 | 1 0 26 | 4 0 3 2 1 27 | 1 0 28 | 4 0 1 5 4 29 | 1 0 30 | 4 1 2 6 5 31 | 1 0 32 | 4 2 3 7 6 33 | 1 0 34 | 4 3 0 4 7 35 | 1 0 36 | 3 8 9 10 37 | 0 38 | 0 39 | -------------------------------------------------------------------------------- /data/test_geometry_generic/207_2.poly: -------------------------------------------------------------------------------- 1 | 17 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 0.2 0.2 1.0 11 | 9 0.8 0.2 1.0 12 | 10 0.5 0.5 1.0 13 | 11 0.3 0.25 1.0 14 | 12 0.7 0.25 1.0 15 | 13 0.5 0.45 1.0 16 | 14 0.45 0.3 1.0 17 | 15 0.55 0.3 1.0 18 | 16 0.50 0.35 1.0 19 | 8 0 20 | 2 1 0 21 | 4 4 5 6 7 22 | 3 10 9 8 23 | 1 0.5 0.22 1.0 24 | 2 1 0 25 | 3 13 12 11 26 | 3 16 15 14 27 | 1 0.5 0.33 1.0 28 | 1 0 29 | 4 0 3 2 1 30 | 1 0 31 | 4 0 1 5 4 32 | 1 0 33 | 4 1 2 6 5 34 | 1 0 35 | 4 2 3 7 6 36 | 1 0 37 | 4 3 0 4 7 38 | 1 0 39 | 3 8 9 10 40 | 0 41 | 0 42 | -------------------------------------------------------------------------------- /data/test_geometry_generic/208.poly: -------------------------------------------------------------------------------- 1 | 12 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 0.2 0.2 1.0 11 | 9 0.8 0.2 1.0 12 | 10 0.8 0.8 1.0 13 | 11 0.2 0.8 1.0 14 | 6 0 15 | 2 1 16 | 4 4 5 6 7 17 | 4 8 9 10 11 18 | 1 0.5 0.5 1.0 19 | 1 0 20 | 4 0 3 2 1 21 | 1 0 22 | 4 0 1 5 4 23 | 1 0 24 | 4 1 2 6 5 25 | 1 0 26 | 4 2 3 7 6 27 | 1 0 28 | 4 3 0 4 7 29 | 0 30 | 0 31 | -------------------------------------------------------------------------------- /data/test_geometry_generic/301.poly: -------------------------------------------------------------------------------- 1 | 4 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 2 0 7 | 1 0 8 | 4 0 3 2 1 9 | 1 0 10 | 4 0 1 2 3 11 | 0 12 | 0 13 | -------------------------------------------------------------------------------- /data/test_geometry_generic/301_1.poly: -------------------------------------------------------------------------------- 1 | 8 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 3 0 11 | 1 0 12 | 4 0 3 2 1 13 | 1 0 14 | 4 4 5 6 7 15 | 1 0 16 | 4 0 1 5 4 17 | 0 18 | 0 19 | -------------------------------------------------------------------------------- /data/test_geometry_generic/302.poly: -------------------------------------------------------------------------------- 1 | 8 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 5 0 11 | 1 0 12 | 4 4 5 6 7 13 | 1 0 14 | 4 0 1 5 4 15 | 1 0 16 | 4 1 2 6 5 17 | 1 0 18 | 4 2 3 7 6 19 | 1 0 20 | 4 3 0 4 7 21 | 0 22 | 0 23 | -------------------------------------------------------------------------------- /data/test_geometry_generic/302_1.poly: -------------------------------------------------------------------------------- 1 | 12 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 0.2 0.2 1.0 11 | 9 0.8 0.2 1.0 12 | 10 0.8 0.8 1.0 13 | 11 0.2 0.8 1.0 14 | 6 0 15 | 2 1 16 | 4 4 5 6 7 17 | 4 11 10 9 8 18 | 1 0.5 0.5 1.0 19 | 1 0 20 | 4 0 3 2 1 21 | 1 0 22 | 4 0 1 5 4 23 | 1 0 24 | 4 1 2 6 5 25 | 1 0 26 | 4 2 3 7 6 27 | 1 0 28 | 4 3 0 4 7 29 | 0 30 | 0 31 | -------------------------------------------------------------------------------- /data/test_geometry_generic/303.poly: -------------------------------------------------------------------------------- 1 | 10 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 2.0 2.0 2.0 11 | 9 2.0 3.0 3.0 12 | 7 0 13 | 1 0 14 | 4 0 3 2 1 15 | 1 0 16 | 4 4 5 6 7 17 | 1 0 18 | 4 0 1 5 4 19 | 1 0 20 | 4 1 2 6 5 21 | 1 0 22 | 4 2 3 7 6 23 | 1 0 24 | 4 3 0 4 7 25 | 1 0 26 | 3 2 8 9 27 | 0 28 | 0 -------------------------------------------------------------------------------- /data/test_geometry_generic/303_1.poly: -------------------------------------------------------------------------------- 1 | 15 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 2.0 1.0 1.0 11 | 9 2.0 2.0 1.0 12 | 10 1.0 2.0 1.0 13 | 11 1.0 1.0 2.0 14 | 12 2.0 1.0 2.0 15 | 13 2.0 2.0 2.0 16 | 14 1.0 2.0 2.0 17 | 12 0 18 | 1 0 19 | 4 0 3 2 1 20 | 1 0 21 | 4 4 5 6 7 22 | 1 0 23 | 4 0 1 5 4 24 | 1 0 25 | 4 1 2 6 5 26 | 1 0 27 | 4 2 3 7 6 28 | 1 0 29 | 4 3 0 4 7 30 | 1 0 31 | 4 6 10 9 8 32 | 1 0 33 | 4 11 12 13 14 34 | 1 0 35 | 4 8 9 13 12 36 | 1 0 37 | 4 6 8 12 11 38 | 1 0 39 | 4 9 10 14 13 40 | 1 0 41 | 4 6 11 14 10 42 | 0 43 | 0 44 | -------------------------------------------------------------------------------- /data/test_geometry_generic/303_2.poly: -------------------------------------------------------------------------------- 1 | 14 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 0.2 0.2 0.0 11 | 9 1.0 0.5 0.0 12 | 10 0.5 0.8 0.0 13 | 11 0.2 0.2 1.0 14 | 12 1.0 0.5 1.0 15 | 13 0.5 0.8 1.0 16 | 9 0 17 | 2 1 18 | 5 0 3 2 9 1 19 | 3 8 9 10 20 | 1 0.9 0.5 0.0 21 | 2 1 22 | 5 4 5 12 6 7 23 | 3 11 13 12 24 | 1 0.5 0.5 1.0 25 | 1 0 26 | 4 0 1 5 4 27 | 1 0 28 | 6 1 9 2 6 12 5 29 | 1 0 30 | 4 2 3 7 6 31 | 1 0 32 | 4 3 0 4 7 33 | 1 0 34 | 4 10 9 12 13 35 | 1 0 36 | 4 8 10 13 11 37 | 1 0 38 | 4 9 8 11 12 39 | 0 40 | 0 41 | -------------------------------------------------------------------------------- /data/test_geometry_generic/303_cs.poly: -------------------------------------------------------------------------------- 1 | 9 3 0 0 2 | 0 0 0 0 3 | 1 0 1 0 4 | 2 1 1 0 5 | 3 1 0 0 6 | 4 0 0 1 7 | 5 0 1 1 8 | 6 1 1 1 9 | 7 1 0 1 10 | 8 0.5 0.5 1 11 | 12 0 12 | 1 0 13 | 3 0 1 2 14 | 1 0 15 | 3 0 2 3 16 | 1 0 17 | 3 0 4 5 18 | 1 0 19 | 3 0 5 1 20 | 1 0 21 | 3 0 3 7 22 | 1 0 23 | 3 0 7 4 24 | 1 0 25 | 3 3 2 6 26 | 1 0 27 | 3 3 6 7 28 | 1 0 29 | 3 2 1 5 30 | 1 0 31 | 3 2 5 6 32 | 1 0 33 | 3 4 7 8 34 | 1 0 35 | 3 5 8 6 36 | 0 37 | 0 38 | -------------------------------------------------------------------------------- /data/test_geometry_generic/304_1.poly: -------------------------------------------------------------------------------- 1 | 8 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 7 0 11 | 1 0 12 | 4 0 3 2 1 13 | 1 0 14 | 4 4 5 6 7 15 | 1 0 16 | 4 0 1 5 4 17 | 1 0 18 | 4 1 2 6 5 19 | 1 0 20 | 4 2 3 7 6 21 | 1 0 22 | 4 3 0 4 7 23 | 1 0 24 | 4 3 1 5 7 25 | 0 26 | 0 -------------------------------------------------------------------------------- /data/test_geometry_generic/305.poly: -------------------------------------------------------------------------------- 1 | 11 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 2.0 2.0 2.0 11 | 9 2.0 3.0 3.0 12 | 10 5.0 9.0 4.0 13 | 7 0 14 | 1 0 15 | 3 10 8 9 16 | 1 0 17 | 4 0 3 2 1 18 | 1 0 19 | 4 4 5 6 7 20 | 1 0 21 | 4 0 1 5 4 22 | 1 0 23 | 4 1 2 6 5 24 | 1 0 25 | 4 2 3 7 6 26 | 1 0 27 | 4 3 0 4 7 28 | 0 29 | 0 -------------------------------------------------------------------------------- /data/test_geometry_generic/305_1.poly: -------------------------------------------------------------------------------- 1 | 16 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 0.0 0.0 2.0 11 | 9 1.0 0.0 2.0 12 | 10 1.0 1.0 2.0 13 | 11 0.0 1.0 2.0 14 | 12 0.0 0.0 3.0 15 | 13 1.0 0.0 3.0 16 | 14 1.0 1.0 3.0 17 | 15 0.0 1.0 3.0 18 | 12 0 19 | 1 0 20 | 4 0 3 2 1 21 | 1 0 22 | 4 4 5 6 7 23 | 1 0 24 | 4 0 1 5 4 25 | 1 0 26 | 4 1 2 6 5 27 | 1 0 28 | 4 2 3 7 6 29 | 1 0 30 | 4 3 0 4 7 31 | 1 0 32 | 4 8 11 10 9 33 | 1 0 34 | 4 12 13 14 15 35 | 1 0 36 | 4 8 9 13 12 37 | 1 0 38 | 4 9 10 14 13 39 | 1 0 40 | 4 10 11 15 14 41 | 1 0 42 | 4 11 8 12 15 43 | 0 44 | 0 45 | -------------------------------------------------------------------------------- /data/test_geometry_generic/306.poly: -------------------------------------------------------------------------------- 1 | 9 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 0.5 0.5 -1.0 11 | 9 0 12 | 1 0 13 | 4 0 3 2 1 14 | 1 0 15 | 3 4 5 8 16 | 1 0 17 | 3 5 6 8 18 | 1 0 19 | 3 6 7 8 20 | 1 0 21 | 3 7 4 8 22 | 1 0 23 | 4 0 1 5 4 24 | 1 0 25 | 4 1 2 6 5 26 | 1 0 27 | 4 2 3 7 6 28 | 1 0 29 | 4 3 0 4 7 30 | 0 31 | 0 32 | -------------------------------------------------------------------------------- /data/test_geometry_generic/306_1.poly: -------------------------------------------------------------------------------- 1 | 9 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 0.5 0.5 0.0 11 | 9 0 12 | 1 0 13 | 4 0 3 2 1 14 | 1 0 15 | 3 4 5 8 16 | 1 0 17 | 3 5 6 8 18 | 1 0 19 | 3 6 7 8 20 | 1 0 21 | 3 7 4 8 22 | 1 0 23 | 4 0 1 5 4 24 | 1 0 25 | 4 1 2 6 5 26 | 1 0 27 | 4 2 3 7 6 28 | 1 0 29 | 4 3 0 4 7 30 | 0 31 | 0 32 | -------------------------------------------------------------------------------- /data/test_geometry_generic/307.poly: -------------------------------------------------------------------------------- 1 | 8 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 6 0 11 | 1 0 12 | 4 0 1 2 3 13 | 1 0 14 | 4 4 5 6 7 15 | 1 0 16 | 4 0 1 5 4 17 | 1 0 18 | 4 1 2 6 5 19 | 1 0 20 | 4 2 3 7 6 21 | 1 0 22 | 4 3 0 4 7 23 | 0 24 | 0 25 | -------------------------------------------------------------------------------- /data/test_geometry_generic/307_1.poly: -------------------------------------------------------------------------------- 1 | 9 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 0.5 0.5 1.0 11 | 6 0 12 | 1 0 13 | 4 4 5 8 7 14 | 1 0 15 | 4 7 6 5 8 16 | 1 0 17 | 4 0 3 2 1 18 | 1 0 19 | 4 0 1 5 4 20 | 1 0 21 | 4 1 2 6 5 22 | 1 0 23 | 4 2 3 7 6 24 | 1 0 25 | 4 3 0 4 7 26 | 0 27 | 0 28 | -------------------------------------------------------------------------------- /data/test_geometry_generic/401.poly: -------------------------------------------------------------------------------- 1 | 4 3 0 0 2 | 0 0.2 0.2 0.2 3 | 1 0.8 0.2 0.2 4 | 2 0.5 0.5 0.2 5 | 3 0.5 0.5 1.00001 6 | 4 0 7 | 1 0 8 | 3 0 1 2 9 | 1 0 10 | 3 0 3 1 11 | 1 0 12 | 3 1 3 2 13 | 1 0 14 | 3 0 2 3 15 | 0 16 | 0 17 | -------------------------------------------------------------------------------- /data/test_geometry_generic/401_1.poly: -------------------------------------------------------------------------------- 1 | 4 3 0 0 2 | 0 0.2 0.2 2.0 3 | 1 0.8 0.2 2.0 4 | 2 0.5 0.5 2.0 5 | 3 0.5 0.5 0.99999 6 | 4 0 7 | 1 0 8 | 3 0 2 1 9 | 1 0 10 | 3 0 1 3 11 | 1 0 12 | 3 1 2 3 13 | 1 0 14 | 3 2 0 3 15 | 0 16 | 0 -------------------------------------------------------------------------------- /data/test_geometry_generic/401_2.poly: -------------------------------------------------------------------------------- 1 | 4 3 0 0 2 | 0 0.8 0.2 0.2 3 | 1 0.9 0.3 0.2 4 | 2 0.5 0.5 0.2 5 | 3 0.5 0.5 0.9 6 | 4 0 7 | 1 0 8 | 3 0 1 2 9 | 1 0 10 | 3 0 3 1 11 | 1 0 12 | 3 1 3 2 13 | 1 0 14 | 3 0 2 3 15 | 0 16 | 0 -------------------------------------------------------------------------------- /data/test_geometry_generic/401_3.poly: -------------------------------------------------------------------------------- 1 | 4 3 0 0 2 | 0 0.8 0.2 0.2 3 | 1 0.9 0.3 0.2 4 | 2 0.5 0.5 0.2 5 | 3 0.5 0.5 0.5 6 | 4 0 7 | 1 0 8 | 3 0 1 2 9 | 1 0 10 | 3 0 3 1 11 | 1 0 12 | 3 1 3 2 13 | 1 0 14 | 3 0 2 3 15 | 0 16 | 0 -------------------------------------------------------------------------------- /data/test_geometry_generic/401_4.poly: -------------------------------------------------------------------------------- 1 | 4 3 0 0 2 | 0 0.2 0.2 0 3 | 1 0.8 0.2 0 4 | 2 0.5 0.5 0 5 | 3 0.5 0.5 0.9 6 | 4 0 7 | 1 0 8 | 3 0 1 2 9 | 1 0 10 | 3 0 3 1 11 | 1 0 12 | 3 1 3 2 13 | 1 0 14 | 3 0 2 3 15 | 0 16 | 0 -------------------------------------------------------------------------------- /data/test_geometry_generic/401_5.poly: -------------------------------------------------------------------------------- 1 | 6 3 0 0 2 | 0 0.5 0.0 0.0 3 | 1 1.0 0.5 0.0 4 | 2 0.5 0.5 0.0 5 | 3 0.5 0.0 1.0 6 | 4 0.5 0.5 1.0 7 | 5 1.0 0.5 1.0 8 | 5 0 9 | 1 0 10 | 3 0 1 2 11 | 1 0 12 | 3 3 4 5 13 | 1 0 14 | 4 0 3 5 1 15 | 1 0 16 | 4 1 5 4 2 17 | 1 0 18 | 4 0 2 4 3 19 | 0 20 | 0 -------------------------------------------------------------------------------- /data/test_geometry_generic/401_6.poly: -------------------------------------------------------------------------------- 1 | 6 3 0 0 2 | 0 0.5 0.1 0.0 3 | 1 0.9 0.5 0.0 4 | 2 0.5 0.5 0.0 5 | 3 0.5 0.1 1.0 6 | 4 0.5 0.5 1.0 7 | 5 0.9 0.5 1.0 8 | 5 0 9 | 1 0 10 | 3 0 1 2 11 | 1 0 12 | 3 3 4 5 13 | 1 0 14 | 4 0 3 5 1 15 | 1 0 16 | 4 1 5 4 2 17 | 1 0 18 | 4 0 2 4 3 19 | 0 20 | 0 -------------------------------------------------------------------------------- /data/test_geometry_generic/402_in_1.poly: -------------------------------------------------------------------------------- 1 | 4 3 0 0 2 | 0 0.2 0.2 0.2 3 | 1 0.8 0.2 0.2 4 | 2 0.5 0.5 0.2 5 | 3 0.5 0.5 0.9 6 | 4 0 7 | 1 0 8 | 3 0 1 2 9 | 1 0 10 | 3 0 3 1 11 | 1 0 12 | 3 1 3 2 13 | 1 0 14 | 3 0 2 3 15 | 0 16 | 0 17 | -------------------------------------------------------------------------------- /data/test_geometry_generic/403.poly: -------------------------------------------------------------------------------- 1 | 4 3 0 0 2 | 0 1.2 1.2 1.2 3 | 1 1.8 1.2 1.2 4 | 2 1.5 1.5 1.2 5 | 3 1.5 1.5 1.9 6 | 4 0 7 | 1 0 8 | 3 0 1 2 9 | 1 0 10 | 3 0 3 1 11 | 1 0 12 | 3 1 3 2 13 | 1 0 14 | 3 0 2 3 15 | 0 16 | 0 -------------------------------------------------------------------------------- /data/test_geometry_generic/404.poly: -------------------------------------------------------------------------------- 1 | 5 3 0 0 2 | 0 0.0 0.0 0.1 3 | 1 0.0 1.0 0.1 4 | 2 1.0 1.0 0.1 5 | 3 1.0 0.0 0.1 6 | 4 0.5 0.5 0.5 7 | 5 0 8 | 1 0 9 | 4 0 3 2 1 10 | 1 0 11 | 3 0 4 3 12 | 1 0 13 | 3 3 4 2 14 | 1 0 15 | 3 2 4 1 16 | 1 0 17 | 3 1 4 0 18 | 0 19 | 0 -------------------------------------------------------------------------------- /data/test_geometry_generic/405.poly: -------------------------------------------------------------------------------- 1 | 4 3 0 0 2 | 0 0.2 0.2 0.2 3 | 1 0.8 0.2 0.2 4 | 2 0.5 0.5 0.2 5 | 3 0.5 0.5 0.9 6 | 4 0 7 | 1 0 8 | 3 0 1 2 9 | 1 0 10 | 3 0 3 1 11 | 1 0 12 | 3 1 3 2 13 | 1 0 14 | 3 0 2 3 15 | 0 16 | 0 -------------------------------------------------------------------------------- /data/test_geometry_generic/inner_shell.poly: -------------------------------------------------------------------------------- 1 | 4 3 0 0 2 | 0 0.2 0.2 0.2 3 | 1 0.8 0.2 0.2 4 | 2 0.5 0.5 0.2 5 | 3 0.5 0.5 0.9 6 | 4 0 7 | 1 0 8 | 3 0 1 2 9 | 1 0 10 | 3 0 3 1 11 | 1 0 12 | 3 1 3 2 13 | 1 0 14 | 3 0 2 3 15 | 0 16 | 0 17 | -------------------------------------------------------------------------------- /data/test_geometry_specific/501.json: -------------------------------------------------------------------------------- 1 | {"type":"CityJSON","version":"1.0","metadata":{"geographicalExtent":[0.0,0.0,0.0,3.0,1.0,1.0],"presentLoDs":{"2":1}},"CityObjects":{"UUID_d37b2d6c-6d85-43d1-9923-f32fcf142726":{"type":"GenericCityObject","geometry":[{"type":"CompositeSolid","boundaries":[[[[[0,1,2,3]],[[4,5,6,7]],[[0,3,5,4]],[[3,2,6,5]],[[2,1,7,6]],[[1,0,4,7]]]],[[[[8,9,10,11]],[[12,13,14,15]],[[8,11,13,12]],[[11,10,14,13]],[[10,9,15,14]],[[9,8,12,15]]]],[[[[3,2,16,17]],[[5,18,19,6]],[[3,17,18,5]],[[17,16,19,18]],[[16,2,6,19]],[[2,3,5,6]]]]],"lod":2}]}},"vertices":[[0.0,0.0,0.0],[0.0,1.0,0.0],[1.0,1.0,0.0],[1.0,0.0,0.0],[0.0,0.0,1.0],[1.0,0.0,1.0],[1.0,1.0,1.0],[0.0,1.0,1.0],[1.99,0.0,0.0],[1.99,1.0,0.0],[3.0,1.0,0.0],[3.0,0.0,0.0],[1.99,0.0,1.0],[3.0,0.0,1.0],[3.0,1.0,1.0],[1.99,1.0,1.0],[2.0,1.0,0.0],[2.0,0.0,0.0],[2.0,0.0,1.0],[2.0,1.0,1.0]]} -------------------------------------------------------------------------------- /data/test_geometry_specific/501_1.json: -------------------------------------------------------------------------------- 1 | {"type":"CityJSON","version":"1.0","metadata":{"geographicalExtent":[0.0,0.0,0.0,100.0,100.0,100.0],"presentLoDs":{"2":1}},"CityObjects":{"UUID_74fb149b-c496-488b-abe4-e52b73bd36d0":{"type":"GenericCityObject","geometry":[{"type":"CompositeSolid","boundaries":[[[[[0,1,2,3]],[[4,5,6,7]],[[0,3,5,4]],[[3,2,6,5]],[[2,1,7,6]],[[1,0,4,7]]],[[[8,9,10]],[[8,11,9]],[[9,11,10]],[[8,10,11]]]],[[[[12,10,9]],[[12,9,11]],[[9,10,11]],[[12,11,10]]]]],"lod":2}]}},"vertices":[[0.0,0.0,0.0],[0.0,100.0,0.0],[100.0,100.0,0.0],[100.0,0.0,0.0],[0.0,0.0,100.0],[100.0,0.0,100.0],[100.0,100.0,100.0],[0.0,100.0,100.0],[20.0,20.0,20.0],[80.0,20.0,20.0],[50.0,50.0,20.0],[50.0,50.0,90.0],[10.0,10.0,10.0]]} -------------------------------------------------------------------------------- /data/test_geometry_specific/502.json: -------------------------------------------------------------------------------- 1 | {"type":"CityJSON","version":"1.0","metadata":{"geographicalExtent":[0.0,0.0,0.0,6.0,1.0,1.0],"presentLoDs":{"2":1}},"CityObjects":{"UUID_3691e4fe-2f32-4540-9460-259781edc534":{"type":"GenericCityObject","geometry":[{"type":"CompositeSolid","boundaries":[[[[[0,1,2,3]],[[4,5,6,7]],[[0,3,5,4]],[[3,2,6,5]],[[2,1,7,6]],[[1,0,4,7]]]],[[[[8,9,10,11]],[[12,13,14,15]],[[8,11,13,12]],[[11,10,14,13]],[[10,9,15,14]],[[9,8,12,15]]]],[[[[8,9,10,11]],[[12,13,14,15]],[[8,11,13,12]],[[11,10,14,13]],[[10,9,15,14]],[[9,8,12,15]]]]],"lod":2}]}},"vertices":[[0.0,0.0,0.0],[0.0,1.0,0.0],[1.0,1.0,0.0],[1.0,0.0,0.0],[0.0,0.0,1.0],[1.0,0.0,1.0],[1.0,1.0,1.0],[0.0,1.0,1.0],[5.0,0.0,0.0],[5.0,1.0,0.0],[6.0,1.0,0.0],[6.0,0.0,0.0],[5.0,0.0,1.0],[6.0,0.0,1.0],[6.0,1.0,1.0],[5.0,1.0,1.0]]} -------------------------------------------------------------------------------- /data/test_geometry_specific/503.json: -------------------------------------------------------------------------------- 1 | {"type":"CityJSON","version":"1.0","metadata":{"geographicalExtent":[0.0,0.0,0.0,6.0,1.0,1.0],"presentLoDs":{"2":1}},"CityObjects":{"UUID_0bd3e918-38fa-4c45-8e10-a0978bab1b8b":{"type":"GenericCityObject","geometry":[{"type":"CompositeSolid","boundaries":[[[[[0,1,2,3]],[[4,5,6,7]],[[0,3,5,4]],[[3,2,6,5]],[[2,1,7,6]],[[1,0,4,7]]]],[[[[8,9,10,11]],[[12,13,14,15]],[[8,11,13,12]],[[11,10,14,13]],[[10,9,15,14]],[[9,8,12,15]]]],[[[[3,2,16,17]],[[5,18,19,6]],[[3,17,18,5]],[[17,16,19,18]],[[16,2,6,19]],[[2,3,5,6]]]]],"lod":2}]}},"vertices":[[0.0,0.0,0.0],[0.0,1.0,0.0],[1.0,1.0,0.0],[1.0,0.0,0.0],[0.0,0.0,1.0],[1.0,0.0,1.0],[1.0,1.0,1.0],[0.0,1.0,1.0],[5.0,0.0,0.0],[5.0,1.0,0.0],[6.0,1.0,0.0],[6.0,0.0,0.0],[5.0,0.0,1.0],[6.0,0.0,1.0],[6.0,1.0,1.0],[5.0,1.0,1.0],[2.0,1.0,0.0],[2.0,0.0,0.0],[2.0,0.0,1.0],[2.0,1.0,1.0]]} -------------------------------------------------------------------------------- /data/test_geometry_specific/601.json: -------------------------------------------------------------------------------- 1 | {"type":"CityJSON","version":"1.0","metadata":{"geographicalExtent":[0.0,0.0,0.0,250.0,100.0,100.0],"presentLoDs":{"1":2}},"CityObjects":{"elvisisstillalive-1":{"type":"BuildingPart","parents":["elvisisstillalive"],"geometry":[{"type":"Solid","boundaries":[[[[0,1,2,3]],[[4,5,6,7]],[[0,3,5,4]],[[3,2,6,5]],[[2,1,7,6]],[[1,0,4,7]]]],"lod":1}]},"elvisisstillalive-2":{"type":"BuildingPart","parents":["elvisisstillalive"],"geometry":[{"type":"Solid","boundaries":[[[[8,9,10,11]],[[12,13,14,15]],[[8,11,13,12]],[[11,10,14,13]],[[10,9,15,14]],[[9,8,12,15]]]],"lod":1}]},"elvisisstillalive":{"type":"Building","children":["elvisisstillalive-1","elvisisstillalive-2"],"geometry":[]}},"vertices":[[0.0,0.0,0.0],[0.0,100.0,0.0],[100.0,100.0,0.0],[100.0,0.0,0.0],[0.0,0.0,100.0],[100.0,0.0,100.0],[100.0,100.0,100.0],[0.0,100.0,100.0],[50.0,0.0,0.0],[50.0,100.0,0.0],[250.0,100.0,0.0],[250.0,0.0,0.0],[50.0,0.0,100.0],[250.0,0.0,100.0],[250.0,100.0,100.0],[50.0,100.0,100.0]]} -------------------------------------------------------------------------------- /data/test_jsonfg/e103.fg.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | "features": [ 4 | { 5 | "type": "Feature", 6 | "id": "a cube", 7 | "geometry": null, 8 | "time": { 9 | "interval": [ 10 | "2014-04-24T10:50:18Z", 11 | ".." 12 | ] 13 | }, 14 | "place": { 15 | "type": "Polyhedron", 16 | "coordinates": [ 17 | [ 18 | [ 19 | [ 20 | [0.0, 0.0, 0.0 ], [0.0, 1.0, 0.0 ], [1.0, 1.0, 0.0 ], [1.0, 0.0, 0.0 ] 21 | ] 22 | ], 23 | [ 24 | [ 25 | [0.0, 0.0, 1.0 ], [1.0, 0.0, 1.0 ], [1.0, 1.0, 1.0 ], [0.0, 1.0, 1.0 ] 26 | ] 27 | ], 28 | [ 29 | [ 30 | [0.0, 0.0, 0.0 ], [1.0, 0.0, 0.0 ], [1.0, 0.0, 1.0 ], [0.0, 0.0, 1.0 ] 31 | ] 32 | ], 33 | [ 34 | [ 35 | [1.0, 0.0, 0.0 ], [1.0, 1.0, 0.0 ], [1.0, 1.0, 1.0 ], [1.0, 0.0, 1.0 ] 36 | ] 37 | ], 38 | [ 39 | [ 40 | [1.0, 1.0, 0.0 ], [0.0, 1.0, 0.0 ], [0.0, 1.0, 1.0 ], [1.0, 1.0, 1.0 ] 41 | ] 42 | ], 43 | [ 44 | [ 45 | [0.0, 1.0, 0.0 ], [0.0, 0.0, 0.0 ], [0.0, 0.0, 1.0 ], [0.0, 1.0, 1.0 ] 46 | ] 47 | ] 48 | ] 49 | ] 50 | }, 51 | "properties": { 52 | "yeah": "very big" 53 | } 54 | } 55 | ] 56 | } -------------------------------------------------------------------------------- /data/test_jsonfg/geojson.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "Feature", 3 | "geometry": { 4 | "type": "Point", 5 | "coordinates": [125.6, 10.1] 6 | }, 7 | "properties": { 8 | "name": "Dinagat Islands" 9 | } 10 | } -------------------------------------------------------------------------------- /data/test_valid/basecube.obj: -------------------------------------------------------------------------------- 1 | 2 | v 0.0 0.0 0.0 3 | v 1.0 0.0 0.0 4 | v 1.0 1.0 0.0 5 | v 0.0 1.0 0.0 6 | v 0.0 0.0 1.0 7 | v 1.0 0.0 1.0 8 | v 1.0 1.0 1.0 9 | v 0.0 1.0 1.0 10 | f 1 4 3 2 11 | f 5 6 7 8 12 | f 1 2 6 5 13 | f 2 3 7 6 14 | f 3 4 8 7 15 | f 4 1 5 8 16 | -------------------------------------------------------------------------------- /data/test_valid/basecube.off: -------------------------------------------------------------------------------- 1 | OFF 2 | 8 6 0 3 | 0.0 0.0 0.0 4 | 1.0 0.0 0.0 5 | 1.0 1.0 0.0 6 | 0.0 1.0 0.0 7 | 0.0 0.0 1.0 8 | 1.0 0.0 1.0 9 | 1.0 1.0 1.0 10 | 0.0 1.0 1.0 11 | 4 0 3 2 1 12 | 4 4 5 6 7 13 | 4 0 1 5 4 14 | 4 1 2 6 5 15 | 4 2 3 7 6 16 | 4 3 0 4 7 17 | -------------------------------------------------------------------------------- /data/test_valid/basecube.poly: -------------------------------------------------------------------------------- 1 | 8 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 6 0 11 | 1 0 12 | 4 0 3 2 1 13 | 1 0 14 | 4 4 5 6 7 15 | 1 0 16 | 4 0 1 5 4 17 | 1 0 18 | 4 1 2 6 5 19 | 1 0 20 | 4 2 3 7 6 21 | 1 0 22 | 4 3 0 4 7 23 | 0 24 | 0 25 | -------------------------------------------------------------------------------- /data/test_valid/basecube_large_coords.poly: -------------------------------------------------------------------------------- 1 | 8 3 0 0 2 | 0 98999999990.0 98999999990.0 10.0 3 | 1 98999999991.0 98999999990.0 10.0 4 | 2 98999999991.0 98999999991.0 10.0 5 | 3 98999999990.0 98999999991.0 10.0 6 | 4 98999999990.0 98999999990.0 11.0 7 | 5 98999999991.0 98999999990.0 11.0 8 | 6 98999999991.0 98999999991.0 11.0 9 | 7 98999999990.0 98999999991.0 11.0 10 | 6 0 11 | 1 0 12 | 4 0 3 2 1 13 | 1 0 14 | 4 4 5 6 7 15 | 1 0 16 | 4 0 1 5 4 17 | 1 0 18 | 4 1 2 6 5 19 | 1 0 20 | 4 2 3 7 6 21 | 1 0 22 | 4 3 0 4 7 23 | 0 24 | 0 25 | -------------------------------------------------------------------------------- /data/test_valid/closed_top.poly: -------------------------------------------------------------------------------- 1 | 9 3 0 0 2 | 0 0.0 0.0 0.0 3 | 1 1.0 0.0 0.0 4 | 2 1.0 1.0 0.0 5 | 3 0.0 1.0 0.0 6 | 4 0.0 0.0 1.0 7 | 5 1.0 0.0 1.0 8 | 6 1.0 1.0 1.0 9 | 7 0.0 1.0 1.0 10 | 8 0.5 0.5 1.0 11 | 7 0 12 | 1 0 13 | 4 4 5 8 7 14 | 1 0 15 | 4 5 6 7 8 16 | 1 0 17 | 4 0 3 2 1 18 | 1 0 19 | 4 0 1 5 4 20 | 1 0 21 | 4 1 2 6 5 22 | 1 0 23 | 4 2 3 7 6 24 | 1 0 25 | 4 3 0 4 7 26 | 0 27 | 0 28 | -------------------------------------------------------------------------------- /data/test_valid/composite_solid.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "CityJSON", 3 | "version": "1.0", 4 | "CityObjects": { 5 | "id-1":{ 6 | "type": "GenericCityObject", 7 | "geometry": [{ 8 | "type": "CompositeSolid", 9 | "lod": 1, 10 | "boundaries": [ 11 | [ 12 | [ [[0, 3, 2, 1]], [[4, 5, 6, 7]], [[0, 1, 5, 4]], [[1, 2, 6, 5]], [[2, 3, 7, 6]], [[3, 0, 4, 7]] ] 13 | ], 14 | [ 15 | [ [[1, 2, 9, 8]], [[5, 10, 11, 6]], [[1, 8, 10, 5]], [[8, 9, 11, 10]], [[9, 2, 6, 11]], [[2, 1, 5, 6]] ] 16 | ] 17 | ] 18 | }] 19 | } 20 | }, 21 | "vertices": [ 22 | [99999997.99, 99999997.99, 99999997.99], 23 | [99999998.99, 99999997.99, 99999997.99], 24 | [99999998.99, 99999998.99, 99999997.99], 25 | [99999997.99, 99999998.99, 99999997.99], 26 | [99999997.99, 99999997.99, 99999998.99], 27 | [99999998.99, 99999997.99, 99999998.99], 28 | [99999998.99, 99999998.99, 99999998.99], 29 | [99999997.99, 99999998.99, 99999998.99], 30 | [99999999.99, 99999997.99, 99999997.99], 31 | [99999999.99, 99999999.99, 99999997.99], 32 | [99999999.99, 99999997.99, 99999998.99], 33 | [99999999.99, 99999999.99, 99999998.99] 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /data/test_valid/inner_shell.poly: -------------------------------------------------------------------------------- 1 | 4 3 0 0 2 | 0 0.2 0.2 0.2 3 | 1 0.8 0.2 0.2 4 | 2 0.5 0.5 0.2 5 | 3 0.5 0.5 0.9 6 | 4 0 7 | 1 0 8 | 3 0 1 2 9 | 1 0 10 | 3 0 3 1 11 | 1 0 12 | 3 1 3 2 13 | 1 0 14 | 3 0 2 3 15 | 0 16 | 0 17 | -------------------------------------------------------------------------------- /data/test_valid/inner_shell_1.poly: -------------------------------------------------------------------------------- 1 | 4 3 0 0 2 | 0 0.2 0.2 0.2 3 | 1 0.8 0.2 0.2 4 | 2 0.5 0.5 0.2 5 | 3 0.5 0.5 1.0 6 | 4 0 7 | 1 0 8 | 3 0 1 2 9 | 1 0 10 | 3 0 3 1 11 | 1 0 12 | 3 1 3 2 13 | 1 0 14 | 3 0 2 3 15 | 0 16 | 0 -------------------------------------------------------------------------------- /data/test_valid/inner_shell_2.poly: -------------------------------------------------------------------------------- 1 | 4 3 0 0 2 | 0 0.8 0.2 0.2 3 | 1 0.9 0.3 0.2 4 | 2 0.8 0.4 0.2 5 | 3 0.8 0.5 0.9 6 | 4 0 7 | 1 0 8 | 3 0 1 2 9 | 1 0 10 | 3 0 3 1 11 | 1 0 12 | 3 1 3 2 13 | 1 0 14 | 3 0 2 3 15 | 0 16 | 0 -------------------------------------------------------------------------------- /data/test_valid/inner_shell_3.poly: -------------------------------------------------------------------------------- 1 | 4 3 0 0 2 | 0 0.8 0.2 0.2 3 | 1 0.9 0.3 0.2 4 | 2 0.8 0.4 0.2 5 | 3 0.5 0.5 0.9 6 | 4 0 7 | 1 0 8 | 3 1 2 0 9 | 1 0 10 | 3 0 3 1 11 | 1 0 12 | 3 1 3 2 13 | 1 0 14 | 3 0 2 3 15 | 0 16 | 0 -------------------------------------------------------------------------------- /data/test_valid/inner_shell_4.poly: -------------------------------------------------------------------------------- 1 | 4 3 0 0 2 | 0 0.2 0.2 0.05 3 | 1 0.8 0.2 0.05 4 | 2 0.5 0.5 0.05 5 | 3 0.5 0.5 0.2 6 | 4 0 7 | 1 0 8 | 3 0 1 2 9 | 1 0 10 | 3 0 3 1 11 | 1 0 12 | 3 1 3 2 13 | 1 0 14 | 3 0 2 3 15 | 0 16 | 0 17 | -------------------------------------------------------------------------------- /data/test_valid/nearly-collinear.off: -------------------------------------------------------------------------------- 1 | OFF 2 | 19 11 0 3 | 765598.440000 328381.870000 241.220000 4 | 765601.270000 328370.820000 241.220000 5 | 765596.140000 328369.500000 241.220000 6 | 765593.300000 328380.550000 241.220000 7 | 765598.440000 328381.870000 245.440000 8 | 765599.160000 328379.070000 245.500000 9 | 765599.160000 328379.070000 243.720000 10 | 765601.270000 328370.820000 243.660000 11 | 765593.300000 328380.550000 244.550000 12 | 765596.510000 328381.370000 246.720000 13 | 765596.140000 328369.500000 245.020000 14 | 765594.010000 328377.780000 244.930000 15 | 765594.010000 328377.780000 244.630000 16 | 765597.970000 328369.970000 247.100000 17 | 765596.600000 328378.420000 246.380000 18 | 765595.920000 328378.250000 245.920000 19 | 765595.920000 328378.250000 247.090000 20 | 765597.210000 328378.570000 245.750000 21 | 765597.210000 328378.570000 246.790000 22 | 4 0 1 2 3 23 | 6 1 0 4 5 6 7 24 | 5 3 8 9 4 0 25 | 6 3 2 10 11 12 8 26 | 5 1 7 13 10 2 27 | 5 14 15 12 11 16 28 | 5 17 6 5 18 14 29 | 6 6 17 14 16 13 7 30 | 4 11 10 13 16 31 | 6 18 9 8 12 15 14 32 | 4 9 18 5 4 33 | 34 | -------------------------------------------------------------------------------- /data/test_valid/planar.off: -------------------------------------------------------------------------------- 1 | OFF 2 | 5 1 0 3 | 758318.60 379919.16 211.76 4 | 758317.60 379915.36 208.79 5 | 758456.88 379878.84 208.65 6 | 758458.14 379878.52 208.65 7 | 758459.11 379882.25 211.58 8 | 5 0 1 2 3 4 -------------------------------------------------------------------------------- /data/test_valid/two_objects_1.obj: -------------------------------------------------------------------------------- 1 | o cube_1 2 | v 0.0 0.0 0.0 3 | v 1.0 0.0 0.0 4 | v 1.0 1.0 0.0 5 | v 0.0 1.0 0.0 6 | v 0.0 0.0 1.0 7 | v 1.0 0.0 1.0 8 | v 1.0 1.0 1.0 9 | v 0.0 1.0 1.0 10 | f 1 4 3 2 11 | f 5 6 7 8 12 | f 1 2 6 5 13 | f 2 3 7 6 14 | f 3 4 8 7 15 | f 4 1 5 8 16 | o cube_2 17 | f 1 4 3 2 18 | f 5 6 7 7 19 | f 1 2 6 5 20 | f 2 3 7 6 21 | f 3 4 8 7 22 | f 4 1 5 8 23 | -------------------------------------------------------------------------------- /data/test_valid/two_objects_2.obj: -------------------------------------------------------------------------------- 1 | v 0.0 0.0 0.0 2 | v 1.0 0.0 0.0 3 | v 1.0 1.0 0.0 4 | v 0.0 1.0 0.0 5 | v 0.0 0.0 1.0 6 | v 1.0 0.0 1.0 7 | v 1.0 1.0 1.0 8 | v 0.0 1.0 1.0 9 | f 1 4 3 2 10 | f 5 6 7 8 11 | f 1 2 6 5 12 | f 2 3 7 6 13 | f 3 4 8 7 14 | f 4 1 5 8 15 | o cube_44 16 | f 1 4 3 2 17 | f 5 6 7 7 18 | f 1 2 6 5 19 | f 2 3 7 6 20 | f 3 4 8 7 21 | f 4 1 5 8 22 | -------------------------------------------------------------------------------- /data/test_valid/v104_1.off: -------------------------------------------------------------------------------- 1 | OFF 2 | 5 1 0 3 | 758731.86 379196.97 205.54 4 | 758736.08 379207.34 205.54 5 | 758743.72 379204.23 205.54 6 | 758739.37 379193.92 205.54 7 | 758732.25 379196.81 205.54 8 | 5 0 1 2 3 4 9 | -------------------------------------------------------------------------------- /data/test_valid/v104_2.off: -------------------------------------------------------------------------------- 1 | OFF 2 | 5 1 0 3 | 758731.86 379196.97 999205.54 4 | 758736.08 379207.34 999205.54 5 | 758743.72 379204.23 999205.54 6 | 758739.37 379193.92 999205.54 7 | 758732.25 379196.81 999205.54 8 | 5 0 1 2 3 4 9 | -------------------------------------------------------------------------------- /data/test_valid/v405.off: -------------------------------------------------------------------------------- 1 | OFF 2 | 32 60 0 3 | 93753.609375 463845.781250 0.000000 4 | 93753.859375 463841.875000 0.000000 5 | 93753.179688 463841.781250 0.000000 6 | 93753.203125 463842.125000 0.000000 7 | 93751.273438 463842.218750 0.000000 8 | 93751.140625 463840.281250 0.000000 9 | 93752.695312 463840.687500 0.000000 10 | 93753.000000 463835.687500 0.000000 11 | 93748.601562 463832.468750 0.000000 12 | 93748.562500 463832.437500 0.000000 13 | 93748.679688 463845.437500 0.000000 14 | 93749.546875 463845.500000 0.000000 15 | 93749.468750 463853.656250 0.000000 16 | 93753.625000 463854.093750 0.000000 17 | 93753.640625 463853.937500 0.000000 18 | 93754.304688 463845.906250 0.000000 19 | 93754.304688 463845.906250 10.337000 20 | 93753.609375 463845.781250 10.337000 21 | 93753.640625 463853.937500 10.337000 22 | 93753.625000 463854.093750 10.337000 23 | 93749.468750 463853.656250 10.337000 24 | 93749.546875 463845.500000 10.337000 25 | 93748.679688 463845.437500 10.337000 26 | 93748.562500 463832.437500 10.337000 27 | 93748.601562 463832.468750 10.337000 28 | 93753.000000 463835.687500 10.337000 29 | 93752.695312 463840.687500 10.337000 30 | 93751.140625 463840.281250 10.337000 31 | 93751.273438 463842.218750 10.337000 32 | 93753.203125 463842.125000 10.337000 33 | 93753.179688 463841.781250 10.337000 34 | 93753.859375 463841.875000 10.337000 35 | 3 7 10 5 36 | 3 5 10 11 37 | 3 5 11 4 38 | 3 4 11 13 39 | 3 4 13 3 40 | 3 3 13 0 41 | 3 3 0 1 42 | 3 15 0 13 43 | 3 15 13 14 44 | 3 8 9 10 45 | 3 8 10 7 46 | 3 7 5 6 47 | 3 13 11 12 48 | 3 3 1 2 49 | 3 0 15 16 50 | 3 0 16 17 51 | 3 15 14 18 52 | 3 15 18 16 53 | 3 14 13 19 54 | 3 14 19 18 55 | 3 13 12 20 56 | 3 13 20 19 57 | 3 12 11 21 58 | 3 12 21 20 59 | 3 11 10 22 60 | 3 11 22 21 61 | 3 10 9 23 62 | 3 10 23 22 63 | 3 9 8 24 64 | 3 9 24 23 65 | 3 8 7 25 66 | 3 8 25 24 67 | 3 7 6 26 68 | 3 7 26 25 69 | 3 6 5 27 70 | 3 6 27 26 71 | 3 5 4 28 72 | 3 5 28 27 73 | 3 4 3 29 74 | 3 4 29 28 75 | 3 3 2 30 76 | 3 3 30 29 77 | 3 2 1 31 78 | 3 2 31 30 79 | 3 1 0 17 80 | 3 1 17 31 81 | 3 19 20 21 82 | 3 19 21 28 83 | 3 19 28 29 84 | 3 19 29 17 85 | 3 19 17 16 86 | 3 19 16 18 87 | 3 27 28 21 88 | 3 27 21 22 89 | 3 27 22 25 90 | 3 27 25 26 91 | 3 29 30 31 92 | 3 29 31 17 93 | 3 22 23 24 94 | 3 22 24 25 95 | 96 | -------------------------------------------------------------------------------- /demo_lib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required (VERSION 3.16) 2 | 3 | project (myprogram) 4 | 5 | add_definitions(-std=c++14) 6 | set (CMAKE_BUILD_TYPE "Release") 7 | set( CMAKE_CXX_FLAGS "-O2" ) 8 | 9 | add_executable (myprogram main.cpp) 10 | 11 | add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR}/../ build) 12 | # add_subdirectory (/home/elvis/code/val3dity/ build) 13 | 14 | target_link_libraries (myprogram LINK_PUBLIC val3dity) -------------------------------------------------------------------------------- /docs/README.txt: -------------------------------------------------------------------------------- 1 | pip install sphinx-rtd-theme 2 | 3 | sphinx-build -b html . build -------------------------------------------------------------------------------- /docs/_static/104.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/104.png -------------------------------------------------------------------------------- /docs/_static/104b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/104b.png -------------------------------------------------------------------------------- /docs/_static/201.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/201.png -------------------------------------------------------------------------------- /docs/_static/204.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/204.png -------------------------------------------------------------------------------- /docs/_static/205.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/205.png -------------------------------------------------------------------------------- /docs/_static/206.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/206.png -------------------------------------------------------------------------------- /docs/_static/207.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/207.png -------------------------------------------------------------------------------- /docs/_static/208.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/208.png -------------------------------------------------------------------------------- /docs/_static/302.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/302.png -------------------------------------------------------------------------------- /docs/_static/303.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/303.png -------------------------------------------------------------------------------- /docs/_static/304.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/304.png -------------------------------------------------------------------------------- /docs/_static/305.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/305.png -------------------------------------------------------------------------------- /docs/_static/306.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/306.png -------------------------------------------------------------------------------- /docs/_static/501.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/501.png -------------------------------------------------------------------------------- /docs/_static/503.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/503.png -------------------------------------------------------------------------------- /docs/_static/errorcodes.graffle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/errorcodes.graffle -------------------------------------------------------------------------------- /docs/_static/errorcodes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/errorcodes.png -------------------------------------------------------------------------------- /docs/_static/geomprimitives.afdesign: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/geomprimitives.afdesign -------------------------------------------------------------------------------- /docs/_static/geomprimitives.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/geomprimitives.pdf -------------------------------------------------------------------------------- /docs/_static/isoprimitives.afdesign: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/isoprimitives.afdesign -------------------------------------------------------------------------------- /docs/_static/isoprimitives.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/isoprimitives.pdf -------------------------------------------------------------------------------- /docs/_static/isosolid.afdesign: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/isosolid.afdesign -------------------------------------------------------------------------------- /docs/_static/isosolid.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/isosolid.pdf -------------------------------------------------------------------------------- /docs/_static/ogcassertions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/ogcassertions.png -------------------------------------------------------------------------------- /docs/_static/orientation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/orientation.png -------------------------------------------------------------------------------- /docs/_static/report1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/report1.png -------------------------------------------------------------------------------- /docs/_static/report2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/report2.png -------------------------------------------------------------------------------- /docs/_static/torus.afdesign: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/torus.afdesign -------------------------------------------------------------------------------- /docs/_static/torus.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/torus.pdf -------------------------------------------------------------------------------- /docs/_static/unitpolygons.afdesign: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/unitpolygons.afdesign -------------------------------------------------------------------------------- /docs/_static/unitpolygons.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/unitpolygons.pdf -------------------------------------------------------------------------------- /docs/_static/val3dity-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/val3dity-logo.png -------------------------------------------------------------------------------- /docs/_static/val3dity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/val3dity.png -------------------------------------------------------------------------------- /docs/_static/valid3d.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/valid3d.pdf -------------------------------------------------------------------------------- /docs/_static/validornot.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/validornot.pdf -------------------------------------------------------------------------------- /docs/_static/validornot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/validornot.png -------------------------------------------------------------------------------- /docs/_static/vbp.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/vbp.pdf -------------------------------------------------------------------------------- /docs/_static/vcsol.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/vcsol.pdf -------------------------------------------------------------------------------- /docs/_static/vcsol_2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/vcsol_2.pdf -------------------------------------------------------------------------------- /docs/_static/vcsol_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/docs/_static/vcsol_2.png -------------------------------------------------------------------------------- /docs/contact.rst: -------------------------------------------------------------------------------- 1 | ======= 2 | Contact 3 | ======= 4 | 5 | 6 | val3dity is maintained by `Hugo Ledoux `_ and the `3D geoinformation group at TU Delft `_. 7 | 8 | For any questions/issues/errors, please `open an issue on GitHub `_ 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /docs/install.rst: -------------------------------------------------------------------------------- 1 | ============ 2 | Installation 3 | ============ 4 | 5 | 6 | Windows executable 7 | ------------------ 8 | 9 | For Windows, we offer an `executable `_, but you can always compile the project yourself with CMake. 10 | 11 | It's also possible to compile val3dity yourself with the CMake file we offer, but it's slightly more complex with the dependencies. 12 | We suggest you look at `how we build it on GitHub Actions `_ to get some inspirate (and help). 13 | 14 | 15 | macOS & Linux: you need to compile 16 | ---------------------------------- 17 | 18 | The details to compile and use val3dity are on `GitHub `_. 19 | 20 | 21 | Web-application 22 | --------------- 23 | 24 | If you don't want to go through the troubles of compiling and/or installing val3dity, we suggest you use the `web application `_. 25 | Simply upload your file to our server and get a validation report back. 26 | We delete the file as soon as it has been validated. 27 | However, a file is limited to 50MB. 28 | 29 | 30 | Using val3dity as a library 31 | --------------------------- 32 | 33 | val3dity can be compiled and used as a library, see `the instructions `_. 34 | 35 | Also, there is a simple example of how to use it in `./demo_lib` with instructions to compile it. 36 | 37 | -------------------------------------------------------------------------------- /docs/requirements.txt: -------------------------------------------------------------------------------- 1 | sphinx-rtd-theme==2.0.0 -------------------------------------------------------------------------------- /pytest.ini: -------------------------------------------------------------------------------- 1 | [pytest] 2 | markers = 3 | full: run full set of tests 4 | 5 | testpaths = tests -------------------------------------------------------------------------------- /report_browser/css/main.css: -------------------------------------------------------------------------------- 1 | .version-id { 2 | font-weight: normal; 3 | color: #666; 4 | } 5 | .version-message { 6 | font-weight: bold 7 | } 8 | .version-info { 9 | color: slategray 10 | } -------------------------------------------------------------------------------- /report_browser/img/val3dity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/report_browser/img/val3dity.png -------------------------------------------------------------------------------- /report_browser/img/val3dity2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/report_browser/img/val3dity2.png -------------------------------------------------------------------------------- /report_browser/img/welldone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/report_browser/img/welldone.png -------------------------------------------------------------------------------- /src/CityObject.h: -------------------------------------------------------------------------------- 1 | /* 2 | val3dity 3 | 4 | Copyright (c) 2011-2024, 3D geoinformation research group, TU Delft 5 | 6 | This file is part of val3dity. 7 | 8 | val3dity is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | val3dity is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with val3dity. If not, see . 20 | 21 | For any information or further details about the use of val3dity, contact 22 | Hugo Ledoux 23 | 24 | Faculty of Architecture & the Built Environment 25 | Delft University of Technology 26 | Julianalaan 134, Delft 2628BL, the Netherlands 27 | */ 28 | 29 | #ifndef __val3dity__CityObject__ 30 | #define __val3dity__CityObject__ 31 | 32 | #include "Feature.h" 33 | #include "definitions.h" 34 | 35 | 36 | namespace val3dity 37 | { 38 | 39 | class CityObject : public Feature 40 | { 41 | public: 42 | CityObject(std::string theid, std::string thetype); 43 | ~CityObject(); 44 | 45 | bool validate(double tol_planarity_d2p, double tol_planarity_normals, double tol_overlap = -1); 46 | bool is_valid(); 47 | std::string get_type(); 48 | 49 | protected: 50 | bool validate_building(double tol_overlap); 51 | 52 | }; 53 | 54 | } // namespace val3dity 55 | 56 | #endif /* defined(__val3dity__CityObject__) */ 57 | -------------------------------------------------------------------------------- /src/CompositeSolid.h: -------------------------------------------------------------------------------- 1 | /* 2 | val3dity 3 | 4 | Copyright (c) 2011-2024, 3D geoinformation research group, TU Delft 5 | 6 | This file is part of val3dity. 7 | 8 | val3dity is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | val3dity is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with val3dity. If not, see . 20 | 21 | For any information or further details about the use of val3dity, contact 22 | Hugo Ledoux 23 | 24 | Faculty of Architecture & the Built Environment 25 | Delft University of Technology 26 | Julianalaan 134, Delft 2628BL, the Netherlands 27 | */ 28 | 29 | #ifndef CompositeSolid_h 30 | #define CompositeSolid_h 31 | 32 | #include "Primitive.h" 33 | #include "Solid.h" 34 | 35 | #include 36 | #include 37 | 38 | namespace val3dity 39 | { 40 | 41 | class CompositeSolid : public Primitive 42 | { 43 | public: 44 | CompositeSolid(std::string id = ""); 45 | ~CompositeSolid(); 46 | 47 | bool validate(double tol_planarity_d2p, double tol_planarity_normals, double tol_overlap = -1); 48 | int is_valid(); 49 | bool is_empty(); 50 | std::vector get_errors(); 51 | Primitive3D get_type(); 52 | std::set get_unique_error_codes(); 53 | 54 | void get_min_bbox(double& x, double& y); 55 | void translate_vertices(); 56 | 57 | Nef_polyhedron* get_nef_polyhedron(); 58 | 59 | bool add_solid(Solid* s); 60 | int number_of_solids(); 61 | 62 | protected: 63 | std::vector _lsSolids; 64 | Nef_polyhedron* _nef; 65 | }; 66 | 67 | } // namespace val3dity 68 | 69 | #endif /* CompositeSolid_h */ 70 | -------------------------------------------------------------------------------- /src/CompositeSurface.h: -------------------------------------------------------------------------------- 1 | /* 2 | val3dity 3 | 4 | Copyright (c) 2011-2024, 3D geoinformation research group, TU Delft 5 | 6 | This file is part of val3dity. 7 | 8 | val3dity is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | val3dity is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with val3dity. If not, see . 20 | 21 | For any information or further details about the use of val3dity, contact 22 | Hugo Ledoux 23 | 24 | Faculty of Architecture & the Built Environment 25 | Delft University of Technology 26 | Julianalaan 134, Delft 2628BL, the Netherlands 27 | */ 28 | 29 | #ifndef CompositeSurface_h 30 | #define CompositeSurface_h 31 | 32 | #include "Primitive.h" 33 | #include "Surface.h" 34 | 35 | #include 36 | 37 | namespace val3dity 38 | { 39 | 40 | class CompositeSurface : public Primitive 41 | { 42 | public: 43 | CompositeSurface(std::string id = ""); 44 | ~CompositeSurface(); 45 | 46 | bool validate(double tol_planarity_d2p, double tol_planarity_normals, double tol_overlap = -1); 47 | int is_valid(); 48 | bool is_empty(); 49 | Primitive3D get_type(); 50 | 51 | std::vector get_errors(); 52 | 53 | void get_min_bbox(double& x, double& y); 54 | void translate_vertices(); 55 | 56 | std::string get_off_representation(); 57 | 58 | int num_faces(); 59 | int num_vertices(); 60 | bool set_surface(Surface* s); 61 | Surface* get_surface(); 62 | std::set get_unique_error_codes(); 63 | 64 | protected: 65 | Surface* _surface; 66 | }; 67 | 68 | } // namespace val3dity 69 | 70 | #endif /* CompositeSurface_h */ 71 | -------------------------------------------------------------------------------- /src/GenericObject.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | val3dity 3 | 4 | Copyright (c) 2011-2024, 3D geoinformation research group, TU Delft 5 | 6 | This file is part of val3dity. 7 | 8 | val3dity is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | val3dity is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with val3dity. If not, see . 20 | 21 | For any information or further details about the use of val3dity, contact 22 | Hugo Ledoux 23 | 24 | Faculty of Architecture & the Built Environment 25 | Delft University of Technology 26 | Julianalaan 134, Delft 2628BL, the Netherlands 27 | */ 28 | 29 | 30 | #include "GenericObject.h" 31 | #include "definitions.h" 32 | #include "input.h" 33 | 34 | namespace val3dity 35 | { 36 | 37 | GenericObject::GenericObject(std::string theid) 38 | { 39 | _id = theid; 40 | _is_valid = -1; 41 | _type = "GenericObject"; 42 | } 43 | 44 | 45 | GenericObject::~GenericObject() 46 | {} 47 | 48 | 49 | bool GenericObject::validate(double tol_planarity_d2p, double tol_planarity_normals, double tol_overlap) 50 | { 51 | if (_is_valid != -1) 52 | return _is_valid; 53 | bool bValid = Feature::validate_generic(tol_planarity_d2p, tol_planarity_normals, tol_overlap); 54 | _is_valid = bValid; 55 | return bValid; 56 | } 57 | 58 | 59 | bool GenericObject::is_valid() { 60 | if (_is_valid == 1) 61 | return true; 62 | else 63 | return false; 64 | } 65 | 66 | 67 | std::string GenericObject::get_type() { 68 | return _type; 69 | } 70 | 71 | 72 | } // namespace val3dity 73 | -------------------------------------------------------------------------------- /src/GenericObject.h: -------------------------------------------------------------------------------- 1 | /* 2 | val3dity 3 | 4 | Copyright (c) 2011-2024, 3D geoinformation research group, TU Delft 5 | 6 | This file is part of val3dity. 7 | 8 | val3dity is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | val3dity is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with val3dity. If not, see . 20 | 21 | For any information or further details about the use of val3dity, contact 22 | Hugo Ledoux 23 | 24 | Faculty of Architecture & the Built Environment 25 | Delft University of Technology 26 | Julianalaan 134, Delft 2628BL, the Netherlands 27 | */ 28 | 29 | #ifndef __val3dity__GenericObject__ 30 | #define __val3dity__GenericObject__ 31 | 32 | #include "Feature.h" 33 | #include "definitions.h" 34 | 35 | 36 | namespace val3dity 37 | { 38 | 39 | class GenericObject : public Feature 40 | { 41 | public: 42 | GenericObject(std::string theid); 43 | ~GenericObject(); 44 | 45 | bool validate(double tol_planarity_d2p, double tol_planarity_normals, double tol_overlap = -1); 46 | bool is_valid(); 47 | std::string get_type(); 48 | 49 | }; 50 | 51 | } // namespace val3dity 52 | 53 | #endif /* defined(__val3dity__GenericObject__) */ 54 | -------------------------------------------------------------------------------- /src/GeometryTemplate.h: -------------------------------------------------------------------------------- 1 | /* 2 | val3dity 3 | 4 | Copyright (c) 2011-2024, 3D geoinformation research group, TU Delft 5 | 6 | This file is part of val3dity. 7 | 8 | val3dity is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | val3dity is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with val3dity. If not, see . 20 | 21 | For any information or further details about the use of val3dity, contact 22 | Hugo Ledoux 23 | 24 | Faculty of Architecture & the Built Environment 25 | Delft University of Technology 26 | Julianalaan 134, Delft 2628BL, the Netherlands 27 | */ 28 | 29 | #ifndef GeometryTemplate_h 30 | #define GeometryTemplate_h 31 | 32 | #include "Primitive.h" 33 | #include "Solid.h" 34 | 35 | #include 36 | #include 37 | 38 | namespace val3dity 39 | { 40 | 41 | class GeometryTemplate : public Primitive 42 | { 43 | public: 44 | GeometryTemplate(std::string id = ""); 45 | ~GeometryTemplate(); 46 | 47 | bool validate(double tol_planarity_d2p, double tol_planarity_normals, double tol_overlap = -1); 48 | int is_valid(); 49 | bool is_empty(); 50 | std::vector get_errors(); 51 | Primitive3D get_type(); 52 | std::set get_unique_error_codes(); 53 | 54 | void get_min_bbox(double& x, double& y); 55 | void translate_vertices(); 56 | 57 | bool add_primitive(Primitive* s); 58 | 59 | protected: 60 | std::vector _lsPrimitives; 61 | }; 62 | 63 | } // namespace val3dity 64 | 65 | #endif /* GeometryTemplate_h */ 66 | -------------------------------------------------------------------------------- /src/IndoorModel.h: -------------------------------------------------------------------------------- 1 | /* 2 | val3dity 3 | 4 | Copyright (c) 2011-2020, 3D geoinformation research group, TU Delft 5 | 6 | This file is part of val3dity. 7 | 8 | val3dity is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | val3dity is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with val3dity. If not, see . 20 | 21 | For any information or further details about the use of val3dity, contact 22 | Hugo Ledoux 23 | 24 | Faculty of Architecture & the Built Environment 25 | Delft University of Technology 26 | Julianalaan 134, Delft 2628BL, the Netherlands 27 | */ 28 | 29 | #ifndef __val3dity__IndoorModel__ 30 | #define __val3dity__IndoorModel__ 31 | 32 | #include "Feature.h" 33 | #include "definitions.h" 34 | #include "IndoorGraph.h" 35 | 36 | 37 | namespace val3dity 38 | { 39 | 40 | class IndoorModel : public Feature 41 | { 42 | public: 43 | IndoorModel(std::string theid); 44 | ~IndoorModel(); 45 | 46 | bool validate(double tol_planarity_d2p, double tol_planarity_normals, double tol_overlap = -1); 47 | bool is_valid(); 48 | std::string get_type(); 49 | 50 | void add_cell(std::string id, Primitive* p, std::string dual, std::string CellSpaceType); 51 | void add_graph(IndoorGraph* g); 52 | 53 | int get_number_graphs(); 54 | bool graph_has_dual_vertex(std::string theid); 55 | int get_graph_containing_vertex(std::string theid); 56 | 57 | protected: 58 | //-- // 59 | std::map> _cells; 60 | std::vector _graphs; 61 | 62 | }; 63 | 64 | } // namespace val3dity 65 | 66 | #endif /* defined(__val3dity__IndoorModel__) */ 67 | -------------------------------------------------------------------------------- /src/MultiSolid.h: -------------------------------------------------------------------------------- 1 | /* 2 | val3dity 3 | 4 | Copyright (c) 2011-2024, 3D geoinformation research group, TU Delft 5 | 6 | This file is part of val3dity. 7 | 8 | val3dity is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | val3dity is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with val3dity. If not, see . 20 | 21 | For any information or further details about the use of val3dity, contact 22 | Hugo Ledoux 23 | 24 | Faculty of Architecture & the Built Environment 25 | Delft University of Technology 26 | Julianalaan 134, Delft 2628BL, the Netherlands 27 | */ 28 | 29 | #ifndef MultiSolid_h 30 | #define MultiSolid_h 31 | 32 | #include "Primitive.h" 33 | #include "Solid.h" 34 | 35 | #include 36 | #include 37 | 38 | namespace val3dity 39 | { 40 | 41 | class MultiSolid : public Primitive 42 | { 43 | public: 44 | MultiSolid(std::string id = ""); 45 | ~MultiSolid(); 46 | 47 | bool validate(double tol_planarity_d2p, double tol_planarity_normals, double tol_overlap = -1); 48 | int is_valid(); 49 | bool is_empty(); 50 | std::vector get_errors(); 51 | Primitive3D get_type(); 52 | std::set get_unique_error_codes(); 53 | 54 | void get_min_bbox(double& x, double& y); 55 | void translate_vertices(); 56 | 57 | bool add_solid(Solid* s); 58 | int number_of_solids(); 59 | 60 | protected: 61 | std::vector _lsSolids; 62 | }; 63 | 64 | } // namespace val3dity 65 | 66 | #endif /* CompositeSolid_h */ 67 | -------------------------------------------------------------------------------- /src/MultiSurface.h: -------------------------------------------------------------------------------- 1 | /* 2 | val3dity 3 | 4 | Copyright (c) 2011-2024, 3D geoinformation research group, TU Delft 5 | 6 | This file is part of val3dity. 7 | 8 | val3dity is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | val3dity is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with val3dity. If not, see . 20 | 21 | For any information or further details about the use of val3dity, contact 22 | Hugo Ledoux 23 | 24 | Faculty of Architecture & the Built Environment 25 | Delft University of Technology 26 | Julianalaan 134, Delft 2628BL, the Netherlands 27 | */ 28 | 29 | #ifndef MultiSurface_h 30 | #define MultiSurface_h 31 | 32 | // #include "definitions.h" 33 | #include "Primitive.h" 34 | #include "Surface.h" 35 | 36 | #include 37 | 38 | namespace val3dity 39 | { 40 | 41 | class MultiSurface : public Primitive 42 | { 43 | public: 44 | MultiSurface(std::string id = ""); 45 | ~MultiSurface(); 46 | 47 | bool validate(double tol_planarity_d2p, double tol_planarity_normals, double tol_overlap = -1); 48 | int is_valid(); 49 | bool is_empty(); 50 | Primitive3D get_type(); 51 | 52 | std::vector get_errors(); 53 | 54 | void get_min_bbox(double& x, double& y); 55 | void translate_vertices(); 56 | 57 | std::string get_off_representation(); 58 | 59 | int num_faces(); 60 | int num_vertices(); 61 | bool set_surface(Surface* s); 62 | Surface* get_surface(); 63 | std::set get_unique_error_codes(); 64 | 65 | protected: 66 | Surface* _surface; 67 | }; 68 | 69 | } // namespace val3dity 70 | 71 | #endif /* MultiSurface_h */ 72 | -------------------------------------------------------------------------------- /src/validate_prim_toporel.h: -------------------------------------------------------------------------------- 1 | /* 2 | val3dity 3 | 4 | Copyright (c) 2011-2024, 3D geoinformation research group, TU Delft 5 | 6 | This file is part of val3dity. 7 | 8 | val3dity is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | val3dity is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with val3dity. If not, see . 20 | 21 | For any information or further details about the use of val3dity, contact 22 | Hugo Ledoux 23 | 24 | Faculty of Architecture & the Built Environment 25 | Delft University of Technology 26 | Julianalaan 134, Delft 2628BL, the Netherlands 27 | */ 28 | 29 | #ifndef Validate_prim_toporel_h 30 | #define Validate_prim_toporel_h 31 | 32 | #include "definitions.h" 33 | #include "Solid.h" 34 | 35 | namespace val3dity 36 | { 37 | 38 | 39 | class Primitive; 40 | 41 | bool do_primitives_interior_overlap(std::vector& lsPrimitives, 42 | int errorcode_to_assign, 43 | std::vector& lsErrors, 44 | double tol_overlap); 45 | 46 | bool are_cells_interior_disconnected_with_aabb(std::vector>& lsCells, 47 | int errorcode_to_assign, 48 | std::vector& lsErrors, 49 | double tol_overlap); 50 | 51 | int are_primitives_adjacent(Primitive* p1, Primitive* p2, double tol_overlap); 52 | 53 | 54 | 55 | } // namespace val3dity 56 | 57 | #endif /* Validate_prim_toporel_h */ 58 | -------------------------------------------------------------------------------- /tests/test_cityjsonl.py: -------------------------------------------------------------------------------- 1 | """Testing error cases related to CityJSONL input 2 | """ 3 | import pytest 4 | import os.path 5 | 6 | #------------------------------------------------------------------------ Data 7 | @pytest.fixture(scope="module", 8 | params=["denhaag_random_5.jsonl"]) 9 | def data_1(request, dir_cityjsonl): 10 | file_path = os.path.abspath( 11 | os.path.join( 12 | dir_cityjsonl, 13 | request.param)) 14 | return([file_path]) 15 | 16 | @pytest.fixture(scope="module", 17 | params=["a.jsonl"]) 18 | def data_2(request, dir_cityjsonl): 19 | file_path = os.path.abspath( 20 | os.path.join( 21 | dir_cityjsonl, 22 | request.param)) 23 | return([file_path]) 24 | 25 | 26 | 27 | #----------------------------------------------------------------------- Tests 28 | def test_data_1_cityjsonl(validate, data_1, unittests): 29 | error = validate(data_1, options=unittests) 30 | assert(error == [203, 601]) 31 | 32 | def test_data_2_cityjsonl(validate, data_2, unittests): 33 | error = validate(data_2, options=unittests) 34 | assert(error == [901]) 35 | 36 | -------------------------------------------------------------------------------- /tests/test_duplicates.py: -------------------------------------------------------------------------------- 1 | """Testing duplicates vertices in different formats 2 | 3 | All formats should use tolerance to merge "duplicates" a duplicate is 4 | defined as a vertex closer than 'snap_tol' to another one. 5 | """ 6 | 7 | import pytest 8 | import os.path 9 | 10 | 11 | #------------------------------------------------------------------------ Data 12 | @pytest.fixture(scope="module", 13 | params=["cube_tol_1.json", 14 | "cube_tol_1.off", 15 | "cube_tol_1.obj"]) 16 | def data_duplicates(request, dir_duplicates): 17 | file_path = os.path.abspath( 18 | os.path.join( 19 | dir_duplicates, 20 | request.param)) 21 | return(file_path) 22 | 23 | @pytest.fixture(scope="module", 24 | params=[ 25 | ["--unittests", "--snap_tol 0.1"], 26 | ["--unittests", "--snap_tol 0.01"], 27 | ["--unittests", "--snap_tol 0.001"] 28 | ]) 29 | def options_snap_tol(request): 30 | return(request.param) 31 | 32 | 33 | @pytest.fixture(scope="module", 34 | params=[ 35 | ["--unittests", "--snap_tol 0.00001"], 36 | ["--unittests", "--snap_tol 1e-12"] 37 | ]) 38 | def options_snap_tol_invalid(request): 39 | return(request.param) 40 | 41 | #----------------------------------------------------------------------- Tests 42 | def test_duplicates(validate, data_duplicates, options_snap_tol): 43 | error = validate(data_duplicates, options=options_snap_tol) 44 | assert(error == []) 45 | 46 | def test_duplicates(validate, data_duplicates, options_snap_tol_invalid): 47 | error = validate(data_duplicates, options=options_snap_tol_invalid) 48 | assert(error == [302]) 49 | -------------------------------------------------------------------------------- /tests/test_empty_files.py: -------------------------------------------------------------------------------- 1 | """Testing empty files and geometries. 2 | 3 | Try to break val3dity by giving it (partially) empty files in each format. 4 | """ 5 | 6 | import pytest 7 | import os.path 8 | 9 | 10 | #------------------------------------------------------------------------ Data 11 | @pytest.fixture(scope="module", 12 | params=["completely_empty.obj", 13 | "completely_empty.off", 14 | "completely_empty.json",]) 15 | def data_completely_empty(request, dir_empty): 16 | file_path = os.path.abspath( 17 | os.path.join( 18 | dir_empty, 19 | request.param)) 20 | return(file_path) 21 | 22 | 23 | 24 | @pytest.fixture(scope="module", 25 | params=["empty_primitive.json", 26 | "empty_primitive_1.json", 27 | "empty_primitive.obj", 28 | "empty_primitive.poly", 29 | "empty_primitive.off"]) 30 | def dir_empty_primitive(request, dir_empty): 31 | file_path = os.path.abspath( 32 | os.path.join( 33 | dir_empty, 34 | request.param)) 35 | return(file_path) 36 | 37 | #----------------------------------------------------------------------- Tests 38 | def test_completely_empty(validate, data_completely_empty, unittests): 39 | error = validate(data_completely_empty, options=unittests) 40 | assert(error == [901] or error == [902]) 41 | 42 | def test_empty_primitive(validate, dir_empty_primitive, unittests): 43 | error = validate(dir_empty_primitive, options=unittests) 44 | assert(error == [902]) 45 | 46 | -------------------------------------------------------------------------------- /tests/test_jsonfg.py: -------------------------------------------------------------------------------- 1 | """Testing error cases related to JSON-FG 2 | """ 3 | 4 | 5 | import pytest 6 | import os.path 7 | 8 | #------------------------------------------------------------------------ Data 9 | @pytest.fixture(scope="module", 10 | params=["building.fg.json", 11 | "cubes.fg.json"]) 12 | def data_jsonfg_valid(request, dir_jsonfg): 13 | file_path = os.path.abspath( 14 | os.path.join( 15 | dir_jsonfg, 16 | request.param)) 17 | return([file_path]) 18 | 19 | @pytest.fixture(scope="module", 20 | params=["e103.fg.json"]) 21 | def data_jsonfg_invalid(request, dir_jsonfg): 22 | file_path = os.path.abspath( 23 | os.path.join( 24 | dir_jsonfg, 25 | request.param)) 26 | return([file_path]) 27 | 28 | @pytest.fixture(scope="module", 29 | params=["geojson.json"]) 30 | def data_vanilla_geojson(request, dir_jsonfg): 31 | file_path = os.path.abspath( 32 | os.path.join( 33 | dir_jsonfg, 34 | request.param)) 35 | return([file_path]) 36 | 37 | 38 | 39 | #----------------------------------------------------------------------- Tests 40 | def test_data_jsonfg_valid(validate, data_jsonfg_valid, unittests): 41 | error = validate(data_jsonfg_valid, options=unittests) 42 | assert(error == []) 43 | 44 | def test_data_jsonfg_invalid(validate, data_jsonfg_invalid, unittests): 45 | error = validate(data_jsonfg_invalid, options=unittests) 46 | assert(error == [103]) 47 | 48 | def test_vanilla_geojson(validate, data_vanilla_geojson, unittests): 49 | error = validate(data_vanilla_geojson, options=unittests) 50 | assert(error == [906]) 51 | -------------------------------------------------------------------------------- /tests/test_metadata.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | import yaml 3 | import os.path 4 | from os import walk 5 | 6 | @pytest.mark.full 7 | def test_metadata(): 8 | """Check that every test file in /data/test_*/ is documented in test_metadata.yml""" 9 | root = os.getcwd() 10 | data_dir = os.path.join(root, "data") 11 | file = os.path.abspath(os.path.join(root, data_dir, "test_metadata.yml")) 12 | 13 | with open(file, "r") as stream: 14 | ds = yaml.load(stream, Loader=yaml.Loader) 15 | 16 | cases = ds.keys() 17 | for case in cases: 18 | case_dir = os.path.join(data_dir, case) 19 | for root, dir, filenames in walk(case_dir, topdown=True): 20 | files_exist = set([os.path.splitext(f)[0] for f in filenames]) 21 | tests = ds[case].keys() 22 | files_documented = set(tests) 23 | assert files_exist == files_documented, \ 24 | "There is a discrepancy between the existing and documented test files \ 25 | for the test case {case}. Compare test_data.yml with the contents of \ 26 | the {case} folder.".format(case=case) 27 | for test in tests: 28 | if not ds[case][test]: 29 | raise AssertionError('test %s must have a description in test_metadata.yml' % test) 30 | else: 31 | assert len(ds[case][test]) > 0, \ 32 | 'test %s must have a description in test_metadata.yml' % test 33 | -------------------------------------------------------------------------------- /tests/test_tu3djson.py: -------------------------------------------------------------------------------- 1 | """Testing error cases related to tu3djson 2 | """ 3 | 4 | 5 | import pytest 6 | import os.path 7 | 8 | #------------------------------------------------------------------------ Data 9 | @pytest.fixture(scope="module", 10 | params=["cube.json", 11 | "cube2.json"]) 12 | def data_tu3djson_valid(request, dir_tu3djson): 13 | file_path = os.path.abspath( 14 | os.path.join( 15 | dir_tu3djson, 16 | request.param)) 17 | return([file_path]) 18 | 19 | @pytest.fixture(scope="module", 20 | params=["cube3.json"]) 21 | def data_tu3djson_invalid(request, dir_tu3djson): 22 | file_path = os.path.abspath( 23 | os.path.join( 24 | dir_tu3djson, 25 | request.param)) 26 | return([file_path]) 27 | 28 | 29 | 30 | #----------------------------------------------------------------------- Tests 31 | def test_data_tu3djson_valid(validate, data_tu3djson_valid, unittests): 32 | error = validate(data_tu3djson_valid, options=unittests) 33 | assert(error == []) 34 | 35 | def test_data_tu3djson_invalid(validate, data_tu3djson_invalid, unittests): 36 | error = validate(data_tu3djson_invalid, options=unittests) 37 | assert(error == [104]) 38 | 39 | -------------------------------------------------------------------------------- /thirdparty/spdlog/cfg/argv.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | #include 6 | #include 7 | 8 | // 9 | // Init log levels using each argv entry that starts with "SPDLOG_LEVEL=" 10 | // 11 | // set all loggers to debug level: 12 | // example.exe "SPDLOG_LEVEL=debug" 13 | 14 | // set logger1 to trace level 15 | // example.exe "SPDLOG_LEVEL=logger1=trace" 16 | 17 | // turn off all logging except for logger1 and logger2: 18 | // example.exe "SPDLOG_LEVEL=off,logger1=debug,logger2=info" 19 | 20 | namespace spdlog { 21 | namespace cfg { 22 | 23 | // search for SPDLOG_LEVEL= in the args and use it to init the levels 24 | inline void load_argv_levels(int argc, const char **argv) { 25 | const std::string spdlog_level_prefix = "SPDLOG_LEVEL="; 26 | for (int i = 1; i < argc; i++) { 27 | std::string arg = argv[i]; 28 | if (arg.find(spdlog_level_prefix) == 0) { 29 | auto levels_string = arg.substr(spdlog_level_prefix.size()); 30 | helpers::load_levels(levels_string); 31 | } 32 | } 33 | } 34 | 35 | inline void load_argv_levels(int argc, char **argv) { 36 | load_argv_levels(argc, const_cast(argv)); 37 | } 38 | 39 | } // namespace cfg 40 | } // namespace spdlog 41 | -------------------------------------------------------------------------------- /thirdparty/spdlog/cfg/env.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | 9 | // 10 | // Init levels and patterns from env variables SPDLOG_LEVEL 11 | // Inspired from Rust's "env_logger" crate (https://crates.io/crates/env_logger). 12 | // Note - fallback to "info" level on unrecognized levels 13 | // 14 | // Examples: 15 | // 16 | // set global level to debug: 17 | // export SPDLOG_LEVEL=debug 18 | // 19 | // turn off all logging except for logger1: 20 | // export SPDLOG_LEVEL="*=off,logger1=debug" 21 | // 22 | 23 | // turn off all logging except for logger1 and logger2: 24 | // export SPDLOG_LEVEL="off,logger1=debug,logger2=info" 25 | 26 | namespace spdlog { 27 | namespace cfg { 28 | inline void load_env_levels() { 29 | auto env_val = details::os::getenv("SPDLOG_LEVEL"); 30 | if (!env_val.empty()) { 31 | helpers::load_levels(env_val); 32 | } 33 | } 34 | 35 | } // namespace cfg 36 | } // namespace spdlog 37 | -------------------------------------------------------------------------------- /thirdparty/spdlog/cfg/helpers.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | namespace spdlog { 10 | namespace cfg { 11 | namespace helpers { 12 | // 13 | // Init levels from given string 14 | // 15 | // Examples: 16 | // 17 | // set global level to debug: "debug" 18 | // turn off all logging except for logger1: "off,logger1=debug" 19 | // turn off all logging except for logger1 and logger2: "off,logger1=debug,logger2=info" 20 | // 21 | SPDLOG_API void load_levels(const std::string &txt); 22 | } // namespace helpers 23 | 24 | } // namespace cfg 25 | } // namespace spdlog 26 | 27 | #ifdef SPDLOG_HEADER_ONLY 28 | #include "helpers-inl.h" 29 | #endif // SPDLOG_HEADER_ONLY 30 | -------------------------------------------------------------------------------- /thirdparty/spdlog/details/backtracer-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | namespace spdlog { 10 | namespace details { 11 | SPDLOG_INLINE backtracer::backtracer(const backtracer &other) { 12 | std::lock_guard lock(other.mutex_); 13 | enabled_ = other.enabled(); 14 | messages_ = other.messages_; 15 | } 16 | 17 | SPDLOG_INLINE backtracer::backtracer(backtracer &&other) SPDLOG_NOEXCEPT { 18 | std::lock_guard lock(other.mutex_); 19 | enabled_ = other.enabled(); 20 | messages_ = std::move(other.messages_); 21 | } 22 | 23 | SPDLOG_INLINE backtracer &backtracer::operator=(backtracer other) { 24 | std::lock_guard lock(mutex_); 25 | enabled_ = other.enabled(); 26 | messages_ = std::move(other.messages_); 27 | return *this; 28 | } 29 | 30 | SPDLOG_INLINE void backtracer::enable(size_t size) { 31 | std::lock_guard lock{mutex_}; 32 | enabled_.store(true, std::memory_order_relaxed); 33 | messages_ = circular_q{size}; 34 | } 35 | 36 | SPDLOG_INLINE void backtracer::disable() { 37 | std::lock_guard lock{mutex_}; 38 | enabled_.store(false, std::memory_order_relaxed); 39 | } 40 | 41 | SPDLOG_INLINE bool backtracer::enabled() const { return enabled_.load(std::memory_order_relaxed); } 42 | 43 | SPDLOG_INLINE void backtracer::push_back(const log_msg &msg) { 44 | std::lock_guard lock{mutex_}; 45 | messages_.push_back(log_msg_buffer{msg}); 46 | } 47 | 48 | SPDLOG_INLINE bool backtracer::empty() const { 49 | std::lock_guard lock{mutex_}; 50 | return messages_.empty(); 51 | } 52 | 53 | // pop all items in the q and apply the given fun on each of them. 54 | SPDLOG_INLINE void backtracer::foreach_pop(std::function fun) { 55 | std::lock_guard lock{mutex_}; 56 | while (!messages_.empty()) { 57 | auto &front_msg = messages_.front(); 58 | fun(front_msg); 59 | messages_.pop_front(); 60 | } 61 | } 62 | } // namespace details 63 | } // namespace spdlog 64 | -------------------------------------------------------------------------------- /thirdparty/spdlog/details/backtracer.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | // Store log messages in circular buffer. 14 | // Useful for storing debug data in case of error/warning happens. 15 | 16 | namespace spdlog { 17 | namespace details { 18 | class SPDLOG_API backtracer { 19 | mutable std::mutex mutex_; 20 | std::atomic enabled_{false}; 21 | circular_q messages_; 22 | 23 | public: 24 | backtracer() = default; 25 | backtracer(const backtracer &other); 26 | 27 | backtracer(backtracer &&other) SPDLOG_NOEXCEPT; 28 | backtracer &operator=(backtracer other); 29 | 30 | void enable(size_t size); 31 | void disable(); 32 | bool enabled() const; 33 | void push_back(const log_msg &msg); 34 | bool empty() const; 35 | 36 | // pop all items in the q and apply the given fun on each of them. 37 | void foreach_pop(std::function fun); 38 | }; 39 | 40 | } // namespace details 41 | } // namespace spdlog 42 | 43 | #ifdef SPDLOG_HEADER_ONLY 44 | #include "backtracer-inl.h" 45 | #endif 46 | -------------------------------------------------------------------------------- /thirdparty/spdlog/details/console_globals.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | namespace spdlog { 10 | namespace details { 11 | 12 | struct console_mutex { 13 | using mutex_t = std::mutex; 14 | static mutex_t &mutex() { 15 | static mutex_t s_mutex; 16 | return s_mutex; 17 | } 18 | }; 19 | 20 | struct console_nullmutex { 21 | using mutex_t = null_mutex; 22 | static mutex_t &mutex() { 23 | static mutex_t s_mutex; 24 | return s_mutex; 25 | } 26 | }; 27 | } // namespace details 28 | } // namespace spdlog 29 | -------------------------------------------------------------------------------- /thirdparty/spdlog/details/file_helper.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | namespace spdlog { 10 | namespace details { 11 | 12 | // Helper class for file sinks. 13 | // When failing to open a file, retry several times(5) with a delay interval(10 ms). 14 | // Throw spdlog_ex exception on errors. 15 | 16 | class SPDLOG_API file_helper { 17 | public: 18 | file_helper() = default; 19 | explicit file_helper(const file_event_handlers &event_handlers); 20 | 21 | file_helper(const file_helper &) = delete; 22 | file_helper &operator=(const file_helper &) = delete; 23 | ~file_helper(); 24 | 25 | void open(const filename_t &fname, bool truncate = false); 26 | void reopen(bool truncate); 27 | void flush(); 28 | void sync(); 29 | void close(); 30 | void write(const memory_buf_t &buf); 31 | size_t size() const; 32 | const filename_t &filename() const; 33 | 34 | // 35 | // return file path and its extension: 36 | // 37 | // "mylog.txt" => ("mylog", ".txt") 38 | // "mylog" => ("mylog", "") 39 | // "mylog." => ("mylog.", "") 40 | // "/dir1/dir2/mylog.txt" => ("/dir1/dir2/mylog", ".txt") 41 | // 42 | // the starting dot in filenames is ignored (hidden files): 43 | // 44 | // ".mylog" => (".mylog". "") 45 | // "my_folder/.mylog" => ("my_folder/.mylog", "") 46 | // "my_folder/.mylog.txt" => ("my_folder/.mylog", ".txt") 47 | static std::tuple split_by_extension(const filename_t &fname); 48 | 49 | private: 50 | const int open_tries_ = 5; 51 | const unsigned int open_interval_ = 10; 52 | std::FILE *fd_{nullptr}; 53 | filename_t filename_; 54 | file_event_handlers event_handlers_; 55 | }; 56 | } // namespace details 57 | } // namespace spdlog 58 | 59 | #ifdef SPDLOG_HEADER_ONLY 60 | #include "file_helper-inl.h" 61 | #endif 62 | -------------------------------------------------------------------------------- /thirdparty/spdlog/details/log_msg-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | #include 11 | 12 | namespace spdlog { 13 | namespace details { 14 | 15 | SPDLOG_INLINE log_msg::log_msg(spdlog::log_clock::time_point log_time, 16 | spdlog::source_loc loc, 17 | string_view_t a_logger_name, 18 | spdlog::level::level_enum lvl, 19 | spdlog::string_view_t msg) 20 | : logger_name(a_logger_name), 21 | level(lvl), 22 | time(log_time) 23 | #ifndef SPDLOG_NO_THREAD_ID 24 | , 25 | thread_id(os::thread_id()) 26 | #endif 27 | , 28 | source(loc), 29 | payload(msg) { 30 | } 31 | 32 | SPDLOG_INLINE log_msg::log_msg(spdlog::source_loc loc, 33 | string_view_t a_logger_name, 34 | spdlog::level::level_enum lvl, 35 | spdlog::string_view_t msg) 36 | : log_msg(os::now(), loc, a_logger_name, lvl, msg) {} 37 | 38 | SPDLOG_INLINE log_msg::log_msg(string_view_t a_logger_name, 39 | spdlog::level::level_enum lvl, 40 | spdlog::string_view_t msg) 41 | : log_msg(os::now(), source_loc{}, a_logger_name, lvl, msg) {} 42 | 43 | } // namespace details 44 | } // namespace spdlog 45 | -------------------------------------------------------------------------------- /thirdparty/spdlog/details/log_msg.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | namespace spdlog { 10 | namespace details { 11 | struct SPDLOG_API log_msg { 12 | log_msg() = default; 13 | log_msg(log_clock::time_point log_time, 14 | source_loc loc, 15 | string_view_t logger_name, 16 | level::level_enum lvl, 17 | string_view_t msg); 18 | log_msg(source_loc loc, string_view_t logger_name, level::level_enum lvl, string_view_t msg); 19 | log_msg(string_view_t logger_name, level::level_enum lvl, string_view_t msg); 20 | log_msg(const log_msg &other) = default; 21 | log_msg &operator=(const log_msg &other) = default; 22 | 23 | string_view_t logger_name; 24 | level::level_enum level{level::off}; 25 | log_clock::time_point time; 26 | size_t thread_id{0}; 27 | 28 | // wrapping the formatted text with color (updated by pattern_formatter). 29 | mutable size_t color_range_start{0}; 30 | mutable size_t color_range_end{0}; 31 | 32 | source_loc source; 33 | string_view_t payload; 34 | }; 35 | } // namespace details 36 | } // namespace spdlog 37 | 38 | #ifdef SPDLOG_HEADER_ONLY 39 | #include "log_msg-inl.h" 40 | #endif 41 | -------------------------------------------------------------------------------- /thirdparty/spdlog/details/log_msg_buffer-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | namespace spdlog { 11 | namespace details { 12 | 13 | SPDLOG_INLINE log_msg_buffer::log_msg_buffer(const log_msg &orig_msg) 14 | : log_msg{orig_msg} { 15 | buffer.append(logger_name.begin(), logger_name.end()); 16 | buffer.append(payload.begin(), payload.end()); 17 | update_string_views(); 18 | } 19 | 20 | SPDLOG_INLINE log_msg_buffer::log_msg_buffer(const log_msg_buffer &other) 21 | : log_msg{other} { 22 | buffer.append(logger_name.begin(), logger_name.end()); 23 | buffer.append(payload.begin(), payload.end()); 24 | update_string_views(); 25 | } 26 | 27 | SPDLOG_INLINE log_msg_buffer::log_msg_buffer(log_msg_buffer &&other) SPDLOG_NOEXCEPT 28 | : log_msg{other}, 29 | buffer{std::move(other.buffer)} { 30 | update_string_views(); 31 | } 32 | 33 | SPDLOG_INLINE log_msg_buffer &log_msg_buffer::operator=(const log_msg_buffer &other) { 34 | log_msg::operator=(other); 35 | buffer.clear(); 36 | buffer.append(other.buffer.data(), other.buffer.data() + other.buffer.size()); 37 | update_string_views(); 38 | return *this; 39 | } 40 | 41 | SPDLOG_INLINE log_msg_buffer &log_msg_buffer::operator=(log_msg_buffer &&other) SPDLOG_NOEXCEPT { 42 | log_msg::operator=(other); 43 | buffer = std::move(other.buffer); 44 | update_string_views(); 45 | return *this; 46 | } 47 | 48 | SPDLOG_INLINE void log_msg_buffer::update_string_views() { 49 | logger_name = string_view_t{buffer.data(), logger_name.size()}; 50 | payload = string_view_t{buffer.data() + logger_name.size(), payload.size()}; 51 | } 52 | 53 | } // namespace details 54 | } // namespace spdlog 55 | -------------------------------------------------------------------------------- /thirdparty/spdlog/details/log_msg_buffer.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | 8 | namespace spdlog { 9 | namespace details { 10 | 11 | // Extend log_msg with internal buffer to store its payload. 12 | // This is needed since log_msg holds string_views that points to stack data. 13 | 14 | class SPDLOG_API log_msg_buffer : public log_msg { 15 | memory_buf_t buffer; 16 | void update_string_views(); 17 | 18 | public: 19 | log_msg_buffer() = default; 20 | explicit log_msg_buffer(const log_msg &orig_msg); 21 | log_msg_buffer(const log_msg_buffer &other); 22 | log_msg_buffer(log_msg_buffer &&other) SPDLOG_NOEXCEPT; 23 | log_msg_buffer &operator=(const log_msg_buffer &other); 24 | log_msg_buffer &operator=(log_msg_buffer &&other) SPDLOG_NOEXCEPT; 25 | }; 26 | 27 | } // namespace details 28 | } // namespace spdlog 29 | 30 | #ifdef SPDLOG_HEADER_ONLY 31 | #include "log_msg_buffer-inl.h" 32 | #endif 33 | -------------------------------------------------------------------------------- /thirdparty/spdlog/details/null_mutex.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | // null, no cost dummy "mutex" and dummy "atomic" int 9 | 10 | namespace spdlog { 11 | namespace details { 12 | struct null_mutex { 13 | void lock() const {} 14 | void unlock() const {} 15 | }; 16 | 17 | struct null_atomic_int { 18 | int value; 19 | null_atomic_int() = default; 20 | 21 | explicit null_atomic_int(int new_value) 22 | : value(new_value) {} 23 | 24 | int load(std::memory_order = std::memory_order_relaxed) const { return value; } 25 | 26 | void store(int new_value, std::memory_order = std::memory_order_relaxed) { value = new_value; } 27 | 28 | int exchange(int new_value, std::memory_order = std::memory_order_relaxed) { 29 | std::swap(new_value, value); 30 | return new_value; // return value before the call 31 | } 32 | }; 33 | 34 | } // namespace details 35 | } // namespace spdlog 36 | -------------------------------------------------------------------------------- /thirdparty/spdlog/details/periodic_worker-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | namespace spdlog { 11 | namespace details { 12 | 13 | // stop the worker thread and join it 14 | SPDLOG_INLINE periodic_worker::~periodic_worker() { 15 | if (worker_thread_.joinable()) { 16 | { 17 | std::lock_guard lock(mutex_); 18 | active_ = false; 19 | } 20 | cv_.notify_one(); 21 | worker_thread_.join(); 22 | } 23 | } 24 | 25 | } // namespace details 26 | } // namespace spdlog 27 | -------------------------------------------------------------------------------- /thirdparty/spdlog/details/periodic_worker.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | // periodic worker thread - periodically executes the given callback function. 7 | // 8 | // RAII over the owned thread: 9 | // creates the thread on construction. 10 | // stops and joins the thread on destruction (if the thread is executing a callback, wait for it 11 | // to finish first). 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | namespace spdlog { 19 | namespace details { 20 | 21 | class SPDLOG_API periodic_worker { 22 | public: 23 | template 24 | periodic_worker(const std::function &callback_fun, 25 | std::chrono::duration interval) { 26 | active_ = (interval > std::chrono::duration::zero()); 27 | if (!active_) { 28 | return; 29 | } 30 | 31 | worker_thread_ = std::thread([this, callback_fun, interval]() { 32 | for (;;) { 33 | std::unique_lock lock(this->mutex_); 34 | if (this->cv_.wait_for(lock, interval, [this] { return !this->active_; })) { 35 | return; // active_ == false, so exit this thread 36 | } 37 | callback_fun(); 38 | } 39 | }); 40 | } 41 | std::thread &get_thread() { return worker_thread_; } 42 | periodic_worker(const periodic_worker &) = delete; 43 | periodic_worker &operator=(const periodic_worker &) = delete; 44 | // stop the worker thread and join it 45 | ~periodic_worker(); 46 | 47 | private: 48 | bool active_; 49 | std::thread worker_thread_; 50 | std::mutex mutex_; 51 | std::condition_variable cv_; 52 | }; 53 | } // namespace details 54 | } // namespace spdlog 55 | 56 | #ifdef SPDLOG_HEADER_ONLY 57 | #include "periodic_worker-inl.h" 58 | #endif 59 | -------------------------------------------------------------------------------- /thirdparty/spdlog/details/synchronous_factory.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include "registry.h" 7 | 8 | namespace spdlog { 9 | 10 | // Default logger factory- creates synchronous loggers 11 | class logger; 12 | 13 | struct synchronous_factory { 14 | template 15 | static std::shared_ptr create(std::string logger_name, SinkArgs &&...args) { 16 | auto sink = std::make_shared(std::forward(args)...); 17 | auto new_logger = std::make_shared(std::move(logger_name), std::move(sink)); 18 | details::registry::instance().initialize_logger(new_logger); 19 | return new_logger; 20 | } 21 | }; 22 | } // namespace spdlog 23 | -------------------------------------------------------------------------------- /thirdparty/spdlog/details/windows_include.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifndef NOMINMAX 4 | #define NOMINMAX // prevent windows redefining min/max 5 | #endif 6 | 7 | #ifndef WIN32_LEAN_AND_MEAN 8 | #define WIN32_LEAN_AND_MEAN 9 | #endif 10 | 11 | #include 12 | -------------------------------------------------------------------------------- /thirdparty/spdlog/fmt/bundled/fmt.license.rst: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 - present, Victor Zverovich 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | --- Optional exception to the license --- 23 | 24 | As an exception, if, as a result of your compiling your source code, portions 25 | of this Software are embedded into a machine-executable object form of such 26 | source code, you may redistribute such embedded portions in such object form 27 | without including the above copyright and permission notices. 28 | -------------------------------------------------------------------------------- /thirdparty/spdlog/fmt/bundled/locale.h: -------------------------------------------------------------------------------- 1 | #include "xchar.h" 2 | #warning fmt/locale.h is deprecated, include fmt/format.h or fmt/xchar.h instead 3 | -------------------------------------------------------------------------------- /thirdparty/spdlog/fmt/chrono.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | // 8 | // include bundled or external copy of fmtlib's chrono support 9 | // 10 | #include 11 | 12 | #if !defined(SPDLOG_USE_STD_FORMAT) 13 | #if !defined(SPDLOG_FMT_EXTERNAL) 14 | #ifdef SPDLOG_HEADER_ONLY 15 | #ifndef FMT_HEADER_ONLY 16 | #define FMT_HEADER_ONLY 17 | #endif 18 | #endif 19 | #include 20 | #else 21 | #include 22 | #endif 23 | #endif 24 | -------------------------------------------------------------------------------- /thirdparty/spdlog/fmt/compile.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | // 8 | // include bundled or external copy of fmtlib's compile-time support 9 | // 10 | #include 11 | 12 | #if !defined(SPDLOG_USE_STD_FORMAT) 13 | #if !defined(SPDLOG_FMT_EXTERNAL) 14 | #ifdef SPDLOG_HEADER_ONLY 15 | #ifndef FMT_HEADER_ONLY 16 | #define FMT_HEADER_ONLY 17 | #endif 18 | #endif 19 | #include 20 | #else 21 | #include 22 | #endif 23 | #endif 24 | -------------------------------------------------------------------------------- /thirdparty/spdlog/fmt/fmt.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016-2018 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | 8 | // 9 | // Include a bundled header-only copy of fmtlib or an external one. 10 | // By default spdlog include its own copy. 11 | // 12 | #include 13 | 14 | #if defined(SPDLOG_USE_STD_FORMAT) // SPDLOG_USE_STD_FORMAT is defined - use std::format 15 | #include 16 | #elif !defined(SPDLOG_FMT_EXTERNAL) 17 | #if !defined(SPDLOG_COMPILED_LIB) && !defined(FMT_HEADER_ONLY) 18 | #define FMT_HEADER_ONLY 19 | #endif 20 | #ifndef FMT_USE_WINDOWS_H 21 | #define FMT_USE_WINDOWS_H 0 22 | #endif 23 | 24 | #include 25 | #include 26 | 27 | #else // SPDLOG_FMT_EXTERNAL is defined - use external fmtlib 28 | #include 29 | #include 30 | #endif 31 | -------------------------------------------------------------------------------- /thirdparty/spdlog/fmt/ostr.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | // 8 | // include bundled or external copy of fmtlib's ostream support 9 | // 10 | #include 11 | 12 | #if !defined(SPDLOG_USE_STD_FORMAT) 13 | #if !defined(SPDLOG_FMT_EXTERNAL) 14 | #ifdef SPDLOG_HEADER_ONLY 15 | #ifndef FMT_HEADER_ONLY 16 | #define FMT_HEADER_ONLY 17 | #endif 18 | #endif 19 | #include 20 | #else 21 | #include 22 | #endif 23 | #endif 24 | -------------------------------------------------------------------------------- /thirdparty/spdlog/fmt/ranges.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | // 8 | // include bundled or external copy of fmtlib's ranges support 9 | // 10 | #include 11 | 12 | #if !defined(SPDLOG_USE_STD_FORMAT) 13 | #if !defined(SPDLOG_FMT_EXTERNAL) 14 | #ifdef SPDLOG_HEADER_ONLY 15 | #ifndef FMT_HEADER_ONLY 16 | #define FMT_HEADER_ONLY 17 | #endif 18 | #endif 19 | #include 20 | #else 21 | #include 22 | #endif 23 | #endif 24 | -------------------------------------------------------------------------------- /thirdparty/spdlog/fmt/std.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | // 8 | // include bundled or external copy of fmtlib's std support (for formatting e.g. 9 | // std::filesystem::path, std::thread::id, std::monostate, std::variant, ...) 10 | // 11 | #include 12 | 13 | #if !defined(SPDLOG_USE_STD_FORMAT) 14 | #if !defined(SPDLOG_FMT_EXTERNAL) 15 | #ifdef SPDLOG_HEADER_ONLY 16 | #ifndef FMT_HEADER_ONLY 17 | #define FMT_HEADER_ONLY 18 | #endif 19 | #endif 20 | #include 21 | #else 22 | #include 23 | #endif 24 | #endif 25 | -------------------------------------------------------------------------------- /thirdparty/spdlog/fmt/xchar.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | // 8 | // include bundled or external copy of fmtlib's xchar support 9 | // 10 | #include 11 | 12 | #if !defined(SPDLOG_USE_STD_FORMAT) 13 | #if !defined(SPDLOG_FMT_EXTERNAL) 14 | #ifdef SPDLOG_HEADER_ONLY 15 | #ifndef FMT_HEADER_ONLY 16 | #define FMT_HEADER_ONLY 17 | #endif 18 | #endif 19 | #include 20 | #else 21 | #include 22 | #endif 23 | #endif 24 | -------------------------------------------------------------------------------- /thirdparty/spdlog/formatter.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | namespace spdlog { 10 | 11 | class formatter { 12 | public: 13 | virtual ~formatter() = default; 14 | virtual void format(const details::log_msg &msg, memory_buf_t &dest) = 0; 15 | virtual std::unique_ptr clone() const = 0; 16 | }; 17 | } // namespace spdlog 18 | -------------------------------------------------------------------------------- /thirdparty/spdlog/fwd.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | namespace spdlog { 7 | class logger; 8 | class formatter; 9 | 10 | namespace sinks { 11 | class sink; 12 | } 13 | 14 | namespace level { 15 | enum level_enum : int; 16 | } 17 | 18 | } // namespace spdlog 19 | -------------------------------------------------------------------------------- /thirdparty/spdlog/mdc.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | #include 10 | 11 | // MDC is a simple map of key->string values stored in thread local storage whose content will be printed by the loggers. 12 | // Note: Not supported in async mode (thread local storage - so the async thread pool have different copy). 13 | // 14 | // Usage example: 15 | // spdlog::mdc::put("mdc_key_1", "mdc_value_1"); 16 | // spdlog::info("Hello, {}", "World!"); // => [2024-04-26 02:08:05.040] [info] [mdc_key_1:mdc_value_1] Hello, World! 17 | 18 | namespace spdlog { 19 | class SPDLOG_API mdc { 20 | public: 21 | using mdc_map_t = std::map; 22 | 23 | static void put(const std::string &key, const std::string &value) { 24 | get_context()[key] = value; 25 | } 26 | 27 | static std::string get(const std::string &key) { 28 | auto &context = get_context(); 29 | auto it = context.find(key); 30 | if (it != context.end()) { 31 | return it->second; 32 | } 33 | return ""; 34 | } 35 | 36 | static void remove(const std::string &key) { get_context().erase(key); } 37 | 38 | static void clear() { get_context().clear(); } 39 | 40 | static mdc_map_t &get_context() { 41 | static thread_local mdc_map_t context; 42 | return context; 43 | } 44 | }; 45 | 46 | } // namespace spdlog 47 | -------------------------------------------------------------------------------- /thirdparty/spdlog/sinks/base_sink-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | #include 11 | #include 12 | 13 | #include 14 | #include 15 | 16 | template 17 | SPDLOG_INLINE spdlog::sinks::base_sink::base_sink() 18 | : formatter_{details::make_unique()} {} 19 | 20 | template 21 | SPDLOG_INLINE spdlog::sinks::base_sink::base_sink( 22 | std::unique_ptr formatter) 23 | : formatter_{std::move(formatter)} {} 24 | 25 | template 26 | void SPDLOG_INLINE spdlog::sinks::base_sink::log(const details::log_msg &msg) { 27 | std::lock_guard lock(mutex_); 28 | sink_it_(msg); 29 | } 30 | 31 | template 32 | void SPDLOG_INLINE spdlog::sinks::base_sink::flush() { 33 | std::lock_guard lock(mutex_); 34 | flush_(); 35 | } 36 | 37 | template 38 | void SPDLOG_INLINE spdlog::sinks::base_sink::set_pattern(const std::string &pattern) { 39 | std::lock_guard lock(mutex_); 40 | set_pattern_(pattern); 41 | } 42 | 43 | template 44 | void SPDLOG_INLINE 45 | spdlog::sinks::base_sink::set_formatter(std::unique_ptr sink_formatter) { 46 | std::lock_guard lock(mutex_); 47 | set_formatter_(std::move(sink_formatter)); 48 | } 49 | 50 | template 51 | void SPDLOG_INLINE spdlog::sinks::base_sink::set_pattern_(const std::string &pattern) { 52 | set_formatter_(details::make_unique(pattern)); 53 | } 54 | 55 | template 56 | void SPDLOG_INLINE 57 | spdlog::sinks::base_sink::set_formatter_(std::unique_ptr sink_formatter) { 58 | formatter_ = std::move(sink_formatter); 59 | } 60 | -------------------------------------------------------------------------------- /thirdparty/spdlog/sinks/base_sink.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | // 6 | // base sink templated over a mutex (either dummy or real) 7 | // concrete implementation should override the sink_it_() and flush_() methods. 8 | // locking is taken care of in this class - no locking needed by the 9 | // implementers.. 10 | // 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | namespace spdlog { 17 | namespace sinks { 18 | template 19 | class SPDLOG_API base_sink : public sink { 20 | public: 21 | base_sink(); 22 | explicit base_sink(std::unique_ptr formatter); 23 | ~base_sink() override = default; 24 | 25 | base_sink(const base_sink &) = delete; 26 | base_sink(base_sink &&) = delete; 27 | 28 | base_sink &operator=(const base_sink &) = delete; 29 | base_sink &operator=(base_sink &&) = delete; 30 | 31 | void log(const details::log_msg &msg) final; 32 | void flush() final; 33 | void set_pattern(const std::string &pattern) final; 34 | void set_formatter(std::unique_ptr sink_formatter) final; 35 | 36 | protected: 37 | // sink formatter 38 | std::unique_ptr formatter_; 39 | Mutex mutex_; 40 | 41 | virtual void sink_it_(const details::log_msg &msg) = 0; 42 | virtual void flush_() = 0; 43 | virtual void set_pattern_(const std::string &pattern); 44 | virtual void set_formatter_(std::unique_ptr sink_formatter); 45 | }; 46 | } // namespace sinks 47 | } // namespace spdlog 48 | 49 | #ifdef SPDLOG_HEADER_ONLY 50 | #include "base_sink-inl.h" 51 | #endif 52 | -------------------------------------------------------------------------------- /thirdparty/spdlog/sinks/basic_file_sink-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | #include 11 | #include 12 | 13 | namespace spdlog { 14 | namespace sinks { 15 | 16 | template 17 | SPDLOG_INLINE basic_file_sink::basic_file_sink(const filename_t &filename, 18 | bool truncate, 19 | const file_event_handlers &event_handlers) 20 | : file_helper_{event_handlers} { 21 | file_helper_.open(filename, truncate); 22 | } 23 | 24 | template 25 | SPDLOG_INLINE const filename_t &basic_file_sink::filename() const { 26 | return file_helper_.filename(); 27 | } 28 | 29 | template 30 | SPDLOG_INLINE void basic_file_sink::sink_it_(const details::log_msg &msg) { 31 | memory_buf_t formatted; 32 | base_sink::formatter_->format(msg, formatted); 33 | file_helper_.write(formatted); 34 | } 35 | 36 | template 37 | SPDLOG_INLINE void basic_file_sink::flush_() { 38 | file_helper_.flush(); 39 | } 40 | 41 | } // namespace sinks 42 | } // namespace spdlog 43 | -------------------------------------------------------------------------------- /thirdparty/spdlog/sinks/callback_sink.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | #include 11 | #include 12 | 13 | namespace spdlog { 14 | 15 | // callbacks type 16 | typedef std::function custom_log_callback; 17 | 18 | namespace sinks { 19 | /* 20 | * Trivial callback sink, gets a callback function and calls it on each log 21 | */ 22 | template 23 | class callback_sink final : public base_sink { 24 | public: 25 | explicit callback_sink(const custom_log_callback &callback) 26 | : callback_{callback} {} 27 | 28 | protected: 29 | void sink_it_(const details::log_msg &msg) override { callback_(msg); } 30 | void flush_() override{}; 31 | 32 | private: 33 | custom_log_callback callback_; 34 | }; 35 | 36 | using callback_sink_mt = callback_sink; 37 | using callback_sink_st = callback_sink; 38 | 39 | } // namespace sinks 40 | 41 | // 42 | // factory functions 43 | // 44 | template 45 | inline std::shared_ptr callback_logger_mt(const std::string &logger_name, 46 | const custom_log_callback &callback) { 47 | return Factory::template create(logger_name, callback); 48 | } 49 | 50 | template 51 | inline std::shared_ptr callback_logger_st(const std::string &logger_name, 52 | const custom_log_callback &callback) { 53 | return Factory::template create(logger_name, callback); 54 | } 55 | 56 | } // namespace spdlog 57 | -------------------------------------------------------------------------------- /thirdparty/spdlog/sinks/null_sink.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | #include 11 | 12 | namespace spdlog { 13 | namespace sinks { 14 | 15 | template 16 | class null_sink : public base_sink { 17 | protected: 18 | void sink_it_(const details::log_msg &) override {} 19 | void flush_() override {} 20 | }; 21 | 22 | using null_sink_mt = null_sink; 23 | using null_sink_st = null_sink; 24 | 25 | } // namespace sinks 26 | 27 | template 28 | inline std::shared_ptr null_logger_mt(const std::string &logger_name) { 29 | auto null_logger = Factory::template create(logger_name); 30 | null_logger->set_level(level::off); 31 | return null_logger; 32 | } 33 | 34 | template 35 | inline std::shared_ptr null_logger_st(const std::string &logger_name) { 36 | auto null_logger = Factory::template create(logger_name); 37 | null_logger->set_level(level::off); 38 | return null_logger; 39 | } 40 | 41 | } // namespace spdlog 42 | -------------------------------------------------------------------------------- /thirdparty/spdlog/sinks/ostream_sink.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | #include 10 | #include 11 | 12 | namespace spdlog { 13 | namespace sinks { 14 | template 15 | class ostream_sink final : public base_sink { 16 | public: 17 | explicit ostream_sink(std::ostream &os, bool force_flush = false) 18 | : ostream_(os), 19 | force_flush_(force_flush) {} 20 | ostream_sink(const ostream_sink &) = delete; 21 | ostream_sink &operator=(const ostream_sink &) = delete; 22 | 23 | protected: 24 | void sink_it_(const details::log_msg &msg) override { 25 | memory_buf_t formatted; 26 | base_sink::formatter_->format(msg, formatted); 27 | ostream_.write(formatted.data(), static_cast(formatted.size())); 28 | if (force_flush_) { 29 | ostream_.flush(); 30 | } 31 | } 32 | 33 | void flush_() override { ostream_.flush(); } 34 | 35 | std::ostream &ostream_; 36 | bool force_flush_; 37 | }; 38 | 39 | using ostream_sink_mt = ostream_sink; 40 | using ostream_sink_st = ostream_sink; 41 | 42 | } // namespace sinks 43 | } // namespace spdlog 44 | -------------------------------------------------------------------------------- /thirdparty/spdlog/sinks/sink-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | #include 11 | 12 | SPDLOG_INLINE bool spdlog::sinks::sink::should_log(spdlog::level::level_enum msg_level) const { 13 | return msg_level >= level_.load(std::memory_order_relaxed); 14 | } 15 | 16 | SPDLOG_INLINE void spdlog::sinks::sink::set_level(level::level_enum log_level) { 17 | level_.store(log_level, std::memory_order_relaxed); 18 | } 19 | 20 | SPDLOG_INLINE spdlog::level::level_enum spdlog::sinks::sink::level() const { 21 | return static_cast(level_.load(std::memory_order_relaxed)); 22 | } 23 | -------------------------------------------------------------------------------- /thirdparty/spdlog/sinks/sink.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | namespace spdlog { 10 | 11 | namespace sinks { 12 | class SPDLOG_API sink { 13 | public: 14 | virtual ~sink() = default; 15 | virtual void log(const details::log_msg &msg) = 0; 16 | virtual void flush() = 0; 17 | virtual void set_pattern(const std::string &pattern) = 0; 18 | virtual void set_formatter(std::unique_ptr sink_formatter) = 0; 19 | 20 | void set_level(level::level_enum log_level); 21 | level::level_enum level() const; 22 | bool should_log(level::level_enum msg_level) const; 23 | 24 | protected: 25 | // sink log level - default is all 26 | level_t level_{level::trace}; 27 | }; 28 | 29 | } // namespace sinks 30 | } // namespace spdlog 31 | 32 | #ifdef SPDLOG_HEADER_ONLY 33 | #include "sink-inl.h" 34 | #endif 35 | -------------------------------------------------------------------------------- /thirdparty/spdlog/sinks/stdout_color_sinks-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | #include 11 | #include 12 | 13 | namespace spdlog { 14 | 15 | template 16 | SPDLOG_INLINE std::shared_ptr stdout_color_mt(const std::string &logger_name, 17 | color_mode mode) { 18 | return Factory::template create(logger_name, mode); 19 | } 20 | 21 | template 22 | SPDLOG_INLINE std::shared_ptr stdout_color_st(const std::string &logger_name, 23 | color_mode mode) { 24 | return Factory::template create(logger_name, mode); 25 | } 26 | 27 | template 28 | SPDLOG_INLINE std::shared_ptr stderr_color_mt(const std::string &logger_name, 29 | color_mode mode) { 30 | return Factory::template create(logger_name, mode); 31 | } 32 | 33 | template 34 | SPDLOG_INLINE std::shared_ptr stderr_color_st(const std::string &logger_name, 35 | color_mode mode) { 36 | return Factory::template create(logger_name, mode); 37 | } 38 | } // namespace spdlog 39 | -------------------------------------------------------------------------------- /thirdparty/spdlog/sinks/stdout_color_sinks.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifdef _WIN32 7 | #include 8 | #else 9 | #include 10 | #endif 11 | 12 | #include 13 | 14 | namespace spdlog { 15 | namespace sinks { 16 | #ifdef _WIN32 17 | using stdout_color_sink_mt = wincolor_stdout_sink_mt; 18 | using stdout_color_sink_st = wincolor_stdout_sink_st; 19 | using stderr_color_sink_mt = wincolor_stderr_sink_mt; 20 | using stderr_color_sink_st = wincolor_stderr_sink_st; 21 | #else 22 | using stdout_color_sink_mt = ansicolor_stdout_sink_mt; 23 | using stdout_color_sink_st = ansicolor_stdout_sink_st; 24 | using stderr_color_sink_mt = ansicolor_stderr_sink_mt; 25 | using stderr_color_sink_st = ansicolor_stderr_sink_st; 26 | #endif 27 | } // namespace sinks 28 | 29 | template 30 | std::shared_ptr stdout_color_mt(const std::string &logger_name, 31 | color_mode mode = color_mode::automatic); 32 | 33 | template 34 | std::shared_ptr stdout_color_st(const std::string &logger_name, 35 | color_mode mode = color_mode::automatic); 36 | 37 | template 38 | std::shared_ptr stderr_color_mt(const std::string &logger_name, 39 | color_mode mode = color_mode::automatic); 40 | 41 | template 42 | std::shared_ptr stderr_color_st(const std::string &logger_name, 43 | color_mode mode = color_mode::automatic); 44 | 45 | } // namespace spdlog 46 | 47 | #ifdef SPDLOG_HEADER_ONLY 48 | #include "stdout_color_sinks-inl.h" 49 | #endif 50 | -------------------------------------------------------------------------------- /thirdparty/spdlog/sinks/udp_sink.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | #include 9 | #ifdef _WIN32 10 | #include 11 | #else 12 | #include 13 | #endif 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | // Simple udp client sink 21 | // Sends formatted log via udp 22 | 23 | namespace spdlog { 24 | namespace sinks { 25 | 26 | struct udp_sink_config { 27 | std::string server_host; 28 | uint16_t server_port; 29 | 30 | udp_sink_config(std::string host, uint16_t port) 31 | : server_host{std::move(host)}, 32 | server_port{port} {} 33 | }; 34 | 35 | template 36 | class udp_sink : public spdlog::sinks::base_sink { 37 | public: 38 | // host can be hostname or ip address 39 | explicit udp_sink(udp_sink_config sink_config) 40 | : client_{sink_config.server_host, sink_config.server_port} {} 41 | 42 | ~udp_sink() override = default; 43 | 44 | protected: 45 | void sink_it_(const spdlog::details::log_msg &msg) override { 46 | spdlog::memory_buf_t formatted; 47 | spdlog::sinks::base_sink::formatter_->format(msg, formatted); 48 | client_.send(formatted.data(), formatted.size()); 49 | } 50 | 51 | void flush_() override {} 52 | details::udp_client client_; 53 | }; 54 | 55 | using udp_sink_mt = udp_sink; 56 | using udp_sink_st = udp_sink; 57 | 58 | } // namespace sinks 59 | 60 | // 61 | // factory functions 62 | // 63 | template 64 | inline std::shared_ptr udp_logger_mt(const std::string &logger_name, 65 | sinks::udp_sink_config skin_config) { 66 | return Factory::template create(logger_name, skin_config); 67 | } 68 | 69 | } // namespace spdlog 70 | -------------------------------------------------------------------------------- /thirdparty/spdlog/stopwatch.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | // Stopwatch support for spdlog (using std::chrono::steady_clock). 10 | // Displays elapsed seconds since construction as double. 11 | // 12 | // Usage: 13 | // 14 | // spdlog::stopwatch sw; 15 | // ... 16 | // spdlog::debug("Elapsed: {} seconds", sw); => "Elapsed 0.005116733 seconds" 17 | // spdlog::info("Elapsed: {:.6} seconds", sw); => "Elapsed 0.005163 seconds" 18 | // 19 | // 20 | // If other units are needed (e.g. millis instead of double), include "fmt/chrono.h" and use 21 | // "duration_cast<..>(sw.elapsed())": 22 | // 23 | // #include 24 | //.. 25 | // using std::chrono::duration_cast; 26 | // using std::chrono::milliseconds; 27 | // spdlog::info("Elapsed {}", duration_cast(sw.elapsed())); => "Elapsed 5ms" 28 | 29 | namespace spdlog { 30 | class stopwatch { 31 | using clock = std::chrono::steady_clock; 32 | std::chrono::time_point start_tp_; 33 | 34 | public: 35 | stopwatch() 36 | : start_tp_{clock::now()} {} 37 | 38 | std::chrono::duration elapsed() const { 39 | return std::chrono::duration(clock::now() - start_tp_); 40 | } 41 | 42 | std::chrono::milliseconds elapsed_ms() const { 43 | return std::chrono::duration_cast(clock::now() - start_tp_); 44 | } 45 | 46 | void reset() { start_tp_ = clock::now(); } 47 | }; 48 | } // namespace spdlog 49 | 50 | // Support for fmt formatting (e.g. "{:012.9}" or just "{}") 51 | namespace 52 | #ifdef SPDLOG_USE_STD_FORMAT 53 | std 54 | #else 55 | fmt 56 | #endif 57 | { 58 | 59 | template <> 60 | struct formatter : formatter { 61 | template 62 | auto format(const spdlog::stopwatch &sw, FormatContext &ctx) const -> decltype(ctx.out()) { 63 | return formatter::format(sw.elapsed().count(), ctx); 64 | } 65 | }; 66 | } // namespace std 67 | -------------------------------------------------------------------------------- /thirdparty/spdlog/version.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #define SPDLOG_VER_MAJOR 1 7 | #define SPDLOG_VER_MINOR 14 8 | #define SPDLOG_VER_PATCH 1 9 | 10 | #define SPDLOG_TO_VERSION(major, minor, patch) (major * 10000 + minor * 100 + patch) 11 | #define SPDLOG_VERSION SPDLOG_TO_VERSION(SPDLOG_VER_MAJOR, SPDLOG_VER_MINOR, SPDLOG_VER_PATCH) 12 | -------------------------------------------------------------------------------- /thirdparty/tclap/IgnoreRestVisitor.h: -------------------------------------------------------------------------------- 1 | // -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*- 2 | 3 | 4 | /****************************************************************************** 5 | * 6 | * file: IgnoreRestVisitor.h 7 | * 8 | * Copyright (c) 2003, Michael E. Smoot . 9 | * All rights reserved. 10 | * 11 | * See the file COPYING in the top directory of this distribution for 12 | * more information. 13 | * 14 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 15 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20 | * DEALINGS IN THE SOFTWARE. 21 | * 22 | *****************************************************************************/ 23 | 24 | 25 | #ifndef TCLAP_IGNORE_REST_VISITOR_H 26 | #define TCLAP_IGNORE_REST_VISITOR_H 27 | 28 | #include 29 | #include 30 | 31 | namespace TCLAP { 32 | 33 | /** 34 | * A Visitor that tells the CmdLine to begin ignoring arguments after 35 | * this one is parsed. 36 | */ 37 | class IgnoreRestVisitor: public Visitor 38 | { 39 | public: 40 | 41 | /** 42 | * Constructor. 43 | */ 44 | IgnoreRestVisitor() : Visitor() {} 45 | 46 | /** 47 | * Sets Arg::_ignoreRest. 48 | */ 49 | void visit() { Arg::beginIgnoring(); } 50 | }; 51 | 52 | } 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /thirdparty/tclap/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | libtclapincludedir = $(includedir)/tclap 3 | 4 | libtclapinclude_HEADERS = \ 5 | Arg.h \ 6 | ArgException.h \ 7 | ArgTraits.h \ 8 | CmdLine.h \ 9 | CmdLineInterface.h \ 10 | CmdLineOutput.h \ 11 | Constraint.h \ 12 | DocBookOutput.h \ 13 | HelpVisitor.h \ 14 | IgnoreRestVisitor.h \ 15 | MultiArg.h \ 16 | MultiSwitchArg.h \ 17 | OptionalUnlabeledTracker.h \ 18 | StandardTraits.h \ 19 | StdOutput.h \ 20 | SwitchArg.h \ 21 | UnlabeledMultiArg.h \ 22 | UnlabeledValueArg.h \ 23 | ValueArg.h \ 24 | ValuesConstraint.h \ 25 | VersionVisitor.h \ 26 | Visitor.h \ 27 | XorHandler.h \ 28 | ZshCompletionOutput.h \ 29 | sstream.h 30 | -------------------------------------------------------------------------------- /thirdparty/tclap/OptionalUnlabeledTracker.h: -------------------------------------------------------------------------------- 1 | // -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*- 2 | 3 | 4 | 5 | /****************************************************************************** 6 | * 7 | * file: OptionalUnlabeledTracker.h 8 | * 9 | * Copyright (c) 2005, Michael E. Smoot . 10 | * All rights reserved. 11 | * 12 | * See the file COPYING in the top directory of this distribution for 13 | * more information. 14 | * 15 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21 | * DEALINGS IN THE SOFTWARE. 22 | * 23 | *****************************************************************************/ 24 | 25 | 26 | #ifndef TCLAP_OPTIONAL_UNLABELED_TRACKER_H 27 | #define TCLAP_OPTIONAL_UNLABELED_TRACKER_H 28 | 29 | #include 30 | 31 | namespace TCLAP { 32 | 33 | class OptionalUnlabeledTracker 34 | { 35 | 36 | public: 37 | 38 | static void check( bool req, const std::string& argName ); 39 | 40 | static void gotOptional() { alreadyOptionalRef() = true; } 41 | 42 | static bool& alreadyOptional() { return alreadyOptionalRef(); } 43 | 44 | private: 45 | 46 | static bool& alreadyOptionalRef() { static bool ct = false; return ct; } 47 | }; 48 | 49 | 50 | inline void OptionalUnlabeledTracker::check( bool req, const std::string& argName ) 51 | { 52 | if ( OptionalUnlabeledTracker::alreadyOptional() ) 53 | throw( SpecificationException( 54 | "You can't specify ANY Unlabeled Arg following an optional Unlabeled Arg", 55 | argName ) ); 56 | 57 | if ( !req ) 58 | OptionalUnlabeledTracker::gotOptional(); 59 | } 60 | 61 | 62 | } // namespace TCLAP 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /thirdparty/tclap/StandardTraits.h: -------------------------------------------------------------------------------- 1 | // -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*- 2 | 3 | /****************************************************************************** 4 | * 5 | * file: StandardTraits.h 6 | * 7 | * Copyright (c) 2007, Daniel Aarno, Michael E. Smoot . 8 | * Copyright (c) 2017, Google LLC 9 | * All rights reserved. 10 | * 11 | * See the file COPYING in the top directory of this distribution for 12 | * more information. 13 | * 14 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 15 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20 | * DEALINGS IN THE SOFTWARE. 21 | * 22 | *****************************************************************************/ 23 | 24 | // This is an internal tclap file, you should probably not have to 25 | // include this directly 26 | 27 | #ifndef TCLAP_STANDARD_TRAITS_H 28 | #define TCLAP_STANDARD_TRAITS_H 29 | 30 | #ifdef HAVE_CONFIG_H 31 | #include // To check for long long 32 | #endif 33 | 34 | // If Microsoft has already typedef'd wchar_t as an unsigned 35 | // short, then compiles will break because it's as if we're 36 | // creating ArgTraits twice for unsigned short. Thus... 37 | #ifdef _MSC_VER 38 | #ifndef _NATIVE_WCHAR_T_DEFINED 39 | #define TCLAP_DONT_DECLARE_WCHAR_T_ARGTRAITS 40 | #endif 41 | #endif 42 | 43 | namespace TCLAP { 44 | 45 | // Integer types (signed, unsigned and bool) and floating point types all 46 | // have value-like semantics. 47 | 48 | // Strings have string like argument traits. 49 | template<> 50 | struct ArgTraits { 51 | typedef StringLike ValueCategory; 52 | }; 53 | 54 | template 55 | void SetString(T &dst, const std::string &src) 56 | { 57 | dst = src; 58 | } 59 | 60 | } // namespace 61 | 62 | #endif 63 | 64 | -------------------------------------------------------------------------------- /thirdparty/tclap/Visitor.h: -------------------------------------------------------------------------------- 1 | // -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*- 2 | 3 | 4 | /****************************************************************************** 5 | * 6 | * file: Visitor.h 7 | * 8 | * Copyright (c) 2003, Michael E. Smoot . 9 | * Copyright (c) 2017, Google LLC 10 | * All rights reserved. 11 | * 12 | * See the file COPYING in the top directory of this distribution for 13 | * more information. 14 | * 15 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21 | * DEALINGS IN THE SOFTWARE. 22 | * 23 | *****************************************************************************/ 24 | 25 | 26 | #ifndef TCLAP_VISITOR_H 27 | #define TCLAP_VISITOR_H 28 | 29 | namespace TCLAP { 30 | 31 | /** 32 | * A base class that defines the interface for visitors. 33 | */ 34 | class Visitor 35 | { 36 | public: 37 | 38 | /** 39 | * Constructor. Does nothing. 40 | */ 41 | Visitor() { } 42 | 43 | /** 44 | * Destructor. Does nothing. 45 | */ 46 | virtual ~Visitor() { } 47 | 48 | /** 49 | * This method (to implemented by children) will be 50 | * called when the visitor is visited. 51 | */ 52 | virtual void visit() = 0; 53 | }; 54 | 55 | } 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /thirdparty/tclap/sstream.h: -------------------------------------------------------------------------------- 1 | // -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*- 2 | 3 | /****************************************************************************** 4 | * 5 | * file: sstream.h 6 | * 7 | * Copyright (c) 2003, Michael E. Smoot . 8 | * Copyright (c) 2004, Michael E. Smoot, Daniel Aarno . 9 | * Copyright (c) 2017 Google Inc. 10 | * All rights reserved. 11 | * 12 | * See the file COPYING in the top directory of this distribution for 13 | * more information. 14 | * 15 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21 | * DEALINGS IN THE SOFTWARE. 22 | * 23 | *****************************************************************************/ 24 | 25 | #ifndef TCLAP_SSTREAM_H 26 | #define TCLAP_SSTREAM_H 27 | 28 | #if !defined(HAVE_STRSTREAM) 29 | // Assume sstream is available if strstream is not specified 30 | // (https://sourceforge.net/p/tclap/bugs/23/) 31 | #define HAVE_SSTREAM 32 | #endif 33 | 34 | #if defined(HAVE_SSTREAM) 35 | #include 36 | namespace TCLAP { 37 | typedef std::istringstream istringstream; 38 | typedef std::ostringstream ostringstream; 39 | } 40 | #elif defined(HAVE_STRSTREAM) 41 | #include 42 | namespace TCLAP { 43 | typedef std::istrstream istringstream; 44 | typedef std::ostrstream ostringstream; 45 | } 46 | #else 47 | #error "Need a stringstream (sstream or strstream) to compile!" 48 | #endif 49 | 50 | #endif // TCLAP_SSTREAM_H 51 | -------------------------------------------------------------------------------- /tools/python/addgmlids.py: -------------------------------------------------------------------------------- 1 | import sys 2 | from lxml import etree 3 | import uuid 4 | 5 | def main(): 6 | fIn = sys.argv[1] 7 | parser = etree.XMLParser(ns_clean=True) 8 | tree = etree.parse(fIn, parser) 9 | root = tree.getroot() 10 | for key in root.nsmap.keys(): 11 | if root.nsmap[key].find('www.opengis.net/gml') != -1: 12 | gmlns = "%s" % root.nsmap[key] 13 | 14 | solidid = 1 15 | for solid in root.findall(".//{%s}Solid" % gmlns): 16 | gmlid = solid.get("{%s}id" % gmlns) 17 | if gmlid == None: 18 | solid.set("{%s}id" % gmlns, str(uuid.uuid4())) 19 | solidid += 1 20 | 21 | fOut = open(sys.argv[2], 'w') 22 | fOut.write(etree.tostring(root, pretty_print=True)) 23 | fOut.close() 24 | return 1 25 | 26 | 27 | if __name__ == "__main__": 28 | main() 29 | 30 | -------------------------------------------------------------------------------- /tools/python/cleanpoly.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import sys 4 | 5 | def main(): 6 | status = 0 7 | fin = open(sys.argv[1]) 8 | for l in fin: 9 | ll = l.split() 10 | if not ( (len(ll) == 0) or (ll[0] == "#") ): 11 | if status == 0: 12 | print ll[0], "3 0 0" 13 | status += 1 14 | elif status == 1: 15 | if len(ll) < 4: 16 | status += 1 17 | print ll[0], 0 18 | else: 19 | print " ".join(ll[0:4]) 20 | elif status == 2: 21 | if ll.count('#') > 0: 22 | i = ll.index('#') 23 | ll = ll[:i] 24 | if (len(ll) != (int(ll[0])+1)): 25 | if len(ll) == 1: 26 | print ll[0], "0" 27 | elif len(ll) == 4: #-- hole point line 28 | print " ".join(ll) 29 | else: 30 | print ll[0], ll[1] 31 | else: 32 | print " ".join(ll) 33 | 34 | 35 | if __name__ == "__main__": 36 | main() 37 | -------------------------------------------------------------------------------- /tools/python/obj2off.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import StringIO 3 | 4 | def main(): 5 | fIn = open(sys.argv[1]) 6 | # fIn = open('/Users/hugo/temp/cgal-bug/a2.obj') 7 | # fIn = open('/Users/hugo/temp/cgal-bug/a_cleaned.off.obj') 8 | fOut = convert(fIn) 9 | print fOut.getvalue() 10 | 11 | def convert(fIn): 12 | fOut = StringIO.StringIO() 13 | #-- skip the header 14 | lsVertices = [] 15 | lsFaces = [] 16 | for l in fIn: 17 | if (len(l) == 0) or (l[0] == '#'): 18 | continue 19 | if (l[0] == 'v'): 20 | lsVertices.append(l) 21 | if (l[0] == 'f'): 22 | lsFaces.append(l) 23 | # print len(lsVertices) 24 | # print len(lsFaces) 25 | fOut.write("OFF\n" + str(len(lsVertices)) + " " + str(len(lsFaces)) + " 0\n") 26 | for i in lsVertices: 27 | v = i.split() 28 | fOut.write(v[1] + " " + v[2] + " " + v[3] +"\n") 29 | for i in lsFaces: 30 | f = i.split() 31 | le = len(f) - 1 32 | fOut.write(str(le) + " ") 33 | for each in f[1:]: 34 | st = int(each) - 1 35 | fOut.write(str(st) + " ") 36 | fOut.write("\n") 37 | return fOut 38 | 39 | 40 | 41 | 42 | 43 | 44 | if __name__ == "__main__": 45 | main() -------------------------------------------------------------------------------- /tools/python/poly2off.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import StringIO 3 | 4 | def main(): 5 | fIn = open(sys.argv[1]) 6 | # fOut = open(sys.argv[1]+".off", 'w') 7 | fOut = convert(fIn) 8 | print fOut.getvalue() 9 | 10 | def convert(fIn): 11 | fOut = StringIO.StringIO() 12 | #-- skip the header 13 | l = fIn.next() 14 | while (len(l) == 0) or (l[0] == '#'): 15 | l = fIn.next() 16 | numVertices = int(l.split()[0]) 17 | lstVertices = [] 18 | for i in range(numVertices): 19 | lstVertices.append(fIn.next()) 20 | #-- skip the crap in between 21 | l = fIn.next() 22 | while (len(l) < 3) or (l[0] == '#'): 23 | l = fIn.next() 24 | numFaces = int(l.split()[0]) 25 | lstFaces = [] 26 | holes = [] 27 | for i in range(numFaces): 28 | l = fIn.next() 29 | if l.split()[0] == "1": 30 | lstFaces.append(fIn.next()) 31 | else: 32 | print "ERROR: Holes present, use TetGen to produce a (triangulated) OFF file." 33 | sys.exit() 34 | fOut.write("OFF\n" + str(numVertices) + " " + str(len(lstFaces)) + " 0\n") 35 | for l in lstVertices: 36 | v = l.split() 37 | fOut.write(v[1] + " " + v[2] + " " + v[3] +"\n") 38 | for i,l in enumerate(lstFaces): 39 | fOut.write(l) 40 | return fOut 41 | 42 | if __name__ == "__main__": 43 | main() 44 | 45 | -------------------------------------------------------------------------------- /tools/python/translatepoly.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import StringIO 3 | 4 | def main(): 5 | fIn = open(sys.argv[1]) 6 | fOut = translate(fIn) 7 | print fOut.getvalue() 8 | 9 | def translate(fIn): 10 | fOut = StringIO.StringIO() 11 | #-- skip the header 12 | l = fIn.next() 13 | while (len(l) == 0) or (l[0] == '#'): 14 | l = fIn.next() 15 | numVertices = int(l.split()[0]) 16 | lsV = [] 17 | for i in range(numVertices): 18 | v = fIn.next().split() 19 | lsV.append([int(v[0]), float(v[1]), float(v[2]), float(v[3])]) 20 | #-- find the minx and miny 21 | minx = 9e10 22 | miny = 9e10 23 | for v in lsV: 24 | if (v[1] < minx): 25 | minx = v[1] 26 | if (v[2] < miny): 27 | miny = v[2] 28 | # print minx, miny 29 | #--translate 30 | fOut.write("%d 3 0 0\n" % len(lsV)) 31 | for i,v in enumerate(lsV): 32 | fOut.write("%d %f %f %f\n" % 33 | (i, 34 | v[1] - minx, 35 | v[2] - miny, 36 | v[3]) 37 | ) 38 | #-- write the rest as is 39 | try: 40 | l = fIn.next() 41 | while (l != None): 42 | fOut.write(l) 43 | l = fIn.next() 44 | except: 45 | return fOut 46 | 47 | if __name__ == "__main__": 48 | main() 49 | 50 | -------------------------------------------------------------------------------- /tools/viz3dity/README.md: -------------------------------------------------------------------------------- 1 | 2 | # viz3dity: a visualiser for val3dity errors 3 | 4 | ![](screenshot.png) 5 | 6 | 7 | ## dependencies 8 | 9 | ``` 10 | pip install polyscope 11 | pip install numpy 12 | pip install click 13 | pip install tqdm 14 | pip install mapbox-earcut 15 | ``` 16 | 17 | 18 | ## to view the errors 19 | 20 | ``` 21 | val3dity myfile.city.json --report myreport.json 22 | python viz3dity myfile.city.json myreport.json 23 | ``` 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /tools/viz3dity/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/val3dity/db77bc60b006d742289d63c25e7a7159b5cb7887/tools/viz3dity/screenshot.png -------------------------------------------------------------------------------- /uid_entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | # Create passwd entry for arbitrary user ID 6 | if [[ -z "$(awk -F ':' "\$3 == $(id -u)" /etc/passwd)" ]]; then 7 | echo "Adding arbitrary user" 8 | echo "${USER_NAME:-default}:x:$(id -u):0:${USER_NAME:-default} user:${HOME}:/sbin/nologin" >> /etc/passwd 9 | echo "$(awk -F ':' "\$3 == $(id -u)" /etc/passwd)" 10 | fi 11 | 12 | echo "Running as $(id -un):$(id -gn)" 13 | 14 | if [[ $@ == /bin* ]] 15 | then 16 | exec "$@" 17 | else 18 | val3dity $@ 19 | fi 20 | -------------------------------------------------------------------------------- /vcpkg.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "val3dity", 3 | "version-string": "2.5.1", 4 | "dependencies": [ 5 | "boost-program-options", 6 | "boost-geometry", 7 | "boost-locale", 8 | "boost-chrono", 9 | "boost-system", 10 | "boost-filesystem", 11 | "cgal", 12 | "geos", 13 | "eigen3" 14 | ] 15 | 16 | } --------------------------------------------------------------------------------