OpenGeodeWeb-Back 4.0.0__tar.gz → 4.1.0rc1__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.
Files changed (26) hide show
  1. {OpenGeodeWeb-Back-4.0.0/src/OpenGeodeWeb_Back.egg-info → opengeodeweb_back-4.1.0rc1}/PKG-INFO +22 -26
  2. {OpenGeodeWeb-Back-4.0.0 → opengeodeweb_back-4.1.0rc1}/pyproject.toml +1 -1
  3. {OpenGeodeWeb-Back-4.0.0 → opengeodeweb_back-4.1.0rc1}/requirements.txt +23 -30
  4. {OpenGeodeWeb-Back-4.0.0 → opengeodeweb_back-4.1.0rc1/src/OpenGeodeWeb_Back.egg-info}/PKG-INFO +22 -26
  5. {OpenGeodeWeb-Back-4.0.0 → opengeodeweb_back-4.1.0rc1}/src/OpenGeodeWeb_Back.egg-info/SOURCES.txt +1 -1
  6. opengeodeweb_back-4.1.0rc1/src/OpenGeodeWeb_Back.egg-info/requires.txt +27 -0
  7. {OpenGeodeWeb-Back-4.0.0 → opengeodeweb_back-4.1.0rc1}/src/opengeodeweb_back/geode_functions.py +27 -1
  8. {OpenGeodeWeb-Back-4.0.0 → opengeodeweb_back-4.1.0rc1}/src/opengeodeweb_back/geode_objects.py +15 -15
  9. {OpenGeodeWeb-Back-4.0.0 → opengeodeweb_back-4.1.0rc1}/src/opengeodeweb_back/routes/blueprint_routes.py +25 -0
  10. opengeodeweb_back-4.1.0rc1/src/opengeodeweb_back/routes/schemas/inspect_file.json +15 -0
  11. {OpenGeodeWeb-Back-4.0.0 → opengeodeweb_back-4.1.0rc1}/tests/test_functions.py +51 -11
  12. {OpenGeodeWeb-Back-4.0.0 → opengeodeweb_back-4.1.0rc1}/tests/test_routes.py +26 -0
  13. OpenGeodeWeb-Back-4.0.0/src/OpenGeodeWeb_Back.egg-info/requires.txt +0 -31
  14. OpenGeodeWeb-Back-4.0.0/src/opengeodeweb_back/inspector_functions.py +0 -483
  15. {OpenGeodeWeb-Back-4.0.0 → opengeodeweb_back-4.1.0rc1}/LICENSE +0 -0
  16. {OpenGeodeWeb-Back-4.0.0 → opengeodeweb_back-4.1.0rc1}/README.md +0 -0
  17. {OpenGeodeWeb-Back-4.0.0 → opengeodeweb_back-4.1.0rc1}/setup.cfg +0 -0
  18. {OpenGeodeWeb-Back-4.0.0 → opengeodeweb_back-4.1.0rc1}/src/OpenGeodeWeb_Back.egg-info/dependency_links.txt +0 -0
  19. {OpenGeodeWeb-Back-4.0.0 → opengeodeweb_back-4.1.0rc1}/src/OpenGeodeWeb_Back.egg-info/top_level.txt +0 -0
  20. {OpenGeodeWeb-Back-4.0.0 → opengeodeweb_back-4.1.0rc1}/src/opengeodeweb_back/__init__.py +0 -0
  21. {OpenGeodeWeb-Back-4.0.0 → opengeodeweb_back-4.1.0rc1}/src/opengeodeweb_back/routes/schemas/allowed_files.json +0 -0
  22. {OpenGeodeWeb-Back-4.0.0 → opengeodeweb_back-4.1.0rc1}/src/opengeodeweb_back/routes/schemas/allowed_objects.json +0 -0
  23. {OpenGeodeWeb-Back-4.0.0 → opengeodeweb_back-4.1.0rc1}/src/opengeodeweb_back/routes/schemas/geode_objects_and_output_extensions.json +0 -0
  24. {OpenGeodeWeb-Back-4.0.0 → opengeodeweb_back-4.1.0rc1}/src/opengeodeweb_back/routes/schemas/geographic_coordinate_systems.json +0 -0
  25. {OpenGeodeWeb-Back-4.0.0 → opengeodeweb_back-4.1.0rc1}/src/opengeodeweb_back/routes/schemas/missing_files.json +0 -0
  26. {OpenGeodeWeb-Back-4.0.0 → opengeodeweb_back-4.1.0rc1}/src/opengeodeweb_back/routes/schemas/upload_file.json +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: OpenGeodeWeb-Back
3
- Version: 4.0.0
3
+ Version: 4.1.0rc1
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
@@ -11,37 +11,33 @@ Classifier: Operating System :: OS Independent
11
11
  Requires-Python: >=3.8
12
12
  Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
- Requires-Dist: asgiref==3.7.2
14
+ Requires-Dist: asgiref==3.8.1
15
15
  Requires-Dist: attrs==23.2.0
16
- Requires-Dist: blinker==1.7.0
16
+ Requires-Dist: blinker==1.8.1
17
17
  Requires-Dist: click==8.1.7
18
- Requires-Dist: colorama==0.4.6
19
- Requires-Dist: flask[async]==3.0.1
18
+ Requires-Dist: flask[async]==3.0.3
20
19
  Requires-Dist: flask-cors==4.0.0
21
- Requires-Dist: geode-background==7.7.1
22
- Requires-Dist: geode-common==30.1.2
23
- Requires-Dist: geode-conversion==5.2.1
24
- Requires-Dist: geode-explicit==4.4.3
25
- Requires-Dist: geode-implicit==2.6.1
26
- Requires-Dist: geode-numerics==4.3.0
27
- Requires-Dist: geode-simplex==6.5.1
28
- Requires-Dist: geode-viewables==2.2.0
29
- Requires-Dist: importlib-metadata==7.0.1
30
- Requires-Dist: itsdangerous==2.1.2
20
+ Requires-Dist: geode-background==7.9.8
21
+ Requires-Dist: geode-common==31.0.8
22
+ Requires-Dist: geode-conversion==5.2.8
23
+ Requires-Dist: geode-explicit==4.7.5
24
+ Requires-Dist: geode-implicit==2.8.6
25
+ Requires-Dist: geode-numerics==4.3.3
26
+ Requires-Dist: geode-simplex==6.7.4
27
+ Requires-Dist: geode-viewables==2.2.2
28
+ Requires-Dist: itsdangerous==2.2.0
31
29
  Requires-Dist: jinja2==3.1.3
32
30
  Requires-Dist: jsonschema==4.21.1
33
31
  Requires-Dist: jsonschema-specifications==2023.12.1
