OpenGeodeWeb-Back 5.6.6rc2__tar.gz → 5.7.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {opengeodeweb_back-5.6.6rc2/src/OpenGeodeWeb_Back.egg-info → opengeodeweb_back-5.7.0}/PKG-INFO +15 -15
- {opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/pyproject.toml +2 -1
- {opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/requirements.txt +14 -14
- {opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0/src/OpenGeodeWeb_Back.egg-info}/PKG-INFO +15 -15
- {opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/src/OpenGeodeWeb_Back.egg-info/SOURCES.txt +4 -0
- opengeodeweb_back-5.7.0/src/OpenGeodeWeb_Back.egg-info/requires.txt +28 -0
- {opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/src/opengeodeweb_back/routes/blueprint_routes.py +11 -1
- opengeodeweb_back-5.7.0/src/opengeodeweb_back/routes/models/blueprint_models.py +74 -0
- opengeodeweb_back-5.7.0/src/opengeodeweb_back/routes/models/schemas/mesh_components.json +20 -0
- opengeodeweb_back-5.7.0/src/opengeodeweb_back/routes/models/schemas/vtm_component_indices.json +16 -0
- opengeodeweb_back-5.7.0/tests/test_models_routes.py +30 -0
- opengeodeweb_back-5.6.6rc2/src/OpenGeodeWeb_Back.egg-info/requires.txt +0 -28
- {opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/LICENSE +0 -0
- {opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/README.md +0 -0
- {opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/setup.cfg +0 -0
- {opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/src/OpenGeodeWeb_Back.egg-info/dependency_links.txt +0 -0
- {opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/src/OpenGeodeWeb_Back.egg-info/top_level.txt +0 -0
- {opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/src/opengeodeweb_back/__init__.py +0 -0
- {opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/src/opengeodeweb_back/app_config.py +0 -0
- {opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/src/opengeodeweb_back/geode_functions.py +0 -0
- {opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/src/opengeodeweb_back/geode_objects.py +0 -0
- {opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/src/opengeodeweb_back/routes/schemas/allowed_files.json +0 -0
- {opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/src/opengeodeweb_back/routes/schemas/allowed_objects.json +0 -0
- {opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/src/opengeodeweb_back/routes/schemas/create_point.json +0 -0
- {opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/src/opengeodeweb_back/routes/schemas/geode_objects_and_output_extensions.json +0 -0
- {opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/src/opengeodeweb_back/routes/schemas/geographic_coordinate_systems.json +0 -0
- {opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/src/opengeodeweb_back/routes/schemas/inspect_file.json +0 -0
- {opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/src/opengeodeweb_back/routes/schemas/missing_files.json +0 -0
- {opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/src/opengeodeweb_back/routes/schemas/ping.json +0 -0
- {opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/src/opengeodeweb_back/routes/schemas/polygon_attribute_names.json +0 -0
- {opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/src/opengeodeweb_back/routes/schemas/polyhedron_attribute_names.json +0 -0
- {opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/src/opengeodeweb_back/routes/schemas/save_viewable_file.json +0 -0
- {opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/src/opengeodeweb_back/routes/schemas/texture_coordinates.json +0 -0
- {opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/src/opengeodeweb_back/routes/schemas/upload_file.json +0 -0
- {opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/src/opengeodeweb_back/routes/schemas/vertex_attribute_names.json +0 -0
- {opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/src/opengeodeweb_back/test_utils.py +0 -0
- {opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/src/opengeodeweb_back/utils_functions.py +0 -0
- {opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/tests/test_geode_functions.py +0 -0
- {opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/tests/test_routes.py +0 -0
- {opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/tests/test_utils_functions.py +0 -0
{opengeodeweb_back-5.6.6rc2/src/OpenGeodeWeb_Back.egg-info → opengeodeweb_back-5.7.0}/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: OpenGeodeWeb-Back
|
3
|
-
Version: 5.
|
3
|
+
Version: 5.7.0
|
4
4
|
Summary: OpenGeodeWeb-Back is an open source framework that proposes handy python functions and wrappers for the OpenGeode ecosystem
|
5
5
|
Author-email: Geode-solutions <team-web@geode-solutions.com>
|
6
6
|
Project-URL: Homepage, https://github.com/Geode-solutions/OpenGeodeWeb-Back
|
@@ -17,24 +17,24 @@ Requires-Dist: blinker==1.9.0
|
|
17
17
|
Requires-Dist: click==8.1.8
|
18
18
|
Requires-Dist: flask[async]==3.1.0
|
19
19
|
Requires-Dist: flask-cors==5.0.1
|
20
|
-
Requires-Dist: geode-background==9.
|
21
|
-
Requires-Dist: geode-common==33.7.
|
22
|
-
Requires-Dist: geode-conversion==6.2.
|
23
|
-
Requires-Dist: geode-explicit==6.1.
|
24
|
-
Requires-Dist: geode-implicit==3.7.
|
25
|
-
Requires-Dist: geode-numerics==6.0.
|
26
|
-
Requires-Dist: geode-simplex==9.2.
|
27
|
-
Requires-Dist: geode-viewables==3.
|
20
|
+
Requires-Dist: geode-background==9.2.3
|
21
|
+
Requires-Dist: geode-common==33.7.6
|
22
|
+
Requires-Dist: geode-conversion==6.2.11
|
23
|
+
Requires-Dist: geode-explicit==6.1.38
|
24
|
+
Requires-Dist: geode-implicit==3.7.8
|
25
|
+
Requires-Dist: geode-numerics==6.0.6
|
26
|
+
Requires-Dist: geode-simplex==9.2.8
|
27
|
+
Requires-Dist: geode-viewables==3.1.1
|
28
28
|
Requires-Dist: itsdangerous==2.2.0
|
29
29
|
Requires-Dist: jinja2==3.1.6
|
30
30
|
Requires-Dist: jsonschema==4.23.0
|
31
|
-
Requires-Dist: jsonschema-specifications==
|
31
|
+
Requires-Dist: jsonschema-specifications==2025.4.1
|
32
32
|
Requires-Dist: markupsafe==3.0.2
|
33
|
-
Requires-Dist: opengeode-core==15.17.
|
34
|
-
Requires-Dist: opengeode-geosciences==8.4.
|
35
|
-
Requires-Dist: opengeode-geosciencesio==5.3.
|
36
|
-
Requires-Dist: opengeode-inspector==6.
|
37
|
-
Requires-Dist: opengeode-io==7.
|
33
|
+
Requires-Dist: opengeode-core==15.17.14
|
34
|
+
Requires-Dist: opengeode-geosciences==8.4.6
|
35
|
+
Requires-Dist: opengeode-geosciencesio==5.3.9
|
36
|
+
Requires-Dist: opengeode-inspector==6.4.0
|
37
|
+
Requires-Dist: opengeode-io==7.2.0
|
38
38
|
Requires-Dist: referencing==0.36.2
|
39
39
|
Requires-Dist: rpds-py==0.24.0
|
40
40
|
Requires-Dist: typing-extensions==4.13.2
|
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
|
|
5
5
|
|
6
6
|
[project]
|
7
7
|
name = "OpenGeodeWeb-Back"
|
8
|
-
version = "5.
|
8
|
+
version = "5.7.0"
|
9
9
|
dynamic = ["dependencies"]
|
10
10
|
authors = [
|
11
11
|
{ name="Geode-solutions", email="team-web@geode-solutions.com" },
|
@@ -31,6 +31,7 @@ where = ["src"]
|
|
31
31
|
|
32
32
|
[tool.setuptools.package-data]
|
33
33
|
"opengeodeweb_back.routes.schemas" = ["*.json"]
|
34
|
+
"opengeodeweb_back.routes.models.schemas" = ["*.json"]
|
34
35
|
|
35
36
|
[tool.semantic_release]
|
36
37
|
version_toml = [
|
@@ -20,12 +20,12 @@ flask[async]==3.1.0
|
|
20
20
|
# flask-cors
|
21
21
|
flask-cors==5.0.1
|
22
22
|
# via -r requirements.in
|
23
|
-
geode-background==9.
|
23
|
+
geode-background==9.2.3
|
24
24
|
# via
|
25
25
|
# geode-explicit
|
26
26
|
# geode-implicit
|
27
27
|
# geode-simplex
|
28
|
-
geode-common==33.7.
|
28
|
+
geode-common==33.7.6
|
29
29
|
# via
|
30
30
|
# -r requirements.in
|
31
31
|
# geode-background
|
@@ -35,27 +35,27 @@ geode-common==33.7.2
|
|
35
35
|
# geode-numerics
|
36
36
|
# geode-simplex
|
37
37
|
# geode-viewables
|
38
|
-
geode-conversion==6.2.
|
38
|
+
geode-conversion==6.2.11
|
39
39
|
# via
|
40
40
|
# geode-explicit
|
41
41
|
# geode-implicit
|
42
42
|
# geode-simplex
|
43
|
-
geode-explicit==6.1.
|
43
|
+
geode-explicit==6.1.38
|
44
44
|
# via
|
45
45
|
# -r requirements.in
|
46
46
|
# geode-implicit
|
47
|
-
geode-implicit==3.7.
|
47
|
+
geode-implicit==3.7.8
|
48
48
|
# via -r requirements.in
|
49
|
-
geode-numerics==6.0.
|
49
|
+
geode-numerics==6.0.6
|
50
50
|
# via
|
51
51
|
# -r requirements.in
|
52
52
|
# geode-implicit
|
53
53
|
# geode-simplex
|
54
|
-
geode-simplex==9.2.
|
54
|
+
geode-simplex==9.2.8
|
55
55
|
# via
|
56
56
|
# -r requirements.in
|
57
57
|
# geode-implicit
|
58
|
-
geode-viewables==3.
|
58
|
+
geode-viewables==3.1.1
|
59
59
|
# via -r requirements.in
|
60
60
|
itsdangerous==2.2.0
|
61
61
|
# via flask
|
@@ -63,13 +63,13 @@ jinja2==3.1.6
|
|
63
63
|
# via flask
|
64
64
|
jsonschema==4.23.0
|
65
65
|
# via -r requirements.in
|
66
|
-
jsonschema-specifications==
|
66
|
+
jsonschema-specifications==2025.4.1
|
67
67
|
# via jsonschema
|
68
68
|
markupsafe==3.0.2
|
69
69
|
# via
|
70
70
|
# jinja2
|
71
71
|
# werkzeug
|
72
|
-
opengeode-core==15.17.
|
72
|
+
opengeode-core==15.17.14
|
73
73
|
# via
|
74
74
|
# -r requirements.in
|
75
75
|
# geode-background
|
@@ -84,23 +84,23 @@ opengeode-core==15.17.8
|
|
84
84
|
# opengeode-geosciencesio
|
85
85
|
# opengeode-inspector
|
86
86
|
# opengeode-io
|
87
|
-
opengeode-geosciences==8.4.
|
87
|
+
opengeode-geosciences==8.4.6
|
88
88
|
# via
|
89
89
|
# -r requirements.in
|
90
90
|
# geode-implicit
|
91
91
|
# geode-viewables
|
92
92
|
# opengeode-geosciencesio
|
93
|
-
opengeode-geosciencesio==5.3.
|
93
|
+
opengeode-geosciencesio==5.3.9
|
94
94
|
# via
|
95
95
|
# -r requirements.in
|
96
96
|
# geode-implicit
|
97
|
-
opengeode-inspector==6.
|
97
|
+
opengeode-inspector==6.4.0
|
98
98
|
# via
|
99
99
|
# -r requirements.in
|
100
100
|
# geode-explicit
|
101
101
|
# geode-implicit
|
102
102
|
# geode-simplex
|
103
|
-
opengeode-io==7.
|
103
|
+
opengeode-io==7.2.0
|
104
104
|
# via
|
105
105
|
# -r requirements.in
|
106
106
|
# geode-implicit
|
{opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0/src/OpenGeodeWeb_Back.egg-info}/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: OpenGeodeWeb-Back
|
3
|
-
Version: 5.
|
3
|
+
Version: 5.7.0
|
4
4
|
Summary: OpenGeodeWeb-Back is an open source framework that proposes handy python functions and wrappers for the OpenGeode ecosystem
|
5
5
|
Author-email: Geode-solutions <team-web@geode-solutions.com>
|
6
6
|
Project-URL: Homepage, https://github.com/Geode-solutions/OpenGeodeWeb-Back
|
@@ -17,24 +17,24 @@ Requires-Dist: blinker==1.9.0
|
|
17
17
|
Requires-Dist: click==8.1.8
|
18
18
|
Requires-Dist: flask[async]==3.1.0
|
19
19
|
Requires-Dist: flask-cors==5.0.1
|
20
|
-
Requires-Dist: geode-background==9.
|
21
|
-
Requires-Dist: geode-common==33.7.
|
22
|
-
Requires-Dist: geode-conversion==6.2.
|
23
|
-
Requires-Dist: geode-explicit==6.1.
|
24
|
-
Requires-Dist: geode-implicit==3.7.
|
25
|
-
Requires-Dist: geode-numerics==6.0.
|
26
|
-
Requires-Dist: geode-simplex==9.2.
|
27
|
-
Requires-Dist: geode-viewables==3.
|
20
|
+
Requires-Dist: geode-background==9.2.3
|
21
|
+
Requires-Dist: geode-common==33.7.6
|
22
|
+
Requires-Dist: geode-conversion==6.2.11
|
23
|
+
Requires-Dist: geode-explicit==6.1.38
|
24
|
+
Requires-Dist: geode-implicit==3.7.8
|
25
|
+
Requires-Dist: geode-numerics==6.0.6
|
26
|
+
Requires-Dist: geode-simplex==9.2.8
|
27
|
+
Requires-Dist: geode-viewables==3.1.1
|
28
28
|
Requires-Dist: itsdangerous==2.2.0
|
29
29
|
Requires-Dist: jinja2==3.1.6
|
30
30
|
Requires-Dist: jsonschema==4.23.0
|
31
|
-
Requires-Dist: jsonschema-specifications==
|
31
|
+
Requires-Dist: jsonschema-specifications==2025.4.1
|
32
32
|
Requires-Dist: markupsafe==3.0.2
|
33
|
-
Requires-Dist: opengeode-core==15.17.
|
34
|
-
Requires-Dist: opengeode-geosciences==8.4.
|
35
|
-
Requires-Dist: opengeode-geosciencesio==5.3.
|
36
|
-
Requires-Dist: opengeode-inspector==6.
|
37
|
-
Requires-Dist: opengeode-io==7.
|
33
|
+
Requires-Dist: opengeode-core==15.17.14
|
34
|
+
Requires-Dist: opengeode-geosciences==8.4.6
|
35
|
+
Requires-Dist: opengeode-geosciencesio==5.3.9
|
36
|
+
Requires-Dist: opengeode-inspector==6.4.0
|
37
|
+
Requires-Dist: opengeode-io==7.2.0
|
38
38
|
Requires-Dist: referencing==0.36.2
|
39
39
|
Requires-Dist: rpds-py==0.24.0
|
40
40
|
Requires-Dist: typing-extensions==4.13.2
|
{opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/src/OpenGeodeWeb_Back.egg-info/SOURCES.txt
RENAMED
@@ -14,6 +14,9 @@ src/opengeodeweb_back/geode_objects.py
|
|
14
14
|
src/opengeodeweb_back/test_utils.py
|
15
15
|
src/opengeodeweb_back/utils_functions.py
|
16
16
|
src/opengeodeweb_back/routes/blueprint_routes.py
|
17
|
+
src/opengeodeweb_back/routes/models/blueprint_models.py
|
18
|
+
src/opengeodeweb_back/routes/models/schemas/mesh_components.json
|
19
|
+
src/opengeodeweb_back/routes/models/schemas/vtm_component_indices.json
|
17
20
|
src/opengeodeweb_back/routes/schemas/allowed_files.json
|
18
21
|
src/opengeodeweb_back/routes/schemas/allowed_objects.json
|
19
22
|
src/opengeodeweb_back/routes/schemas/create_point.json
|
@@ -29,5 +32,6 @@ src/opengeodeweb_back/routes/schemas/texture_coordinates.json
|
|
29
32
|
src/opengeodeweb_back/routes/schemas/upload_file.json
|
30
33
|
src/opengeodeweb_back/routes/schemas/vertex_attribute_names.json
|
31
34
|
tests/test_geode_functions.py
|
35
|
+
tests/test_models_routes.py
|
32
36
|
tests/test_routes.py
|
33
37
|
tests/test_utils_functions.py
|
@@ -0,0 +1,28 @@
|
|
1
|
+
asgiref==3.8.1
|
2
|
+
attrs==25.3.0
|
3
|
+
blinker==1.9.0
|
4
|
+
click==8.1.8
|
5
|
+
flask[async]==3.1.0
|
6
|
+
flask-cors==5.0.1
|
7
|
+
geode-background==9.2.3
|
8
|
+
geode-common==33.7.6
|
9
|
+
geode-conversion==6.2.11
|
10
|
+
geode-explicit==6.1.38
|
11
|
+
geode-implicit==3.7.8
|
12
|
+
geode-numerics==6.0.6
|
13
|
+
geode-simplex==9.2.8
|
14
|
+
geode-viewables==3.1.1
|
15
|
+
itsdangerous==2.2.0
|
16
|
+
jinja2==3.1.6
|
17
|
+
jsonschema==4.23.0
|
18
|
+
jsonschema-specifications==2025.4.1
|
19
|
+
markupsafe==3.0.2
|
20
|
+
opengeode-core==15.17.14
|
21
|
+
opengeode-geosciences==8.4.6
|
22
|
+
opengeode-geosciencesio==5.3.9
|
23
|
+
opengeode-inspector==6.4.0
|
24
|
+
opengeode-io==7.2.0
|
25
|
+
referencing==0.36.2
|
26
|
+
rpds-py==0.24.0
|
27
|
+
typing-extensions==4.13.2
|
28
|
+
werkzeug==3.1.3
|
@@ -12,7 +12,9 @@ import werkzeug
|
|
12
12
|
# Local application imports
|
13
13
|
from .. import geode_functions, utils_functions
|
14
14
|
|
15
|
-
|
15
|
+
from .models import blueprint_models
|
16
|
+
|
17
|
+
routes = flask.Blueprint("routes", __name__, url_prefix="/opengeodeweb_back")
|
16
18
|
|
17
19
|
|
18
20
|
@routes.before_request
|
@@ -23,11 +25,19 @@ def before_request():
|
|
23
25
|
|
24
26
|
@routes.teardown_request
|
25
27
|
def teardown_request(exception):
|
28
|
+
|
26
29
|
if "ping" not in flask.request.path:
|
27
30
|
utils_functions.decrement_request_counter(flask.current_app)
|
28
31
|
utils_functions.update_last_request_time(flask.current_app)
|
29
32
|
|
30
33
|
|
34
|
+
routes.register_blueprint(
|
35
|
+
blueprint_models.routes,
|
36
|
+
url_prefix=blueprint_models.routes.url_prefix,
|
37
|
+
name=blueprint_models.routes.name,
|
38
|
+
)
|
39
|
+
|
40
|
+
|
31
41
|
schemas = os.path.join(os.path.dirname(__file__), "schemas")
|
32
42
|
|
33
43
|
with open(
|
@@ -0,0 +1,74 @@
|
|
1
|
+
import json
|
2
|
+
import os
|
3
|
+
import xml.etree.ElementTree as ET
|
4
|
+
import flask
|
5
|
+
from ... import geode_functions, utils_functions
|
6
|
+
|
7
|
+
routes = flask.Blueprint("models", __name__, url_prefix="/models")
|
8
|
+
|
9
|
+
|
10
|
+
schemas = os.path.join(os.path.dirname(__file__), "schemas")
|
11
|
+
|
12
|
+
with open(os.path.join(schemas, "vtm_component_indices.json"), "r") as file:
|
13
|
+
vtm_component_indices_json = json.load(file)
|
14
|
+
|
15
|
+
|
16
|
+
@routes.route(
|
17
|
+
vtm_component_indices_json["route"], methods=vtm_component_indices_json["methods"]
|
18
|
+
)
|
19
|
+
def uuid_to_flat_index():
|
20
|
+
|
21
|
+
print(f"uuid_to_flat_index : {flask.request=}", flush=True)
|
22
|
+
utils_functions.validate_request(flask.request, vtm_component_indices_json)
|
23
|
+
vtm_file_path = os.path.join(
|
24
|
+
flask.current_app.config["DATA_FOLDER_PATH"], flask.request.json["id"] + ".vtm"
|
25
|
+
)
|
26
|
+
|
27
|
+
tree = ET.parse(vtm_file_path)
|
28
|
+
root = tree.getroot()
|
29
|
+
uuid_to_flat_index = {}
|
30
|
+
current_index = 1
|
31
|
+
|
32
|
+
for elem in root.iter():
|
33
|
+
if "uuid" in elem.attrib and elem.tag == "DataSet":
|
34
|
+
uuid_to_flat_index[elem.attrib["uuid"]] = current_index
|
35
|
+
current_index += 1
|
36
|
+
|
37
|
+
return flask.make_response(
|
38
|
+
{"uuid_to_flat_index": uuid_to_flat_index},
|
39
|
+
200,
|
40
|
+
)
|
41
|
+
|
42
|
+
|
43
|
+
def extract_model_uuids(geode_object, file_path):
|
44
|
+
model = geode_functions.load(geode_object, file_path)
|
45
|
+
mesh_components = model.mesh_components()
|
46
|
+
|
47
|
+
uuid_dict = {}
|
48
|
+
|
49
|
+
for mesh_component, ids in mesh_components.items():
|
50
|
+
component_name = mesh_component.get()
|
51
|
+
uuid_dict[component_name] = [id.string() for id in ids]
|
52
|
+
|
53
|
+
return uuid_dict
|
54
|
+
|
55
|
+
|
56
|
+
with open(os.path.join(schemas, "mesh_components.json"), "r") as file:
|
57
|
+
mesh_components_json = json.load(file)
|
58
|
+
|
59
|
+
|
60
|
+
@routes.route(mesh_components_json["route"], methods=mesh_components_json["methods"])
|
61
|
+
def extract_uuids_endpoint():
|
62
|
+
print(f"extract_uuids_endpoint : {flask.request=}", flush=True)
|
63
|
+
|
64
|
+
utils_functions.validate_request(flask.request, mesh_components_json)
|
65
|
+
|
66
|
+
file_path = os.path.join(
|
67
|
+
flask.current_app.config["DATA_FOLDER_PATH"], flask.request.json["filename"]
|
68
|
+
)
|
69
|
+
|
70
|
+
if not os.path.exists(file_path):
|
71
|
+
return flask.make_response({"error": "File not found"}, 404)
|
72
|
+
|
73
|
+
uuid_dict = extract_model_uuids(flask.request.json["geode_object"], file_path)
|
74
|
+
return flask.make_response({"uuid_dict": uuid_dict}, 200)
|
@@ -0,0 +1,20 @@
|
|
1
|
+
{
|
2
|
+
"route": "/mesh_components",
|
3
|
+
"methods": [
|
4
|
+
"POST"
|
5
|
+
],
|
6
|
+
"type": "object",
|
7
|
+
"properties": {
|
8
|
+
"filename": {
|
9
|
+
"type": "string"
|
10
|
+
},
|
11
|
+
"geode_object": {
|
12
|
+
"type": "string"
|
13
|
+
}
|
14
|
+
},
|
15
|
+
"required": [
|
16
|
+
"filename",
|
17
|
+
"geode_object"
|
18
|
+
],
|
19
|
+
"additionalProperties": false
|
20
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
def test_model_mesh_components(client):
|
2
|
+
route = f"/models/vtm_component_indices"
|
3
|
+
get_full_data = lambda: {"id": "cube"}
|
4
|
+
json = get_full_data()
|
5
|
+
response = client.post(route, json=json)
|
6
|
+
assert response.status_code == 200
|
7
|
+
uuid_dict = response.json["uuid_to_flat_index"]
|
8
|
+
assert type(uuid_dict) is dict
|
9
|
+
|
10
|
+
indices = list(uuid_dict.values())
|
11
|
+
indices.sort()
|
12
|
+
assert indices[0] == 1
|
13
|
+
assert all(indices[i] == indices[i - 1] + 1 for i in range(1, len(indices)))
|
14
|
+
|
15
|
+
|
16
|
+
def test_extract_brep_uuids(client):
|
17
|
+
route = "/models/mesh_components"
|
18
|
+
json_data = {"filename": "cube.og_brep", "geode_object": "BRep"}
|
19
|
+
|
20
|
+
response = client.post(route, json=json_data)
|
21
|
+
|
22
|
+
assert response.status_code == 200
|
23
|
+
uuid_dict = response.json["uuid_dict"]
|
24
|
+
assert isinstance(uuid_dict, dict)
|
25
|
+
assert (
|
26
|
+
"Block" in uuid_dict
|
27
|
+
or "Line" in uuid_dict
|
28
|
+
or "Surface" in uuid_dict
|
29
|
+
or "Corner" in uuid_dict
|
30
|
+
)
|
@@ -1,28 +0,0 @@
|
|
1
|
-
asgiref==3.8.1
|
2
|
-
attrs==25.3.0
|
3
|
-
blinker==1.9.0
|
4
|
-
click==8.1.8
|
5
|
-
flask[async]==3.1.0
|
6
|
-
flask-cors==5.0.1
|
7
|
-
geode-background==9.1.5
|
8
|
-
geode-common==33.7.2
|
9
|
-
geode-conversion==6.2.7
|
10
|
-
geode-explicit==6.1.35
|
11
|
-
geode-implicit==3.7.4
|
12
|
-
geode-numerics==6.0.3
|
13
|
-
geode-simplex==9.2.5
|
14
|
-
geode-viewables==3.0.12
|
15
|
-
itsdangerous==2.2.0
|
16
|
-
jinja2==3.1.6
|
17
|
-
jsonschema==4.23.0
|
18
|
-
jsonschema-specifications==2024.10.1
|
19
|
-
markupsafe==3.0.2
|
20
|
-
opengeode-core==15.17.8
|
21
|
-
opengeode-geosciences==8.4.3
|
22
|
-
opengeode-geosciencesio==5.3.8
|
23
|
-
opengeode-inspector==6.3.11
|
24
|
-
opengeode-io==7.1.5
|
25
|
-
referencing==0.36.2
|
26
|
-
rpds-py==0.24.0
|
27
|
-
typing-extensions==4.13.2
|
28
|
-
werkzeug==3.1.3
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/src/OpenGeodeWeb_Back.egg-info/top_level.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
{opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/src/opengeodeweb_back/geode_functions.py
RENAMED
File without changes
|
{opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/src/opengeodeweb_back/geode_objects.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{opengeodeweb_back-5.6.6rc2 → opengeodeweb_back-5.7.0}/src/opengeodeweb_back/utils_functions.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|