stbkit 0.1.0a9.dev1__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.
- stbkit/__main__.py +10 -0
- stbkit/api/__init__.py +48 -0
- stbkit/api/experimental/__init__.py +19 -0
- stbkit/api/experimental/repository/__init__.py +30 -0
- stbkit/api/py.typed +0 -0
- stbkit/api/stb_latest.py +7 -0
- stbkit/api/stb_v2_0_2.py +11 -0
- stbkit/api/stb_v2_1_1.py +9 -0
- stbkit/cli/__init__.py +17 -0
- stbkit/cli/_internal/cli_main.py +114 -0
- stbkit/cli/_internal/common.py +126 -0
- stbkit/cli/_internal/constants_exit_code.py +59 -0
- stbkit/cli/_internal/converter.py +693 -0
- stbkit/cli/_internal/diff.py +213 -0
- stbkit/cli/_internal/entry_points.py +25 -0
- stbkit/cli/_internal/global_parent.py +70 -0
- stbkit/cli/_internal/show_versions.py +36 -0
- stbkit/cli/_internal/validate.py +310 -0
- stbkit/cli/commands/convert.py +16 -0
- stbkit/cli/commands/diff.py +16 -0
- stbkit/cli/commands/validate.py +16 -0
- stbkit/cli/py.typed +0 -0
- stbkit/tools/__init__.py +12 -0
- stbkit/tools/_internal/__init__.py +5 -0
- stbkit/tools/_internal/constants.py +21 -0
- stbkit/tools/_internal/data_model/building_geometry.py +1208 -0
- stbkit/tools/_internal/data_model/building_geometry_web.py +106 -0
- stbkit/tools/_internal/data_model/element_data.py +93 -0
- stbkit/tools/_internal/data_model/ifc_data/entity_data.py +67 -0
- stbkit/tools/_internal/data_model/ifc_data/entity_names.py +32 -0
- stbkit/tools/_internal/data_model/shape_data.py +1089 -0
- stbkit/tools/_internal/diff/__init__.py +5 -0
- stbkit/tools/_internal/diff/common.py +50 -0
- stbkit/tools/_internal/diff/diff_xml.py +796 -0
- stbkit/tools/_internal/matrix.py +51 -0
- stbkit/tools/_internal/optional_dependencies/__init__.py +5 -0
- stbkit/tools/_internal/optional_dependencies/ifc_common.py +28 -0
- stbkit/tools/_internal/optional_dependencies/ifc_exporter/ifc_entity_exporter.py +473 -0
- stbkit/tools/_internal/optional_dependencies/ifc_exporter/ifc_profile_exporter.py +267 -0
- stbkit/tools/_internal/optional_dependencies/ifc_exporter/ifc_representation_exporter.py +178 -0
- stbkit/tools/_internal/optional_dependencies/ifc_pipeline.py +133 -0
- stbkit/tools/_internal/optional_dependencies/ifc_to_building_geometry.py +64 -0
- stbkit/tools/_internal/stb_io.py +116 -0
- stbkit/tools/_internal/stb_repair/_common.py +24 -0
- stbkit/tools/_internal/stb_repair/_stb_repair.py +197 -0
- stbkit/tools/_internal/stb_repair/_stb_v2_0_2_repair.py +53 -0
- stbkit/tools/_internal/stb_repair/_stb_v2_1_0_repair.py +109 -0
- stbkit/tools/_internal/stb_repair/_stb_v2_1_1_repair.py +109 -0
- stbkit/tools/_internal/studio_report.py +49 -0
- stbkit/tools/_internal/utils/atomic_writer.py +57 -0
- stbkit/tools/_internal/utils/float_rounding.py +49 -0
- stbkit/tools/_internal/utils/girder_utils.py +91 -0
- stbkit/tools/_internal/utils/guid_utils.py +30 -0
- stbkit/tools/_internal/utils/mesh_utils.py +1305 -0
- stbkit/tools/_internal/utils/node_utils.py +50 -0
- stbkit/tools/_internal/utils/unit_utils.py +23 -0
- stbkit/tools/_internal/vectors.py +222 -0
- stbkit/tools/converters/__init__.py +39 -0
- stbkit/tools/converters/_internal/__init__.py +5 -0
- stbkit/tools/converters/_internal/building_geometry_to_ply_text.py +32 -0
- stbkit/tools/converters/_internal/coord_converter.py +151 -0
- stbkit/tools/converters/_internal/element_data_to_building_geometry.py +549 -0
- stbkit/tools/converters/_internal/ifc_to_ply_text.py +21 -0
- stbkit/tools/converters/_internal/name_converter.py +23 -0
- stbkit/tools/converters/_internal/pipeline/__init__.py +5 -0
- stbkit/tools/converters/_internal/pipeline/data.py +188 -0
- stbkit/tools/converters/_internal/pipeline/execution.py +569 -0
- stbkit/tools/converters/_internal/pipeline/ply_pipeline.py +52 -0
- stbkit/tools/converters/_internal/pipeline/stb_pipeline.py +226 -0
- stbkit/tools/converters/_internal/pipeline/stb_pipeline_latest.py +39 -0
- stbkit/tools/converters/_internal/pipeline/step.py +139 -0
- stbkit/tools/converters/_internal/stb_latest_to_element_data/__init__.py +17 -0
- stbkit/tools/converters/_internal/stb_latest_to_element_data/_stb_latest_to_element_data.py +186 -0
- stbkit/tools/converters/_internal/stb_latest_to_element_data/member/member_footing.py +49 -0
- stbkit/tools/converters/_internal/stb_latest_to_element_data/member/member_line.py +533 -0
- stbkit/tools/converters/_internal/stb_latest_to_element_data/member/member_pile.py +100 -0
- stbkit/tools/converters/_internal/stb_latest_to_element_data/member/member_plane.py +103 -0
- stbkit/tools/converters/_internal/stb_latest_to_element_data/open.py +70 -0
- stbkit/tools/converters/_internal/stb_latest_to_element_data/section/sec.py +214 -0
- stbkit/tools/converters/_internal/stb_latest_to_element_data/section/sec_beam_rc.py +67 -0
- stbkit/tools/converters/_internal/stb_latest_to_element_data/section/sec_beam_s.py +97 -0
- stbkit/tools/converters/_internal/stb_latest_to_element_data/section/sec_beam_src.py +28 -0
- stbkit/tools/converters/_internal/stb_latest_to_element_data/section/sec_brace_s.py +49 -0
- stbkit/tools/converters/_internal/stb_latest_to_element_data/section/sec_column_cft.py +217 -0
- stbkit/tools/converters/_internal/stb_latest_to_element_data/section/sec_column_rc.py +41 -0
- stbkit/tools/converters/_internal/stb_latest_to_element_data/section/sec_column_s.py +127 -0
- stbkit/tools/converters/_internal/stb_latest_to_element_data/section/sec_column_src.py +173 -0
- stbkit/tools/converters/_internal/stb_latest_to_element_data/section/sec_foundation.py +225 -0
- stbkit/tools/converters/_internal/stb_latest_to_element_data/section/sec_parapet_rc.py +53 -0
- stbkit/tools/converters/_internal/stb_latest_to_element_data/section/sec_pile_rc.py +106 -0
- stbkit/tools/converters/_internal/stb_latest_to_element_data/section/sec_pile_s.py +100 -0
- stbkit/tools/converters/_internal/stb_latest_to_element_data/section/sec_steel.py +432 -0
- stbkit/tools/converters/_internal/stb_to_building_geometry.py +44 -0
- stbkit/tools/converters/_internal/stb_to_ifc_data/__init__.py +5 -0
- stbkit/tools/converters/_internal/stb_to_ifc_data/_stb_to_ifc_data.py +59 -0
- stbkit/tools/converters/_internal/stb_to_ifc_data/convert_option.py +22 -0
- stbkit/tools/converters/_internal/stb_to_ply_text.py +22 -0
- stbkit/tools/py.typed +0 -0
- stbkit/tools/upgrade/__init__.py +13 -0
- stbkit/tools/upgrade/_internal/__init__.py +5 -0
- stbkit/tools/upgrade/_internal/common.py +205 -0
- stbkit/tools/upgrade/_internal/upgrade.py +228 -0
- stbkit/tools/upgrade/_internal/v2_0_2_to_v2_1_0/__init__.py +60 -0
- stbkit/tools/upgrade/_internal/v2_0_2_to_v2_1_0/hook_funcs/hook_common.py +62 -0
- stbkit/tools/upgrade/_internal/v2_0_2_to_v2_1_0/hook_funcs/hook_joint_beam_shape_h.py +44 -0
- stbkit/tools/upgrade/_internal/v2_0_2_to_v2_1_0/hook_funcs/hook_sec_pile_rc.py +101 -0
- stbkit/tools/upgrade/_internal/v2_0_2_to_v2_1_0/hook_funcs/hook_sec_pile_s.py +78 -0
- stbkit/tools/upgrade/_internal/v2_0_2_to_v2_1_0/hook_funcs/hook_sec_slab_deck.py +56 -0
- stbkit/tools/upgrade/_internal/v2_0_2_to_v2_1_0/hook_funcs/hook_sec_slab_rc.py +128 -0
- stbkit/tools/upgrade/_internal/v2_0_2_to_v2_1_0/hook_funcs/post_girder.py +126 -0
- stbkit/tools/upgrade/_internal/v2_0_2_to_v2_1_0/hook_funcs/post_open.py +110 -0
- stbkit/tools/upgrade/_internal/v2_0_2_to_v2_1_0/hook_funcs/post_sec_beam_rc.py +227 -0
- stbkit/tools/upgrade/_internal/v2_0_2_to_v2_1_0/hook_funcs/post_sec_beam_s.py +1153 -0
- stbkit/tools/upgrade/_internal/v2_0_2_to_v2_1_0/hooks.py +22 -0
- stbkit/tools/upgrade/_internal/v2_0_2_to_v2_1_0/post.py +42 -0
- stbkit/tools/upgrade/_internal/v2_0_2_to_v2_1_0/tables.py +99 -0
- stbkit/tools/upgrade/_internal/v2_1_0_to_v2_1_1/__init__.py +58 -0
- stbkit/tools/upgrade/_internal/v2_1_0_to_v2_1_1/hooks.py +32 -0
- stbkit/tools/upgrade/_internal/v2_1_0_to_v2_1_1/tables.py +56 -0
- stbkit-0.1.0a9.dev1.dist-info/METADATA +196 -0
- stbkit-0.1.0a9.dev1.dist-info/RECORD +125 -0
- stbkit-0.1.0a9.dev1.dist-info/WHEEL +5 -0
- stbkit-0.1.0a9.dev1.dist-info/entry_points.txt +2 -0
- stbkit-0.1.0a9.dev1.dist-info/licenses/LICENSE +373 -0
- stbkit-0.1.0a9.dev1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Copyright 2026 TAISEI CORPORATION
|
|
2
|
+
# SPDX-License-Identifier: MPL-2.0
|
|
3
|
+
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
6
|
+
|
|
7
|
+
from stbkit.core.data_model.common import StBridgeRoot
|
|
8
|
+
from stbkit.core.stb_io import loads
|
|
9
|
+
from stbkit.core.stb_reporting import Reporter, get_reporter
|
|
10
|
+
|
|
11
|
+
from stbkit.api import upgrade_to_latest
|
|
12
|
+
from stbkit.api.stb_latest import StBridge
|
|
13
|
+
from stbkit.tools.converters._internal.stb_to_building_geometry import (
|
|
14
|
+
stb_to_building_geometry,
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
from .building_geometry import BuildingGeometry, OptionalUuidColumn
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def _uuid_strings(column: OptionalUuidColumn) -> list[str | None]:
|
|
21
|
+
def _get_string(index: int) -> str | None:
|
|
22
|
+
value = column.get(index)
|
|
23
|
+
return None if value is None else str(value)
|
|
24
|
+
|
|
25
|
+
return [_get_string(index) for index in range(len(column))]
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def building_geometry_to_web_payload(
|
|
29
|
+
geometry: BuildingGeometry,
|
|
30
|
+
) -> dict[str, object]:
|
|
31
|
+
geometry.freeze()
|
|
32
|
+
|
|
33
|
+
return {
|
|
34
|
+
"origin_xyz": list(geometry.origin_xyz),
|
|
35
|
+
"mesh": {
|
|
36
|
+
"positions": list(geometry.mesh.positions),
|
|
37
|
+
"face_vertex_indices": list(geometry.mesh.face_vertex_indices),
|
|
38
|
+
"face_offsets": list(geometry.mesh.face_offsets),
|
|
39
|
+
},
|
|
40
|
+
"elements": {
|
|
41
|
+
"kind": list(geometry.elements.kind),
|
|
42
|
+
"flags": list(geometry.elements.flags),
|
|
43
|
+
"vertex_start": list(geometry.elements.vertex_start),
|
|
44
|
+
"vertex_count": list(geometry.elements.vertex_count),
|
|
45
|
+
"face_start": list(geometry.elements.face_start),
|
|
46
|
+
"face_count": list(geometry.elements.face_count),
|
|
47
|
+
"line_shape_index": list(geometry.elements.line_shape_index),
|
|
48
|
+
"plane_shape_index": list(geometry.elements.plane_shape_index),
|
|
49
|
+
"node_start": list(geometry.elements.node_start),
|
|
50
|
+
"node_count": list(geometry.elements.node_count),
|
|
51
|
+
"story_start": list(geometry.elements.story_start),
|
|
52
|
+
"story_count": list(geometry.elements.story_count),
|
|
53
|
+
"guid": _uuid_strings(geometry.elements.guid),
|
|
54
|
+
"xpath": list(geometry.elements.xpath),
|
|
55
|
+
"name": list(geometry.elements.name),
|
|
56
|
+
"source_type": list(geometry.elements.source_type),
|
|
57
|
+
"source_id": list(geometry.elements.source_id),
|
|
58
|
+
},
|
|
59
|
+
"line_shapes": {
|
|
60
|
+
"start_end_xyz": list(geometry.line_shapes.start_end_xyz),
|
|
61
|
+
"reference_y_xyz": list(geometry.line_shapes.reference_y_xyz),
|
|
62
|
+
"reference_y_valid": list(geometry.line_shapes.reference_y_valid),
|
|
63
|
+
},
|
|
64
|
+
"plane_shapes": {
|
|
65
|
+
"points_xyz": list(geometry.plane_shapes.points_xyz),
|
|
66
|
+
"loop_point_offsets": list(geometry.plane_shapes.loop_point_offsets),
|
|
67
|
+
"plane_loop_offsets": list(geometry.plane_shapes.plane_loop_offsets),
|
|
68
|
+
"loop_types": list(geometry.plane_shapes.loop_types),
|
|
69
|
+
},
|
|
70
|
+
"nodes": {
|
|
71
|
+
"positions_xyz": list(geometry.nodes.positions_xyz),
|
|
72
|
+
"source_id": list(geometry.nodes.source_id),
|
|
73
|
+
"guid": _uuid_strings(geometry.nodes.guid),
|
|
74
|
+
"story_index": list(geometry.nodes.story_index),
|
|
75
|
+
"xpath": list(geometry.nodes.xpath),
|
|
76
|
+
},
|
|
77
|
+
"stories": {
|
|
78
|
+
"source_id": list(geometry.stories.source_id),
|
|
79
|
+
"name": list(geometry.stories.name),
|
|
80
|
+
"elevations": list(geometry.stories.elevations),
|
|
81
|
+
},
|
|
82
|
+
"axes": {
|
|
83
|
+
"points_xyz": list(geometry.axes.points_xyz),
|
|
84
|
+
"point_start": list(geometry.axes.point_start),
|
|
85
|
+
"point_count": list(geometry.axes.point_count),
|
|
86
|
+
"source_id": list(geometry.axes.source_id),
|
|
87
|
+
"name": list(geometry.axes.name),
|
|
88
|
+
},
|
|
89
|
+
"element_node_indices": list(geometry.element_node_indices),
|
|
90
|
+
"element_story_indices": list(geometry.element_story_indices),
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
def stb_xml_to_web_payload(
|
|
95
|
+
xml: str,
|
|
96
|
+
*,
|
|
97
|
+
reporter: Reporter | None = None,
|
|
98
|
+
) -> dict[str, object]:
|
|
99
|
+
actual_reporter: Reporter = reporter or get_reporter()
|
|
100
|
+
root: StBridgeRoot = loads(xml, reporter=actual_reporter)
|
|
101
|
+
stb: StBridge = upgrade_to_latest(root, reporter=actual_reporter)
|
|
102
|
+
geometry: BuildingGeometry = stb_to_building_geometry(
|
|
103
|
+
stb,
|
|
104
|
+
reporter=actual_reporter,
|
|
105
|
+
)
|
|
106
|
+
return building_geometry_to_web_payload(geometry)
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Copyright 2025-2026 TAISEI CORPORATION
|
|
2
|
+
# SPDX-License-Identifier: MPL-2.0
|
|
3
|
+
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
6
|
+
|
|
7
|
+
from dataclasses import dataclass, field
|
|
8
|
+
from enum import StrEnum
|
|
9
|
+
from uuid import UUID
|
|
10
|
+
|
|
11
|
+
from stbkit.tools._internal.vectors import Vector2d, Vector3d
|
|
12
|
+
|
|
13
|
+
from .shape_data import (
|
|
14
|
+
ShapePair,
|
|
15
|
+
ShapePosition,
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class ElementType(StrEnum):
|
|
20
|
+
COLUMN = "column"
|
|
21
|
+
POST = "post"
|
|
22
|
+
GIRDER = "girder"
|
|
23
|
+
BEAM = "beam"
|
|
24
|
+
BRACE = "brace"
|
|
25
|
+
SLAB = "slab"
|
|
26
|
+
WALL = "wall"
|
|
27
|
+
ISOLATING_DEVICE = "isolating_device"
|
|
28
|
+
DAMPING_DEVICE = "damping_device"
|
|
29
|
+
FRAME_DAMPING_DEVICE = "frame_damping_device"
|
|
30
|
+
FOOTING = "footing"
|
|
31
|
+
STRIP_FOOTING = "strip_footing"
|
|
32
|
+
PILE = "pile"
|
|
33
|
+
FOUNDATION_COLUMN = "foundation_column"
|
|
34
|
+
PARAPET = "parapet"
|
|
35
|
+
OPEN = "open"
|
|
36
|
+
PENETRATION = "penetration"
|
|
37
|
+
JOINT = "joint"
|
|
38
|
+
PANEL_ZONE = "panel_zone"
|
|
39
|
+
CONNECTION = "connection"
|
|
40
|
+
OTHER = "other"
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
@dataclass(frozen=True, kw_only=True, slots=True)
|
|
44
|
+
class Node:
|
|
45
|
+
position: Vector3d
|
|
46
|
+
xpath: str | None = None
|
|
47
|
+
guid: UUID | None = None
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
@dataclass(eq=False, order=False, kw_only=True, slots=True)
|
|
51
|
+
class ElementPlane:
|
|
52
|
+
element_type: ElementType | None = None
|
|
53
|
+
name: str | None = None
|
|
54
|
+
guid: UUID | None = None
|
|
55
|
+
points: list[Vector3d] | None = None
|
|
56
|
+
thickness: float | None = None
|
|
57
|
+
opens: list[list[Vector2d]] = field(default_factory=list)
|
|
58
|
+
path: str | None = None
|
|
59
|
+
node_ids: list[int] = field(default_factory=list)
|
|
60
|
+
node_points: list[Vector3d] | None = None
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
@dataclass(eq=False, order=False, kw_only=True, slots=True)
|
|
64
|
+
class ElementLine:
|
|
65
|
+
element_type: ElementType | None = None
|
|
66
|
+
name: str | None = None
|
|
67
|
+
guid: UUID | None = None
|
|
68
|
+
lengths: list[float] = field(default_factory=list)
|
|
69
|
+
point_start: Vector3d | None = None
|
|
70
|
+
point_end: Vector3d | None = None
|
|
71
|
+
angle: float = 0.0
|
|
72
|
+
shapes: list[ShapePair] = field(default_factory=list)
|
|
73
|
+
axis_position: ShapePosition = ShapePosition.CENTER_CENTER
|
|
74
|
+
path: str | None = None
|
|
75
|
+
node_ids: list[int] = field(default_factory=list)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
@dataclass(eq=False, order=False, kw_only=True, slots=True)
|
|
79
|
+
class ElementLineSrc:
|
|
80
|
+
element_type: ElementType | None = None
|
|
81
|
+
name: str | None = None
|
|
82
|
+
guid: UUID | None = None
|
|
83
|
+
steel: ElementLine | None = None
|
|
84
|
+
rc: ElementLine | None = None
|
|
85
|
+
path: str | None = None
|
|
86
|
+
node_ids: list[int] = field(default_factory=list)
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
class ElementData(list[ElementLine | ElementPlane | ElementLineSrc]):
|
|
90
|
+
def __init__(
|
|
91
|
+
self, elements: list[ElementLine | ElementPlane | ElementLineSrc] | None = None
|
|
92
|
+
):
|
|
93
|
+
super().__init__(elements or [])
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Copyright 2025-2026 TAISEI CORPORATION
|
|
2
|
+
# SPDX-License-Identifier: MPL-2.0
|
|
3
|
+
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
6
|
+
|
|
7
|
+
from dataclasses import dataclass, field
|
|
8
|
+
from typing import TYPE_CHECKING
|
|
9
|
+
from uuid import UUID
|
|
10
|
+
|
|
11
|
+
from stbkit.core.stb_reporting import Reporter
|
|
12
|
+
|
|
13
|
+
from ..element_data import ElementData
|
|
14
|
+
|
|
15
|
+
if TYPE_CHECKING:
|
|
16
|
+
import ifcopenshell.file
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@dataclass(eq=False, order=False, kw_only=True, slots=True)
|
|
20
|
+
class IfcBuildingStorey:
|
|
21
|
+
name: str | None = None
|
|
22
|
+
guid: UUID | None = None
|
|
23
|
+
elements: ElementData = field(default_factory=ElementData)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
@dataclass(eq=False, order=False, kw_only=True, slots=True)
|
|
27
|
+
class IfcBuilding:
|
|
28
|
+
name: str | None = None
|
|
29
|
+
guid: UUID | None = None
|
|
30
|
+
building_storeys: list[IfcBuildingStorey] = field(default_factory=list)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
@dataclass(eq=False, order=False, kw_only=True, slots=True)
|
|
34
|
+
class IfcSite:
|
|
35
|
+
name: str | None = None
|
|
36
|
+
guid: UUID | None = None
|
|
37
|
+
building: IfcBuilding | None = None
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
@dataclass(eq=False, order=False, kw_only=True, slots=True)
|
|
41
|
+
class IfcProject:
|
|
42
|
+
name: str | None = None
|
|
43
|
+
guid: UUID | None = None
|
|
44
|
+
site: IfcSite | None = None
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
@dataclass(eq=False, order=False, kw_only=True, slots=True)
|
|
48
|
+
class IfcModel:
|
|
49
|
+
project: IfcProject | None = None
|
|
50
|
+
|
|
51
|
+
def to_ifc(
|
|
52
|
+
self,
|
|
53
|
+
*,
|
|
54
|
+
reporter: Reporter,
|
|
55
|
+
round_digits: int | None = None,
|
|
56
|
+
round_digits_mm: int | None = None,
|
|
57
|
+
) -> "ifcopenshell.file":
|
|
58
|
+
from ...optional_dependencies.ifc_exporter.ifc_entity_exporter import (
|
|
59
|
+
IfcEntityExporter,
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
return IfcEntityExporter.ifc_model_to_file(
|
|
63
|
+
self,
|
|
64
|
+
reporter=reporter,
|
|
65
|
+
round_digits=round_digits,
|
|
66
|
+
round_digits_mm=round_digits_mm,
|
|
67
|
+
)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Copyright 2025-2026 TAISEI CORPORATION
|
|
2
|
+
# SPDX-License-Identifier: MPL-2.0
|
|
3
|
+
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
6
|
+
|
|
7
|
+
from enum import StrEnum
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class EntityName(StrEnum):
|
|
11
|
+
IFC_BEAM = "IfcBeam"
|
|
12
|
+
IFC_BUILDING = "IfcBuilding"
|
|
13
|
+
IFC_BUILDING_STOREY = "IfcBuildingStorey"
|
|
14
|
+
IFC_C_SHAPE_PROFILE_DEF = "IfcCShapeProfileDef"
|
|
15
|
+
IFC_CIRCLE_PROFILE_DEF = "IfcCircleProfileDef"
|
|
16
|
+
IFC_CIRCLE_HOLLOW_PROFILE_DEF = "IfcCircleHollowProfileDef"
|
|
17
|
+
IFC_COLUMN = "IfcColumn"
|
|
18
|
+
IFC_ELEMENT_ASSEMBLY = "IfcElementAssembly"
|
|
19
|
+
IFC_FOOTING = "IfcFooting"
|
|
20
|
+
IFC_I_SHAPE_PROFILE_DEF = "IfcIShapeProfileDef"
|
|
21
|
+
IFC_MEMBER = "IfcMember"
|
|
22
|
+
IFC_PILE = "IfcPile"
|
|
23
|
+
IFC_PROJECT = "IfcProject"
|
|
24
|
+
IFC_REL_AGGREGATES = "IfcRelAggregates"
|
|
25
|
+
IFC_REL_CONTAINED_IN_SPATIAL_STRUCTURE = "IfcRelContainedInSpatialStructure"
|
|
26
|
+
IFC_RECTANGLE_HOLLOW_PROFILE_DEF = "IfcRectangleHollowProfileDef"
|
|
27
|
+
IFC_RECTANGLE_PROFILE_DEF = "IfcRectangleProfileDef"
|
|
28
|
+
IFC_SITE = "IfcSite"
|
|
29
|
+
IFC_SLAB = "IfcSlab"
|
|
30
|
+
IFC_T_SHAPE_PROFILE_DEF = "IfcTShapeProfileDef"
|
|
31
|
+
IFC_U_SHAPE_PROFILE_DEF = "IfcUShapeProfileDef"
|
|
32
|
+
IFC_WALL = "IfcWall"
|