|
1 |
| -This folder contains the inputs & outputs of our algorithm, on the [MAMBO](https://gitlab.com/franck.ledoux/mambo/) dataset. |
| 1 | +# Validity-first automatic polycube labeling for CAD models - supplemental material |
2 | 2 |
|
3 |
| -Contrary to a supplemental material in the PDF format where the ordering is fixed and the 3D models are compressed into a set of 2D images, |
4 |
| -you will be able to sort/filter by any column, and visualize the results in a 3D viewer. |
| 3 | +This folder contains the inputs & outputs of our algorithm, on the [MAMBO](https://gitlab.com/franck.ledoux/mambo/) and [OctreeMeshing](https://cims.nyu.edu/gcl/papers/2019-OctreeMeshing.zip) datasets, as well as results of _PolyCut_[^polycut] and _Evocube_[^evocube]. |
5 | 4 |
|
6 |
| -# Important : Allow the access to local files |
| 5 | +## Open the interactive document |
7 | 6 |
|
8 |
| -However, for security reasons, internet navigators do not allow HTML files from accessing local files |
9 |
| -([CORS error](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy#file_origins)), |
10 |
| -such as the 3D models. You have 2 solutions: |
| 7 | +Our supplemental material do not require an internet connection. Rendering code is inside the `js/` subfolder and 3D models inside `glb/`. |
11 | 8 |
|
12 |
| -## 1. Temporarily change the security policy of your internet navigator |
| 9 | +By default, internet navigators do not allow both HTTP access and `file:///` access ([CORS error](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy#file_origins)). |
| 10 | +If you directly open `index.html` with your internet navigator, the 3D models will not be rendered. |
13 | 11 |
|
14 |
| -### Firefox |
15 |
| - |
16 |
| -Open `about:config` and change the value of `security.fileuri.strict_origin_policy` from `true` to `false` |
17 |
| - |
18 |
| -Then open `index.html` |
19 |
| - |
20 |
| -### Chrome |
21 |
| - |
22 |
| -Execute |
| 12 | +### Recommended: Launch a HTTP server with [Python](https://www.python.org/) |
23 | 13 |
|
24 | 14 | ```bash
|
25 |
| -google-chrome index.html --allow-file-access-from-files |
| 15 | +python -m http.server |
26 | 16 | ```
|
27 | 17 |
|
28 |
| -## 2. Launch an HTTP server |
| 18 | +Then open the printed address (usually http://0.0.0.0:8000/) with your internet navigator. Python will serve `index.html` locally and provide access to the 3D models through HTTP. |
29 | 19 |
|
30 |
| -For example with Python: |
| 20 | +### Other means to launch a HTTP server |
31 | 21 |
|
32 |
| -```bash |
33 |
| -python3 -m http.server |
34 |
| -``` |
| 22 | +- with the [miniserve](https://github.com/svenstaro/miniserve) binary: `miniserve .` |
| 23 | +- with [PHP](https://www.php.net/): `php -S localhost:8080 -t .` |
| 24 | +- with the [http-server](https://www.npmjs.com/package/http-server) Node.js package: `http-server .` |
| 25 | +- with [Ruby](https://www.ruby-lang.org/en/) and [WEBrick](https://github.com/ruby/webrick): `ruby -run -ehttpd .` |
35 | 26 |
|
36 |
| -Then open http://0.0.0.0:8000/ with your internet navigator |
| 27 | +### Other method: Temporarily change the security policy of your internet navigator |
37 | 28 |
|
38 |
| -# Sankey diagram |
| 29 | +- with Firefox: open `about:config` and change the value of `security.fileuri.strict_origin_policy` from `true` to `false`, then open `index.html` |
| 30 | +- with Chrome: execute `google-chrome index.html --allow-file-access-from-files` |
39 | 31 |
|
40 |
| -Above the interactive grid, there is a collapsed section hiding a Sankey diagram, which gives high level stats about the batch execution |
41 |
| -(for our method only, Evocube results are ignored). |
42 |
| -You can adjust the vertical position of the nodes, and hovering them gives the number of models. |
| 32 | +## Sankey diagram |
43 | 33 |
|
44 |
| -# Column filters |
| 34 | +Above the interactive grid, there is a collapsed section hiding a Sankey diagram, which gives high level stats on our method only. You can adjust the vertical position of the nodes, and hovering them gives the number of models. |
45 | 35 |
|
46 |
| -To see only labelings generated by our method : hamburger button of the 'method' column → select Equals 'Ours' |
47 |
| -([Set Filters](https://www.ag-grid.com/javascript-data-grid/filter-set/) are not available in the community edition of the library) |
| 36 | +## Column filters |
48 | 37 |
|
49 |
| -To see only invalid labelings : hamburger button of the 'valid' column → choose 'False' |
| 38 | +To see only labelings generated by our method : hamburger button of the "method" column → select Equals "Ours" |
| 39 | +([Set Filters](https://www.ag-grid.com/javascript-data-grid/filter-set/) are not available in the community edition of the library). |
50 | 40 |
|
51 |
| -To see only failed labeling generations : for ex. hamburger button of the '#charts' column → choose 'Blank'. To reset, choose 'Equals' and leave empty |
| 41 | +To see only invalid labelings : hamburger button of the "valid" column → choose "False". |
52 | 42 |
|
53 |
| -# Column sort |
| 43 | +To see only failed labeling generations : e.g. hamburger button of the "#charts" column → choose "Blank". To reset, choose "Equals" and leave the field empty. |
54 | 44 |
|
55 |
| -You can click on the name of a column to switch between ascending, descending and default order. |
| 45 | +## Column sort |
56 | 46 |
|
57 |
| -# Columns description |
| 47 | +You can click on the name of a column to switch between ascending, descending and default order. |
58 | 48 |
|
59 |
| -- CAD model : name of the 3D model |
| 49 | +## Columns description |
60 | 50 |
|
61 |
| -- method : if the polycube labeling was generated using Evocube (Dumery et al. 2022) or our algorithm |
| 51 | +- CAD model : name of the 3D model. Bx, Sx and Mx models are from the MAMBO dataset, the others from OctreeMeshing |
| 52 | +- method : if the polycube labeling was generated using a graph-cut optimization (our initial labeling), _PolyCut_[^polycut], _Evocube_[^evocube] or our method |
62 | 53 |
|
63 | 54 | "surface mesh" group
|
64 | 55 |
|
65 | 56 | - #vertices : number of vertices in the triangle mesh
|
66 |
| - |
67 | 57 | - #facets : number of facets in the triangle mesh
|
68 |
| - |
69 | 58 | - sd(area) : standard deviation of the facets area
|
70 | 59 |
|
71 | 60 | "labeling" group
|
72 | 61 |
|
73 | 62 | - #charts : number of charts
|
74 |
| - |
75 | 63 | - #boundaries : number of boundaries
|
76 |
| - |
77 | 64 | - #corners : number of corners
|
78 |
| - |
79 | 65 | - #invalid-charts : number of invalid charts
|
80 |
| - |
81 | 66 | - #invalid-boundaries : number of invalid boundaries
|
82 |
| - |
83 | 67 | - #invalid-corners : number of invalid corners
|
84 |
| - |
85 | 68 | - min(fidelity) : minimal (worse) per-triangle fidelity (closeness between the facet normal and the assigned direction). In [0,1]
|
86 |
| - |
87 | 69 | - avg(fidelity) : average per-triangle fidelity, in [0,1]
|
88 |
| - |
89 | 70 | - valid : if the labeling corresponds to a polycube topology or not
|
90 |
| - |
91 | 71 | - #turning-points : number of turning-points (high turns along boundaries)
|
92 |
| - |
93 |
| -- duration : execution duration, of the labeling algorithm only, in seconds |
94 |
| - |
95 |
| -- speedup : duration of Evocube divided by the duration of our algorithm |
96 |
| - |
97 |
| -- open : open the 3D viewer. After 5s, the 3D model switches between the labeled mesh and a fast polycube estimation. If no labeling was generated, the triangle mesh is displayed instead. Screen space Ambient Occlusion (SSAO) is on by default. |
| 72 | +- duration : duration of the labeling stage with file I/O, in seconds. For our method, the generation of the initial labeling with graph-cut is |
| 73 | +- relative duration : duration divided by the duration of our method |
| 74 | +- open : open the 3D viewer. After 5s, the 3D model switches between the labeled mesh and a fast polycube estimation. If no labeling was generated, the triangle mesh is displayed instead. Screen Space Ambient Occlusion (SSAO) is on by default. |
98 | 75 |
|
99 | 76 | "feature edges" group
|
100 | 77 |
|
101 |
| -- removed : percentage of CAD lines not considered feature edges because of their low dihedral angle |
102 |
| - |
103 |
| -- lost : percentage of lost feature edges because the same direction (label) is assigned on the 2 adjacent facets |
104 |
| - |
105 |
| -- preserved : percentage of preserved feature edge (between 2 different labels) |
| 78 | +- ignored : percentage of CAD lines not considered feature edges because of their low dihedral angle |
| 79 | +- sharp & lost : percentage of lost feature edges because the same direction (label) is assigned on the 2 adjacent facets |
| 80 | +- sharp & preserved : percentage of preserved feature edge (between 2 different labels) |
106 | 81 |
|
107 | 82 | "hex-mesh" group
|
108 | 83 |
|
109 | 84 | - min(SJ) : minimal (worse) per-hexahedron scaled jacobian
|
110 |
| - |
111 | 85 | - avg(SJ) : average per-hexahedron scaled jacobian
|
| 86 | +- open : open the 3D viewer. Screen Space Ambient Occlusion (SSAO) is off by default. |
112 | 87 |
|
113 |
| -- open : open the 3D viewer. Screen space Ambient Occlusion (SSAO) is off by default. |
114 |
| - |
115 |
| -# Comparison with PolyCut |
116 |
| - |
117 |
| -We wanted to compare our algorithm with PolyCut (Livesu et al. 2013). |
118 |
| -However, we were unable to successfully run the executable provided by the authors (polycut.exe). |
119 |
| -We did not get any output file and the logs were empty. |
120 |
| -Following executables in pipeline.bat failed and printed "Input file missing". |
121 |
| -We contacted the corresponding author and did not get an answer before the submission deadline. |
122 |
| - |
123 |
| -# Acknowledgment |
| 88 | +## Acknowledgment |
124 | 89 |
|
125 | 90 | The authors would like to thank contributors to the [AG Grid](https://github.com/ag-grid/ag-grid),
|
126 | 91 | [d3-sankey](https://github.com/d3/d3-sankey), [model-viewer](https://github.com/google/model-viewer)
|
127 | 92 | and [tinygltf](https://github.com/syoyo/tinygltf) libraries, as well as Khronos Group for the
|
128 | 93 | standardization of the [glTF](https://www.khronos.org/gltf/) file format.
|
129 | 94 |
|
130 |
| -Like our algorithm, data processing and the report generation will be made open-source. |
| 95 | +Like our algorithm, data processing and the report generation will be made open-source. |
| 96 | + |
| 97 | +--- |
| 98 | + |
| 99 | +[^polycut]: M. Livesu, N. Vining, A. Sheffer, J. Gregson and R. Scateni, « PolyCut: Monotone Graph-Cuts for PolyCube Base-Complex Construction », in _Proceedings of SIGGRAPH Asia_, ACM, 2013. doi:[10.1145/2508363.2508388](https://doi.org/10.1145/2508363.2508388) |
| 100 | + |
| 101 | +[^evocube]: C. Dumery, F. Protais, S. Mestrallet, C. Bourcier and F. Ledoux, « Evocube: a Genetic Labeling Framework for Polycube-Maps », vol. 41, nᵒ 6, p. 467‑479, 2022, doi: [10.1111/cgf.14649](https://doi.org/10.1111/cgf.14649) |
0 commit comments