34
- Requires-Dist: markupsafe==2.1.4
35
- Requires-Dist: opengeode-core==14.13.2
36
- Requires-Dist: opengeode-geosciences==7.4.0
37
- Requires-Dist: opengeode-geosciencesio==4.6.0
38
- Requires-Dist: opengeode-inspector==4.0.6
39
- Requires-Dist: opengeode-io==6.4.0
40
- Requires-Dist: referencing==0.33.0
41
- Requires-Dist: rpds-py==0.17.1
42
- Requires-Dist: typing-extensions==4.9.0
43
- Requires-Dist: werkzeug==3.0.1
44
- Requires-Dist: zipp==3.17.0
32
+ Requires-Dist: markupsafe==2.1.5
33
+ Requires-Dist: opengeode-core==14.19.2
34
+ Requires-Dist: opengeode-geosciences==7.6.4
35
+ Requires-Dist: opengeode-geosciencesio==4.7.6
36
+ Requires-Dist: opengeode-inspector==5.1.3
37
+ Requires-Dist: opengeode-io==6.5.1
38
+ Requires-Dist: referencing==0.35.0
39
+ Requires-Dist: rpds-py==0.18.0
40
+ Requires-Dist: werkzeug==3.0.2
45
41
 
46
42
  <h1 align="center">OpenGeodeWeb-Back<sup><i>by Geode-solutions</i></sup></h1>
47
43
  <h3 align="center">OpenSource Python framework based on OpenGeode</h3>
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
 
6
6
  [project]
7
7
  name = "OpenGeodeWeb-Back"
8
- version = "4.0.0"
8
+ version = "4.1.0-rc.1"
9
9
  dynamic = ["dependencies"]
