OpenGeodeWeb-Back 5.10.0rc22__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 +173 -0
- opengeodeweb_back/app_config.py +1 -10
- 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 +352 -231
- 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.json +10 -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 +93 -88
- {opengeodeweb_back-5.10.0rc22.dist-info → opengeodeweb_back-5.14.1.dist-info}/METADATA +17 -22
- opengeodeweb_back-5.14.1.dist-info/RECORD +98 -0
- opengeodeweb_back-5.14.1.dist-info/entry_points.txt +2 -0
- opengeodeweb_back/geode_objects.py +0 -570
- opengeodeweb_back/routes/schemas/create_point.json +0 -29
- opengeodeweb_back-5.10.0rc22.dist-info/RECORD +0 -30
- {opengeodeweb_back-5.10.0rc22.dist-info → opengeodeweb_back-5.14.1.dist-info}/WHEEL +0 -0
- {opengeodeweb_back-5.10.0rc22.dist-info → opengeodeweb_back-5.14.1.dist-info}/licenses/LICENSE +0 -0
- {opengeodeweb_back-5.10.0rc22.dist-info → opengeodeweb_back-5.14.1.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,102 @@
|
|
|
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 GeodeModelType
|
|
12
|
+
from .geode_model import GeodeModel, ComponentRegistry
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class GeodeBRep(GeodeModel):
|
|
16
|
+
brep: og.BRep
|
|
17
|
+
|
|
18
|
+
def __init__(self, brep: og.BRep | None = None) -> None:
|
|
19
|
+
self.brep = brep if brep is not None else og.BRep()
|
|
20
|
+
super().__init__(self.brep)
|
|
21
|
+
|
|
22
|
+
@classmethod
|
|
23
|
+
def geode_object_type(cls) -> GeodeModelType:
|
|
24
|
+
return "BRep"
|
|
25
|
+
|
|
26
|
+
def native_extension(self) -> str:
|
|
27
|
+
return self.brep.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.BRepBuilder:
|
|
38
|
+
return og.BRepBuilder(self.brep)
|
|
39
|
+
|
|
40
|
+
@classmethod
|
|
41
|
+
def load(cls, filename: str) -> GeodeBRep:
|
|
42
|
+
return GeodeBRep(og.load_brep(filename))
|
|
43
|
+
|
|
44
|
+
@classmethod
|
|
45
|
+
def additional_files(cls, filename: str) -> og.AdditionalFiles:
|
|
46
|
+
return og.brep_additional_files(filename)
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def is_loadable(cls, filename: str) -> og.Percentage:
|
|
50
|
+
return og.is_brep_loadable(filename)
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def input_extensions(cls) -> list[str]:
|
|
54
|
+
return og.BRepInputFactory.list_creators()
|
|
55
|
+
|
|
56
|
+
@classmethod
|
|
57
|
+
def output_extensions(cls) -> list[str]:
|
|
58
|
+
return og.BRepOutputFactory.list_creators()
|
|
59
|
+
|
|
60
|
+
@classmethod
|
|
61
|
+
def object_priority(cls, filename: str) -> int:
|
|
62
|
+
return og.brep_object_priority(filename)
|
|
63
|
+
|
|
64
|
+
def is_saveable(self, filename: str) -> bool:
|
|
65
|
+
return og.is_brep_saveable(self.brep, filename)
|
|
66
|
+
|
|
67
|
+
def save(self, filename: str) -> list[str]:
|
|
68
|
+
return og.save_brep(self.brep, filename)
|
|
69
|
+
|
|
70
|
+
def save_viewable(self, filename_without_extension: str) -> str:
|
|
71
|
+
return viewables.save_viewable_brep(self.brep, filename_without_extension)
|
|
72
|
+
|
|
73
|
+
def save_light_viewable(self, filename_without_extension: str) -> str:
|
|
74
|
+
return viewables.save_light_viewable_brep(self.brep, filename_without_extension)
|
|
75
|
+
|
|
76
|
+
def mesh_components(self) -> ComponentRegistry:
|
|
77
|
+
return self.brep.mesh_components()
|
|
78
|
+
|
|
79
|
+
def inspect(self) -> og_inspector.BRepInspectionResult:
|
|
80
|
+
return og_inspector.inspect_brep(self.brep)
|
|
81
|
+
|
|
82
|
+
def assign_crs(
|
|
83
|
+
self, crs_name: str, info: og_geosciences.GeographicCoordinateSystemInfo
|
|
84
|
+
) -> None:
|
|
85
|
+
builder = self.builder()
|
|
86
|
+
og_geosciences.assign_brep_geographic_coordinate_system_info(
|
|
87
|
+
self.brep, builder, crs_name, info
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
def convert_crs(
|
|
91
|
+
self, crs_name: str, info: og_geosciences.GeographicCoordinateSystemInfo
|
|
92
|
+
) -> None:
|
|
93
|
+
builder = self.builder()
|
|
94
|
+
og_geosciences.convert_brep_coordinate_reference_system(
|
|
95
|
+
self.brep, builder, crs_name, info
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
def create_crs(
|
|
99
|
+
self, crs_name: str, input: og.CoordinateSystem2D, output: og.CoordinateSystem2D
|
|
100
|
+
) -> None:
|
|
101
|
+
builder = self.builder()
|
|
102
|
+
og.create_brep_coordinate_system(self.brep, builder, crs_name, input, output)
|
|
@@ -0,0 +1,75 @@
|
|
|
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 geode_viewables as viewables
|
|
8
|
+
|
|
9
|
+
# Local application imports
|
|
10
|
+
from .types import GeodeModelType
|
|
11
|
+
from .geode_section import GeodeSection
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class GeodeCrossSection(GeodeSection):
|
|
15
|
+
cross_section: og_geosciences.CrossSection
|
|
16
|
+
|
|
17
|
+
def __init__(
|
|
18
|
+
self, cross_section: og_geosciences.CrossSection | None = None
|
|
19
|
+
) -> None:
|
|
20
|
+
self.cross_section = (
|
|
21
|
+
cross_section
|
|
22
|
+
if cross_section is not None
|
|
23
|
+
else og_geosciences.CrossSection()
|
|
24
|
+
)
|
|
25
|
+
super().__init__(self.cross_section)
|
|
26
|
+
|
|
27
|
+
@classmethod
|
|
28
|
+
def geode_object_type(cls) -> GeodeModelType:
|
|
29
|
+
return "CrossSection"
|
|
30
|
+
|
|
31
|
+
def native_extension(self) -> str:
|
|
32
|
+
return self.cross_section.native_extension()
|
|
33
|
+
|
|
34
|
+
def builder(self) -> og_geosciences.CrossSectionBuilder:
|
|
35
|
+
return og_geosciences.CrossSectionBuilder(self.cross_section)
|
|
36
|
+
|
|
37
|
+
@classmethod
|
|
38
|
+
def load(cls, filename: str) -> GeodeCrossSection:
|
|
39
|
+
return GeodeCrossSection(og_geosciences.load_cross_section(filename))
|
|
40
|
+
|
|
41
|
+
@classmethod
|
|
42
|
+
def additional_files(cls, filename: str) -> og.AdditionalFiles:
|
|
43
|
+
return og_geosciences.cross_section_additional_files(filename)
|
|
44
|
+
|
|
45
|
+
@classmethod
|
|
46
|
+
def is_loadable(cls, filename: str) -> og.Percentage:
|
|
47
|
+
return og_geosciences.is_cross_section_loadable(filename)
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def input_extensions(cls) -> list[str]:
|
|
51
|
+
return og_geosciences.CrossSectionInputFactory.list_creators()
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def output_extensions(cls) -> list[str]:
|
|
55
|
+
return og_geosciences.CrossSectionOutputFactory.list_creators()
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def object_priority(cls, filename: str) -> int:
|
|
59
|
+
return og_geosciences.cross_section_object_priority(filename)
|
|
60
|
+
|
|
61
|
+
def is_saveable(self, filename: str) -> bool:
|
|
62
|
+
return og_geosciences.is_cross_section_saveable(self.cross_section, filename)
|
|
63
|
+
|
|
64
|
+
def save(self, filename: str) -> list[str]:
|
|
65
|
+
return og_geosciences.save_cross_section(self.cross_section, filename)
|
|
66
|
+
|
|
67
|
+
def save_viewable(self, filename_without_extension: str) -> str:
|
|
68
|
+
return viewables.save_viewable_cross_section(
|
|
69
|
+
self.cross_section, filename_without_extension
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
def save_light_viewable(self, filename_without_extension: str) -> str:
|
|
73
|
+
return viewables.save_light_viewable_cross_section(
|
|
74
|
+
self.cross_section, filename_without_extension
|
|
75
|
+
)
|
|
@@ -0,0 +1,107 @@
|
|
|
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_graph import GeodeGraph
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class GeodeEdgedCurve2D(GeodeGraph):
|
|
16
|
+
edged_curve: og.EdgedCurve2D
|
|
17
|
+
|
|
18
|
+
def __init__(self, edged_curve: og.EdgedCurve2D | None = None) -> None:
|
|
19
|
+
self.edged_curve = (
|
|
20
|
+
edged_curve if edged_curve is not None else og.EdgedCurve2D.create()
|
|
21
|
+
)
|
|
22
|
+
super().__init__(self.edged_curve)
|
|
23
|
+
|
|
24
|
+
@classmethod
|
|
25
|
+
def geode_object_type(cls) -> GeodeMeshType:
|
|
26
|
+
return "EdgedCurve2D"
|
|
27
|
+
|
|
28
|
+
def native_extension(self) -> str:
|
|
29
|
+
return self.edged_curve.native_extension()
|
|
30
|
+
|
|
31
|
+
@classmethod
|
|
32
|
+
def is_3D(cls) -> bool:
|
|
33
|
+
return False
|
|
34
|
+
|
|
35
|
+
@classmethod
|
|
36
|
+
def is_viewable(cls) -> bool:
|
|
37
|
+
return True
|
|
38
|
+
|
|
39
|
+
def builder(self) -> og.EdgedCurveBuilder2D:
|
|
40
|
+
return og.EdgedCurveBuilder2D.create(self.edged_curve)
|
|
41
|
+
|
|
42
|
+
@classmethod
|
|
43
|
+
def load(cls, filename: str) -> GeodeEdgedCurve2D:
|
|
44
|
+
return GeodeEdgedCurve2D(og.load_edged_curve2D(filename))
|
|
45
|
+
|
|
46
|
+
@classmethod
|
|
47
|
+
def additional_files(cls, filename: str) -> og.AdditionalFiles:
|
|
48
|
+
return og.edged_curve_additional_files2D(filename)
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def is_loadable(cls, filename: str) -> og.Percentage:
|
|
52
|
+
return og.is_edged_curve_loadable2D(filename)
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def input_extensions(cls) -> list[str]:
|
|
56
|
+
return og.EdgedCurveInputFactory2D.list_creators()
|
|
57
|
+
|
|
58
|
+
@classmethod
|
|
59
|
+
def output_extensions(cls) -> list[str]:
|
|
60
|
+
return og.EdgedCurveOutputFactory2D.list_creators()
|
|
61
|
+
|
|
62
|
+
@classmethod
|
|
63
|
+
def object_priority(cls, filename: str) -> int:
|
|
64
|
+
return og.edged_curve_object_priority2D(filename)
|
|
65
|
+
|
|
66
|
+
def is_saveable(self, filename: str) -> bool:
|
|
67
|
+
return og.is_edged_curve_saveable2D(self.edged_curve, filename)
|
|
68
|
+
|
|
69
|
+
def save(self, filename: str) -> list[str]:
|
|
70
|
+
return og.save_edged_curve2D(self.edged_curve, filename)
|
|
71
|
+
|
|
72
|
+
def save_viewable(self, filename_without_extension: str) -> str:
|
|
73
|
+
return viewables.save_viewable_edged_curve2D(
|
|
74
|
+
self.edged_curve, filename_without_extension
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
def save_light_viewable(self, filename_without_extension: str) -> str:
|
|
78
|
+
return viewables.save_light_viewable_edged_curve2D(
|
|
79
|
+
self.edged_curve, filename_without_extension
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
def inspect(self) -> og_inspector.EdgedCurveInspectionResult:
|
|
83
|
+
return og_inspector.inspect_edged_curve2D(self.edged_curve)
|
|
84
|
+
|
|
85
|
+
def assign_crs(
|
|
86
|
+
self, crs_name: str, info: og_geosciences.GeographicCoordinateSystemInfo
|
|
87
|
+
) -> None:
|
|
88
|
+
builder = self.builder()
|
|
89
|
+
og_geosciences.assign_edged_curve_geographic_coordinate_system_info2D(
|
|
90
|
+
self.edged_curve, builder, crs_name, info
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
def convert_crs(
|
|
94
|
+
self, crs_name: str, info: og_geosciences.GeographicCoordinateSystemInfo
|
|
95
|
+
) -> None:
|
|
96
|
+
builder = self.builder()
|
|
97
|
+
og_geosciences.convert_edged_curve_coordinate_reference_system2D(
|
|
98
|
+
self.edged_curve, builder, crs_name, info
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
def create_crs(
|
|
102
|
+
self, crs_name: str, input: og.CoordinateSystem2D, output: og.CoordinateSystem2D
|
|
103
|
+
) -> None:
|
|
104
|
+
builder = self.builder()
|
|
105
|
+
og.create_edged_curve_coordinate_system2D(
|
|
106
|
+
self.edged_curve, builder, crs_name, input, output
|
|
107
|
+
)
|
|
@@ -0,0 +1,107 @@
|
|
|
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_graph import GeodeGraph
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class GeodeEdgedCurve3D(GeodeGraph):
|
|
16
|
+
edged_curve: og.EdgedCurve3D
|
|
17
|
+
|
|
18
|
+
def __init__(self, edged_curve: og.EdgedCurve3D | None = None) -> None:
|
|
19
|
+
self.edged_curve = (
|
|
20
|
+
edged_curve if edged_curve is not None else og.EdgedCurve3D.create()
|
|
21
|
+
)
|
|
22
|
+
super().__init__(self.edged_curve)
|
|
23
|
+
|
|
24
|
+
@classmethod
|
|
25
|
+
def geode_object_type(cls) -> GeodeMeshType:
|
|
26
|
+
return "EdgedCurve3D"
|
|
27
|
+
|
|
28
|
+
def native_extension(self) -> str:
|
|
29
|
+
return self.edged_curve.native_extension()
|
|
30
|
+
|
|
31
|
+
@classmethod
|
|
32
|
+
def is_3D(cls) -> bool:
|
|
33
|
+
return True
|
|
34
|
+
|
|
35
|
+
@classmethod
|
|
36
|
+
def is_viewable(cls) -> bool:
|
|
37
|
+
return True
|
|
38
|
+
|
|
39
|
+
def builder(self) -> og.EdgedCurveBuilder3D:
|
|
40
|
+
return og.EdgedCurveBuilder3D.create(self.edged_curve)
|
|
41
|
+
|
|
42
|
+
@classmethod
|
|
43
|
+
def load(cls, filename: str) -> GeodeEdgedCurve3D:
|
|
44
|
+
return GeodeEdgedCurve3D(og.load_edged_curve3D(filename))
|
|
45
|
+
|
|
46
|
+
@classmethod
|
|
47
|
+
def additional_files(cls, filename: str) -> og.AdditionalFiles:
|
|
48
|
+
return og.edged_curve_additional_files3D(filename)
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def is_loadable(cls, filename: str) -> og.Percentage:
|
|
52
|
+
return og.is_edged_curve_loadable3D(filename)
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def input_extensions(cls) -> list[str]:
|
|
56
|
+
return og.EdgedCurveInputFactory3D.list_creators()
|
|
57
|
+
|
|
58
|
+
@classmethod
|
|
59
|
+
def output_extensions(cls) -> list[str]:
|
|
60
|
+
return og.EdgedCurveOutputFactory3D.list_creators()
|
|
61
|
+
|
|
62
|
+
@classmethod
|
|
63
|
+
def object_priority(cls, filename: str) -> int:
|
|
64
|
+
return og.edged_curve_object_priority3D(filename)
|
|
65
|
+
|
|
66
|
+
def is_saveable(self, filename: str) -> bool:
|
|
67
|
+
return og.is_edged_curve_saveable3D(self.edged_curve, filename)
|
|
68
|
+
|
|
69
|
+
def save(self, filename: str) -> list[str]:
|
|
70
|
+
return og.save_edged_curve3D(self.edged_curve, filename)
|
|
71
|
+
|
|
72
|
+
def save_viewable(self, filename_without_extension: str) -> str:
|
|
73
|
+
return viewables.save_viewable_edged_curve3D(
|
|
74
|
+
self.edged_curve, filename_without_extension
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
def save_light_viewable(self, filename_without_extension: str) -> str:
|
|
78
|
+
return viewables.save_light_viewable_edged_curve3D(
|
|
79
|
+
self.edged_curve, filename_without_extension
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
def inspect(self) -> og_inspector.EdgedCurveInspectionResult:
|
|
83
|
+
return og_inspector.inspect_edged_curve3D(self.edged_curve)
|
|
84
|
+
|
|
85
|
+
def assign_crs(
|
|
86
|
+
self, crs_name: str, info: og_geosciences.GeographicCoordinateSystemInfo
|
|
87
|
+
) -> None:
|
|
88
|
+
builder = self.builder()
|
|
89
|
+
og_geosciences.assign_edged_curve_geographic_coordinate_system_info3D(
|
|
90
|
+
self.edged_curve, builder, crs_name, info
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
def convert_crs(
|
|
94
|
+
self, crs_name: str, info: og_geosciences.GeographicCoordinateSystemInfo
|
|
95
|
+
) -> None:
|
|
96
|
+
builder = self.builder()
|
|
97
|
+
og_geosciences.convert_edged_curve_coordinate_reference_system3D(
|
|
98
|
+
self.edged_curve, builder, crs_name, info
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
def create_crs(
|
|
102
|
+
self, crs_name: str, input: og.CoordinateSystem2D, output: og.CoordinateSystem2D
|
|
103
|
+
) -> None:
|
|
104
|
+
builder = self.builder()
|
|
105
|
+
og.create_edged_curve_coordinate_system3D(
|
|
106
|
+
self.edged_curve, builder, crs_name, input, output
|
|
107
|
+
)
|
|
@@ -0,0 +1,76 @@
|
|
|
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_vertex_set import GeodeVertexSet
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class GeodeGraph(GeodeVertexSet):
|
|
15
|
+
graph: og.Graph
|
|
16
|
+
|
|
17
|
+
def __init__(self, graph: og.Graph | None = None) -> None:
|
|
18
|
+
self.graph = graph if graph is not None else og.Graph.create()
|
|
19
|
+
super().__init__(self.graph)
|
|
20
|
+
|
|
21
|
+
@classmethod
|
|
22
|
+
def geode_object_type(cls) -> GeodeMeshType:
|
|
23
|
+
return "Graph"
|
|
24
|
+
|
|
25
|
+
def native_extension(self) -> str:
|
|
26
|
+
return self.graph.native_extension()
|
|
27
|
+
|
|
28
|
+
@classmethod
|
|
29
|
+
def is_3D(cls) -> bool:
|
|
30
|
+
return False
|
|
31
|
+
|
|
32
|
+
@classmethod
|
|
33
|
+
def is_viewable(cls) -> bool:
|
|
34
|
+
return False
|
|
35
|
+
|
|
36
|
+
def builder(self) -> og.GraphBuilder:
|
|
37
|
+
return og.GraphBuilder.create(self.graph)
|
|
38
|
+
|
|
39
|
+
@classmethod
|
|
40
|
+
def load(cls, filename: str) -> GeodeGraph:
|
|
41
|
+
return GeodeGraph(og.load_graph(filename))
|
|
42
|
+
|
|
43
|
+
@classmethod
|
|
44
|
+
def additional_files(cls, filename: str) -> og.AdditionalFiles:
|
|
45
|
+
return og.graph_additional_files(filename)
|
|
46
|
+
|
|
47
|
+
@classmethod
|
|
48
|
+
def is_loadable(cls, filename: str) -> og.Percentage:
|
|
49
|
+
return og.is_graph_loadable(filename)
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def input_extensions(cls) -> list[str]:
|
|
53
|
+
return og.GraphInputFactory.list_creators()
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def output_extensions(cls) -> list[str]:
|
|
57
|
+
return og.GraphOutputFactory.list_creators()
|
|
58
|
+
|
|
59
|
+
@classmethod
|
|
60
|
+
def object_priority(cls, filename: str) -> int:
|
|
61
|
+
return og.graph_object_priority(filename)
|
|
62
|
+
|
|
63
|
+
def is_saveable(self, filename: str) -> bool:
|
|
64
|
+
return og.is_graph_saveable(self.graph, filename)
|
|
65
|
+
|
|
66
|
+
def save(self, filename: str) -> list[str]:
|
|
67
|
+
return og.save_graph(self.graph, filename)
|
|
68
|
+
|
|
69
|
+
def save_viewable(self, filename_without_extension: str) -> str:
|
|
70
|
+
return ""
|
|
71
|
+
|
|
72
|
+
def save_light_viewable(self, filename_without_extension: str) -> str:
|
|
73
|
+
return ""
|
|
74
|
+
|
|
75
|
+
def inspect(self) -> object:
|
|
76
|
+
return None
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
import geode_viewables as viewables
|
|
8
|
+
|
|
9
|
+
# Local application imports
|
|
10
|
+
from .types import GeodeMeshType
|
|
11
|
+
from .geode_mesh import GeodeMesh
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class GeodeGrid2D(GeodeMesh):
|
|
15
|
+
@classmethod
|
|
16
|
+
def is_3D(cls) -> bool:
|
|
17
|
+
return False
|
|
18
|
+
|
|
19
|
+
@classmethod
|
|
20
|
+
def is_viewable(cls) -> bool:
|
|
21
|
+
return True
|
|
22
|
+
|
|
23
|
+
def builder(self) -> object:
|
|
24
|
+
return None
|
|
25
|
+
|
|
26
|
+
def inspect(self) -> object:
|
|
27
|
+
return None
|
|
28
|
+
|
|
29
|
+
@abstractmethod
|
|
30
|
+
def cell_attribute_manager(self) -> og.AttributeManager: ...
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
import geode_viewables as viewables
|
|
8
|
+
|
|
9
|
+
# Local application imports
|
|
10
|
+
from .types import GeodeMeshType
|
|
11
|
+
from .geode_mesh import GeodeMesh
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class GeodeGrid3D(GeodeMesh):
|
|
15
|
+
@classmethod
|
|
16
|
+
def is_3D(cls) -> bool:
|
|
17
|
+
return True
|
|
18
|
+
|
|
19
|
+
@classmethod
|
|
20
|
+
def is_viewable(cls) -> bool:
|
|
21
|
+
return True
|
|
22
|
+
|
|
23
|
+
def builder(self) -> object:
|
|
24
|
+
return None
|
|
25
|
+
|
|
26
|
+
def inspect(self) -> object:
|
|
27
|
+
return None
|
|
28
|
+
|
|
29
|
+
@abstractmethod
|
|
30
|
+
def cell_attribute_manager(self) -> og.AttributeManager: ...
|
|
@@ -0,0 +1,71 @@
|
|
|
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 GeodeHybridSolid3D(GeodeSolidMesh3D):
|
|
15
|
+
hybrid_solid: og.HybridSolid3D
|
|
16
|
+
|
|
17
|
+
def __init__(self, hybrid_solid: og.HybridSolid3D | None = None) -> None:
|
|
18
|
+
self.hybrid_solid = (
|
|
19
|
+
hybrid_solid if hybrid_solid is not None else og.HybridSolid3D.create()
|
|
20
|
+
)
|
|
21
|
+
super().__init__(self.hybrid_solid)
|
|
22
|
+
|
|
23
|
+
@classmethod
|
|
24
|
+
def geode_object_type(cls) -> GeodeMeshType:
|
|
25
|
+
return "HybridSolid3D"
|
|
26
|
+
|
|
27
|
+
def native_extension(self) -> str:
|
|
28
|
+
return self.hybrid_solid.native_extension()
|
|
29
|
+
|
|
30
|
+
def builder(self) -> og.HybridSolidBuilder3D:
|
|
31
|
+
return og.HybridSolidBuilder3D.create(self.hybrid_solid)
|
|
32
|
+
|
|
33
|
+
@classmethod
|
|
34
|
+
def load(cls, filename: str) -> GeodeHybridSolid3D:
|
|
35
|
+
return GeodeHybridSolid3D(og.load_hybrid_solid3D(filename))
|
|
36
|
+
|
|
37
|
+
@classmethod
|
|
38
|
+
def additional_files(cls, filename: str) -> og.AdditionalFiles:
|
|
39
|
+
return og.hybrid_solid_additional_files3D(filename)
|
|
40
|
+
|
|
41
|
+
@classmethod
|
|
42
|
+
def is_loadable(cls, filename: str) -> og.Percentage:
|
|
43
|
+
return og.is_hybrid_solid_loadable3D(filename)
|
|
44
|
+
|
|
45
|
+
@classmethod
|
|
46
|
+
def input_extensions(cls) -> list[str]:
|
|
47
|
+
return og.HybridSolidInputFactory3D.list_creators()
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def output_extensions(cls) -> list[str]:
|
|
51
|
+
return og.HybridSolidOutputFactory3D.list_creators()
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def object_priority(cls, filename: str) -> int:
|
|
55
|
+
return og.hybrid_solid_object_priority3D(filename)
|
|
56
|
+
|
|
57
|
+
def is_saveable(self, filename: str) -> bool:
|
|
58
|
+
return og.is_hybrid_solid_saveable3D(self.hybrid_solid, filename)
|
|
59
|
+
|
|
60
|
+
def save(self, filename: str) -> list[str]:
|
|
61
|
+
return og.save_hybrid_solid3D(self.hybrid_solid, filename)
|
|
62
|
+
|
|
63
|
+
def save_viewable(self, filename_without_extension: str) -> str:
|
|
64
|
+
return viewables.save_viewable_hybrid_solid3D(
|
|
65
|
+
self.hybrid_solid, filename_without_extension
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
def save_light_viewable(self, filename_without_extension: str) -> str:
|
|
69
|
+
return viewables.save_light_viewable_hybrid_solid3D(
|
|
70
|
+
self.hybrid_solid, filename_without_extension
|
|
71
|
+
)
|
|
@@ -0,0 +1,81 @@
|
|
|
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 geode_viewables as viewables
|
|
8
|
+
|
|
9
|
+
# Local application imports
|
|
10
|
+
from .types import GeodeModelType
|
|
11
|
+
from .geode_cross_section import GeodeCrossSection
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class GeodeImplicitCrossSection(GeodeCrossSection):
|
|
15
|
+
implicit_cross_section: og_geosciences.ImplicitCrossSection
|
|
16
|
+
|
|
17
|
+
def __init__(
|
|
18
|
+
self, implicit_cross_section: og_geosciences.ImplicitCrossSection | None = None
|
|
19
|
+
) -> None:
|
|
20
|
+
self.implicit_cross_section = (
|
|
21
|
+
implicit_cross_section
|
|
22
|
+
if implicit_cross_section is not None
|
|
23
|
+
else og_geosciences.ImplicitCrossSection()
|
|
24
|
+
)
|
|
25
|
+
super().__init__(self.implicit_cross_section)
|
|
26
|
+
|
|
27
|
+
@classmethod
|
|
28
|
+
def geode_object_type(cls) -> GeodeModelType:
|
|
29
|
+
return "ImplicitCrossSection"
|
|
30
|
+
|
|
31
|
+
def native_extension(self) -> str:
|
|
32
|
+
return self.implicit_cross_section.native_extension()
|
|
33
|
+
|
|
34
|
+
def builder(self) -> og_geosciences.ImplicitCrossSectionBuilder:
|
|
35
|
+
return og_geosciences.ImplicitCrossSectionBuilder(self.implicit_cross_section)
|
|
36
|
+
|
|
37
|
+
@classmethod
|
|
38
|
+
def load(cls, filename: str) -> GeodeImplicitCrossSection:
|
|
39
|
+
return GeodeImplicitCrossSection(
|
|
40
|
+
og_geosciences.load_implicit_cross_section(filename)
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
@classmethod
|
|
44
|
+
def additional_files(cls, filename: str) -> og.AdditionalFiles:
|
|
45
|
+
return og_geosciences.implicit_cross_section_additional_files(filename)
|
|
46
|
+
|
|
47
|
+
@classmethod
|
|
48
|
+
def is_loadable(cls, filename: str) -> og.Percentage:
|
|
49
|
+
return og_geosciences.is_implicit_cross_section_loadable(filename)
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def input_extensions(cls) -> list[str]:
|
|
53
|
+
return og_geosciences.ImplicitCrossSectionInputFactory.list_creators()
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def output_extensions(cls) -> list[str]:
|
|
57
|
+
return og_geosciences.ImplicitCrossSectionOutputFactory.list_creators()
|
|
58
|
+
|
|
59
|
+
@classmethod
|
|
60
|
+
def object_priority(cls, filename: str) -> int:
|
|
61
|
+
return og_geosciences.implicit_cross_section_object_priority(filename)
|
|
62
|
+
|
|
63
|
+
def is_saveable(self, filename: str) -> bool:
|
|
64
|
+
return og_geosciences.is_implicit_cross_section_saveable(
|
|
65
|
+
self.implicit_cross_section, filename
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
def save(self, filename: str) -> list[str]:
|
|
69
|
+
return og_geosciences.save_implicit_cross_section(
|
|
70
|
+
self.implicit_cross_section, filename
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
def save_viewable(self, filename_without_extension: str) -> str:
|
|
74
|
+
return viewables.save_viewable_implicit_cross_section(
|
|
75
|
+
self.implicit_cross_section, filename_without_extension
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
def save_light_viewable(self, filename_without_extension: str) -> str:
|
|
79
|
+
return viewables.save_light_viewable_implicit_cross_section(
|
|
80
|
+
self.implicit_cross_section, filename_without_extension
|
|
81
|
+
)
|