OpenGeodeWeb-Back 1.1.0rc4__py3-none-any.whl → 1.2.0__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-1.1.0rc4.dist-info → OpenGeodeWeb_Back-1.2.0.dist-info}/METADATA +1 -1
- OpenGeodeWeb_Back-1.2.0.dist-info/RECORD +9 -0
- opengeodeweb_back/geode_functions.py +22 -24
- opengeodeweb_back/geode_objects.py +48 -42
- OpenGeodeWeb_Back-1.1.0rc4.dist-info/RECORD +0 -9
- {OpenGeodeWeb_Back-1.1.0rc4.dist-info → OpenGeodeWeb_Back-1.2.0.dist-info}/LICENSE +0 -0
- {OpenGeodeWeb_Back-1.1.0rc4.dist-info → OpenGeodeWeb_Back-1.2.0.dist-info}/WHEEL +0 -0
- {OpenGeodeWeb_Back-1.1.0rc4.dist-info → OpenGeodeWeb_Back-1.2.0.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: OpenGeodeWeb-Back
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.2.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
|
@@ -0,0 +1,9 @@
|
|
1
|
+
opengeodeweb_back/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
+
opengeodeweb_back/geode_functions.py,sha256=Mk8RK-DEFNvagVAyI0PwjhwocvxFPA8i1ALc3j5b3IE,9186
|
3
|
+
opengeodeweb_back/geode_objects.py,sha256=2UMXocCaJy_sphwHHMHAj8UDiDnQQnFe8uCSTsgZDJA,15327
|
4
|
+
opengeodeweb_back/inspector_functions.py,sha256=rx3LsY6ETKl1J9kKilcFRZMZrIoBZEIOebqWrcuMJsk,15903
|
5
|
+
OpenGeodeWeb_Back-1.2.0.dist-info/LICENSE,sha256=d-icw4NmOEwW-hCOcEjYmvoBZW_cEqiC4VL3cxZMe6Y,1072
|
6
|
+
OpenGeodeWeb_Back-1.2.0.dist-info/METADATA,sha256=OIEKCN4fHa6TKXMyKZz4KUQxTz9TwNEQT00P2bgLyNI,2329
|
7
|
+
OpenGeodeWeb_Back-1.2.0.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
8
|
+
OpenGeodeWeb_Back-1.2.0.dist-info/top_level.txt,sha256=tN1FZeLIVBrdja2-pbmhg5-tK-JILmmT9OeIBnhlUrQ,18
|
9
|
+
OpenGeodeWeb_Back-1.2.0.dist-info/RECORD,,
|
@@ -16,12 +16,12 @@ import werkzeug
|
|
16
16
|
from .geode_objects import objects_list
|
17
17
|
|
18
18
|
|
19
|
-
def
|
20
|
-
return objects_list()[geode_object]["
|
19
|
+
def get_input_factory(geode_object: str):
|
20
|
+
return objects_list()[geode_object]["input_factory"]
|
21
21
|
|
22
22
|
|
23
|
-
def
|
24
|
-
return objects_list()[geode_object]["
|
23
|
+
def get_output_factory(geode_object: str):
|
24
|
+
return objects_list()[geode_object]["output_factory"]
|
25
25
|
|
26
26
|
|
27
27
|
def load(geode_object: str, file_absolute_path: str):
|
@@ -34,17 +34,17 @@ def save(geode_object: str, data, folder_absolute_path: str, filename: str):
|
|
34
34
|
)
|
35
35
|
|
36
36
|
|
37
|
-
def
|
37
|
+
def create_builder(geode_object: str, data):
|
38
38
|
return objects_list()[geode_object]["builder"](data)
|
39
39
|
|
40
40
|
|
41
41
|
def assign_crs(geode_object: str, data, crs_name: str, info):
|
42
|
-
builder =
|
42
|
+
builder = create_builder(geode_object, data)
|
43
43
|
objects_list()[geode_object]["crs"]["assign"](data, builder, crs_name, info)
|
44
44
|
|
45
45
|
|
46
46
|
def convert_crs(geode_object: str, data, crs_name: str, info):
|
47
|
-
builder =
|
47
|
+
builder = create_builder(geode_object, data)
|
48
48
|
objects_list()[geode_object]["crs"]["convert"](data, builder, crs_name, info)
|
49
49
|
|
50
50
|
|
@@ -55,7 +55,7 @@ def create_coordinate_system(
|
|
55
55
|
input_coordiante_system,
|
56
56
|
output_coordiante_system,
|
57
57
|
):
|
58
|
-
builder =
|
58
|
+
builder = create_builder(geode_object, data)
|
59
59
|
objects_list()[geode_object]["crs"]["create"](
|
60
60
|
data, builder, name, input_coordiante_system, output_coordiante_system
|
61
61
|
)
|
@@ -73,20 +73,19 @@ def is_viewable(geode_object: str):
|
|
73
73
|
return objects_list()[geode_object]["is_viewable"]
|
74
74
|
|
75
75
|
|
76
|
+
def get_inspector(geode_object: str, data):
|
77
|
+
return objects_list()[geode_object]["inspector"](data)
|
78
|
+
|
79
|
+
|
76
80
|
def save_viewable(geode_object: str, data, folder_absolute_path: str, id: str):
|
77
81
|
return objects_list()[geode_object]["save_viewable"](
|
78
82
|
data, os.path.join(folder_absolute_path, id)
|
79
83
|
)
|
80
84
|
|
81
85
|
|
82
|
-
def get_inspector(geode_object: str, data):
|
83
|
-
return objects_list()[geode_object]["inspector"](data)
|
84
|
-
|
85
|
-
|
86
86
|
def get_geode_object_input_extensions(geode_object: str):
|
87
87
|
inputs_list = []
|
88
|
-
geode_object_inputs =
|
89
|
-
|
88
|
+
geode_object_inputs = get_input_factory(geode_object)
|
90
89
|
for input in geode_object_inputs:
|
91
90
|
list_creators = input.list_creators()
|
92
91
|
inputs_list = inputs_list + list_creators
|
@@ -97,7 +96,7 @@ def get_geode_object_input_extensions(geode_object: str):
|
|
97
96
|
|
98
97
|
def get_geode_object_output_extensions(geode_object: str):
|
99
98
|
output_list = []
|
100
|
-
geode_object_outputs =
|
99
|
+
geode_object_outputs = get_output_factory(geode_object)
|
101
100
|
|
102
101
|
for output in geode_object_outputs:
|
103
102
|
list_creators = output.list_creators()
|
@@ -123,17 +122,16 @@ def list_input_extensions(
|
|
123
122
|
for geode_object, value in objects_list().items():
|
124
123
|
if keys:
|
125
124
|
for key in keys:
|
126
|
-
if key in value
|
127
|
-
print(geode_object)
|
125
|
+
if key in value:
|
128
126
|
if type(value[key]) == bool and value[key] == True:
|
129
|
-
|
127
|
+
pass
|
130
128
|
else:
|
131
129
|
continue
|
132
130
|
else:
|
133
131
|
continue
|
134
132
|
|
135
|
-
|
136
|
-
extensions_list = extensions_list +
|
133
|
+
geode_object_input_extensions = get_geode_object_input_extensions(geode_object)
|
134
|
+
extensions_list = extensions_list + geode_object_input_extensions
|
137
135
|
|
138
136
|
extensions_list = list(set(extensions_list))
|
139
137
|
extensions_list.sort()
|
@@ -152,8 +150,8 @@ def list_geode_objects(extension: str, keys: list = []):
|
|
152
150
|
geode_objects_list = []
|
153
151
|
|
154
152
|
for geode_object, value in objects_list().items():
|
155
|
-
|
156
|
-
for input in
|
153
|
+
input_factory = get_input_factory(geode_object)
|
154
|
+
for input in input_factory:
|
157
155
|
if input.has_creator(extension):
|
158
156
|
if geode_object not in geode_objects_list:
|
159
157
|
geode_objects_list.append(geode_object)
|
@@ -231,7 +229,7 @@ def set_interval(func, sec):
|
|
231
229
|
|
232
230
|
|
233
231
|
def get_extension_from_filename(filename):
|
234
|
-
return os.path.splitext(filename)[1]
|
232
|
+
return os.path.splitext(filename)[1]
|
235
233
|
|
236
234
|
|
237
235
|
def get_form_variables(form, variables_array):
|
@@ -299,7 +297,7 @@ def convert_geographic_coordinate_system_info(geode_object: str, data, output_cr
|
|
299
297
|
def create_coordinate_system(
|
300
298
|
geode_object: str, data, name, input_coordinate_points, output_coordinate_points
|
301
299
|
):
|
302
|
-
builder =
|
300
|
+
builder = create_builder(geode_object, data)
|
303
301
|
|
304
302
|
input_coordiante_system = get_coordinate_system(
|
305
303
|
geode_object, input_coordinate_points
|
@@ -9,8 +9,8 @@ import geode_viewables as g_v
|
|
9
9
|
def objects_list():
|
10
10
|
return {
|
11
11
|
"BRep": {
|
12
|
-
"
|
13
|
-
"
|
12
|
+
"input_factory": [og.BRepInputFactory],
|
13
|
+
"output_factory": [og.BRepOutputFactory],
|
14
14
|
"load": og.load_brep,
|
15
15
|
"save": og.save_brep,
|
16
16
|
"builder": og.BRepBuilder,
|
@@ -26,8 +26,11 @@ def objects_list():
|
|
26
26
|
"inspector": og_inspector.BRepInspector,
|
27
27
|
},
|
28
28
|
"CrossSection": {
|
29
|
-
"
|
30
|
-
"
|
29
|
+
"input_factory": [og_gs.CrossSectionInputFactory],
|
30
|
+
"output_factory": [
|
31
|
+
og.SectionOutputFactory,
|
32
|
+
og_gs.CrossSectionOutputFactory,
|
33
|
+
],
|
31
34
|
"load": og_gs.load_cross_section,
|
32
35
|
"save": og_gs.save_cross_section,
|
33
36
|
"builder": og_gs.CrossSectionBuilder,
|
@@ -43,8 +46,8 @@ def objects_list():
|
|
43
46
|
"inspector": og_inspector.SectionInspector,
|
44
47
|
},
|
45
48
|
"EdgedCurve2D": {
|
46
|
-
"
|
47
|
-
"
|
49
|
+
"input_factory": [og.EdgedCurveInputFactory2D],
|
50
|
+
"output_factory": [og.EdgedCurveOutputFactory2D],
|
48
51
|
"load": og.load_edged_curve2D,
|
49
52
|
"save": og.save_edged_curve2D,
|
50
53
|
"builder": og.EdgedCurveBuilder2D.create,
|
@@ -60,8 +63,8 @@ def objects_list():
|
|
60
63
|
"inspector": og_inspector.EdgedCurveInspector2D,
|
61
64
|
},
|
62
65
|
"EdgedCurve3D": {
|
63
|
-
"
|
64
|
-
"
|
66
|
+
"input_factory": [og.EdgedCurveInputFactory3D],
|
67
|
+
"output_factory": [og.EdgedCurveOutputFactory3D],
|
65
68
|
"load": og.load_edged_curve3D,
|
66
69
|
"save": og.save_edged_curve3D,
|
67
70
|
"builder": og.EdgedCurveBuilder3D.create,
|
@@ -77,8 +80,8 @@ def objects_list():
|
|
77
80
|
"inspector": og_inspector.EdgedCurveInspector3D,
|
78
81
|
},
|
79
82
|
"Graph": {
|
80
|
-
"
|
81
|
-
"
|
83
|
+
"input_factory": [og.GraphInputFactory],
|
84
|
+
"output_factory": [og.GraphOutputFactory],
|
82
85
|
"load": og.load_graph,
|
83
86
|
"save": og.save_graph,
|
84
87
|
"builder": og.GraphBuilder.create,
|
@@ -87,8 +90,8 @@ def objects_list():
|
|
87
90
|
"is_viewable": True,
|
88
91
|
},
|
89
92
|
"HybridSolid3D": {
|
90
|
-
"
|
91
|
-
"
|
93
|
+
"input_factory": [og.HybridSolidInputFactory3D],
|
94
|
+
"output_factory": [og.HybridSolidOutputFactory3D],
|
92
95
|
"load": og.load_hybrid_solid3D,
|
93
96
|
"save": og.save_hybrid_solid3D,
|
94
97
|
"builder": og.HybridSolidBuilder3D.create,
|
@@ -104,8 +107,8 @@ def objects_list():
|
|
104
107
|
"inspector": og_inspector.SolidMeshInspector3D,
|
105
108
|
},
|
106
109
|
"PointSet2D": {
|
107
|
-
"
|
108
|
-
"
|
110
|
+
"input_factory": [og.PointSetInputFactory2D],
|
111
|
+
"output_factory": [og.PointSetOutputFactory2D],
|
109
112
|
"load": og.load_point_set2D,
|
110
113
|
"save": og.save_point_set2D,
|
111
114
|
"builder": og.PointSetBuilder2D.create,
|
@@ -121,8 +124,8 @@ def objects_list():
|
|
121
124
|
"inspector": og_inspector.PointSetInspector2D,
|
122
125
|
},
|
123
126
|
"PointSet3D": {
|
124
|
-
"
|
125
|
-
"
|
127
|
+
"input_factory": [og.PointSetInputFactory3D],
|
128
|
+
"output_factory": [og.PointSetOutputFactory3D],
|
126
129
|
"load": og.load_point_set3D,
|
127
130
|
"save": og.save_point_set3D,
|
128
131
|
"builder": og.PointSetBuilder3D.create,
|
@@ -138,8 +141,8 @@ def objects_list():
|
|
138
141
|
"inspector": og_inspector.PointSetInspector3D,
|
139
142
|
},
|
140
143
|
"PolygonalSurface2D": {
|
141
|
-
"
|
142
|
-
"
|
144
|
+
"input_factory": [og.PolygonalSurfaceInputFactory2D],
|
145
|
+
"output_factory": [og.PolygonalSurfaceOutputFactory2D],
|
143
146
|
"load": og.load_polygonal_surface2D,
|
144
147
|
"save": og.save_polygonal_surface2D,
|
145
148
|
"builder": og.PolygonalSurfaceBuilder2D.create,
|
@@ -155,8 +158,8 @@ def objects_list():
|
|
155
158
|
"inspector": og_inspector.SurfaceMeshInspector2D,
|
156
159
|
},
|
157
160
|
"PolygonalSurface3D": {
|
158
|
-
"
|
159
|
-
"
|
161
|
+
"input_factory": [og.PolygonalSurfaceInputFactory3D],
|
162
|
+
"output_factory": [og.PolygonalSurfaceOutputFactory3D],
|
160
163
|
"load": og.load_polygonal_surface3D,
|
161
164
|
"save": og.save_polygonal_surface3D,
|
162
165
|
"builder": og.PolygonalSurfaceBuilder3D.create,
|
@@ -172,8 +175,8 @@ def objects_list():
|
|
172
175
|
"inspector": og_inspector.SurfaceMeshInspector3D,
|
173
176
|
},
|
174
177
|
"PolyhedralSolid3D": {
|
175
|
-
"
|
176
|
-
"
|
178
|
+
"input_factory": [og.PolyhedralSolidInputFactory3D],
|
179
|
+
"output_factory": [og.PolyhedralSolidOutputFactory3D],
|
177
180
|
"load": og.load_polyhedral_solid3D,
|
178
181
|
"save": og.save_polyhedral_solid3D,
|
179
182
|
"builder": og.PolyhedralSolidBuilder3D.create,
|
@@ -189,8 +192,8 @@ def objects_list():
|
|
189
192
|
"inspector": og_inspector.SolidMeshInspector3D,
|
190
193
|
},
|
191
194
|
"RasterImage2D": {
|
192
|
-
"
|
193
|
-
"
|
195
|
+
"input_factory": [og.RasterImageInputFactory2D],
|
196
|
+
"output_factory": [og.RasterImageOutputFactory2D],
|
194
197
|
"load": og.load_raster_image2D,
|
195
198
|
"save": og.save_raster_image2D,
|
196
199
|
"is_model": False,
|
@@ -199,8 +202,8 @@ def objects_list():
|
|
199
202
|
"save_viewable": g_v.save_viewable_raster_image2D,
|
200
203
|
},
|
201
204
|
"RasterImage3D": {
|
202
|
-
"
|
203
|
-
"
|
205
|
+
"input_factory": [og.RasterImageInputFactory3D],
|
206
|
+
"output_factory": [og.RasterImageOutputFactory3D],
|
204
207
|
"load": og.load_raster_image3D,
|
205
208
|
"save": og.save_raster_image3D,
|
206
209
|
"is_model": False,
|
@@ -209,8 +212,8 @@ def objects_list():
|
|
209
212
|
"save_viewable": g_v.save_viewable_raster_image3D,
|
210
213
|
},
|
211
214
|
"RegularGrid2D": {
|
212
|
-
"
|
213
|
-
"
|
215
|
+
"input_factory": [og.RegularGridInputFactory2D],
|
216
|
+
"output_factory": [og.RegularGridOutputFactory2D],
|
214
217
|
"load": og.load_regular_grid2D,
|
215
218
|
"save": og.save_regular_grid2D,
|
216
219
|
"builder": og.RegularGridBuilder2D.create,
|
@@ -225,8 +228,8 @@ def objects_list():
|
|
225
228
|
"save_viewable": g_v.save_viewable_regular_grid2D,
|
226
229
|
},
|
227
230
|
"RegularGrid3D": {
|
228
|
-
"
|
229
|
-
"
|
231
|
+
"input_factory": [og.RegularGridInputFactory3D],
|
232
|
+
"output_factory": [og.RegularGridOutputFactory3D],
|
230
233
|
"load": og.load_regular_grid3D,
|
231
234
|
"save": og.save_regular_grid3D,
|
232
235
|
"builder": og.RegularGridBuilder3D.create,
|
@@ -241,8 +244,8 @@ def objects_list():
|
|
241
244
|
"save_viewable": g_v.save_viewable_regular_grid3D,
|
242
245
|
},
|
243
246
|
"Section": {
|
244
|
-
"
|
245
|
-
"
|
247
|
+
"input_factory": [og.SectionInputFactory],
|
248
|
+
"output_factory": [og.SectionOutputFactory],
|
246
249
|
"load": og.load_section,
|
247
250
|
"save": og.save_section,
|
248
251
|
"builder": og.SectionBuilder,
|
@@ -258,8 +261,11 @@ def objects_list():
|
|
258
261
|
"inspector": og_inspector.SectionInspector,
|
259
262
|
},
|
260
263
|
"StructuralModel": {
|
261
|
-
"
|
262
|
-
"
|
264
|
+
"input_factory": [og_gs.StructuralModelInputFactory],
|
265
|
+
"output_factory": [
|
266
|
+
og.BRepOutputFactory,
|
267
|
+
og_gs.StructuralModelOutputFactory,
|
268
|
+
],
|
263
269
|
"load": og_gs.load_structural_model,
|
264
270
|
"save": og_gs.save_structural_model,
|
265
271
|
"builder": og_gs.StructuralModelBuilder,
|
@@ -275,8 +281,8 @@ def objects_list():
|
|
275
281
|
"inspector": og_inspector.BRepInspector,
|
276
282
|
},
|
277
283
|
"TetrahedralSolid3D": {
|
278
|
-
"
|
279
|
-
"
|
284
|
+
"input_factory": [og.TetrahedralSolidInputFactory3D],
|
285
|
+
"output_factory": [og.TetrahedralSolidOutputFactory3D],
|
280
286
|
"load": og.load_tetrahedral_solid3D,
|
281
287
|
"save": og.save_tetrahedral_solid3D,
|
282
288
|
"builder": og.TetrahedralSolidBuilder3D.create,
|
@@ -292,8 +298,8 @@ def objects_list():
|
|
292
298
|
"inspector": og_inspector.SolidMeshInspector3D,
|
293
299
|
},
|
294
300
|
"TriangulatedSurface2D": {
|
295
|
-
"
|
296
|
-
"
|
301
|
+
"input_factory": [og.TriangulatedSurfaceInputFactory2D],
|
302
|
+
"output_factory": [og.TriangulatedSurfaceOutputFactory2D],
|
297
303
|
"load": og.load_triangulated_surface2D,
|
298
304
|
"save": og.save_triangulated_surface2D,
|
299
305
|
"builder": og.TriangulatedSurfaceBuilder2D.create,
|
@@ -309,8 +315,8 @@ def objects_list():
|
|
309
315
|
"inspector": og_inspector.TriangulatedSurfaceInspector2D,
|
310
316
|
},
|
311
317
|
"TriangulatedSurface3D": {
|
312
|
-
"
|
313
|
-
"
|
318
|
+
"input_factory": [og.TriangulatedSurfaceInputFactory3D],
|
319
|
+
"output_factory": [og.TriangulatedSurfaceOutputFactory3D],
|
314
320
|
"load": og.load_triangulated_surface3D,
|
315
321
|
"save": og.save_triangulated_surface3D,
|
316
322
|
"builder": og.TriangulatedSurfaceBuilder3D.create,
|
@@ -326,8 +332,8 @@ def objects_list():
|
|
326
332
|
"inspector": og_inspector.TriangulatedSurfaceInspector3D,
|
327
333
|
},
|
328
334
|
"VertexSet": {
|
329
|
-
"
|
330
|
-
"
|
335
|
+
"input_factory": [og.VertexSetInputFactory],
|
336
|
+
"output_factory": [og.VertexSetOutputFactory],
|
331
337
|
"load": og.load_vertex_set,
|
332
338
|
"save": og.save_vertex_set,
|
333
339
|
"builder": og.VertexSetBuilder.create,
|
@@ -1,9 +0,0 @@
|
|
1
|
-
opengeodeweb_back/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
-
opengeodeweb_back/geode_functions.py,sha256=VYBQ1LdIh5bxU1Wibw9fM1QGFOFUKWgAqvQrSUFcvAE,9186
|
3
|
-
opengeodeweb_back/geode_objects.py,sha256=a-qSLBMQ3h5KVXpnIgQ2zxDVer8fPumwhcCNErm6NVs,14897
|
4
|
-
opengeodeweb_back/inspector_functions.py,sha256=rx3LsY6ETKl1J9kKilcFRZMZrIoBZEIOebqWrcuMJsk,15903
|
5
|
-
OpenGeodeWeb_Back-1.1.0rc4.dist-info/LICENSE,sha256=d-icw4NmOEwW-hCOcEjYmvoBZW_cEqiC4VL3cxZMe6Y,1072
|
6
|
-
OpenGeodeWeb_Back-1.1.0rc4.dist-info/METADATA,sha256=fF_cDG0Roro_Zt1Dc4T7UjGpb58hAFD37x1Pumv1GhA,2332
|
7
|
-
OpenGeodeWeb_Back-1.1.0rc4.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
8
|
-
OpenGeodeWeb_Back-1.1.0rc4.dist-info/top_level.txt,sha256=tN1FZeLIVBrdja2-pbmhg5-tK-JILmmT9OeIBnhlUrQ,18
|
9
|
-
OpenGeodeWeb_Back-1.1.0rc4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|