10
10
  authors = [
11
11
  { name="Geode-solutions", email="team-web@geode-solutions.com" },
@@ -1,33 +1,31 @@
1
1
  #
2
- # This file is autogenerated by pip-compile with Python 3.9
2
+ # This file is autogenerated by pip-compile with Python 3.11
3
3
  # by the following command:
4
4
  #
5
5
  # pip-compile requirements.in
6
6
  #
7
- asgiref==3.7.2
7
+ asgiref==3.8.1
8
8
  # via flask
9
9
  attrs==23.2.0
10
10
  # via
11
11
  # jsonschema
12
12
  # referencing
13
- blinker==1.7.0
13
+ blinker==1.8.1
14
14
  # via flask
15
15
  click==8.1.7
16
16
  # via flask
17
- colorama==0.4.6
18
- # via click
19
- flask[async]==3.0.1
17
+ flask[async]==3.0.3
20
18
  # via
21
19
  # -r requirements.in
22
20
  # flask-cors
23
21
  flask-cors==4.0.0
24
22
  # via -r requirements.in
25
- geode-background==7.7.1
23
+ geode-background==7.9.8
26
24
  # via
27
25
  # geode-explicit
28
26
  # geode-implicit
29
27
  # geode-simplex
30
- geode-common==30.1.2
28
+ geode-common==31.0.8
31
29
  # via
32
30
  # -r requirements.in
33
31
  # geode-background
@@ -36,28 +34,26 @@ geode-common==30.1.2
36
34
  # geode-numerics
37
35
  # geode-simplex
38
36
  # geode-viewables
39
- geode-conversion==5.2.1
37
+ geode-conversion==5.2.8
40
38
  # via
41
39
  # geode-explicit
42
40
  # geode-implicit
43
- geode-explicit==4.4.3
41
+ geode-explicit==4.7.5
44
42
  # via
45
43
  # -r requirements.in
46
44
  # geode-implicit
47
- geode-implicit==2.6.1
45
+ geode-implicit==2.8.6
48
46
  # via -r requirements.in
49
- geode-numerics==4.3.0
47
+ geode-numerics==4.3.3
50
48
  # via
51
49
  # -r requirements.in
52
50
  # geode-implicit
53
51
  # geode-simplex
54
- geode-simplex==6.5.1
52
+ geode-simplex==6.7.4
55
53
  # via -r requirements.in
56
- geode-viewables==2.2.0
54
+ geode-viewables==2.2.2
57
55
  # via -r requirements.in
58
- importlib-metadata==7.0.1
59
- # via flask
60
- itsdangerous==2.1.2
56
+ itsdangerous==2.2.0
61
57
  # via flask
62
58
  jinja2==3.1.3
63
59
  # via flask
@@ -65,11 +61,11 @@ jsonschema==4.21.1
65
61
  # via -r requirements.in
66
62
  jsonschema-specifications==2023.12.1
67
63
  # via jsonschema
68
- markupsafe==2.1.4
64
+ markupsafe==2.1.5
69
65
  # via
70
66
  # jinja2
71
67
  # werkzeug
72
- opengeode-core==14.13.2
68
+ opengeode-core==14.19.2
73
69
  # via
74
70
  # -r requirements.in
75
71
  # geode-background
@@ -84,40 +80,37 @@ opengeode-core==14.13.2
84
80
  # opengeode-geosciencesio
85
81
  # opengeode-inspector
86
82
  # opengeode-io
87
- opengeode-geosciences==7.4.0
83
+ opengeode-geosciences==7.6.4
88
84
  # via
89
85
  # -r requirements.in
90
86
  # geode-implicit
91
87
  # geode-viewables
92
88
  # opengeode-geosciencesio
93
- opengeode-geosciencesio==4.6.0
89
+ opengeode-geosciencesio==4.7.6
94
90
  # via
95
91
  # -r requirements.in
96
92
  # geode-implicit
97
- opengeode-inspector==4.0.6
93
+ opengeode-inspector==5.1.3
98
94
  # via
99
95
  # -r requirements.in
100
96
  # geode-explicit
101
97
  # geode-implicit
102
- opengeode-io==6.4.0
98
+ # geode-simplex
99
+ opengeode-io==6.5.1
103
100
  # via
104
101
  # -r requirements.in
105
102
  # geode-implicit
106
103
  # geode-viewables
107
104
  # opengeode-geosciencesio
108
- referencing==0.33.0
105
+ referencing==0.35.0
109
106
  # via
110
107
  # jsonschema
111
108
  # jsonschema-specifications
112
- rpds-py==0.17.1
109
+ rpds-py==0.18.0
113
110
  # via
114
111
  # jsonschema
115
112
  # referencing
116
- typing-extensions==4.9.0
117
- # via asgiref
118
- werkzeug==3.0.1
113
+ werkzeug==3.0.2
119
114
  # via
120
115
  # -r requirements.in
121
116
  # flask
122
- zipp==3.17.0
123
- # via importlib-metadata
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: OpenGeodeWeb-Back
3
- Version: 4.0.0
3
+ Version: 4.1.0rc1
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
@@ -11,37 +11,33 @@ Classifier: Operating System :: OS Independent
11
11
  Requires-Python: >=3.8
12
12
  Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
- Requires-Dist: asgiref==3.7.2
14
+ Requires-Dist: asgiref==3.8.1
15
15
  Requires-Dist: attrs==23.2.0
16
- Requires-Dist: blinker==1.7.0
16
+ Requires-Dist: blinker==1.8.1
17
17
  Requires-Dist: click==8.1.7
18
- Requires-Dist: colorama==0.4.6
19
- Requires-Dist: flask[async]==3.0.1
18
+ Requires-Dist: flask[async]==3.0.3
20
19
  Requires-Dist: flask-cors==4.0.0
21
- Requires-Dist: geode-background==7.7.1
22
- Requires-Dist: geode-common==30.1.2
23
- Requires-Dist: geode-conversion==5.2.1
24
- Requires-Dist: geode-explicit==4.4.3
25
- Requires-Dist: geode-implicit==2.6.1
26
- Requires-Dist: geode-numerics==4.3.0
27
- Requires-Dist: geode-simplex==6.5.1
28
- Requires-Dist: geode-viewables==2.2.0
29
- Requires-Dist: importlib-metadata==7.0.1
30
- Requires-Dist: itsdangerous==2.1.2
20
+ Requires-Dist: geode-background==7.9.8
21
+ Requires-Dist: geode-common==31.0.8
22
+ Requires-Dist: geode-conversion==5.2.8
23
+ Requires-Dist: geode-explicit==4.7.5
24
+ Requires-Dist: geode-implicit==2.8.6
25
+ Requires-Dist: geode-numerics==4.3.3
26
+ Requires-Dist: geode-simplex==6.7.4
27
+ Requires-Dist: geode-viewables==2.2.2
28
+ Requires-Dist: itsdangerous==2.2.0
31
29
  Requires-Dist: jinja2==3.1.3
32
30
  Requires-Dist: jsonschema==4.21.1
33
31
  Requires-Dist: jsonschema-specifications==2023.12.1
34
- Requires-Dist: markupsafe==2.1.4
35
- Requires-Dist: opengeode-core==14.13.2
36
- Requires-Dist: opengeode-geosciences==7.4.0
37
- Requires-Dist: opengeode-geosciencesio==4.6.0
38
- Requires-Dist: opengeode-inspector==4.0.6
39
- Requires-Dist: opengeode-io==6.4.0
40
- Requires-Dist: referencing==0.33.0
41
- Requires-Dist: rpds-py==0.17.1
42
- Requires-Dist: typing-extensions==4.9.0
43
- Requires-Dist: werkzeug==3.0.1
44
- Requires-Dist: zipp==3.17.0
32
+ Requires-Dist: markupsafe==2.1.5
33
+ Requires-Dist: opengeode-core==14.19.2
34
+ Requires-Dist: opengeode-geosciences==7.6.4
35
+ Requires-Dist: opengeode-geosciencesio==4.7.6
36
+ Requires-Dist: opengeode-inspector==5.1.3
37
+ Requires-Dist: opengeode-io==6.5.1
38
+ Requires-Dist: referencing==0.35.0
39
+ Requires-Dist: rpds-py==0.18.0
40
+ Requires-Dist: werkzeug==3.0.2
45
41
 
46
42
  <h1 align="center">OpenGeodeWeb-Back<sup><i>by Geode-solutions</i></sup></h1>
47
43
  <h3 align="center">OpenSource Python framework based on OpenGeode</h3>
@@ -10,12 +10,12 @@ src/OpenGeodeWeb_Back.egg-info/top_level.txt
10
10
  src/opengeodeweb_back/__init__.py
11
11
  src/opengeodeweb_back/geode_functions.py
12
12
  src/opengeodeweb_back/geode_objects.py
13
- src/opengeodeweb_back/inspector_functions.py
14
13
  src/opengeodeweb_back/routes/blueprint_routes.py
15
14
  src/opengeodeweb_back/routes/schemas/allowed_files.json
16
15
  src/opengeodeweb_back/routes/schemas/allowed_objects.json
17
16
  src/opengeodeweb_back/routes/schemas/geode_objects_and_output_extensions.json
18
17
  src/opengeodeweb_back/routes/schemas/geographic_coordinate_systems.json
18
+ src/opengeodeweb_back/routes/schemas/inspect_file.json
19
19
  src/opengeodeweb_back/routes/schemas/missing_files.json
20
20
  src/opengeodeweb_back/routes/schemas/upload_file.json
21
21
  tests/test_functions.py
@@ -0,0 +1,27 @@
1
+ asgiref==3.8.1
2
+ attrs==23.2.0
3
+ blinker==1.8.1
4
+ click==8.1.7
5
+ flask[async]==3.0.3
6
+ flask-cors==4.0.0
7
+ geode-background==7.9.8
8
+ geode-common==31.0.8
9
+ geode-conversion==5.2.8
10
+ geode-explicit==4.7.5
11
+ geode-implicit==2.8.6
12
+ geode-numerics==4.3.3
13
+ geode-simplex==6.7.4
14
+ geode-viewables==2.2.2
15
+ itsdangerous==2.2.0
16
+ jinja2==3.1.3
17
+ jsonschema==4.21.1
18
+ jsonschema-specifications==2023.12.1
19
+ markupsafe==2.1.5
20
+ opengeode-core==14.19.2
21
+ opengeode-geosciences==7.6.4
22
+ opengeode-geosciencesio==4.7.6
23
+ opengeode-inspector==5.1.3
24
+ opengeode-io==6.5.1
25
+ referencing==0.35.0
26
+ rpds-py==0.18.0
27
+ werkzeug==3.0.2
@@ -90,7 +90,7 @@ def is_viewable(geode_object: str):
90
90
  return geode_object_value(geode_object)["is_viewable"]
91
91
 
92
92
 
93
- def inspector(geode_object: str, data):
93
+ def inspect(geode_object: str, data):
94
94
  return geode_object_value(geode_object)["inspector"](data)
95
95
 
96
96
 
@@ -174,6 +174,32 @@ def geode_objects_output_extensions(geode_object: str, data):
174
174
  return geode_objects_output_extensions_dict
175
175
 
176
176
 
177
+ def get_inspector_children(obj):
178
+ new_object = {}
179
+
180
+ if "inspection_type" in dir(obj):
181
+ new_object["title"] = obj.inspection_type()
182
+ new_object["nb_issues"] = 0
183
+ new_object["children"] = []
184
+ for child in dir(obj):
185
+ if not child.startswith("__") and not child in [
186
+ "inspection_type",
187
+ "string",
188
+ ]:
189
+ child_instance = obj.__getattribute__(child)
190
+ child_object = get_inspector_children(child_instance)
191
+ new_object["children"].append(child_object)
192
+ new_object["nb_issues"] += child_object["nb_issues"]
193
+ else:
194
+ new_object["title"] = obj.description()
195
+ nb_issues = obj.nb_issues()
196
+ new_object["nb_issues"] = nb_issues
197
+ if nb_issues > 0:
198
+ issues = obj.string().split("\n")
199
+ new_object["issues"] = issues
200
+ return new_object
201
+
202
+
177
203
  def versions(list_packages: list):
178
204
  list_with_versions = []
179
205
  for package in list_packages:
@@ -26,7 +26,7 @@ def geode_objects_dict():
26
26
  "is_3D": True,
27
27
  "is_viewable": True,
28
28
  "save_viewable": g_v.save_viewable_brep,
29
- "inspector": og_inspector.BRepInspector,
29
+ "inspector": og_inspector.inspect_brep,
30
30
  },
