OpenGeodeWeb-Back 0.0.1__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.
@@ -0,0 +1,11 @@
1
+ name: Check branch origin
2
+
3
+ on:
4
+ pull_request:
5
+
6
+ jobs:
7
+ check-branch-protection:
8
+ uses: Geode-solutions/actions/.github/workflows/branch-protection.yml@master
9
+ with:
10
+ branch_from: 'next'
11
+ branch_to: 'master'
@@ -0,0 +1,26 @@
1
+ name: CD
2
+
3
+ on:
4
+ push:
5
+ branches: [ master, next ]
6
+
7
+ jobs:
8
+ build:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - name: Checkout
12
+ uses: actions/checkout@v3
13
+ - name: Build
14
+ run: |
15
+ python3 -m pip install --upgrade build
16
+ python3 -m build
17
+ ls
18
+ ls dist
19
+ - name: Publish on PyPI
20
+ uses: pypa/gh-action-pypi-publish@release/v1
21
+ with:
22
+ skip-existing: true
23
+ verbose: true
24
+ user: __token__
25
+ password: ${{ secrets.PYPI_TOKEN }}
26
+ packages-dir: "dist"
@@ -0,0 +1,2 @@
1
+ .pytest_cache
2
+ dist
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Geode-solutions
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,47 @@
1
+ Metadata-Version: 2.1
2
+ Name: OpenGeodeWeb-Back
3
+ Version: 0.0.1
4
+ Summary: Open source library of python functions and OpenGeode wrappers
5
+ Project-URL: Homepage, https://github.com/Geode-solutions/OpenGeodeWeb-Back
6
+ Project-URL: Bug Tracker, https://github.com/Geode-solutions/OpenGeodeWeb-Back/issues
7
+ Author-email: Geode-solutions <contact@geode-solutions.com>
8
+ License-File: LICENSE
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Programming Language :: Python :: 3
12
+ Requires-Python: >=3.8
13
+ Description-Content-Type: text/markdown
14
+
15
+
16
+ <h1 align="center">OpenGeodeWeb-Back<sup><i>by Geode-solutions</i></sup></h1>
17
+ <h3 align="center">OpenSource Python framework based on OpenGeode</h3>
18
+
19
+ <p align="center">
20
+ <img src="https://github.com/Geode-solutions/OpenGeodeWeb-Back/workflows/CI/badge.svg" alt="Build Status">
21
+ <img src="https://github.com/Geode-solutions/OpenGeodeWeb-Back/workflows/CD/badge.svg" alt="Deploy Status">
22
+ <img src="https://codecov.io/gh/Geode-solutions/OpenGeodeWeb-Back/branch/master/graph/badge.svg" alt="Coverage Status">
23
+ <img src="https://img.shields.io/github/release/Geode-solutions/OpenGeodeWeb-Back.svg" alt="Version">
24
+ <img src="https://img.shields.io/pypi/v/opengeode-core" alt="PyPI" >
25
+ </p>
26
+
27
+ <p align="center">
28
+ <img src="https://img.shields.io/badge/C%2B%2B-11-blue.svg" alt="Language">
29
+ <img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License">
30
+ <img src="https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg" alt="Semantic-release">
31
+ </p>
32
+
33
+ ---
34
+
35
+ ## Introduction
36
+
37
+ OpenGeodeWeb-Back is an open source framework that proposes handy functions and wrappers for the OpenGeode ecosystem
38
+
39
+
40
+ ## Changelog
41
+ Detailed changes for each release are documented in the [release notes](https://github.com/Geode-solutions/OpenGeodeWeb-Back/releases).
42
+
43
+
44
+ ## License
45
+ [MIT](https://opensource.org/licenses/MIT)
46
+
47
+ Copyright (c) 2019 - 2023, Geode-solutions
@@ -0,0 +1,33 @@
1
+
2
+ <h1 align="center">OpenGeodeWeb-Back<sup><i>by Geode-solutions</i></sup></h1>
3
+ <h3 align="center">OpenSource Python framework based on OpenGeode</h3>
4
+
5
+ <p align="center">
6
+ <img src="https://github.com/Geode-solutions/OpenGeodeWeb-Back/workflows/CI/badge.svg" alt="Build Status">
7
+ <img src="https://github.com/Geode-solutions/OpenGeodeWeb-Back/workflows/CD/badge.svg" alt="Deploy Status">
8
+ <img src="https://codecov.io/gh/Geode-solutions/OpenGeodeWeb-Back/branch/master/graph/badge.svg" alt="Coverage Status">
9
+ <img src="https://img.shields.io/github/release/Geode-solutions/OpenGeodeWeb-Back.svg" alt="Version">
10
+ <img src="https://img.shields.io/pypi/v/opengeode-core" alt="PyPI" >
11
+ </p>
12
+
13
+ <p align="center">
14
+ <img src="https://img.shields.io/badge/C%2B%2B-11-blue.svg" alt="Language">
15
+ <img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License">
16
+ <img src="https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg" alt="Semantic-release">
17
+ </p>
18
+
19
+ ---
20
+
21
+ ## Introduction
22
+
23
+ OpenGeodeWeb-Back is an open source framework that proposes handy functions and wrappers for the OpenGeode ecosystem
24
+
25
+
26
+ ## Changelog
27
+ Detailed changes for each release are documented in the [release notes](https://github.com/Geode-solutions/OpenGeodeWeb-Back/releases).
28
+
29
+
30
+ ## License
31
+ [MIT](https://opensource.org/licenses/MIT)
32
+
33
+ Copyright (c) 2019 - 2023, Geode-solutions
@@ -0,0 +1,23 @@
1
+ [build-system]
2
+ requires = ["OpenGeode-core", "OpenGeode-IO", "OpenGeode-Geosciences", "OpenGeode-GeosciencesIO", "Geode-Viewables", "hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+
6
+ [project]
7
+ name = "OpenGeodeWeb-Back"
8
+ version = "0.0.1"
9
+ authors = [
10
+ { name="Geode-solutions", email="contact@geode-solutions.com" },
11
+ ]
12
+ description = "Open source library of python functions and OpenGeode wrappers"
13
+ readme = "README.md"
14
+ requires-python = ">=3.8"
15
+ classifiers = [
16
+ "Programming Language :: Python :: 3",
17
+ "License :: OSI Approved :: MIT License",
18
+ "Operating System :: OS Independent",
19
+ ]
20
+
21
+ [project.urls]
22
+ "Homepage" = "https://github.com/Geode-solutions/OpenGeodeWeb-Back"
23
+ "Bug Tracker" = "https://github.com/Geode-solutions/OpenGeodeWeb-Back/issues"
@@ -0,0 +1,5 @@
1
+ OpenGeode-core
2
+ OpenGeode-IO
3
+ OpenGeode-Geosciences
4
+ OpenGeode-GeosciencesIO
5
+ Geode-Viewables
@@ -0,0 +1,29 @@
1
+ #
2
+ # This file is autogenerated by pip-compile with Python 3.9
3
+ # by the following command:
4
+ #
5
+ # pip-compile --resolver=backtracking requirements.in
6
+ #
7
+ geode-common==26.1.3
8
+ # via geode-viewables
9
+ geode-viewables==2.0.3
10
+ # via -r requirements.in
11
+ opengeode-core==14.4.1
12
+ # via
13
+ # -r requirements.in
14
+ # geode-common
15
+ # geode-viewables
16
+ # opengeode-geosciences
17
+ # opengeode-geosciencesio
18
+ # opengeode-io
19
+ opengeode-geosciences==7.1.1
20
+ # via
21
+ # -r requirements.in
22
+ # geode-viewables
23
+ # opengeode-geosciencesio
24
+ opengeode-geosciencesio==4.1.6
25
+ # via -r requirements.in
26
+ opengeode-io==6.0.10
27
+ # via
28
+ # -r requirements.in
29
+ # geode-viewables
@@ -0,0 +1,234 @@
1
+ import base64
2
+ import geode_objects
3
+ import os
4
+ import pkg_resources
5
+ import werkzeug
6
+ import flask
7
+ import uuid
8
+
9
+ import opengeode_geosciences as og_gs
10
+ import opengeode as og
11
+
12
+
13
+ def list_objects_input_extensions(
14
+ is_viewable: bool = True,
15
+ geode_object: str = "",
16
+ ):
17
+ """
18
+ Purpose:
19
+ Function that returns a list of all input extensions
20
+ Returns:
21
+ An ordered list of input file extensions
22
+ """
23
+ return_list = []
24
+ objects_list = geode_objects.objects_list()
25
+
26
+ for object_ in objects_list.values():
27
+ if object_["is_viewable"] == is_viewable or geode_object == object_:
28
+ values = object_["input"]
29
+ for value in values:
30
+ list_creators = value.list_creators()
31
+ for creator in list_creators:
32
+ if creator not in return_list:
33
+ return_list.append(creator)
34
+ return_list.sort()
35
+ return return_list
36
+
37
+
38
+ def list_objects(extension: str, is_viewable: bool = True):
39
+ """
40
+ Purpose:
41
+ Function that returns a list of objects that can handle a file, given his extension
42
+ Args:
43
+ extension -- The extension of the file
44
+ Returns:
45
+ An ordered list of object's names
46
+ """
47
+ return_list = []
48
+ objects_list = geode_objects.objects_list()
49
+
50
+ for object_, values in objects_list.items():
51
+ if values["is_viewable"] == is_viewable:
52
+ list_values = values["input"]
53
+ for value in list_values:
54
+ if value.has_creator(extension):
55
+ if object_ not in return_list:
56
+ return_list.append(object_)
57
+ return_list.sort()
58
+ return return_list
59
+
60
+
61
+ def list_output_file_extensions(object: str):
62
+ """
63
+ Purpose:
64
+ Function that returns a list of output file extensions that can be handled by an object
65
+ Args:
66
+ object -- The name of the object
67
+ Returns:
68
+ An ordered list of file extensions
69
+ """
70
+ List = []
71
+ objects_list = geode_objects.objects_list()
72
+
73
+ values = objects_list[object]["output"]
74
+ for value in values:
75
+ list_creators = value.list_creators()
76
+ for creator in list_creators:
77
+ if creator not in List:
78
+ List.append(creator)
79
+ List.sort()
80
+ return List
81
+
82
+
83
+ def get_versions(list_packages: list):
84
+ list_with_versions = []
85
+ for package in list_packages:
86
+ list_with_versions.append(
87
+ {
88
+ "package": package,
89
+ "version": pkg_resources.get_distribution(package).version,
90
+ }
91
+ )
92
+ return list_with_versions
93
+
94
+
95
+ def upload_file(file: str, file_name: str, upload_folder: str, file_size: int):
96
+ if not os.path.exists(upload_folder):
97
+ os.mkdir(upload_folder)
98
+ file_decoded = base64.b64decode(file.split(",")[-1])
99
+ secure_file_name = werkzeug.utils.secure_filename(file_name)
100
+ file_path = os.path.join(upload_folder, secure_file_name)
101
+ f = open(file_path, "wb")
102
+ f.write(file_decoded)
103
+ f.close()
104
+
105
+ final_size = os.path.getsize(file_path)
106
+ return int(file_size) == int(final_size)
107
+
108
+
109
+ def create_lock_file():
110
+ LOCK_FOLDER = flask.current_app.config["LOCK_FOLDER"]
111
+ if not os.path.exists(LOCK_FOLDER):
112
+ os.mkdir(LOCK_FOLDER)
113
+ flask.g.UUID = uuid.uuid4()
114
+ file_path = f"{LOCK_FOLDER}/{str(flask.g.UUID)}.txt"
115
+ f = open(file_path, "a")
116
+ f.close()
117
+
118
+
119
+ def remove_lock_file():
120
+ LOCK_FOLDER = flask.current_app.config["LOCK_FOLDER"]
121
+ os.remove(f"{LOCK_FOLDER}/{str(flask.g.UUID)}.txt")
122
+
123
+
124
+ def set_interval(func, sec):
125
+ def func_wrapper():
126
+ set_interval(func, sec)
127
+ func()
128
+
129
+ t = threading.Timer(sec, func_wrapper)
130
+ t.daemon = True
131
+ t.start()
132
+ return t
133
+
134
+
135
+ def is_model(geode_object):
136
+ return geode_objects.objects_list()[geode_object]["is_model"]
137
+
138
+
139
+ def is_3D(geode_object):
140
+ return geode_objects.objects_list()[geode_object]["is_3D"]
141
+
142
+
143
+ def get_builder(geode_object, data):
144
+ return geode_objects.objects_list()[geode_object]["builder"](data)
145
+
146
+
147
+ def load(file_path):
148
+ return geode_objects.objects_list()[geode_object]["load"](file_path)
149
+
150
+
151
+ def save(data, geode_object, id, filename):
152
+ geode_objects.objects_list()[geode_object]["save"](
153
+ data, os.path.join(UPLOAD_FOLDER, filename)
154
+ )
155
+
156
+
157
+ def save_viewable(data, geode_object, id):
158
+ geode_objects.objects_list()[geode_object]["save_viewable"](
159
+ data, os.path.join(UPLOAD_FOLDER, id)
160
+ )
161
+
162
+
163
+ def get_geographic_coordinate_systems(geode_object):
164
+ if is_3D(geode_object):
165
+ return og_gs.GeographicCoordinateSystem3D.geographic_coordinate_systems()
166
+ else:
167
+ return og_gs.GeographicCoordinateSystem2D.geographic_coordinate_systems()
168
+
169
+
170
+ def get_geographic_coordinate_systems_info(geode_object, crs):
171
+ if is_3D(geode_object):
172
+ return og_gs.GeographicCoordinateSystemInfo3D(
173
+ crs["authority"], crs["code"], crs["name"]
174
+ )
175
+ else:
176
+ return og_gs.GeographicCoordinateSystemInfo2D(
177
+ crs["authority"], crs["code"], crs["name"]
178
+ )
179
+
180
+
181
+ def get_coordinate_system(geode_object, coordinate_system):
182
+ return og.CoordinateSystem2D(
183
+ [
184
+ og.Vector2D(
185
+ og.Point2D(
186
+ [coordinate_system["origin_x"], coordinate_system["origin_y"]]
187
+ ),
188
+ og.Point2D(
189
+ [coordinate_system["point_1_x"], coordinate_system["point_1_y"]]
190
+ ),
191
+ ),
192
+ og.Vector2D(
193
+ og.Point2D(
194
+ [coordinate_system["origin_x"], coordinate_system["origin_y"]]
195
+ ),
196
+ og.Point2D(
197
+ [coordinate_system["point_2_x"], coordinate_system["point_2_y"]]
198
+ ),
199
+ ),
200
+ ],
201
+ og.Point2D([coordinate_system["origin_x"], coordinate_system["origin_y"]]),
202
+ )
203
+
204
+
205
+ def assign_geographic_coordinate_system_info(geode_object, data, input_crs):
206
+ builder = get_builder(geode_object, data)
207
+ info = get_geographic_coordinate_systems_info(geode_object, input_crs)
208
+ geode_objects.objects_list()[geode_object]["crs"]["assign"](
209
+ data, builder, input_crs["name"], info
210
+ )
211
+
212
+
213
+ def convert_geographic_coordinate_system_info(geode_object, data, output_crs):
214
+ builder = get_builder(geode_object, data)
215
+ info = get_geographic_coordinate_systems_info(geode_object, output_crs)
216
+ geode_objects.objects_list()[geode_object]["crs"]["convert"](
217
+ data, builder, output_crs["name"], info
218
+ )
219
+
220
+
221
+ def create_coordinate_system(
222
+ geode_object, data, name, input_coordinate_points, output_coordinate_points
223
+ ):
224
+ builder = get_builder(geode_object, data)
225
+
226
+ input_coordiante_system = get_coordinate_system(
227
+ geode_object, input_coordinate_points
228
+ )
229
+ output_coordiante_system = get_coordinate_system(
230
+ geode_object, output_coordinate_points
231
+ )
232
+ geode_objects.objects_list()[geode_object]["crs"]["create"](
233
+ data, builder, name, input_coordiante_system, output_coordiante_system
234
+ )
@@ -0,0 +1,324 @@
1
+ import opengeode as og
2
+ import opengeode_io as og_io
3
+ import opengeode_geosciences as og_gs
4
+ import opengeode_geosciencesio as og_gs_io
5
+ import geode_viewables as g_v
6
+
7
+
8
+ def objects_list():
9
+ return {
10
+ "BRep": {
11
+ "input": [og.BRepInputFactory],
12
+ "output": [og.BRepOutputFactory],
13
+ "load": og.load_brep,
14
+ "save": og.save_brep,
15
+ "builder": og.BRepBuilder,
16
+ "crs": {
17
+ "assign": og_gs.assign_brep_geographic_coordinate_system_info,
18
+ "convert": og_gs.convert_brep_coordinate_reference_system,
19
+ "create": og.create_brep_coordinate_system,
20
+ },
21
+ "is_model": True,
22
+ "is_3D": True,
23
+ "is_viewable": True,
24
+ "save_viewable": g_v.save_viewable_brep,
25
+ },
26
+ "CrossSection": {
27
+ "input": [og_gs.CrossSectionInputFactory],
28
+ "output": [og.SectionOutputFactory, og_gs.CrossSectionOutputFactory],
29
+ "load": og_gs.load_cross_section,
30
+ "save": og_gs.save_cross_section,
31
+ "builder": og_gs.CrossSectionBuilder,
32
+ "crs": {
33
+ "assign": og_gs.assign_section_geographic_coordinate_system_info,
34
+ "convert": og_gs.convert_section_coordinate_reference_system,
35
+ "create": og.create_section_coordinate_system,
36
+ },
37
+ "is_model": True,
38
+ "is_3D": False,
39
+ "is_viewable": True,
40
+ "save_viewable": g_v.save_viewable_cross_section,
41
+ },
42
+ "EdgedCurve2D": {
43
+ "input": [og.EdgedCurveInputFactory2D],
44
+ "output": [og.EdgedCurveOutputFactory2D],
45
+ "load": og.load_edged_curve2D,
46
+ "save": og.save_edged_curve2D,
47
+ "builder": og.EdgedCurveBuilder2D.create,
48
+ "crs": {
49
+ "assign": og_gs.assign_edged_curve_geographic_coordinate_system_info2D,
50
+ "convert": og_gs.convert_edged_curve_coordinate_reference_system2D,
51
+ "create": og.create_edged_curve_coordinate_system2D,
52
+ },
53
+ "is_model": False,
54
+ "is_3D": False,
55
+ "is_viewable": True,
56
+ "save_viewable": g_v.save_viewable_edged_curve2D,
57
+ },
58
+ "EdgedCurve3D": {
59
+ "input": [og.EdgedCurveInputFactory3D],
60
+ "output": [og.EdgedCurveOutputFactory3D],
61
+ "load": og.load_edged_curve3D,
62
+ "save": og.save_edged_curve3D,
63
+ "builder": og.EdgedCurveBuilder3D.create,
64
+ "crs": {
65
+ "assign": og_gs.assign_edged_curve_geographic_coordinate_system_info3D,
66
+ "convert": og_gs.convert_edged_curve_coordinate_reference_system3D,
67
+ "create": og.create_edged_curve_coordinate_system3D,
68
+ },
69
+ "is_model": False,
70
+ "is_3D": True,
71
+ "is_viewable": True,
72
+ "save_viewable": g_v.save_viewable_edged_curve3D,
73
+ },
74
+ "Graph": {
75
+ "input": [og.GraphInputFactory],
76
+ "output": [og.GraphOutputFactory],
77
+ "load": og.load_graph,
78
+ "save": og.save_graph,
79
+ "builder": og.GraphBuilder.create,
80
+ "is_model": False,
81
+ "is_3D": False,
82
+ "is_viewable": True,
83
+ "save_viewable": "",
84
+ },
85
+ "HybridSolid3D": {
86
+ "input": [og.HybridSolidInputFactory3D],
87
+ "output": [og.HybridSolidOutputFactory3D],
88
+ "load": og.load_hybrid_solid3D,
89
+ "save": og.save_hybrid_solid3D,
90
+ "builder": og.HybridSolidBuilder3D.create,
91
+ "crs": {
92
+ "assign": og_gs.assign_solid_mesh_geographic_coordinate_system_info3D,
93
+ "convert": og_gs.convert_solid_mesh_coordinate_reference_system3D,
94
+ "create": og.create_solid_mesh_coordinate_system3D,
95
+ },
96
+ "is_model": False,
97
+ "is_3D": True,
98
+ "is_viewable": True,
99
+ "save_viewable": g_v.save_viewable_hybrid_solid3D,
100
+ },
101
+ "PointSet2D": {
102
+ "input": [og.PointSetInputFactory2D],
103
+ "output": [og.PointSetOutputFactory2D],
104
+ "load": og.load_point_set2D,
105
+ "save": og.save_point_set2D,
106
+ "builder": og.PointSetBuilder2D.create,
107
+ "crs": {
108
+ "assign": og_gs.assign_point_set_geographic_coordinate_system_info2D,
109
+ "convert": og_gs.convert_point_set_coordinate_reference_system2D,
110
+ "create": og.create_point_set_coordinate_system2D,
111
+ },
112
+ "is_model": False,
113
+ "is_3D": False,
114
+ "is_viewable": True,
115
+ "save_viewable": g_v.save_viewable_point_set2D,
116
+ },
117
+ "PointSet3D": {
118
+ "input": [og.PointSetInputFactory3D],
119
+ "output": [og.PointSetOutputFactory3D],
120
+ "load": og.load_point_set3D,
121
+ "save": og.save_point_set3D,
122
+ "builder": og.PointSetBuilder3D.create,
123
+ "crs": {
124
+ "assign": og_gs.assign_point_set_geographic_coordinate_system_info3D,
125
+ "convert": og_gs.convert_point_set_coordinate_reference_system3D,
126
+ "create": og.create_point_set_coordinate_system3D,
127
+ },
128
+ "is_model": False,
129
+ "is_3D": True,
130
+ "is_viewable": True,
131
+ "save_viewable": g_v.save_viewable_point_set3D,
132
+ },
133
+ "PolygonalSurface2D": {
134
+ "input": [og.PolygonalSurfaceInputFactory2D],
135
+ "output": [og.PolygonalSurfaceOutputFactory2D],
136
+ "load": og.load_polygonal_surface2D,
137
+ "save": og.save_polygonal_surface2D,
138
+ "builder": og.PolygonalSurfaceBuilder2D.create,
139
+ "crs": {
140
+ "assign": og_gs.assign_surface_mesh_geographic_coordinate_system_info2D,
141
+ "convert": og_gs.convert_surface_mesh_coordinate_reference_system2D,
142
+ "create": og.create_surface_mesh_coordinate_system2D,
143
+ },
144
+ "is_model": False,
145
+ "is_3D": False,
146
+ "is_viewable": True,
147
+ "save_viewable": g_v.save_viewable_polygonal_surface2D,
148
+ },
149
+ "PolygonalSurface3D": {
150
+ "input": [og.PolygonalSurfaceInputFactory3D],
151
+ "output": [og.PolygonalSurfaceOutputFactory3D],
152
+ "load": og.load_polygonal_surface3D,
153
+ "save": og.save_polygonal_surface3D,
154
+ "builder": og.PolygonalSurfaceBuilder3D.create,
155
+ "crs": {
156
+ "assign": og_gs.assign_surface_mesh_geographic_coordinate_system_info3D,
157
+ "convert": og_gs.convert_surface_mesh_coordinate_reference_system3D,
158
+ "create": og.create_surface_mesh_coordinate_system3D,
159
+ },
160
+ "is_model": False,
161
+ "is_3D": True,
162
+ "is_viewable": True,
163
+ "save_viewable": g_v.save_viewable_polygonal_surface3D,
164
+ },
165
+ "PolyhedralSolid3D": {
166
+ "input": [og.PolyhedralSolidInputFactory3D],
167
+ "output": [og.PolyhedralSolidOutputFactory3D],
168
+ "load": og.load_polyhedral_solid3D,
169
+ "save": og.save_polyhedral_solid3D,
170
+ "builder": og.PolyhedralSolidBuilder3D.create,
171
+ "crs": {
172
+ "assign": og_gs.assign_solid_mesh_geographic_coordinate_system_info3D,
173
+ "convert": og_gs.convert_solid_mesh_coordinate_reference_system3D,
174
+ "create": og.create_solid_mesh_coordinate_system3D,
175
+ },
176
+ "is_model": False,
177
+ "is_3D": True,
178
+ "is_viewable": True,
179
+ "save_viewable": g_v.save_viewable_polyhedral_solid3D,
180
+ },
181
+ "RasterImage2D": {
182
+ "input": [og.RasterImageInputFactory2D],
183
+ "output": [og.RasterImageOutputFactory2D],
184
+ "load": og.load_raster_image2D,
185
+ "save": og.save_raster_image2D,
186
+ "is_model": False,
187
+ "is_3D": False,
188
+ "is_viewable": False,
189
+ "save_viewable": g_v.save_viewable_raster_image2D,
190
+ },
191
+ "RasterImage3D": {
192
+ "input": [og.RasterImageInputFactory3D],
193
+ "output": [og.RasterImageOutputFactory3D],
194
+ "load": og.load_raster_image3D,
195
+ "save": og.save_raster_image3D,
196
+ "is_model": False,
197
+ "is_3D": False,
198
+ "is_viewable": False,
199
+ "save_viewable": g_v.save_viewable_raster_image3D,
200
+ },
201
+ "RegularGrid2D": {
202
+ "input": [og.RegularGridInputFactory2D],
203
+ "output": [og.RegularGridOutputFactory2D],
204
+ "load": og.load_regular_grid2D,
205
+ "save": og.save_regular_grid2D,
206
+ "builder": og.RegularGridBuilder2D.create,
207
+ "crs": {
208
+ "assign": og_gs.assign_surface_mesh_geographic_coordinate_system_info2D,
209
+ "convert": og_gs.convert_surface_mesh_coordinate_reference_system2D,
210
+ "create": og.create_surface_mesh_coordinate_system2D,
211
+ },
212
+ "is_model": False,
213
+ "is_3D": False,
214
+ "is_viewable": True,
215
+ "save_viewable": g_v.save_viewable_regular_grid2D,
216
+ },
217
+ "RegularGrid3D": {
218
+ "input": [og.RegularGridInputFactory3D],
219
+ "output": [og.RegularGridOutputFactory3D],
220
+ "load": og.load_regular_grid3D,
221
+ "save": og.save_regular_grid3D,
222
+ "builder": og.RegularGridBuilder3D.create,
223
+ "crs": {
224
+ "assign": og_gs.assign_solid_mesh_geographic_coordinate_system_info3D,
225
+ "convert": og_gs.convert_solid_mesh_coordinate_reference_system3D,
226
+ "create": og.create_surface_mesh_coordinate_system3D,
227
+ },
228
+ "is_model": False,
229
+ "is_3D": True,
230
+ "is_viewable": True,
231
+ "save_viewable": g_v.save_viewable_regular_grid3D,
232
+ },
233
+ "Section": {
234
+ "input": [og.SectionInputFactory],
235
+ "output": [og.SectionOutputFactory],
236
+ "load": og.load_section,
237
+ "save": og.save_section,
238
+ "builder": og.SectionBuilder,
239
+ "crs": {
240
+ "assign": og_gs.assign_section_geographic_coordinate_system_info,
241
+ "convert": og_gs.convert_section_coordinate_reference_system,
242
+ "create": og.create_section_coordinate_system,
243
+ },
244
+ "is_model": True,
245
+ "is_3D": False,
246
+ "is_viewable": True,
247
+ "save_viewable": g_v.save_viewable_section,
248
+ },
249
+ "StructuralModel": {
250
+ "input": [og_gs.StructuralModelInputFactory],
251
+ "output": [og.BRepOutputFactory, og_gs.StructuralModelOutputFactory],
252
+ "load": og_gs.load_structural_model,
253
+ "save": og_gs.save_structural_model,
254
+ "builder": og_gs.StructuralModelBuilder,
255
+ "crs": {
256
+ "assign": og_gs.assign_brep_geographic_coordinate_system_info,
257
+ "convert": og_gs.convert_brep_coordinate_reference_system,
258
+ "create": og.create_brep_coordinate_system,
259
+ },
260
+ "is_model": True,
261
+ "is_3D": True,
262
+ "is_viewable": True,
263
+ "save_viewable": g_v.save_viewable_structural_model,
264
+ },
265
+ "TetrahedralSolid3D": {
266
+ "input": [og.TetrahedralSolidInputFactory3D],
267
+ "output": [og.TetrahedralSolidOutputFactory3D],
268
+ "load": og.load_tetrahedral_solid3D,
269
+ "save": og.save_tetrahedral_solid3D,
270
+ "builder": og.TetrahedralSolidBuilder3D.create,
271
+ "crs": {
272
+ "assign": og_gs.assign_solid_mesh_geographic_coordinate_system_info3D,
273
+ "convert": og_gs.convert_solid_mesh_coordinate_reference_system3D,
274
+ "create": og.create_solid_mesh_coordinate_system3D,
275
+ },
276
+ "is_model": False,
277
+ "is_3D": True,
278
+ "is_viewable": True,
279
+ "save_viewable": g_v.save_viewable_tetrahedral_solid3D,
280
+ },
281
+ "TriangulatedSurface2D": {
282
+ "input": [og.TriangulatedSurfaceInputFactory2D],
283
+ "output": [og.TriangulatedSurfaceOutputFactory2D],
284
+ "load": og.load_triangulated_surface2D,
285
+ "save": og.save_triangulated_surface2D,
286
+ "builder": og.TriangulatedSurfaceBuilder2D.create,
287
+ "crs": {
288
+ "assign": og_gs.assign_surface_mesh_geographic_coordinate_system_info2D,
289
+ "convert": og_gs.convert_surface_mesh_coordinate_reference_system2D,
290
+ "create": og.create_surface_mesh_coordinate_system2D,
291
+ },
292
+ "is_model": False,
293
+ "is_3D": False,
294
+ "is_viewable": True,
295
+ "save_viewable": g_v.save_viewable_triangulated_surface2D,
296
+ },
297
+ "TriangulatedSurface3D": {
298
+ "input": [og.TriangulatedSurfaceInputFactory3D],
299
+ "output": [og.TriangulatedSurfaceOutputFactory3D],
300
+ "load": og.load_triangulated_surface3D,
301
+ "save": og.save_triangulated_surface3D,
302
+ "builder": og.TriangulatedSurfaceBuilder3D.create,
303
+ "crs": {
304
+ "assign": og_gs.assign_surface_mesh_geographic_coordinate_system_info3D,
305
+ "convert": og_gs.convert_surface_mesh_coordinate_reference_system3D,
306
+ "create": og.create_surface_mesh_coordinate_system3D,
307
+ },
308
+ "is_model": False,
309
+ "is_3D": True,
310
+ "is_viewable": True,
311
+ "save_viewable": g_v.save_viewable_triangulated_surface3D,
312
+ },
313
+ "VertexSet": {
314
+ "input": [og.VertexSetInputFactory],
315
+ "output": [og.VertexSetOutputFactory],
316
+ "load": og.load_vertex_set,
317
+ "save": og.save_vertex_set,
318
+ "builder": og.VertexSetBuilder.create,
319
+ "is_model": True,
320
+ "is_3D": False,
321
+ "is_viewable": False,
322
+ "save_viewable": "",
323
+ },
324
+ }