OpenGeodeWeb-Back 5.10.4__py3-none-any.whl → 5.14.1__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/app.py +20 -14
- opengeodeweb_back/geode_functions.py +44 -283
- opengeodeweb_back/geode_objects/__init__.py +61 -0
- opengeodeweb_back/geode_objects/geode_brep.py +102 -0
- opengeodeweb_back/geode_objects/geode_cross_section.py +75 -0
- opengeodeweb_back/geode_objects/geode_edged_curve2d.py +107 -0
- opengeodeweb_back/geode_objects/geode_edged_curve3d.py +107 -0
- opengeodeweb_back/geode_objects/geode_graph.py +76 -0
- opengeodeweb_back/geode_objects/geode_grid2d.py +30 -0
- opengeodeweb_back/geode_objects/geode_grid3d.py +30 -0
- opengeodeweb_back/geode_objects/geode_hybrid_solid3d.py +71 -0
- opengeodeweb_back/geode_objects/geode_implicit_cross_section.py +81 -0
- opengeodeweb_back/geode_objects/geode_implicit_structural_model.py +85 -0
- opengeodeweb_back/geode_objects/geode_light_regular_grid2d.py +72 -0
- opengeodeweb_back/geode_objects/geode_light_regular_grid3d.py +72 -0
- opengeodeweb_back/geode_objects/geode_mesh.py +19 -0
- opengeodeweb_back/geode_objects/geode_model.py +22 -0
- opengeodeweb_back/geode_objects/geode_object.py +78 -0
- opengeodeweb_back/geode_objects/geode_point_set2d.py +105 -0
- opengeodeweb_back/geode_objects/geode_point_set3d.py +105 -0
- opengeodeweb_back/geode_objects/geode_polygonal_surface2d.py +73 -0
- opengeodeweb_back/geode_objects/geode_polygonal_surface3d.py +73 -0
- opengeodeweb_back/geode_objects/geode_polyhedral_solid3d.py +73 -0
- opengeodeweb_back/geode_objects/geode_raster_image2d.py +83 -0
- opengeodeweb_back/geode_objects/geode_raster_image3d.py +83 -0
- opengeodeweb_back/geode_objects/geode_regular_grid2d.py +78 -0
- opengeodeweb_back/geode_objects/geode_regular_grid3d.py +78 -0
- opengeodeweb_back/geode_objects/geode_section.py +106 -0
- opengeodeweb_back/geode_objects/geode_solid_mesh3d.py +61 -0
- opengeodeweb_back/geode_objects/geode_structural_model.py +78 -0
- opengeodeweb_back/geode_objects/geode_surface_mesh2d.py +66 -0
- opengeodeweb_back/geode_objects/geode_surface_mesh3d.py +66 -0
- opengeodeweb_back/geode_objects/geode_tetrahedral_solid3d.py +73 -0
- opengeodeweb_back/geode_objects/geode_triangulated_surface2d.py +77 -0
- opengeodeweb_back/geode_objects/geode_triangulated_surface3d.py +77 -0
- opengeodeweb_back/geode_objects/geode_vertex_set.py +81 -0
- opengeodeweb_back/geode_objects/types.py +75 -0
- opengeodeweb_back/routes/blueprint_routes.py +346 -225
- opengeodeweb_back/routes/create/blueprint_create.py +121 -0
- opengeodeweb_back/routes/create/schemas/__init__.py +3 -0
- opengeodeweb_back/routes/create/schemas/create_aoi.json +45 -0
- opengeodeweb_back/routes/create/schemas/create_aoi.py +25 -0
- opengeodeweb_back/routes/create/schemas/create_point.json +29 -0
- opengeodeweb_back/routes/create/schemas/create_point.py +13 -0
- opengeodeweb_back/routes/create/schemas/create_voi.json +36 -0
- opengeodeweb_back/routes/create/schemas/create_voi.py +24 -0
- opengeodeweb_back/routes/models/blueprint_models.py +27 -27
- opengeodeweb_back/routes/models/schemas/__init__.py +2 -0
- opengeodeweb_back/routes/models/schemas/mesh_components.py +10 -0
- opengeodeweb_back/routes/models/schemas/vtm_component_indices.py +10 -0
- opengeodeweb_back/routes/schemas/__init__.py +17 -0
- opengeodeweb_back/routes/schemas/allowed_files.json +6 -8
- opengeodeweb_back/routes/schemas/allowed_files.py +10 -0
- opengeodeweb_back/routes/schemas/allowed_objects.json +1 -8
- opengeodeweb_back/routes/schemas/allowed_objects.py +10 -0
- opengeodeweb_back/routes/schemas/cell_attribute_names.json +13 -0
- opengeodeweb_back/routes/schemas/cell_attribute_names.py +10 -0
- opengeodeweb_back/routes/schemas/export_project.json +21 -0
- opengeodeweb_back/routes/schemas/export_project.py +12 -0
- opengeodeweb_back/routes/schemas/geode_objects_and_output_extensions.json +2 -2
- opengeodeweb_back/routes/schemas/geode_objects_and_output_extensions.py +11 -0
- opengeodeweb_back/routes/schemas/geographic_coordinate_systems.json +2 -2
- opengeodeweb_back/routes/schemas/geographic_coordinate_systems.py +10 -0
- opengeodeweb_back/routes/schemas/import_project.json +10 -0
- opengeodeweb_back/routes/schemas/import_project.py +10 -0
- opengeodeweb_back/routes/schemas/inspect_file.json +2 -2
- opengeodeweb_back/routes/schemas/inspect_file.py +11 -0
- opengeodeweb_back/routes/schemas/kill.py +10 -0
- opengeodeweb_back/routes/schemas/missing_files.json +2 -2
- opengeodeweb_back/routes/schemas/missing_files.py +11 -0
- opengeodeweb_back/routes/schemas/ping.py +10 -0
- opengeodeweb_back/routes/schemas/polygon_attribute_names.py +10 -0
- opengeodeweb_back/routes/schemas/polyhedron_attribute_names.py +10 -0
- opengeodeweb_back/routes/schemas/save_viewable_file.json +2 -2
- opengeodeweb_back/routes/schemas/save_viewable_file.py +11 -0
- opengeodeweb_back/routes/schemas/texture_coordinates.py +10 -0
- opengeodeweb_back/routes/schemas/upload_file.py +11 -0
- opengeodeweb_back/routes/schemas/vertex_attribute_names.py +10 -0
- opengeodeweb_back/test_utils.py +9 -3
- opengeodeweb_back/utils_functions.py +77 -74
- {opengeodeweb_back-5.10.4.dist-info → opengeodeweb_back-5.14.1.dist-info}/METADATA +9 -9
- opengeodeweb_back-5.14.1.dist-info/RECORD +98 -0
- opengeodeweb_back/geode_objects.py +0 -570
- opengeodeweb_back/routes/schemas/create_point.json +0 -29
- opengeodeweb_back-5.10.4.dist-info/RECORD +0 -33
- {opengeodeweb_back-5.10.4.dist-info → opengeodeweb_back-5.14.1.dist-info}/WHEEL +0 -0
- {opengeodeweb_back-5.10.4.dist-info → opengeodeweb_back-5.14.1.dist-info}/entry_points.txt +0 -0
- {opengeodeweb_back-5.10.4.dist-info → opengeodeweb_back-5.14.1.dist-info}/licenses/LICENSE +0 -0
- {opengeodeweb_back-5.10.4.dist-info → opengeodeweb_back-5.14.1.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Standard library imports
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
# Third party imports
|
|
5
|
+
import opengeode as og
|
|
6
|
+
import opengeode_inspector as og_inspector
|
|
7
|
+
import geode_viewables as viewables
|
|
8
|
+
|
|
9
|
+
# Local application imports
|
|
10
|
+
from .types import GeodeMeshType
|
|
11
|
+
from .geode_grid2d import GeodeGrid2D
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class GeodeLightRegularGrid2D(GeodeGrid2D):
|
|
15
|
+
light_regular_grid: og.LightRegularGrid2D
|
|
16
|
+
|
|
17
|
+
def __init__(self, light_regular_grid: og.LightRegularGrid2D) -> None:
|
|
18
|
+
self.light_regular_grid = light_regular_grid
|
|
19
|
+
super().__init__(self.light_regular_grid)
|
|
20
|
+
|
|
21
|
+
@classmethod
|
|
22
|
+
def geode_object_type(cls) -> GeodeMeshType:
|
|
23
|
+
return "LightRegularGrid2D"
|
|
24
|
+
|
|
25
|
+
def native_extension(self) -> str:
|
|
26
|
+
return self.light_regular_grid.native_extension()
|
|
27
|
+
|
|
28
|
+
@classmethod
|
|
29
|
+
def load(cls, filename: str) -> GeodeLightRegularGrid2D:
|
|
30
|
+
return GeodeLightRegularGrid2D(og.load_light_regular_grid2D(filename))
|
|
31
|
+
|
|
32
|
+
@classmethod
|
|
33
|
+
def additional_files(cls, filename: str) -> og.AdditionalFiles:
|
|
34
|
+
return og.light_regular_grid_additional_files2D(filename)
|
|
35
|
+
|
|
36
|
+
@classmethod
|
|
37
|
+
def is_loadable(cls, filename: str) -> og.Percentage:
|
|
38
|
+
return og.is_light_regular_grid_loadable2D(filename)
|
|
39
|
+
|
|
40
|
+
@classmethod
|
|
41
|
+
def input_extensions(cls) -> list[str]:
|
|
42
|
+
return og.LightRegularGridInputFactory2D.list_creators()
|
|
43
|
+
|
|
44
|
+
@classmethod
|
|
45
|
+
def output_extensions(cls) -> list[str]:
|
|
46
|
+
return og.LightRegularGridOutputFactory2D.list_creators()
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def object_priority(cls, filename: str) -> int:
|
|
50
|
+
return og.light_regular_grid_object_priority2D(filename)
|
|
51
|
+
|
|
52
|
+
def is_saveable(self, filename: str) -> bool:
|
|
53
|
+
return og.is_light_regular_grid_saveable2D(self.light_regular_grid, filename)
|
|
54
|
+
|
|
55
|
+
def save(self, filename: str) -> list[str]:
|
|
56
|
+
return og.save_light_regular_grid2D(self.light_regular_grid, filename)
|
|
57
|
+
|
|
58
|
+
def save_viewable(self, filename_without_extension: str) -> str:
|
|
59
|
+
return viewables.save_viewable_light_regular_grid2D(
|
|
60
|
+
self.light_regular_grid, filename_without_extension
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
def save_light_viewable(self, filename_without_extension: str) -> str:
|
|
64
|
+
return viewables.save_light_viewable_light_regular_grid2D(
|
|
65
|
+
self.light_regular_grid, filename_without_extension
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
def vertex_attribute_manager(self) -> og.AttributeManager:
|
|
69
|
+
return self.light_regular_grid.grid_vertex_attribute_manager()
|
|
70
|
+
|
|
71
|
+
def cell_attribute_manager(self) -> og.AttributeManager:
|
|
72
|
+
return self.light_regular_grid.cell_attribute_manager()
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Standard library imports
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
# Third party imports
|
|
5
|
+
import opengeode as og
|
|
6
|
+
import opengeode_inspector as og_inspector
|
|
7
|
+
import geode_viewables as viewables
|
|
8
|
+
|
|
9
|
+
# Local application imports
|
|
10
|
+
from .types import GeodeMeshType
|
|
11
|
+
from .geode_grid3d import GeodeGrid3D
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class GeodeLightRegularGrid3D(GeodeGrid3D):
|
|
15
|
+
light_regular_grid: og.LightRegularGrid3D
|
|
16
|
+
|
|
17
|
+
def __init__(self, light_regular_grid: og.LightRegularGrid3D) -> None:
|
|
18
|
+
self.light_regular_grid = light_regular_grid
|
|
19
|
+
super().__init__(self.light_regular_grid)
|
|
20
|
+
|
|
21
|
+
@classmethod
|
|
22
|
+
def geode_object_type(cls) -> GeodeMeshType:
|
|
23
|
+
return "LightRegularGrid3D"
|
|
24
|
+
|
|
25
|
+
def native_extension(self) -> str:
|
|
26
|
+
return self.light_regular_grid.native_extension()
|
|
27
|
+
|
|
28
|
+
@classmethod
|
|
29
|
+
def load(cls, filename: str) -> GeodeLightRegularGrid3D:
|
|
30
|
+
return GeodeLightRegularGrid3D(og.load_light_regular_grid3D(filename))
|
|
31
|
+
|
|
32
|
+
@classmethod
|
|
33
|
+
def additional_files(cls, filename: str) -> og.AdditionalFiles:
|
|
34
|
+
return og.light_regular_grid_additional_files3D(filename)
|
|
35
|
+
|
|
36
|
+
@classmethod
|
|
37
|
+
def is_loadable(cls, filename: str) -> og.Percentage:
|
|
38
|
+
return og.is_light_regular_grid_loadable3D(filename)
|
|
39
|
+
|
|
40
|
+
@classmethod
|
|
41
|
+
def input_extensions(cls) -> list[str]:
|
|
42
|
+
return og.LightRegularGridInputFactory3D.list_creators()
|
|
43
|
+
|
|
44
|
+
@classmethod
|
|
45
|
+
def output_extensions(cls) -> list[str]:
|
|
46
|
+
return og.LightRegularGridOutputFactory3D.list_creators()
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def object_priority(cls, filename: str) -> int:
|
|
50
|
+
return og.light_regular_grid_object_priority3D(filename)
|
|
51
|
+
|
|
52
|
+
def is_saveable(self, filename: str) -> bool:
|
|
53
|
+
return og.is_light_regular_grid_saveable3D(self.light_regular_grid, filename)
|
|
54
|
+
|
|
55
|
+
def save(self, filename: str) -> list[str]:
|
|
56
|
+
return og.save_light_regular_grid3D(self.light_regular_grid, filename)
|
|
57
|
+
|
|
58
|
+
def save_viewable(self, filename_without_extension: str) -> str:
|
|
59
|
+
return viewables.save_viewable_light_regular_grid3D(
|
|
60
|
+
self.light_regular_grid, filename_without_extension
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
def save_light_viewable(self, filename_without_extension: str) -> str:
|
|
64
|
+
return viewables.save_light_viewable_light_regular_grid3D(
|
|
65
|
+
self.light_regular_grid, filename_without_extension
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
def vertex_attribute_manager(self) -> og.AttributeManager:
|
|
69
|
+
return self.light_regular_grid.grid_vertex_attribute_manager()
|
|
70
|
+
|
|
71
|
+
def cell_attribute_manager(self) -> og.AttributeManager:
|
|
72
|
+
return self.light_regular_grid.cell_attribute_manager()
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Standard library imports
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
from abc import abstractmethod
|
|
4
|
+
|
|
5
|
+
# Third party imports
|
|
6
|
+
import opengeode as og
|
|
7
|
+
|
|
8
|
+
# Local application imports
|
|
9
|
+
from .types import GeodeObjectType, ViewerType
|
|
10
|
+
from .geode_object import GeodeObject
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class GeodeMesh(GeodeObject):
|
|
14
|
+
@classmethod
|
|
15
|
+
def viewer_type(cls) -> ViewerType:
|
|
16
|
+
return "mesh"
|
|
17
|
+
|
|
18
|
+
@abstractmethod
|
|
19
|
+
def vertex_attribute_manager(self) -> og.AttributeManager: ...
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Standard library imports
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
from abc import ABC, abstractmethod
|
|
4
|
+
from typing import Literal, Any, get_args, cast
|
|
5
|
+
|
|
6
|
+
# Third party imports
|
|
7
|
+
import opengeode as og
|
|
8
|
+
|
|
9
|
+
# Local application imports
|
|
10
|
+
from .types import GeodeObjectType, GeodeModelType, ViewerType
|
|
11
|
+
from .geode_object import GeodeObject
|
|
12
|
+
|
|
13
|
+
ComponentRegistry = dict[og.ComponentType, list[og.uuid]]
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class GeodeModel(GeodeObject):
|
|
17
|
+
@classmethod
|
|
18
|
+
def viewer_type(cls) -> ViewerType:
|
|
19
|
+
return "model"
|
|
20
|
+
|
|
21
|
+
@abstractmethod
|
|
22
|
+
def mesh_components(self) -> ComponentRegistry: ...
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Standard library imports
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
from abc import ABC, abstractmethod
|
|
4
|
+
from typing import Literal, Any, get_args, cast
|
|
5
|
+
|
|
6
|
+
# Third party imports
|
|
7
|
+
import opengeode as og
|
|
8
|
+
|
|
9
|
+
# Local application imports
|
|
10
|
+
from .types import GeodeObjectType, ViewerType
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class GeodeObject(ABC):
|
|
14
|
+
identifier: og.Identifier
|
|
15
|
+
|
|
16
|
+
def __init__(self, identifier: og.Identifier | None = None) -> None:
|
|
17
|
+
self.identifier = identifier if identifier is not None else og.Identifier()
|
|
18
|
+
|
|
19
|
+
@classmethod
|
|
20
|
+
@abstractmethod
|
|
21
|
+
def geode_object_type(cls) -> GeodeObjectType: ...
|
|
22
|
+
|
|
23
|
+
@classmethod
|
|
24
|
+
@abstractmethod
|
|
25
|
+
def viewer_type(cls) -> ViewerType: ...
|
|
26
|
+
|
|
27
|
+
@classmethod
|
|
28
|
+
@abstractmethod
|
|
29
|
+
def is_3D(cls) -> bool: ...
|
|
30
|
+
|
|
31
|
+
@classmethod
|
|
32
|
+
@abstractmethod
|
|
33
|
+
def is_viewable(cls) -> bool: ...
|
|
34
|
+
|
|
35
|
+
@abstractmethod
|
|
36
|
+
def builder(self) -> Any: ...
|
|
37
|
+
|
|
38
|
+
@classmethod
|
|
39
|
+
@abstractmethod
|
|
40
|
+
def is_loadable(cls, filename: str) -> og.Percentage: ...
|
|
41
|
+
|
|
42
|
+
@classmethod
|
|
43
|
+
@abstractmethod
|
|
44
|
+
def load(cls, filename: str) -> GeodeObject: ...
|
|
45
|
+
|
|
46
|
+
@classmethod
|
|
47
|
+
@abstractmethod
|
|
48
|
+
def additional_files(cls, filename: str) -> og.AdditionalFiles: ...
|
|
49
|
+
|
|
50
|
+
@abstractmethod
|
|
51
|
+
def native_extension(cls) -> str: ...
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
@abstractmethod
|
|
55
|
+
def input_extensions(cls) -> list[str]: ...
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
@abstractmethod
|
|
59
|
+
def object_priority(cls, filename: str) -> int: ...
|
|
60
|
+
|
|
61
|
+
@classmethod
|
|
62
|
+
@abstractmethod
|
|
63
|
+
def output_extensions(cls) -> list[str]: ...
|
|
64
|
+
|
|
65
|
+
@abstractmethod
|
|
66
|
+
def is_saveable(self, filename: str) -> bool: ...
|
|
67
|
+
|
|
68
|
+
@abstractmethod
|
|
69
|
+
def save(self, filename: str) -> list[str]: ...
|
|
70
|
+
|
|
71
|
+
@abstractmethod
|
|
72
|
+
def save_viewable(self, filename_without_extension: str) -> str: ...
|
|
73
|
+
|
|
74
|
+
@abstractmethod
|
|
75
|
+
def save_light_viewable(self, filename_without_extension: str) -> str: ...
|
|
76
|
+
|
|
77
|
+
@abstractmethod
|
|
78
|
+
def inspect(self) -> Any: ...
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Standard library imports
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
# Third party imports
|
|
5
|
+
import opengeode as og
|
|
6
|
+
import opengeode_geosciences as og_geosciences
|
|
7
|
+
import opengeode_inspector as og_inspector
|
|
8
|
+
import geode_viewables as viewables
|
|
9
|
+
|
|
10
|
+
# Local application imports
|
|
11
|
+
from .types import GeodeMeshType
|
|
12
|
+
from .geode_vertex_set import GeodeVertexSet
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class GeodePointSet2D(GeodeVertexSet):
|
|
16
|
+
point_set: og.PointSet2D
|
|
17
|
+
|
|
18
|
+
def __init__(self, point_set: og.PointSet2D | None = None) -> None:
|
|
19
|
+
self.point_set = point_set if point_set is not None else og.PointSet2D.create()
|
|
20
|
+
super().__init__(self.point_set)
|
|
21
|
+
|
|
22
|
+
@classmethod
|
|
23
|
+
def geode_object_type(cls) -> GeodeMeshType:
|
|
24
|
+
return "PointSet2D"
|
|
25
|
+
|
|
26
|
+
def native_extension(self) -> str:
|
|
27
|
+
return self.point_set.native_extension()
|
|
28
|
+
|
|
29
|
+
@classmethod
|
|
30
|
+
def is_3D(cls) -> bool:
|
|
31
|
+
return False
|
|
32
|
+
|
|
33
|
+
@classmethod
|
|
34
|
+
def is_viewable(cls) -> bool:
|
|
35
|
+
return True
|
|
36
|
+
|
|
37
|
+
def builder(self) -> og.PointSetBuilder2D:
|
|
38
|
+
return og.PointSetBuilder2D.create(self.point_set)
|
|
39
|
+
|
|
40
|
+
@classmethod
|
|
41
|
+
def load(cls, filename: str) -> GeodePointSet2D:
|
|
42
|
+
return GeodePointSet2D(og.load_point_set2D(filename))
|
|
43
|
+
|
|
44
|
+
@classmethod
|
|
45
|
+
def additional_files(cls, filename: str) -> og.AdditionalFiles:
|
|
46
|
+
return og.point_set_additional_files2D(filename)
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def is_loadable(cls, filename: str) -> og.Percentage:
|
|
50
|
+
return og.is_point_set_loadable2D(filename)
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def input_extensions(cls) -> list[str]:
|
|
54
|
+
return og.PointSetInputFactory2D.list_creators()
|
|
55
|
+
|
|
56
|
+
@classmethod
|
|
57
|
+
def output_extensions(cls) -> list[str]:
|
|
58
|
+
return og.PointSetOutputFactory2D.list_creators()
|
|
59
|
+
|
|
60
|
+
@classmethod
|
|
61
|
+
def object_priority(cls, filename: str) -> int:
|
|
62
|
+
return og.point_set_object_priority2D(filename)
|
|
63
|
+
|
|
64
|
+
def is_saveable(self, filename: str) -> bool:
|
|
65
|
+
return og.is_point_set_saveable2D(self.point_set, filename)
|
|
66
|
+
|
|
67
|
+
def save(self, filename: str) -> list[str]:
|
|
68
|
+
return og.save_point_set2D(self.point_set, filename)
|
|
69
|
+
|
|
70
|
+
def save_viewable(self, filename_without_extension: str) -> str:
|
|
71
|
+
return viewables.save_viewable_point_set2D(
|
|
72
|
+
self.point_set, filename_without_extension
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
def save_light_viewable(self, filename_without_extension: str) -> str:
|
|
76
|
+
return viewables.save_light_viewable_point_set2D(
|
|
77
|
+
self.point_set, filename_without_extension
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
def inspect(self) -> og_inspector.PointSetInspectionResult:
|
|
81
|
+
return og_inspector.inspect_point_set2D(self.point_set)
|
|
82
|
+
|
|
83
|
+
def assign_crs(
|
|
84
|
+
self, crs_name: str, info: og_geosciences.GeographicCoordinateSystemInfo
|
|
85
|
+
) -> None:
|
|
86
|
+
builder = self.builder()
|
|
87
|
+
og_geosciences.assign_point_set_geographic_coordinate_system_info2D(
|
|
88
|
+
self.point_set, builder, crs_name, info
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
def convert_crs(
|
|
92
|
+
self, crs_name: str, info: og_geosciences.GeographicCoordinateSystemInfo
|
|
93
|
+
) -> None:
|
|
94
|
+
builder = self.builder()
|
|
95
|
+
og_geosciences.convert_point_set_coordinate_reference_system2D(
|
|
96
|
+
self.point_set, builder, crs_name, info
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
def create_crs(
|
|
100
|
+
self, crs_name: str, input: og.CoordinateSystem2D, output: og.CoordinateSystem2D
|
|
101
|
+
) -> None:
|
|
102
|
+
builder = self.builder()
|
|
103
|
+
og.create_point_set_coordinate_system2D(
|
|
104
|
+
self.point_set, builder, crs_name, input, output
|
|
105
|
+
)
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Standard library imports
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
# Third party imports
|
|
5
|
+
import opengeode as og
|
|
6
|
+
import opengeode_geosciences as og_geosciences
|
|
7
|
+
import opengeode_inspector as og_inspector
|
|
8
|
+
import geode_viewables as viewables
|
|
9
|
+
|
|
10
|
+
# Local application imports
|
|
11
|
+
from .types import GeodeMeshType
|
|
12
|
+
from .geode_vertex_set import GeodeVertexSet
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class GeodePointSet3D(GeodeVertexSet):
|
|
16
|
+
point_set: og.PointSet3D
|
|
17
|
+
|
|
18
|
+
def __init__(self, point_set: og.PointSet3D | None = None) -> None:
|
|
19
|
+
self.point_set = point_set if point_set is not None else og.PointSet3D.create()
|
|
20
|
+
super().__init__(self.point_set)
|
|
21
|
+
|
|
22
|
+
@classmethod
|
|
23
|
+
def geode_object_type(cls) -> GeodeMeshType:
|
|
24
|
+
return "PointSet3D"
|
|
25
|
+
|
|
26
|
+
def native_extension(self) -> str:
|
|
27
|
+
return self.point_set.native_extension()
|
|
28
|
+
|
|
29
|
+
@classmethod
|
|
30
|
+
def is_3D(cls) -> bool:
|
|
31
|
+
return True
|
|
32
|
+
|
|
33
|
+
@classmethod
|
|
34
|
+
def is_viewable(cls) -> bool:
|
|
35
|
+
return True
|
|
36
|
+
|
|
37
|
+
def builder(self) -> og.PointSetBuilder3D:
|
|
38
|
+
return og.PointSetBuilder3D.create(self.point_set)
|
|
39
|
+
|
|
40
|
+
@classmethod
|
|
41
|
+
def load(cls, filename: str) -> GeodePointSet3D:
|
|
42
|
+
return GeodePointSet3D(og.load_point_set3D(filename))
|
|
43
|
+
|
|
44
|
+
@classmethod
|
|
45
|
+
def additional_files(cls, filename: str) -> og.AdditionalFiles:
|
|
46
|
+
return og.point_set_additional_files3D(filename)
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def is_loadable(cls, filename: str) -> og.Percentage:
|
|
50
|
+
return og.is_point_set_loadable3D(filename)
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def input_extensions(cls) -> list[str]:
|
|
54
|
+
return og.PointSetInputFactory3D.list_creators()
|
|
55
|
+
|
|
56
|
+
@classmethod
|
|
57
|
+
def output_extensions(cls) -> list[str]:
|
|
58
|
+
return og.PointSetOutputFactory3D.list_creators()
|
|
59
|
+
|
|
60
|
+
@classmethod
|
|
61
|
+
def object_priority(cls, filename: str) -> int:
|
|
62
|
+
return og.point_set_object_priority3D(filename)
|
|
63
|
+
|
|
64
|
+
def is_saveable(self, filename: str) -> bool:
|
|
65
|
+
return og.is_point_set_saveable3D(self.point_set, filename)
|
|
66
|
+
|
|
67
|
+
def save(self, filename: str) -> list[str]:
|
|
68
|
+
return og.save_point_set3D(self.point_set, filename)
|
|
69
|
+
|
|
70
|
+
def save_viewable(self, filename_without_extension: str) -> str:
|
|
71
|
+
return viewables.save_viewable_point_set3D(
|
|
72
|
+
self.point_set, filename_without_extension
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
def save_light_viewable(self, filename_without_extension: str) -> str:
|
|
76
|
+
return viewables.save_light_viewable_point_set3D(
|
|
77
|
+
self.point_set, filename_without_extension
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
def inspect(self) -> og_inspector.PointSetInspectionResult:
|
|
81
|
+
return og_inspector.inspect_point_set3D(self.point_set)
|
|
82
|
+
|
|
83
|
+
def assign_crs(
|
|
84
|
+
self, crs_name: str, info: og_geosciences.GeographicCoordinateSystemInfo
|
|
85
|
+
) -> None:
|
|
86
|
+
builder = self.builder()
|
|
87
|
+
og_geosciences.assign_point_set_geographic_coordinate_system_info3D(
|
|
88
|
+
self.point_set, builder, crs_name, info
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
def convert_crs(
|
|
92
|
+
self, crs_name: str, info: og_geosciences.GeographicCoordinateSystemInfo
|
|
93
|
+
) -> None:
|
|
94
|
+
builder = self.builder()
|
|
95
|
+
og_geosciences.convert_point_set_coordinate_reference_system3D(
|
|
96
|
+
self.point_set, builder, crs_name, info
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
def create_crs(
|
|
100
|
+
self, crs_name: str, input: og.CoordinateSystem2D, output: og.CoordinateSystem2D
|
|
101
|
+
) -> None:
|
|
102
|
+
builder = self.builder()
|
|
103
|
+
og.create_point_set_coordinate_system3D(
|
|
104
|
+
self.point_set, builder, crs_name, input, output
|
|
105
|
+
)
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Standard library imports
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
# Third party imports
|
|
5
|
+
import opengeode as og
|
|
6
|
+
import opengeode_inspector as og_inspector
|
|
7
|
+
import geode_viewables as viewables
|
|
8
|
+
|
|
9
|
+
# Local application imports
|
|
10
|
+
from .types import GeodeMeshType
|
|
11
|
+
from .geode_surface_mesh2d import GeodeSurfaceMesh2D
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class GeodePolygonalSurface2D(GeodeSurfaceMesh2D):
|
|
15
|
+
polygonal_surface: og.PolygonalSurface2D
|
|
16
|
+
|
|
17
|
+
def __init__(self, polygonal_surface: og.PolygonalSurface2D | None = None) -> None:
|
|
18
|
+
self.polygonal_surface = (
|
|
19
|
+
polygonal_surface
|
|
20
|
+
if polygonal_surface is not None
|
|
21
|
+
else og.PolygonalSurface2D.create()
|
|
22
|
+
)
|
|
23
|
+
super().__init__(self.polygonal_surface)
|
|
24
|
+
|
|
25
|
+
@classmethod
|
|
26
|
+
def geode_object_type(cls) -> GeodeMeshType:
|
|
27
|
+
return "PolygonalSurface2D"
|
|
28
|
+
|
|
29
|
+
def native_extension(self) -> str:
|
|
30
|
+
return self.polygonal_surface.native_extension()
|
|
31
|
+
|
|
32
|
+
def builder(self) -> og.PolygonalSurfaceBuilder2D:
|
|
33
|
+
return og.PolygonalSurfaceBuilder2D.create(self.polygonal_surface)
|
|
34
|
+
|
|
35
|
+
@classmethod
|
|
36
|
+
def load(cls, filename: str) -> GeodePolygonalSurface2D:
|
|
37
|
+
return GeodePolygonalSurface2D(og.load_polygonal_surface2D(filename))
|
|
38
|
+
|
|
39
|
+
@classmethod
|
|
40
|
+
def additional_files(cls, filename: str) -> og.AdditionalFiles:
|
|
41
|
+
return og.polygonal_surface_additional_files2D(filename)
|
|
42
|
+
|
|
43
|
+
@classmethod
|
|
44
|
+
def is_loadable(cls, filename: str) -> og.Percentage:
|
|
45
|
+
return og.is_polygonal_surface_loadable2D(filename)
|
|
46
|
+
|
|
47
|
+
@classmethod
|
|
48
|
+
def input_extensions(cls) -> list[str]:
|
|
49
|
+
return og.PolygonalSurfaceInputFactory2D.list_creators()
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def output_extensions(cls) -> list[str]:
|
|
53
|
+
return og.PolygonalSurfaceOutputFactory2D.list_creators()
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def object_priority(cls, filename: str) -> int:
|
|
57
|
+
return og.polygonal_surface_object_priority2D(filename)
|
|
58
|
+
|
|
59
|
+
def is_saveable(self, filename: str) -> bool:
|
|
60
|
+
return og.is_polygonal_surface_saveable2D(self.polygonal_surface, filename)
|
|
61
|
+
|
|
62
|
+
def save(self, filename: str) -> list[str]:
|
|
63
|
+
return og.save_polygonal_surface2D(self.polygonal_surface, filename)
|
|
64
|
+
|
|
65
|
+
def save_viewable(self, filename_without_extension: str) -> str:
|
|
66
|
+
return viewables.save_viewable_polygonal_surface2D(
|
|
67
|
+
self.polygonal_surface, filename_without_extension
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
def save_light_viewable(self, filename_without_extension: str) -> str:
|
|
71
|
+
return viewables.save_light_viewable_polygonal_surface2D(
|
|
72
|
+
self.polygonal_surface, filename_without_extension
|
|
73
|
+
)
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Standard library imports
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
# Third party imports
|
|
5
|
+
import opengeode as og
|
|
6
|
+
import opengeode_inspector as og_inspector
|
|
7
|
+
import geode_viewables as viewables
|
|
8
|
+
|
|
9
|
+
# Local application imports
|
|
10
|
+
from .types import GeodeMeshType
|
|
11
|
+
from .geode_surface_mesh3d import GeodeSurfaceMesh3D
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class GeodePolygonalSurface3D(GeodeSurfaceMesh3D):
|
|
15
|
+
polygonal_surface: og.PolygonalSurface3D
|
|
16
|
+
|
|
17
|
+
def __init__(self, polygonal_surface: og.PolygonalSurface3D | None = None) -> None:
|
|
18
|
+
self.polygonal_surface = (
|
|
19
|
+
polygonal_surface
|
|
20
|
+
if polygonal_surface is not None
|
|
21
|
+
else og.PolygonalSurface3D.create()
|
|
22
|
+
)
|
|
23
|
+
super().__init__(self.polygonal_surface)
|
|
24
|
+
|
|
25
|
+
@classmethod
|
|
26
|
+
def geode_object_type(cls) -> GeodeMeshType:
|
|
27
|
+
return "PolygonalSurface3D"
|
|
28
|
+
|
|
29
|
+
def native_extension(self) -> str:
|
|
30
|
+
return self.polygonal_surface.native_extension()
|
|
31
|
+
|
|
32
|
+
def builder(self) -> og.PolygonalSurfaceBuilder3D:
|
|
33
|
+
return og.PolygonalSurfaceBuilder3D.create(self.polygonal_surface)
|
|
34
|
+
|
|
35
|
+
@classmethod
|
|
36
|
+
def load(cls, filename: str) -> GeodePolygonalSurface3D:
|
|
37
|
+
return GeodePolygonalSurface3D(og.load_polygonal_surface3D(filename))
|
|
38
|
+
|
|
39
|
+
@classmethod
|
|
40
|
+
def additional_files(cls, filename: str) -> og.AdditionalFiles:
|
|
41
|
+
return og.polygonal_surface_additional_files3D(filename)
|
|
42
|
+
|
|
43
|
+
@classmethod
|
|
44
|
+
def is_loadable(cls, filename: str) -> og.Percentage:
|
|
45
|
+
return og.is_polygonal_surface_loadable3D(filename)
|
|
46
|
+
|
|
47
|
+
@classmethod
|
|
48
|
+
def input_extensions(cls) -> list[str]:
|
|
49
|
+
return og.PolygonalSurfaceInputFactory3D.list_creators()
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def output_extensions(cls) -> list[str]:
|
|
53
|
+
return og.PolygonalSurfaceOutputFactory3D.list_creators()
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def object_priority(cls, filename: str) -> int:
|
|
57
|
+
return og.polygonal_surface_object_priority3D(filename)
|
|
58
|
+
|
|
59
|
+
def is_saveable(self, filename: str) -> bool:
|
|
60
|
+
return og.is_polygonal_surface_saveable3D(self.polygonal_surface, filename)
|
|
61
|
+
|
|
62
|
+
def save(self, filename: str) -> list[str]:
|
|
63
|
+
return og.save_polygonal_surface3D(self.polygonal_surface, filename)
|
|
64
|
+
|
|
65
|
+
def save_viewable(self, filename_without_extension: str) -> str:
|
|
66
|
+
return viewables.save_viewable_polygonal_surface3D(
|
|
67
|
+
self.polygonal_surface, filename_without_extension
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
def save_light_viewable(self, filename_without_extension: str) -> str:
|
|
71
|
+
return viewables.save_light_viewable_polygonal_surface3D(
|
|
72
|
+
self.polygonal_surface, filename_without_extension
|
|
73
|
+
)
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Standard library imports
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
# Third party imports
|
|
5
|
+
import opengeode as og
|
|
6
|
+
import opengeode_inspector as og_inspector
|
|
7
|
+
import geode_viewables as viewables
|
|
8
|
+
|
|
9
|
+
# Local application imports
|
|
10
|
+
from .types import GeodeMeshType
|
|
11
|
+
from .geode_solid_mesh3d import GeodeSolidMesh3D
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class GeodePolyhedralSolid3D(GeodeSolidMesh3D):
|
|
15
|
+
polyhedral_solid: og.PolyhedralSolid3D
|
|
16
|
+
|
|
17
|
+
def __init__(self, polyhedral_solid: og.PolyhedralSolid3D | None = None) -> None:
|
|
18
|
+
self.polyhedral_solid = (
|
|
19
|
+
polyhedral_solid
|
|
20
|
+
if polyhedral_solid is not None
|
|
21
|
+
else og.PolyhedralSolid3D.create()
|
|
22
|
+
)
|
|
23
|
+
super().__init__(self.polyhedral_solid)
|
|
24
|
+
|
|
25
|
+
@classmethod
|
|
26
|
+
def geode_object_type(cls) -> GeodeMeshType:
|
|
27
|
+
return "PolyhedralSolid3D"
|
|
28
|
+
|
|
29
|
+
def native_extension(self) -> str:
|
|
30
|
+
return self.polyhedral_solid.native_extension()
|
|
31
|
+
|
|
32
|
+
def builder(self) -> og.PolyhedralSolidBuilder3D:
|
|
33
|
+
return og.PolyhedralSolidBuilder3D.create(self.polyhedral_solid)
|
|
34
|
+
|
|
35
|
+
@classmethod
|
|
36
|
+
def load(cls, filename: str) -> GeodePolyhedralSolid3D:
|
|
37
|
+
return GeodePolyhedralSolid3D(og.load_polyhedral_solid3D(filename))
|
|
38
|
+
|
|
39
|
+
@classmethod
|
|
40
|
+
def additional_files(cls, filename: str) -> og.AdditionalFiles:
|
|
41
|
+
return og.polyhedral_solid_additional_files3D(filename)
|
|
42
|
+
|
|
43
|
+
@classmethod
|
|
44
|
+
def is_loadable(cls, filename: str) -> og.Percentage:
|
|
45
|
+
return og.is_polyhedral_solid_loadable3D(filename)
|
|
46
|
+
|
|
47
|
+
@classmethod
|
|
48
|
+
def input_extensions(cls) -> list[str]:
|
|
49
|
+
return og.PolyhedralSolidInputFactory3D.list_creators()
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def output_extensions(cls) -> list[str]:
|
|
53
|
+
return og.PolyhedralSolidOutputFactory3D.list_creators()
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def object_priority(cls, filename: str) -> int:
|
|
57
|
+
return og.polyhedral_solid_object_priority3D(filename)
|
|
58
|
+
|
|
59
|
+
def is_saveable(self, filename: str) -> bool:
|
|
60
|
+
return og.is_polyhedral_solid_saveable3D(self.polyhedral_solid, filename)
|
|
61
|
+
|
|
62
|
+
def save(self, filename: str) -> list[str]:
|
|
63
|
+
return og.save_polyhedral_solid3D(self.polyhedral_solid, filename)
|
|
64
|
+
|
|
65
|
+
def save_viewable(self, filename_without_extension: str) -> str:
|
|
66
|
+
return viewables.save_viewable_polyhedral_solid3D(
|
|
67
|
+
self.polyhedral_solid, filename_without_extension
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
def save_light_viewable(self, filename_without_extension: str) -> str:
|
|
71
|
+
return viewables.save_light_viewable_polyhedral_solid3D(
|
|
72
|
+
self.polyhedral_solid, filename_without_extension
|
|
73
|
+
)
|