31
31
  "CrossSection": {
32
32
  "parent": "Section",
@@ -47,7 +47,7 @@ def geode_objects_dict():
47
47
  "is_3D": False,
48
48
  "is_viewable": True,
49
49
  "save_viewable": g_v.save_viewable_cross_section,
50
- "inspector": og_inspector.SectionInspector,
50
+ "inspector": og_inspector.inspect_section,
51
51
  },
52
52
  "EdgedCurve2D": {
53
53
  "input_factory": og.EdgedCurveInputFactory2D,
@@ -67,7 +67,7 @@ def geode_objects_dict():
67
67
  "is_3D": False,
68
68
  "is_viewable": True,
69
69
  "save_viewable": g_v.save_viewable_edged_curve2D,
70
- "inspector": og_inspector.EdgedCurveInspector2D,
70
+ "inspector": og_inspector.inspect_edgedcurve2D,
71
71
  },
72
72
  "EdgedCurve3D": {
73
73
  "input_factory": og.EdgedCurveInputFactory3D,
@@ -87,7 +87,7 @@ def geode_objects_dict():
87
87
  "is_3D": True,
88
88
  "is_viewable": True,
89
89
  "save_viewable": g_v.save_viewable_edged_curve3D,
90
- "inspector": og_inspector.EdgedCurveInspector3D,
90
+ "inspector": og_inspector.inspect_edgedcurve3D,
91
91
  },
92
92
  "Graph": {
93
93
  "input_factory": og.GraphInputFactory,
@@ -120,7 +120,7 @@ def geode_objects_dict():
120
120
  "is_3D": True,
121
121
  "is_viewable": True,
122
122
  "save_viewable": g_v.save_viewable_hybrid_solid3D,
123
- "inspector": og_inspector.SolidMeshInspector3D,
123
+ "inspector": og_inspector.inspect_solid3D,
124
124
  },
125
125
  "LightRegularGrid2D": {
126
126
  "input_factory": og.LightRegularGridInputFactory2D,
@@ -166,7 +166,7 @@ def geode_objects_dict():
166
166
  "is_3D": False,
167
167
  "is_viewable": True,
168
168
  "save_viewable": g_v.save_viewable_point_set2D,
169
- "inspector": og_inspector.PointSetInspector2D,
169
+ "inspector": og_inspector.inspect_pointset2D,
170
170
  },
171
171
  "PointSet3D": {
172
172
  "input_factory": og.PointSetInputFactory3D,
@@ -186,7 +186,7 @@ def geode_objects_dict():
186
186
  "is_3D": True,
187
187
  "is_viewable": True,
188
188
  "save_viewable": g_v.save_viewable_point_set3D,
189
- "inspector": og_inspector.PointSetInspector3D,
189
+ "inspector": og_inspector.inspect_pointset3D,
190
190
  },
191
191
  "PolygonalSurface2D": {
192
192
  "input_factory": og.PolygonalSurfaceInputFactory2D,
@@ -206,7 +206,7 @@ def geode_objects_dict():
206
206
  "is_3D": False,
207
207
  "is_viewable": True,
208
208
  "save_viewable": g_v.save_viewable_polygonal_surface2D,
209
- "inspector": og_inspector.SurfaceMeshInspector2D,
209
+ "inspector": og_inspector.inspect_surface2D,
210
210
  },
211
211
  "PolygonalSurface3D": {
212
212
  "input_factory": og.PolygonalSurfaceInputFactory3D,
@@ -226,7 +226,7 @@ def geode_objects_dict():
226
226
  "is_3D": True,
227
227
  "is_viewable": True,
228
228
  "save_viewable": g_v.save_viewable_polygonal_surface3D,
229
- "inspector": og_inspector.SurfaceMeshInspector3D,
229
+ "inspector": og_inspector.inspect_surface3D,
230
230
  },
231
231
  "PolyhedralSolid3D": {
232
232
  "input_factory": og.PolyhedralSolidInputFactory3D,
@@ -246,7 +246,7 @@ def geode_objects_dict():
246
246
  "is_3D": True,
247
247
  "is_viewable": True,
248
248
  "save_viewable": g_v.save_viewable_polyhedral_solid3D,
249
- "inspector": og_inspector.SolidMeshInspector3D,
249
+ "inspector": og_inspector.inspect_solid3D,
250
250
  },
251
251
  "RasterImage2D": {
252
252
  "input_factory": og.RasterImageInputFactory2D,
@@ -330,7 +330,7 @@ def geode_objects_dict():
330
330
  "is_3D": False,
331
331
  "is_viewable": True,
332
332
  "save_viewable": g_v.save_viewable_section,
333
- "inspector": og_inspector.SectionInspector,
333
+ "inspector": og_inspector.inspect_section,
334
334
  },
335
335
  "StructuralModel": {
336
336
  "parent": "BRep",
@@ -351,7 +351,7 @@ def geode_objects_dict():
351
351
  "is_3D": True,
352
352
  "is_viewable": True,
353
353
  "save_viewable": g_v.save_viewable_structural_model,
354
- "inspector": og_inspector.BRepInspector,
354
+ "inspector": og_inspector.inspect_brep,
355
355
  },
356
356
  "TetrahedralSolid3D": {
357
357
  "input_factory": og.TetrahedralSolidInputFactory3D,
@@ -371,7 +371,7 @@ def geode_objects_dict():
371
371
  "is_3D": True,
372
372
  "is_viewable": True,
373
373
  "save_viewable": g_v.save_viewable_tetrahedral_solid3D,
374
- "inspector": og_inspector.SolidMeshInspector3D,
374
+ "inspector": og_inspector.inspect_solid3D,
375
375
  },
376
376
  "TriangulatedSurface2D": {
377
377
  "input_factory": og.TriangulatedSurfaceInputFactory2D,
@@ -391,7 +391,7 @@ def geode_objects_dict():
391
391
  "is_3D": False,
392
392
  "is_viewable": True,
393
393
  "save_viewable": g_v.save_viewable_triangulated_surface2D,
394
- "inspector": og_inspector.TriangulatedSurfaceInspector2D,
394
+ "inspector": og_inspector.inspect_triangulated_surface2D,
395
395
  },
396
396
  "TriangulatedSurface3D": {
397
397
  "input_factory": og.TriangulatedSurfaceInputFactory3D,
@@ -411,7 +411,7 @@ def geode_objects_dict():
411
411
  "is_3D": True,
412
412
  "is_viewable": True,
413
413
  "save_viewable": g_v.save_viewable_triangulated_surface3D,
414
- "inspector": og_inspector.TriangulatedSurfaceInspector3D,
414
+ "inspector": og_inspector.inspect_triangulated_surface3D,
415
415
  },
