OpenGeodeWeb-Back 4.0.0rc1__py3-none-any.whl → 4.1.0rc1__py3-none-any.whl
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-4.0.0rc1.dist-info → OpenGeodeWeb_Back-4.1.0rc1.dist-info}/METADATA +22 -26
- {OpenGeodeWeb_Back-4.0.0rc1.dist-info → OpenGeodeWeb_Back-4.1.0rc1.dist-info}/RECORD +9 -9
- {OpenGeodeWeb_Back-4.0.0rc1.dist-info → OpenGeodeWeb_Back-4.1.0rc1.dist-info}/WHEEL +1 -1
- opengeodeweb_back/geode_functions.py +27 -1
- opengeodeweb_back/geode_objects.py +15 -15
- opengeodeweb_back/routes/blueprint_routes.py +25 -0
- opengeodeweb_back/routes/schemas/inspect_file.json +15 -0
- opengeodeweb_back/inspector_functions.py +0 -483
- {OpenGeodeWeb_Back-4.0.0rc1.dist-info → OpenGeodeWeb_Back-4.1.0rc1.dist-info}/LICENSE +0 -0
- {OpenGeodeWeb_Back-4.0.0rc1.dist-info → OpenGeodeWeb_Back-4.1.0rc1.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: OpenGeodeWeb-Back
|
3
|
-
Version: 4.
|
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.
|
14
|
+
Requires-Dist: asgiref ==3.8.1
|
15
15
|
Requires-Dist: attrs ==23.2.0
|
16
|
-
Requires-Dist: blinker ==1.
|
16
|
+
Requires-Dist: blinker ==1.8.1
|
17
17
|
Requires-Dist: click ==8.1.7
|
18
|
-
Requires-Dist:
|
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.
|
22
|
-
Requires-Dist: geode-common ==
|
23
|
-
Requires-Dist: geode-conversion ==5.2.
|
24
|
-
Requires-Dist: geode-explicit ==4.
|
25
|
-
Requires-Dist: geode-implicit ==2.6
|
26
|
-
Requires-Dist: geode-numerics ==4.3.
|
27
|
-
Requires-Dist: geode-simplex ==6.
|
28
|
-
Requires-Dist: geode-viewables ==2.2.
|
29
|
-
Requires-Dist:
|
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.
|
35
|
-
Requires-Dist: opengeode-core ==14.
|
36
|
-
Requires-Dist: opengeode-geosciences ==7.4
|
37
|
-
Requires-Dist: opengeode-geosciencesio ==4.6
|
38
|
-
Requires-Dist: opengeode-inspector ==
|
39
|
-
Requires-Dist: opengeode-io ==6.
|
40
|
-
Requires-Dist: referencing ==0.
|
41
|
-
Requires-Dist: rpds-py ==0.
|
42
|
-
Requires-Dist:
|
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>
|
@@ -1,16 +1,16 @@
|
|
1
1
|
opengeodeweb_back/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
-
opengeodeweb_back/geode_functions.py,sha256=
|
3
|
-
opengeodeweb_back/geode_objects.py,sha256=
|
4
|
-
opengeodeweb_back/
|
5
|
-
opengeodeweb_back/routes/blueprint_routes.py,sha256=H2PVQyapIub3XTUL44bEzYnniIN2inQnTUYBLt_vkDc,5189
|
2
|
+
opengeodeweb_back/geode_functions.py,sha256=RkX8uTU1VnwoCFWtUdEzgrixyA81BvOo8lz_hJw8MUY,11349
|
3
|
+
opengeodeweb_back/geode_objects.py,sha256=QHWz2SgaHBd1kO4fZLOV9y2UBrml4L93WP2VmMv_XWA,20286
|
4
|
+
opengeodeweb_back/routes/blueprint_routes.py,sha256=OS-JnDHuIC1q9uY7wUV8y7sn_iHmPUaoNIJzV_qDTtQ,6071
|
6
5
|
opengeodeweb_back/routes/schemas/allowed_files.json,sha256=pRsGf39LiJpl3zEGLg4IqvRtm7iUx3Wq4Tb4tSFXGV0,234
|
7
6
|
opengeodeweb_back/routes/schemas/allowed_objects.json,sha256=8JLtAI46eXeiJuiryS2geRVv0J1rGkFb87pRwtBZSZw,296
|
8
7
|
opengeodeweb_back/routes/schemas/geode_objects_and_output_extensions.json,sha256=0t4YhdKxDlzcLh85JU85z6Pn5h8wlXVt3Zi4ZhXXmTQ,308
|
9
8
|
opengeodeweb_back/routes/schemas/geographic_coordinate_systems.json,sha256=86QEBxAJXdMHulj2SyrxvAAwvyUq3mpKSazwASukeoM,242
|
9
|
+
opengeodeweb_back/routes/schemas/inspect_file.json,sha256=7jmmLD2oZ2dxn5-2HqS6fU92eGM3FWBQdj3CjyYmGOA,285
|
10
10
|
opengeodeweb_back/routes/schemas/missing_files.json,sha256=tJVdSM3CqYFZRC6eNW6Q3JG3RtoaZDxaZtbfx6djbX0,286
|
11
11
|
opengeodeweb_back/routes/schemas/upload_file.json,sha256=sE6bxz3mJbSZlGmrnR_hZmcx0dvZGn3Wpnn6szRPxXQ,186
|
12
|
-
OpenGeodeWeb_Back-4.
|
13
|
-
OpenGeodeWeb_Back-4.
|
14
|
-
OpenGeodeWeb_Back-4.
|
15
|
-
OpenGeodeWeb_Back-4.
|
16
|
-
OpenGeodeWeb_Back-4.
|
12
|
+
OpenGeodeWeb_Back-4.1.0rc1.dist-info/LICENSE,sha256=LoTB-aqQvzTGxoTRXNnhNV0LKiqdk2bQv6MB34l8zkI,1079
|
13
|
+
OpenGeodeWeb_Back-4.1.0rc1.dist-info/METADATA,sha256=U5d4AGEc1XbthSkAVGulTB-vAs4Q4WtWPJyUd2ynBsE,3042
|
14
|
+
OpenGeodeWeb_Back-4.1.0rc1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
15
|
+
OpenGeodeWeb_Back-4.1.0rc1.dist-info/top_level.txt,sha256=tN1FZeLIVBrdja2-pbmhg5-tK-JILmmT9OeIBnhlUrQ,18
|
16
|
+
OpenGeodeWeb_Back-4.1.0rc1.dist-info/RECORD,,
|
@@ -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
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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
|
+
}
|
@@ -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
|
-
}
|
File without changes
|
File without changes
|