416
416
  "VertexSet": {
417
417
  "input_factory": og.VertexSetInputFactory,
@@ -150,6 +150,31 @@ def crs_converter_geographic_coordinate_systems():
150
150
  return flask.make_response({"crs_list": crs_list}, 200)
151
151
 
152
152
 
153
+ with open(
154
+ os.path.join(schemas, "inspect_file.json"),
155
+ "r",
156
+ ) as file:
157
+ inspect_file_json = json.load(file)
158
+
159
+
160
+ @routes.route(
161
+ inspect_file_json["route"],
162
+ methods=inspect_file_json["methods"],
163
+ )
164
+ def inspect_file():
165
+ UPLOAD_FOLDER = flask.current_app.config["UPLOAD_FOLDER"]
166
+ geode_functions.validate_request(flask.request, inspect_file_json)
167
+
168
+ secure_filename = werkzeug.utils.secure_filename(flask.request.json["filename"])
169
+ file_path = os.path.abspath(os.path.join(UPLOAD_FOLDER, secure_filename))
170
+ data = geode_functions.load(flask.request.json["input_geode_object"], file_path)
171
+ class_inspector = geode_functions.inspect(
172
+ flask.request.json["input_geode_object"], data
173
+ )
174
+ inspection_result = geode_functions.get_inspector_children(class_inspector)
175
+ return flask.make_response({"inspection_result": inspection_result}, 200)
176
+
177
+
153
178
  with open(
154
179
  os.path.join(schemas, "geode_objects_and_output_extensions.json"),
155
180
  "r",
@@ -0,0 +1,15 @@
1
+ {
2
+ "route": "/inspect_file",
3
+ "methods": ["POST"],
4
+ "type": "object",
5
+ "properties": {
6
+ "filename": {
7
+ "type": "string"
8
+ },
9
+ "input_geode_object": {
10
+ "type": "string"
11
+ }
12
+ },
13
+ "required": ["filename", "input_geode_object"],
14
+ "additionalProperties": false
15
+ }
@@ -3,6 +3,9 @@ import uuid
3
3
  from src.opengeodeweb_back import geode_functions, geode_objects
4
4
 
5
5
 
6
+ data_folder = os.path.join(os.path.dirname(__file__), "data")
7
+
8
+
6
9
  def test_geode_object_value():
7
10
  for geode_object, value in geode_objects.geode_objects_dict().items():
8
11
  geode_object_value = geode_functions.geode_object_value(geode_object)
@@ -39,7 +42,7 @@ def test_missing_files():
39
42
  for geode_object, value in geode_objects.geode_objects_dict().items():
40
43
  input_extensions = geode_functions.geode_object_input_extensions(geode_object)
41
44
  for input_extension in input_extensions:
42
- file_absolute_path = os.path.abspath(f"tests/data/test.{input_extension}")
45
+ file_absolute_path = os.path.join(data_folder, f"test.{input_extension}")
43
46
  missing_files = geode_functions.missing_files(
44
47
  geode_object, file_absolute_path
45
48
  )
@@ -55,7 +58,7 @@ def test_is_loadable():
55
58
  for geode_object, value in geode_objects.geode_objects_dict().items():
56
59
  input_extensions = geode_functions.geode_object_input_extensions(geode_object)
57
60
  for input_extension in input_extensions:
58
- file_absolute_path = os.path.abspath(f"tests/data/test.{input_extension}")
61
+ file_absolute_path = os.path.join(data_folder, f"test.{input_extension}")
59
62
  is_loadable = geode_functions.is_loadable(geode_object, file_absolute_path)
60
63
  assert type(is_loadable) is bool
61
64
 
@@ -66,8 +69,9 @@ def test_load():
66
69
  input_extensions = geode_functions.geode_object_input_extensions(geode_object)
67
70
  for input_extension in input_extensions:
68
71
  print(f"\t{input_extension=}")
72
+ file_absolute_path = os.path.join(data_folder, f"test.{input_extension}")
69
73
  missing_files = geode_functions.missing_files(
70
- geode_object, f"tests/data/test.{input_extension}"
74
+ geode_object, file_absolute_path
71
75
  )
72
76
  has_missing_files = missing_files.has_missing_files()
73
77
  if has_missing_files:
@@ -75,9 +79,8 @@ def test_load():
75
79
  print(f"\t\t{mandatory_files=}")
76
80
  additional_files = missing_files.additional_files
77
81
  print(f"\t\t{additional_files=}")
78
- file_apsolute_path = os.path.abspath(f"tests/data/test.{input_extension}")
79
- if geode_functions.is_loadable(geode_object, file_apsolute_path):
80
- data = geode_functions.load(geode_object, file_apsolute_path)
82
+ if geode_functions.is_loadable(geode_object, file_absolute_path):
83
+ data = geode_functions.load(geode_object, file_absolute_path)
81
84
  if "save_viewable" in value:
82
85
  uu_id = str(uuid.uuid4()).replace("-", "")
83
86
  viewable_file_path = geode_functions.save_viewable(
@@ -149,8 +152,9 @@ def test_geode_object_output_extensions():
149
152
  input_extensions = geode_functions.geode_object_input_extensions(geode_object)
150
153
  for input_extension in input_extensions:
151
154
  print(f"\t{input_extension=}")
155
+ file_absolute_path = os.path.join(data_folder, f"test.{input_extension}")
152
156
  missing_files = geode_functions.missing_files(
153
- geode_object, f"tests/data/test.{input_extension}"
157
+ geode_object, file_absolute_path
154
158
  )
155
159
  has_missing_files = missing_files.has_missing_files()
156
160
  if has_missing_files:
@@ -158,7 +162,7 @@ def test_geode_object_output_extensions():
158
162
  print(f"\t\t{mandatory_files=}")
159
163
  additional_files = missing_files.additional_files
160
164
  print(f"\t\t{additional_files=}")
161
- file_absolute_path = os.path.abspath(f"tests/data/test.{input_extension}")
165
+ file_absolute_path = os.path.join(data_folder, f"test.{input_extension}")
162
166
  if geode_functions.is_loadable(geode_object, file_absolute_path):
163
167
  data = geode_functions.load(geode_object, file_absolute_path)
164
168
  geode_objets_and_output_extensions = (
@@ -177,6 +181,42 @@ def test_geode_object_output_extensions():
177
181
  assert type(output_extension_value["is_saveable"]) is bool
178
182
 
179
183
 
184
+ def test_get_inspector_children():
185
+ for geode_object, value in geode_objects.geode_objects_dict().items():
186
+ if "inspector" in value:
187
+ print(f"\n{geode_object=}", flush=True)
188
+ input_extensions = geode_functions.geode_object_input_extensions(
189
+ geode_object
190
+ )
191
+ for input_extension in input_extensions:
192
+ print(f"\t{input_extension=}", flush=True)
193
+ file_absolute_path = os.path.join(
194
+ data_folder, f"test.{input_extension}"
195
+ )
196
+ missing_files = geode_functions.missing_files(
197
+ geode_object, file_absolute_path
198
+ )
199
+ has_missing_files = missing_files.has_missing_files()
200
+ if has_missing_files:
201
+ mandatory_files = missing_files.mandatory_files
202
+ print(f"\t\t{mandatory_files=}", flush=True)
203
+ additional_files = missing_files.additional_files
204
+ print(f"\t\t{additional_files=}", flush=True)
205
+ file_absolute_path = os.path.join(
206
+ data_folder, f"test.{input_extension}"
207
+ )
208
+ if geode_functions.is_loadable(geode_object, file_absolute_path):
209
+ data = geode_functions.load(geode_object, file_absolute_path)
210
+ class_inspector = geode_functions.inspect(geode_object, data)
211
+ assert "InspectionResult" in class_inspector.__class__.__name__
212
+ inspection_result = geode_functions.get_inspector_children(
213
+ class_inspector
214
+ )
215
+
216
+ print(f"\t\t{inspection_result=}", flush=True)
217
+ assert type(inspection_result) is dict
218
+
219
+
180
220
  def test_filter_geode_objects():
181
221
  filters_list = ["", "crs", "inspector", None]
182
222
 
@@ -227,8 +267,8 @@ def test_list_geode_objects():
227
267
  input_extensions = geode_functions.list_input_extensions(key)
228
268
  for geode_object, value in geode_objects.geode_objects_dict().items():
229
269
  for input_extension in input_extensions:
230
- file_absolute_path = os.path.abspath(
231
- f"tests/data/test.{input_extension}"
270
+ file_absolute_path = os.path.join(
271
+ data_folder, f"test.{input_extension}"
232
272
  )
233
273
  return_dict = geode_functions.list_geode_objects(
234
274
  file_absolute_path, key
@@ -254,7 +294,7 @@ def test_geode_objects_output_extensions():
254
294
  for geode_object, value in geode_objects.geode_objects_dict().items():
255
295
  input_extensions = geode_functions.geode_object_input_extensions(geode_object)
256
296
  for input_extension in input_extensions:
257
- file_absolute_path = f"tests/data/test.{input_extension}"
297
+ file_absolute_path = os.path.join(data_folder, f"test.{input_extension}")
258
298
  if geode_functions.is_loadable(geode_object, file_absolute_path):
259
299
  data = geode_functions.load(geode_object, file_absolute_path)
260
300
  geode_objects_and_output_extensions = (
@@ -100,6 +100,32 @@ def test_geographic_coordinate_systems(client):
100
100
  )
101
101
 
102
102
 
103
+ def test_inspect_file(client):
104
+ route = f"/inspect_file"
105
+
106
+ def get_full_data():
107
+ return {
108
+ "input_geode_object": "BRep",
109
+ "filename": "corbi.og_brep",
110
+ }
111
+
112
+ json = get_full_data()
113
+
114
+ # Normal test with geode_object 'BRep'
115
+ response = client.post(route, json=json)
116
+ assert response.status_code == 200
117
+ inspection_result = response.json["inspection_result"]
118
+ assert type(inspection_result) is dict
119
+
120
+ for key, value in get_full_data().items():
121
+ json = get_full_data()
122
+ json.pop(key)
123
+ response = client.post(route, json=json)
124
+ assert response.status_code == 400
125
+ error_description = response.json["description"]
126
+ assert error_description == f"Validation error: '{key}' is a required property"
127
+
128
+
103
129
  def test_geode_objects_and_output_extensions(client):
104
130
  route = "/geode_objects_and_output_extensions"
105
131
 
@@ -1,31 +0,0 @@
1
- asgiref==3.7.2
2
- attrs==23.2.0
3
- blinker==1.7.0
4
- click==8.1.7
5
- colorama==0.4.6
6
- flask[async]==3.0.1
7
- flask-cors==4.0.0
8
- geode-background==7.7.1
9
- geode-common==30.1.2
10
- geode-conversion==5.2.1
11
- geode-explicit==4.4.3
12
- geode-implicit==2.6.1
13
- geode-numerics==4.3.0
14
- geode-simplex==6.5.1
15
- geode-viewables==2.2.0
16
- importlib-metadata==7.0.1
17
- itsdangerous==2.1.2
18
- jinja2==3.1.3
19
- jsonschema==4.21.1
20
- jsonschema-specifications==2023.12.1
21
- markupsafe==2.1.4
22
- opengeode-core==14.13.2
23
- opengeode-geosciences==7.4.0
24
- opengeode-geosciencesio==4.6.0
25
- opengeode-inspector==4.0.6
26
- opengeode-io==6.4.0
27
- referencing==0.33.0
28
- rpds-py==0.17.1
29
- typing-extensions==4.9.0
30
- werkzeug==3.0.1
31
- zipp==3.17.0
@@ -1,483 +0,0 @@
1
- class Result:
2
- def __init__(self, children: list, route: str, sentence: str = None, value=None):
3
- self.children = children
4
- self.is_leaf = len(children) == 0
5
- self.route = route
6
- self.value = value
7
- self.sentence = sentence
8
- self.list_invalidities = None
9
-
10
-
11
- def json_return(Result_list: list):
12
- json_result = []
13
- for result in Result_list:
14
- json_temp = {
15
- "value": result.value,
16
- "children": (
17
- result.children if result.is_leaf else json_return(result.children)
18
- ),
19
- "is_leaf": result.is_leaf,
20
- "route": result.route,
21
- "sentence": result.sentence if result.sentence != None else result.route,
22
- }
23
- json_result.append(json_temp)
24
- return json_result
25
-
26
-
27
- def AdjacencyTests(object: str):
28
- AdjacencyTests = [
29
- Result(
30
- [],
31
- f"nb_{object}_with_wrong_adjacency",
32
- f"Number of {object} with invalid adjacencies",
33
- )
34
- ]
35
- Wrapper_AdjacencyTests = Result(AdjacencyTests, "Adjacency")
36
- return Wrapper_AdjacencyTests
37
-
38
-
39
- def ColocationTests():
40
- ColocationTests = [Result([], "nb_colocated_points", "Number of colocated points")]
41
- Wrapper_ColocationTests = Result(ColocationTests, "Colocation")
42
- return Wrapper_ColocationTests
43
-
44
-
45
- def DegenerationTests():
46
- DegenerationTests = [
47
- Result([], "nb_degenerated_edges", "Number of degenerated edges")
48
- ]
49
- Wrapper_DegenerationTests = Result(DegenerationTests, "Degeneration")
50
- return Wrapper_DegenerationTests
51
-
52
-
53
- def ManifoldTests(objects: list):
54
- ManifoldTests = []
55
- for object in objects:
56
- ManifoldTests.append(
57
- Result([], f"nb_non_manifold_{object}", f"Number of non manifold {object}")
58
- )
59
- Wrapper_ManifoldTests = Result(ManifoldTests, "Manifold")
60
- return Wrapper_ManifoldTests
61
-
62
-
63
- def IntersectionTests():
64
- IntersectionTests = [
65
- Result([], "intersecting_elements", "Number of intersecting elements")
66
- ]
67
- Wrapper_IntersectionTests = Result(IntersectionTests, "Intersection")
68
- return Wrapper_IntersectionTests
69
-
70
-
71
- def TopologyTests(object: str):
72
- unique_vertices_colocation = [
73
- Result(
74
- [],
75
- "unique_vertices_linked_to_different_points",
76
- "Number of unique vertices linked to different points in space",
77
- ),
78
- Result(
79
- [],
80
- "colocated_unique_vertices_groups",
81
- "Number of unique vertices colocated in space",
82
- ),
83
- ]
84
-
85
- components_are_linked_to_a_unique_vertex = [
86
- Result(
87
- [],
88
- "nb_corners_not_linked_to_a_unique_vertex",
89
- "Number of corners not linked to a unique vertex",
90
- ),
91
- Result(
92
- [],
93
- "nb_lines_meshed_but_not_linked_to_a_unique_vertex",
94
- "Number of lines not linked to a unique vertex",
95
- ),
96
- Result(
97
- [],
98
- "nb_surfaces_meshed_but_not_linked_to_a_unique_vertex",
99
- "Number of surfaces not linked to a unique vertex",
100
- ),
101
- ]
102
-
103
- invalid_components_topology_unique_vertices = [
104
- Result(
105
- [],
106
- "unique_vertices_not_linked_to_a_component_vertex",
107
- "Number of unique vertices not linked to a component mesh vertex",
108
- ),
109
- Result(
110
- [],
111
- "multiple_corners_unique_vertices",
112
- "Unique vertices linked to multiple corners",
113
- ),
114
- Result(
115
- [],
116
- "multiple_internals_corner_vertices",
117
- "Unique vertices linked to a corner with multiple internal relations",
118
- ),
119
- Result(
120
- [],
121
- "not_internal_nor_boundary_corner_vertices",
122
- "Unique vertices linked to a corner which is neither internal nor boundary",
123
- ),
124
- Result(
125
- [],
126
- "line_corners_without_boundary_status",
127
- "Unique vertices linked to a line and a corner not boundary of the line",
128
- ),
129
- Result(
130
- [],
131
- "part_of_not_boundary_nor_internal_line_unique_vertices",
132
- "Unique vertices part of a line without boundary or internal relations",
133
- ),
134
- Result(
135
- [],
136
- "part_of_line_with_invalid_internal_topology_unique_vertices",
137
- "Unique vertices part of a line with invalid internal topology relations",
138
- ),
139
- Result(
140
- [],
141
- "part_of_invalid_unique_line_unique_vertices",
142
- "Unique vertices part of a single line with invalid topology",
143
- ),
144
- Result(
145
- [],
146
- "part_of_lines_but_not_corner_unique_vertices",
147
- "Unique vertices part of multiple lines with invalid topology",
148
- ),
149
- Result(
150
- [],
151
- "part_of_line_and_not_on_surface_border_unique_vertices",
152
- "Unique vertices part of a line and a surface but not on the border of the surface mesh",
153
- ),
154
- ]
155
-
156
- if object == "brep":
157
- brep_components_are_linked_to_a_unique_vertex = (
158
- components_are_linked_to_a_unique_vertex
159
- )
160
- brep_components_are_linked_to_a_unique_vertex.append(
161
- Result(
162
- [],
163
- "nb_blocks_meshed_but_not_linked_to_a_unique_vertex",
164
- "Number of blocks not linked to a unique vertex",
165
- )
166
- )
167
-
168
- brep_invalid_components_topology_unique_vertices = (
169
- invalid_components_topology_unique_vertices
170
- )
171
- brep_invalid_components_topology_unique_vertices.append(
172
- Result(
173
- [],
174
- "part_of_not_boundary_nor_internal_surface_unique_vertices",
175
- "Unique vertices part of a surface which has no boundary or internal relations",
176
- )
177
- )
178
- brep_invalid_components_topology_unique_vertices.append(
179
- Result(
180
- [],
181
- "part_of_surface_with_invalid_internal_topology_unique_vertices",
182
- "Unique vertices part of a surface with invalid internal topology",
183
- )
184
- )
185
- brep_invalid_components_topology_unique_vertices.append(
186
- Result(
187
- [],
188
- "part_of_invalid_unique_surface_unique_vertices",
189
- "Unique vertices part of a unique surface with invalid topology",
190
- )
191
- )
192
- brep_invalid_components_topology_unique_vertices.append(
193
- Result(
194
- [],
195
- "part_of_invalid_multiple_surfaces_unique_vertices",
196
- "Unique vertices part of multiple surfaces with invalid topology",
197
- )
198
- )
199
- brep_invalid_components_topology_unique_vertices.append(
200
- Result(
201
- [],
202
- "part_of_invalid_blocks_unique_vertices",
203
- "Unique vertices part of blocks with invalid topology",
204
- )
205
- )
206
-
207
- TopologyTests = [
208
- Result(
209
- brep_components_are_linked_to_a_unique_vertex,
210
- "Meshed components are linked to a unique vertex",
211
- ),
212
- Result(
213
- brep_invalid_components_topology_unique_vertices,
214
- "Unique vertices linked to components with invalid topology",
215
- ),
216
- Result(
217
- unique_vertices_colocation, "Unique vertices with colocation issues"
218
- ),
219
- ]
220
- elif object == "section":
221
- section_invalid_components_topology_unique_vertices = (
222
- invalid_components_topology_unique_vertices
223
- )
224
- section_invalid_components_topology_unique_vertices.append(
225
- Result(
226
- [],
227
- "part_of_invalid_surfaces_unique_vertices",
228
- "Unique vertices part of surfaces with invalid topology",
229
- )
230
- )
231
-
232
- TopologyTests = [
233
- Result(
234
- components_are_linked_to_a_unique_vertex,
235
- "Meshed components are linked to a unique vertex",
236
- ),
237
- Result(
238
- section_invalid_components_topology_unique_vertices,
239
- "Unique vertices linked to components with invalid topology",
240
- ),
241
- Result(
242
- unique_vertices_colocation, "Unique vertices with colocation issues"
243
- ),
244
- ]
245
- Wrapper_TopologyTests = Result(TopologyTests, "Topology")
246
- return Wrapper_TopologyTests
247
-
248
-
249
- def ComponentMeshesTests(object: str):
250
- component_meshes_adjacency = [
251
- Result(
252
- [],
253
- "surfaces_nb_edges_with_wrong_adjacencies",
254
- "Model component meshes edge adjacencies",
255
- )
256
- ]
257
- component_meshes_colocation = [
258
- Result(
259
- [],
260
- "components_nb_colocated_points",
261
- "Model component meshes point colocation",
262
- )
263
- ]
264
- component_meshes_degeneration = [
265
- Result(
266
- [],
267
- "components_nb_degenerated_elements",
268
- "Model component meshes element degeneration",
269
- )
270
- ]
271
- component_meshes_manifold = [
272
- Result(
273
- [],
274
- "component_meshes_nb_non_manifold_vertices",
275
- "Model component meshes vertex manifold",
276
- ),
277
- Result(
278
- [],
279
- "component_meshes_nb_non_manifold_edges",
280
- "Model component meshes edge manifold",
281
- ),
282
- ]
283
- component_meshes_intersection = [
284
- Result(
285
- [],
286
- "intersecting_surfaces_elements",
287
- "Pairs of component meshes triangles intersecting",
288
- )
289
- ]
290
-
291
- if object == "brep":
292
- brep_component_meshes_adjacency = component_meshes_adjacency
293
- brep_component_meshes_adjacency.append(
294
- Result(
295
- [],
296
- "blocks_nb_facets_with_wrong_adjacencies",
297
- "Model component meshes facet adjacencies",
298
- )
299
- )
300
-
301
- brep_component_meshes_manifold = component_meshes_manifold
302
- brep_component_meshes_manifold.append(
303
- Result(
304
- [],
305
- "component_meshes_nb_non_manifold_facets",
306
- "Model component meshes facet manifold",
307
- )
308
- )
309
-
310
- ComponentMeshesTests = [
311
- Result(brep_component_meshes_adjacency, "Adjacency"),
312
- Result(component_meshes_colocation, "Colocation"),
313
- Result(component_meshes_degeneration, "Degeneration"),
314
- Result(brep_component_meshes_manifold, "Manifold"),
315
- Result(component_meshes_intersection, "Intersections"),
316
- ]
317
-
318
- elif object == "section":
319
- ComponentMeshesTests = [
320
- Result(component_meshes_adjacency, "Adjacency"),
321
- Result(component_meshes_colocation, "Colocation"),
322
- Result(component_meshes_degeneration, "Degeneration"),
323
- Result(component_meshes_manifold, "Manifold"),
324
- ]
325
-
326
- Wrapper_ComponentMeshesTests = Result(ComponentMeshesTests, "Component Meshes")
327
- return Wrapper_ComponentMeshesTests
328
-
329
-
330
- def inspectors():
331
- BRep_Tests = [Result([TopologyTests("brep"), ComponentMeshesTests("brep")], "BRep")]
332
- CrossSection_Tests = [
333
- Result(
334
- [TopologyTests("section"), ComponentMeshesTests("section")], "CrossSection"
335
- )
336
- ]
337
- EdgedCurve2D_Tests = [
338
- Result([ColocationTests(), DegenerationTests()], "EdgedCurve2D")
339
- ]
340
- EdgedCurve3D_Tests = [
341
- Result([ColocationTests(), DegenerationTests()], "EdgedCurve3D")
342
- ]
343
- Graph_Tests = [Result([], "Graph", value=True)]
344
- HybridSolid3D_Tests = [
345
- Result(
346
- [
347
- AdjacencyTests("facets"),
348
- ColocationTests(),
349
- DegenerationTests(),
350
- ManifoldTests(["edges", "facets", "vertices"]),
351
- ],
352
- "HybridSolid3D",
353
- )
354
- ]
355
- PointSet2D_Tests = [Result([ColocationTests()], "PointSet2D", value=True)]
356
- PointSet3D_Tests = [Result([ColocationTests()], "PointSet3D", value=True)]
357
- PolygonalSurface2D_Tests = [
358
- Result(
359
- [
360
- AdjacencyTests("edges"),
361
- ColocationTests(),
362
- DegenerationTests(),
363
- ManifoldTests(["edges", "vertices"]),
364
- ],
365
- "PolygonalSurface2D",
366
- )
367
- ]
368
- PolygonalSurface3D_Tests = [
369
- Result(
370
- [
371
- AdjacencyTests("edges"),
372
- ColocationTests(),
373
- DegenerationTests(),
374
- ManifoldTests(["edges", "vertices"]),
375
- ],
376
- "PolygonalSurface3D",
377
- )
378
- ]
379
- PolyhedralSolid3D_Tests = [
380
- Result(
381
- [
382
- AdjacencyTests("facets"),
383
- ColocationTests(),
384
- DegenerationTests(),
385
- ManifoldTests(["edges", "facets", "vertices"]),
386
- ],
387
- "PolyhedralSolid3D",
388
- )
389
- ]
390
- RegularGrid2D_Tests = [Result([], "RegularGrid2D", value=True)]
391
- RegularGrid3D_Tests = [Result([], "RegularGrid3D", value=True)]
392
- Section_Tests = [
393
- Result([TopologyTests("section"), ComponentMeshesTests("section")], "Section")
394
- ]
395
- StructuralModel_Tests = [
396
- Result([TopologyTests("brep"), ComponentMeshesTests("brep")], "StructuralModel")
397
- ]
398
- TetrahedralSolid3D_Tests = [
399
- Result(
400
- [
401
- AdjacencyTests("facets"),
402
- ColocationTests(),
403
- DegenerationTests(),
404
- ManifoldTests(["edges", "facets", "vertices"]),
405
- ],
406
- "TetrahedralSolid3D",
407
- )
408
- ]
409
- TriangulatedSurface2D_Tests = [
410
- Result(
411
- [
412
- AdjacencyTests("edges"),
413
- ColocationTests(),
414
- DegenerationTests(),
415
- ManifoldTests(["edges", "vertices"]),
416
- IntersectionTests(),
417
- ],
418
- "TriangulatedSurface2D",
419
- )
420
- ]
421
- TriangulatedSurface3D_Tests = [
422
- Result(
423
- [
424
- AdjacencyTests("edges"),
425
- ColocationTests(),
426
- DegenerationTests(),
427
- ManifoldTests(["edges", "vertices"]),
428
- IntersectionTests(),
429
- ],
430
- "TriangulatedSurface3D",
431
- )
432
- ]
433
- VertexSet_Tests = [Result([], "VertexSet", value=True)]
434
-
435
- return {
436
- "BRep": {"tests_names": BRep_Tests},
437
- "CrossSection": {
438
- "tests_names": CrossSection_Tests,
439
- },
440
- "EdgedCurve2D": {
441
- "tests_names": EdgedCurve2D_Tests,
442
- },
443
- "EdgedCurve3D": {
444
- "tests_names": EdgedCurve3D_Tests,
445
- },
446
- "Graph": {"tests_names": Graph_Tests},
447
- "HybridSolid3D": {
448
- "tests_names": HybridSolid3D_Tests,
449
- },
450
- "PointSet2D": {
451
- "tests_names": PointSet2D_Tests,
452
- },
453
- "PointSet3D": {
454
- "tests_names": PointSet3D_Tests,
455
- },
456
- "PolygonalSurface2D": {
457
- "tests_names": PolygonalSurface2D_Tests,
458
- },
459
- "PolygonalSurface3D": {
460
- "tests_names": PolygonalSurface3D_Tests,
461
- },
462
- "PolyhedralSolid3D": {
463
- "tests_names": PolyhedralSolid3D_Tests,
464
- },
465
- "RegularGrid2D": {"tests_names": RegularGrid2D_Tests},
466
- "RegularGrid3D": {"tests_names": RegularGrid3D_Tests},
467
- "Section": {
468
- "tests_names": Section_Tests,
469
- },
470
- "StructuralModel": {
471
- "tests_names": StructuralModel_Tests,
472
- },
473
- "TetrahedralSolid3D": {
474
- "tests_names": TetrahedralSolid3D_Tests,
475
- },
476
- "TriangulatedSurface2D": {
477
- "tests_names": TriangulatedSurface2D_Tests,
478
- },
479
- "TriangulatedSurface3D": {
480
- "tests_names": TriangulatedSurface3D_Tests,
481
- },
482
- "VertexSet": {"tests_names": VertexSet_Tests},
483
- }