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,1153 @@
|
|
|
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
|
+
import copy
|
|
8
|
+
import uuid
|
|
9
|
+
from collections.abc import Callable, Sequence
|
|
10
|
+
from dataclasses import dataclass
|
|
11
|
+
from typing import Protocol
|
|
12
|
+
from uuid import UUID
|
|
13
|
+
|
|
14
|
+
from stbkit.core.data_model import stb_v2_0_2, stb_v2_1_0
|
|
15
|
+
from stbkit.core.data_model.common import StBridgeElement
|
|
16
|
+
from stbkit.core.repository import RepositoryV2_1_0
|
|
17
|
+
from stbkit.core.stb_exceptions import NoneAccessError, SchemaError
|
|
18
|
+
from stbkit.core.stb_reporting import Code, Phase, Reporter
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class HasShapeAndStrength(Protocol):
|
|
22
|
+
@property
|
|
23
|
+
def shape_or_none(self) -> str | None: ...
|
|
24
|
+
@property
|
|
25
|
+
def strength_main_or_none(self) -> str | None: ...
|
|
26
|
+
@property
|
|
27
|
+
def strength_web_or_none(self) -> str | None: ...
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class HasShapeAndStrengthAndPos(HasShapeAndStrength, Protocol):
|
|
31
|
+
@property
|
|
32
|
+
def pos(self) -> str: ...
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
@dataclass(frozen=True, kw_only=True, slots=True)
|
|
36
|
+
class SteelFigure:
|
|
37
|
+
original_element: StBridgeElement
|
|
38
|
+
straight: HasShapeAndStrength | None
|
|
39
|
+
tapers: Sequence[HasShapeAndStrengthAndPos]
|
|
40
|
+
joints: Sequence[HasShapeAndStrengthAndPos]
|
|
41
|
+
haunches: Sequence[HasShapeAndStrengthAndPos]
|
|
42
|
+
five_types: Sequence[HasShapeAndStrengthAndPos]
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class HasId(Protocol):
|
|
46
|
+
id: int
|
|
47
|
+
guid: UUID
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
@dataclass(frozen=True, kw_only=True, slots=True)
|
|
51
|
+
class SteelBeamKind[TShape: StBridgeElement, TSection: HasId]:
|
|
52
|
+
"""SとSRCで分ける処理"""
|
|
53
|
+
|
|
54
|
+
straight_shape: Callable[[int, stb_v2_1_0.StbSecSteelBeamStraight], TShape]
|
|
55
|
+
taper_shape: Callable[[int, stb_v2_1_0.StbSecSteelBeamTaper], TShape]
|
|
56
|
+
set_figure: Callable[[TSection, list[TShape]], None]
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def _set_figure_s(
|
|
60
|
+
section: stb_v2_1_0.StbSecBeamS, shapes: list[stb_v2_1_0.StbSecSteelBeamSShape]
|
|
61
|
+
) -> None:
|
|
62
|
+
section.stb_sec_steel_figure_beam_s = stb_v2_1_0.StbSecSteelFigureBeamS(
|
|
63
|
+
stb_sec_steel_beam_s_shape=shapes
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
BEAM_KIND_S: SteelBeamKind[stb_v2_1_0.StbSecSteelBeamSShape, stb_v2_1_0.StbSecBeamS] = (
|
|
68
|
+
SteelBeamKind(
|
|
69
|
+
straight_shape=lambda order, straight: stb_v2_1_0.StbSecSteelBeamSShape(
|
|
70
|
+
order=order, stb_sec_steel_beam_straight=straight
|
|
71
|
+
),
|
|
72
|
+
taper_shape=lambda order, taper: stb_v2_1_0.StbSecSteelBeamSShape(
|
|
73
|
+
order=order, stb_sec_steel_beam_taper=taper
|
|
74
|
+
),
|
|
75
|
+
set_figure=_set_figure_s,
|
|
76
|
+
)
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def _set_figure_src(
|
|
81
|
+
section: stb_v2_1_0.StbSecBeamSrc,
|
|
82
|
+
shapes: list[stb_v2_1_0.StbSecSteelBeamSrcShape],
|
|
83
|
+
) -> None:
|
|
84
|
+
section.stb_sec_steel_figure_beam_src = stb_v2_1_0.StbSecSteelFigureBeamSrc(
|
|
85
|
+
stb_sec_steel_beam_src_shape=shapes
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
BEAM_KIND_SRC: SteelBeamKind[
|
|
90
|
+
stb_v2_1_0.StbSecSteelBeamSrcShape, stb_v2_1_0.StbSecBeamSrc
|
|
91
|
+
] = SteelBeamKind(
|
|
92
|
+
straight_shape=lambda order, straight: stb_v2_1_0.StbSecSteelBeamSrcShape(
|
|
93
|
+
order=order, stb_sec_steel_beam_straight=straight
|
|
94
|
+
),
|
|
95
|
+
taper_shape=lambda order, taper: stb_v2_1_0.StbSecSteelBeamSrcShape(
|
|
96
|
+
order=order, stb_sec_steel_beam_taper=taper
|
|
97
|
+
),
|
|
98
|
+
set_figure=_set_figure_src,
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
def stb_sec_steel_figure_beam_s_to_v210[TShape: StBridgeElement, TSection: HasId](
|
|
103
|
+
figure: SteelFigure | None,
|
|
104
|
+
id_section: int,
|
|
105
|
+
v210_sec_beam_s_list: list[TSection],
|
|
106
|
+
kind: SteelBeamKind[TShape, TSection],
|
|
107
|
+
*,
|
|
108
|
+
reporter: Reporter,
|
|
109
|
+
) -> None:
|
|
110
|
+
if figure is None:
|
|
111
|
+
return
|
|
112
|
+
v210_sec_beam_s: TSection | None = next(
|
|
113
|
+
(s for s in v210_sec_beam_s_list if s.id == id_section), None
|
|
114
|
+
)
|
|
115
|
+
if v210_sec_beam_s is None:
|
|
116
|
+
return
|
|
117
|
+
v210_taper: stb_v2_1_0.StbSecSteelBeamTaper
|
|
118
|
+
v210_shapes: list[TShape] = []
|
|
119
|
+
if figure.straight is not None:
|
|
120
|
+
kind.set_figure(
|
|
121
|
+
v210_sec_beam_s,
|
|
122
|
+
[
|
|
123
|
+
kind.straight_shape(
|
|
124
|
+
1,
|
|
125
|
+
stb_v2_1_0.StbSecSteelBeamStraight(
|
|
126
|
+
shape=figure.straight.shape_or_none,
|
|
127
|
+
strength_main=figure.straight.strength_main_or_none,
|
|
128
|
+
strength_web=figure.straight.strength_web_or_none,
|
|
129
|
+
),
|
|
130
|
+
)
|
|
131
|
+
],
|
|
132
|
+
)
|
|
133
|
+
return
|
|
134
|
+
if figure.tapers:
|
|
135
|
+
v202_taper: Sequence[HasShapeAndStrengthAndPos] = figure.tapers
|
|
136
|
+
if len(v202_taper) != 2:
|
|
137
|
+
reporter.warning(
|
|
138
|
+
message="Taperの回数がスキーマ違反のため変換できませんでした",
|
|
139
|
+
code=Code.SCHEMA_ERROR,
|
|
140
|
+
phase=Phase.UPGRADE,
|
|
141
|
+
stb_element=figure.original_element,
|
|
142
|
+
)
|
|
143
|
+
return
|
|
144
|
+
try:
|
|
145
|
+
v202_taper_start: HasShapeAndStrengthAndPos = next(
|
|
146
|
+
pos for pos in v202_taper if pos.pos == "START"
|
|
147
|
+
)
|
|
148
|
+
v202_taper_end: HasShapeAndStrengthAndPos = next(
|
|
149
|
+
pos for pos in v202_taper if pos.pos == "END"
|
|
150
|
+
)
|
|
151
|
+
except StopIteration:
|
|
152
|
+
reporter.warning(
|
|
153
|
+
message="TaperのSTART,ENDが1回ずつ使われていないため変換できませんでした",
|
|
154
|
+
code=Code.SCHEMA_ERROR,
|
|
155
|
+
phase=Phase.UPGRADE,
|
|
156
|
+
stb_element=figure.original_element,
|
|
157
|
+
)
|
|
158
|
+
return
|
|
159
|
+
if (
|
|
160
|
+
v202_taper_start.strength_main_or_none
|
|
161
|
+
!= v202_taper_end.strength_main_or_none
|
|
162
|
+
):
|
|
163
|
+
reporter.warning(
|
|
164
|
+
message=f"{figure.original_element._name_for_log()} 始端と終端の鉄骨強度(主)が異なります。",
|
|
165
|
+
code=Code.SCHEMA_VERSION_MISMATCH,
|
|
166
|
+
phase=Phase.UPGRADE,
|
|
167
|
+
stb_element=figure.original_element,
|
|
168
|
+
)
|
|
169
|
+
if v202_taper_start.strength_web_or_none != v202_taper_end.strength_web_or_none:
|
|
170
|
+
reporter.warning(
|
|
171
|
+
message=f"{figure.original_element._name_for_log()} 始端と終端の鉄骨強度(ウェブ)が異なります。",
|
|
172
|
+
code=Code.SCHEMA_VERSION_MISMATCH,
|
|
173
|
+
phase=Phase.UPGRADE,
|
|
174
|
+
stb_element=figure.original_element,
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
v210_taper = stb_v2_1_0.StbSecSteelBeamTaper(
|
|
178
|
+
start_shape=v202_taper_start.shape_or_none,
|
|
179
|
+
end_shape=v202_taper_end.shape_or_none,
|
|
180
|
+
strength_main=v202_taper_start.strength_main_or_none,
|
|
181
|
+
strength_web=v202_taper_end.strength_web_or_none,
|
|
182
|
+
)
|
|
183
|
+
kind.set_figure(v210_sec_beam_s, [kind.taper_shape(1, v210_taper)])
|
|
184
|
+
return
|
|
185
|
+
|
|
186
|
+
if figure.joints:
|
|
187
|
+
v202_joints: Sequence[HasShapeAndStrengthAndPos] = figure.joints
|
|
188
|
+
if len(v202_joints) < 2 or 3 < len(v202_joints):
|
|
189
|
+
reporter.warning(
|
|
190
|
+
message="Jointの回数がスキーマ違反のため変換できません",
|
|
191
|
+
code=Code.SCHEMA_ERROR,
|
|
192
|
+
phase=Phase.UPGRADE,
|
|
193
|
+
stb_element=figure.original_element,
|
|
194
|
+
)
|
|
195
|
+
return
|
|
196
|
+
tmp_joints: dict[str, HasShapeAndStrengthAndPos] = {}
|
|
197
|
+
for pos in ["START", "CENTER", "END"]:
|
|
198
|
+
try:
|
|
199
|
+
tmp_joints[pos] = next(
|
|
200
|
+
joint for joint in v202_joints if joint.pos == pos
|
|
201
|
+
)
|
|
202
|
+
except StopIteration:
|
|
203
|
+
pass
|
|
204
|
+
if "CENTER" not in tmp_joints:
|
|
205
|
+
reporter.warning(
|
|
206
|
+
message=f"{figure.original_element._name_for_log()} Jointのpos=CENTERがありません",
|
|
207
|
+
code=Code.SCHEMA_ERROR,
|
|
208
|
+
phase=Phase.UPGRADE,
|
|
209
|
+
stb_element=figure.original_element,
|
|
210
|
+
)
|
|
211
|
+
return
|
|
212
|
+
elif len(tmp_joints) < 2:
|
|
213
|
+
reporter.warning(
|
|
214
|
+
message=f"{figure.original_element._name_for_log()} Jointのpos=STARTまたはENDがありません",
|
|
215
|
+
code=Code.SCHEMA_ERROR,
|
|
216
|
+
phase=Phase.UPGRADE,
|
|
217
|
+
stb_element=figure.original_element,
|
|
218
|
+
)
|
|
219
|
+
return
|
|
220
|
+
for i, (_, joint) in enumerate(tmp_joints.items()):
|
|
221
|
+
v210_shapes.append(
|
|
222
|
+
kind.straight_shape(
|
|
223
|
+
i + 1,
|
|
224
|
+
stb_v2_1_0.StbSecSteelBeamStraight(
|
|
225
|
+
shape=joint.shape_or_none,
|
|
226
|
+
strength_main=joint.strength_main_or_none,
|
|
227
|
+
strength_web=joint.strength_web_or_none,
|
|
228
|
+
),
|
|
229
|
+
)
|
|
230
|
+
)
|
|
231
|
+
kind.set_figure(v210_sec_beam_s, v210_shapes)
|
|
232
|
+
return
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
def stb_sec_steel_figure_beam_s_haunch_to_v210[
|
|
236
|
+
TShape: StBridgeElement,
|
|
237
|
+
TSection: HasId,
|
|
238
|
+
](
|
|
239
|
+
figure: SteelFigure | None,
|
|
240
|
+
id_section: int,
|
|
241
|
+
v202_girders: list[stb_v2_0_2.StbGirder],
|
|
242
|
+
v202_beams: list[stb_v2_0_2.StbBeam],
|
|
243
|
+
v210_girders: list[stb_v2_1_0.StbGirder],
|
|
244
|
+
v210_beams: list[stb_v2_1_0.StbBeam],
|
|
245
|
+
v210_sec_beam_s_list: list[TSection],
|
|
246
|
+
ng_section_id: set[int],
|
|
247
|
+
*,
|
|
248
|
+
kind: SteelBeamKind[TShape, TSection],
|
|
249
|
+
reporter: Reporter,
|
|
250
|
+
) -> None:
|
|
251
|
+
if figure is None:
|
|
252
|
+
return
|
|
253
|
+
if not figure.haunches:
|
|
254
|
+
return
|
|
255
|
+
|
|
256
|
+
def _invalidate_target_beams() -> None:
|
|
257
|
+
for v202_beam, v210_beam in zip(v202_girders_and_beams, v210_girders_and_beams):
|
|
258
|
+
if v202_beam.id_section != id_section:
|
|
259
|
+
continue
|
|
260
|
+
if isinstance(v210_beam, stb_v2_1_0.StbGirder):
|
|
261
|
+
v210_beam.stb_girder_steel_switch.clear()
|
|
262
|
+
if isinstance(v210_beam, stb_v2_1_0.StbBeam):
|
|
263
|
+
v210_beam.stb_beam_steel_switch.clear()
|
|
264
|
+
if v210_beam.id_section_or_none is not None:
|
|
265
|
+
ng_section_id.add(v210_beam.id_section)
|
|
266
|
+
v210_beam.id_section_or_none = None
|
|
267
|
+
|
|
268
|
+
v202_girders_and_beams: list[stb_v2_0_2.StbGirder | stb_v2_0_2.StbBeam] = (
|
|
269
|
+
v202_girders + v202_beams
|
|
270
|
+
)
|
|
271
|
+
v210_girders_and_beams: list[stb_v2_1_0.StbGirder | stb_v2_1_0.StbBeam] = (
|
|
272
|
+
v210_girders + v210_beams
|
|
273
|
+
)
|
|
274
|
+
|
|
275
|
+
v202_haunches: Sequence[HasShapeAndStrengthAndPos] = figure.haunches
|
|
276
|
+
if len(v202_haunches) < 2 or 3 < len(v202_haunches):
|
|
277
|
+
reporter.warning(
|
|
278
|
+
message="haunchの回数がスキーマ違反のため変換できません",
|
|
279
|
+
code=Code.SCHEMA_ERROR,
|
|
280
|
+
phase=Phase.UPGRADE,
|
|
281
|
+
stb_element=figure.original_element,
|
|
282
|
+
)
|
|
283
|
+
_invalidate_target_beams()
|
|
284
|
+
return
|
|
285
|
+
haunch_start: HasShapeAndStrengthAndPos | None = None
|
|
286
|
+
try:
|
|
287
|
+
haunch_start = next(haunch for haunch in v202_haunches if haunch.pos == "START")
|
|
288
|
+
except StopIteration:
|
|
289
|
+
pass
|
|
290
|
+
try:
|
|
291
|
+
haunch_center: HasShapeAndStrengthAndPos = next(
|
|
292
|
+
haunch for haunch in v202_haunches if haunch.pos == "CENTER"
|
|
293
|
+
)
|
|
294
|
+
except StopIteration:
|
|
295
|
+
reporter.warning(
|
|
296
|
+
message="pos=CENTERが使われていません",
|
|
297
|
+
code=Code.SCHEMA_ERROR,
|
|
298
|
+
phase=Phase.UPGRADE,
|
|
299
|
+
stb_element=figure.original_element,
|
|
300
|
+
)
|
|
301
|
+
_invalidate_target_beams()
|
|
302
|
+
return
|
|
303
|
+
haunch_end: HasShapeAndStrengthAndPos | None = None
|
|
304
|
+
try:
|
|
305
|
+
haunch_end = next(haunch for haunch in v202_haunches if haunch.pos == "END")
|
|
306
|
+
except StopIteration:
|
|
307
|
+
pass
|
|
308
|
+
if not haunch_start and not haunch_end:
|
|
309
|
+
reporter.warning(
|
|
310
|
+
message=f"{figure.original_element._name_for_log()}posがSTARTもENDも使われていません",
|
|
311
|
+
code=Code.SCHEMA_ERROR,
|
|
312
|
+
phase=Phase.UPGRADE,
|
|
313
|
+
stb_element=figure.original_element,
|
|
314
|
+
)
|
|
315
|
+
_invalidate_target_beams()
|
|
316
|
+
return
|
|
317
|
+
|
|
318
|
+
v202_target_beams_dict: dict[
|
|
319
|
+
tuple[str, str], list[stb_v2_0_2.StbGirder | stb_v2_0_2.StbBeam]
|
|
320
|
+
] = {}
|
|
321
|
+
v210_target_beams_dict: dict[
|
|
322
|
+
tuple[str, str], list[stb_v2_1_0.StbGirder | stb_v2_1_0.StbBeam]
|
|
323
|
+
] = {}
|
|
324
|
+
for v202_beam, v210_beam in zip(v202_girders_and_beams, v210_girders_and_beams):
|
|
325
|
+
if v202_beam.id_section != id_section:
|
|
326
|
+
continue
|
|
327
|
+
key = (
|
|
328
|
+
v202_beam.kind_haunch_start_or_none or "SLOPE",
|
|
329
|
+
v202_beam.kind_haunch_end_or_none or "SLOPE",
|
|
330
|
+
)
|
|
331
|
+
v202_target_beams: list[stb_v2_0_2.StbGirder | stb_v2_0_2.StbBeam] = (
|
|
332
|
+
v202_target_beams_dict.setdefault(key, [])
|
|
333
|
+
)
|
|
334
|
+
v210_target_beams: list[stb_v2_1_0.StbGirder | stb_v2_1_0.StbBeam] = (
|
|
335
|
+
v210_target_beams_dict.setdefault(key, [])
|
|
336
|
+
)
|
|
337
|
+
v202_target_beams.append(v202_beam)
|
|
338
|
+
v210_target_beams.append(v210_beam)
|
|
339
|
+
|
|
340
|
+
for kind_index, (haunch_kind, v202_target_beams) in enumerate(
|
|
341
|
+
v202_target_beams_dict.items()
|
|
342
|
+
):
|
|
343
|
+
v210_shapes: list[TShape] = []
|
|
344
|
+
v210_target_beams = v210_target_beams_dict[haunch_kind]
|
|
345
|
+
order: int = 1
|
|
346
|
+
if haunch_start:
|
|
347
|
+
if haunch_kind[0] == "DROP":
|
|
348
|
+
v210_shapes.append(
|
|
349
|
+
kind.straight_shape(
|
|
350
|
+
order,
|
|
351
|
+
stb_v2_1_0.StbSecSteelBeamStraight(
|
|
352
|
+
shape=haunch_start.shape_or_none,
|
|
353
|
+
strength_main=haunch_start.strength_main_or_none,
|
|
354
|
+
strength_web=haunch_start.strength_web_or_none,
|
|
355
|
+
),
|
|
356
|
+
)
|
|
357
|
+
)
|
|
358
|
+
else:
|
|
359
|
+
v210_taper = stb_v2_1_0.StbSecSteelBeamTaper(
|
|
360
|
+
start_shape=haunch_start.shape_or_none,
|
|
361
|
+
end_shape=haunch_center.shape_or_none,
|
|
362
|
+
strength_main=haunch_start.strength_main_or_none,
|
|
363
|
+
strength_web=haunch_start.strength_web_or_none,
|
|
364
|
+
)
|
|
365
|
+
v210_shapes.append(kind.taper_shape(order, v210_taper))
|
|
366
|
+
order += 1
|
|
367
|
+
v210_shapes.append(
|
|
368
|
+
kind.straight_shape(
|
|
369
|
+
order,
|
|
370
|
+
stb_v2_1_0.StbSecSteelBeamStraight(
|
|
371
|
+
shape=haunch_center.shape_or_none,
|
|
372
|
+
strength_main=haunch_center.strength_main_or_none,
|
|
373
|
+
strength_web=haunch_center.strength_web_or_none,
|
|
374
|
+
),
|
|
375
|
+
)
|
|
376
|
+
)
|
|
377
|
+
order += 1
|
|
378
|
+
if haunch_end:
|
|
379
|
+
if haunch_kind[1] == "DROP":
|
|
380
|
+
v210_shapes.append(
|
|
381
|
+
kind.straight_shape(
|
|
382
|
+
order,
|
|
383
|
+
stb_v2_1_0.StbSecSteelBeamStraight(
|
|
384
|
+
shape=haunch_end.shape_or_none,
|
|
385
|
+
strength_main=haunch_end.strength_main_or_none,
|
|
386
|
+
strength_web=haunch_end.strength_web_or_none,
|
|
387
|
+
),
|
|
388
|
+
)
|
|
389
|
+
)
|
|
390
|
+
else:
|
|
391
|
+
v210_taper = stb_v2_1_0.StbSecSteelBeamTaper(
|
|
392
|
+
start_shape=haunch_center.shape_or_none,
|
|
393
|
+
end_shape=haunch_end.shape_or_none,
|
|
394
|
+
strength_main=haunch_end.strength_main_or_none,
|
|
395
|
+
strength_web=haunch_end.strength_web_or_none,
|
|
396
|
+
)
|
|
397
|
+
v210_shapes.append(kind.taper_shape(order, v210_taper))
|
|
398
|
+
v210_sec_beam_s = next(
|
|
399
|
+
(s for s in v210_sec_beam_s_list if s.id == id_section), None
|
|
400
|
+
)
|
|
401
|
+
if kind_index > 0 and v210_sec_beam_s is not None:
|
|
402
|
+
new_id_section: int = max(s.id for s in v210_sec_beam_s_list) + 1
|
|
403
|
+
v210_sec_beam_s = copy.deepcopy(v210_sec_beam_s)
|
|
404
|
+
v210_sec_beam_s.id = new_id_section
|
|
405
|
+
v210_sec_beam_s.guid = uuid.uuid4()
|
|
406
|
+
kind.set_figure(v210_sec_beam_s, v210_shapes)
|
|
407
|
+
v210_sec_beam_s_list.append(v210_sec_beam_s)
|
|
408
|
+
for v210_target_beam in v210_target_beams:
|
|
409
|
+
v210_target_beam.id_section = new_id_section
|
|
410
|
+
elif v210_sec_beam_s is not None:
|
|
411
|
+
kind.set_figure(v210_sec_beam_s, v210_shapes)
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
def get_haunch_edge_shape(
|
|
415
|
+
v210_sec_steel: stb_v2_1_0.StbSecSteel,
|
|
416
|
+
repo_sec_steel: RepositoryV2_1_0,
|
|
417
|
+
shape_out_name: str | None,
|
|
418
|
+
shape_in_name: str | None,
|
|
419
|
+
) -> stb_v2_1_0.StbSecBuildH | stb_v2_1_0.StbSecBuildBox | None:
|
|
420
|
+
if shape_out_name is None or shape_in_name is None:
|
|
421
|
+
return None
|
|
422
|
+
shape_out = repo_sec_steel.get_steel(shape_out_name)
|
|
423
|
+
shape_in = repo_sec_steel.get_steel(shape_in_name)
|
|
424
|
+
if isinstance(
|
|
425
|
+
shape_out, (stb_v2_1_0.StbSecRollH, stb_v2_1_0.StbSecBuildH)
|
|
426
|
+
) and isinstance(shape_in, (stb_v2_1_0.StbSecRollH, stb_v2_1_0.StbSecBuildH)):
|
|
427
|
+
bh: stb_v2_1_0.StbSecBuildH = stb_v2_1_0.StbSecBuildH(
|
|
428
|
+
name=f"out_shape_{shape_out_name}_in_shape_{shape_in_name}",
|
|
429
|
+
a=shape_in.a_or_none,
|
|
430
|
+
b=shape_in.b_or_none,
|
|
431
|
+
t1=shape_out.t1_or_none,
|
|
432
|
+
t2=shape_out.t2_or_none,
|
|
433
|
+
)
|
|
434
|
+
exist_bh: stb_v2_1_0.StbSecBuildH | None = repo_sec_steel.find_equivalent(
|
|
435
|
+
bh, exclude_fields=["name"]
|
|
436
|
+
)
|
|
437
|
+
if exist_bh is not None:
|
|
438
|
+
return exist_bh
|
|
439
|
+
else:
|
|
440
|
+
v210_sec_steel.stb_sec_build_h.append(bh)
|
|
441
|
+
repo_sec_steel.refresh()
|
|
442
|
+
return bh
|
|
443
|
+
elif isinstance(shape_out, (stb_v2_1_0.StbSecRollBox)) and isinstance(
|
|
444
|
+
shape_in, (stb_v2_1_0.StbSecRollBox, stb_v2_1_0.StbSecBuildBox)
|
|
445
|
+
):
|
|
446
|
+
bb: stb_v2_1_0.StbSecBuildBox = stb_v2_1_0.StbSecBuildBox(
|
|
447
|
+
name=f"out_shape_{shape_out_name}_in_shape_{shape_in_name}",
|
|
448
|
+
a=shape_in.a_or_none,
|
|
449
|
+
b=shape_in.b_or_none,
|
|
450
|
+
t1=shape_out.t_or_none,
|
|
451
|
+
t2=shape_out.t_or_none,
|
|
452
|
+
)
|
|
453
|
+
exist_bb: stb_v2_1_0.StbSecBuildBox | None = repo_sec_steel.find_equivalent(
|
|
454
|
+
bb, exclude_fields=["name"]
|
|
455
|
+
)
|
|
456
|
+
if exist_bb is not None:
|
|
457
|
+
return exist_bb
|
|
458
|
+
else:
|
|
459
|
+
v210_sec_steel.stb_sec_build_box.append(bb)
|
|
460
|
+
repo_sec_steel.refresh()
|
|
461
|
+
return bb
|
|
462
|
+
elif isinstance(shape_out, (stb_v2_1_0.StbSecBuildBox)) and isinstance(
|
|
463
|
+
shape_in, (stb_v2_1_0.StbSecRollBox, stb_v2_1_0.StbSecBuildBox)
|
|
464
|
+
):
|
|
465
|
+
bb = stb_v2_1_0.StbSecBuildBox(
|
|
466
|
+
name=f"out_shape_{shape_out_name}_in_shape_{shape_in_name}",
|
|
467
|
+
a=shape_in.a_or_none,
|
|
468
|
+
b=shape_in.b_or_none,
|
|
469
|
+
t1=shape_out.t1_or_none,
|
|
470
|
+
t2=shape_out.t2_or_none,
|
|
471
|
+
)
|
|
472
|
+
exist_bb = repo_sec_steel.find_equivalent(bb, exclude_fields=["name"])
|
|
473
|
+
if exist_bb is not None:
|
|
474
|
+
return exist_bb
|
|
475
|
+
else:
|
|
476
|
+
v210_sec_steel.stb_sec_build_box.append(bb)
|
|
477
|
+
repo_sec_steel.refresh()
|
|
478
|
+
return bb
|
|
479
|
+
else:
|
|
480
|
+
return None
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
def stb_sec_steel_figure_beam_s_five_types_to_v210[
|
|
484
|
+
TShape: StBridgeElement,
|
|
485
|
+
TSection: HasId,
|
|
486
|
+
](
|
|
487
|
+
figure: SteelFigure | None,
|
|
488
|
+
id_section: int,
|
|
489
|
+
v202_girders: list[stb_v2_0_2.StbGirder],
|
|
490
|
+
v202_beams: list[stb_v2_0_2.StbBeam],
|
|
491
|
+
v210_girders: list[stb_v2_1_0.StbGirder],
|
|
492
|
+
v210_beams: list[stb_v2_1_0.StbBeam],
|
|
493
|
+
v210_sec_beam_s_list: list[TSection],
|
|
494
|
+
v210_sec_steel: stb_v2_1_0.StbSecSteel,
|
|
495
|
+
repo_sec_steel: RepositoryV2_1_0,
|
|
496
|
+
ng_section_id: set[int],
|
|
497
|
+
*,
|
|
498
|
+
kind: SteelBeamKind[TShape, TSection],
|
|
499
|
+
reporter: Reporter,
|
|
500
|
+
) -> None:
|
|
501
|
+
if figure is None:
|
|
502
|
+
return
|
|
503
|
+
if not figure.five_types:
|
|
504
|
+
return
|
|
505
|
+
|
|
506
|
+
v202_girders_and_beams: list[stb_v2_0_2.StbGirder | stb_v2_0_2.StbBeam] = (
|
|
507
|
+
v202_girders + v202_beams
|
|
508
|
+
)
|
|
509
|
+
v210_girders_and_beams: list[stb_v2_1_0.StbGirder | stb_v2_1_0.StbBeam] = (
|
|
510
|
+
v210_girders + v210_beams
|
|
511
|
+
)
|
|
512
|
+
|
|
513
|
+
def _invalidate_target_beams() -> None:
|
|
514
|
+
for v202_beam, v210_beam in zip(v202_girders_and_beams, v210_girders_and_beams):
|
|
515
|
+
if v202_beam.id_section != id_section:
|
|
516
|
+
continue
|
|
517
|
+
if isinstance(v210_beam, stb_v2_1_0.StbGirder):
|
|
518
|
+
v210_beam.stb_girder_steel_switch.clear()
|
|
519
|
+
if isinstance(v210_beam, stb_v2_1_0.StbBeam):
|
|
520
|
+
v210_beam.stb_beam_steel_switch.clear()
|
|
521
|
+
if v210_beam.id_section_or_none is not None:
|
|
522
|
+
ng_section_id.add(v210_beam.id_section)
|
|
523
|
+
v210_beam.id_section_or_none = None
|
|
524
|
+
|
|
525
|
+
v202_five_types_list: Sequence[HasShapeAndStrengthAndPos] = figure.five_types
|
|
526
|
+
if len(v202_five_types_list) < 3 or 5 < len(v202_five_types_list):
|
|
527
|
+
reporter.warning(
|
|
528
|
+
message="StbSecSteelBeam_S_FiveTypesの回数がスキーマ違反のため変換できません",
|
|
529
|
+
code=Code.SCHEMA_ERROR,
|
|
530
|
+
phase=Phase.UPGRADE,
|
|
531
|
+
stb_element=figure.original_element,
|
|
532
|
+
)
|
|
533
|
+
_invalidate_target_beams()
|
|
534
|
+
return
|
|
535
|
+
pos_choices: tuple[str, str, str, str, str] = (
|
|
536
|
+
"START",
|
|
537
|
+
"CENTER",
|
|
538
|
+
"END",
|
|
539
|
+
"HAUNCH_S",
|
|
540
|
+
"HAUNCH_E",
|
|
541
|
+
)
|
|
542
|
+
five_types_dict: dict[str, HasShapeAndStrengthAndPos] = {}
|
|
543
|
+
for pos in pos_choices:
|
|
544
|
+
try:
|
|
545
|
+
five_types_dict[pos] = next(
|
|
546
|
+
five_types
|
|
547
|
+
for five_types in v202_five_types_list
|
|
548
|
+
if five_types.pos == pos
|
|
549
|
+
)
|
|
550
|
+
except StopIteration:
|
|
551
|
+
pass
|
|
552
|
+
|
|
553
|
+
five_types_start: HasShapeAndStrengthAndPos | None = five_types_dict.get("START")
|
|
554
|
+
five_types_center: HasShapeAndStrengthAndPos | None = five_types_dict.get("CENTER")
|
|
555
|
+
five_types_end: HasShapeAndStrengthAndPos | None = five_types_dict.get("END")
|
|
556
|
+
five_types_haunch_s: HasShapeAndStrengthAndPos | None = five_types_dict.get(
|
|
557
|
+
"HAUNCH_S"
|
|
558
|
+
)
|
|
559
|
+
five_types_haunch_e: HasShapeAndStrengthAndPos | None = five_types_dict.get(
|
|
560
|
+
"HAUNCH_E"
|
|
561
|
+
)
|
|
562
|
+
if five_types_center is None:
|
|
563
|
+
reporter.warning(
|
|
564
|
+
message="pos=CENTERが使われていません",
|
|
565
|
+
code=Code.SCHEMA_ERROR,
|
|
566
|
+
phase=Phase.UPGRADE,
|
|
567
|
+
stb_element=figure.original_element,
|
|
568
|
+
)
|
|
569
|
+
_invalidate_target_beams()
|
|
570
|
+
return
|
|
571
|
+
|
|
572
|
+
v202_target_beams_dict: dict[
|
|
573
|
+
tuple[str, str, bool, bool, bool, bool, bool | None, bool | None],
|
|
574
|
+
list[stb_v2_0_2.StbGirder | stb_v2_0_2.StbBeam],
|
|
575
|
+
] = {}
|
|
576
|
+
v210_target_beams_dict: dict[
|
|
577
|
+
tuple[str, str, bool, bool, bool, bool, bool | None, bool | None],
|
|
578
|
+
list[stb_v2_1_0.StbGirder | stb_v2_1_0.StbBeam],
|
|
579
|
+
] = {}
|
|
580
|
+
for v202_beam, v210_beam in zip(v202_girders_and_beams, v210_girders_and_beams):
|
|
581
|
+
if v202_beam.id_section != id_section:
|
|
582
|
+
continue
|
|
583
|
+
is_joint_inside_haunch_start: bool | None = None
|
|
584
|
+
if (
|
|
585
|
+
v202_beam.joint_start_or_none is not None
|
|
586
|
+
and v202_beam.haunch_start_or_none is not None
|
|
587
|
+
):
|
|
588
|
+
is_joint_inside_haunch_start = (
|
|
589
|
+
v202_beam.haunch_start < v202_beam.joint_start
|
|
590
|
+
)
|
|
591
|
+
is_joint_inside_haunch_end: bool | None = None
|
|
592
|
+
if (
|
|
593
|
+
v202_beam.joint_end_or_none is not None
|
|
594
|
+
and v202_beam.haunch_end_or_none is not None
|
|
595
|
+
):
|
|
596
|
+
is_joint_inside_haunch_end = v202_beam.haunch_end < v202_beam.joint_end
|
|
597
|
+
has_haunch_length_start: bool = v202_beam.haunch_start_or_none is not None
|
|
598
|
+
has_joint_length_start: bool = v202_beam.joint_start_or_none is not None
|
|
599
|
+
has_haunch_length_end: bool = v202_beam.haunch_end_or_none is not None
|
|
600
|
+
has_joint_length_end: bool = v202_beam.joint_end_or_none is not None
|
|
601
|
+
|
|
602
|
+
key = (
|
|
603
|
+
v202_beam.kind_haunch_start_or_none or "SLOPE",
|
|
604
|
+
v202_beam.kind_haunch_end_or_none or "SLOPE",
|
|
605
|
+
has_haunch_length_start,
|
|
606
|
+
has_joint_length_start,
|
|
607
|
+
has_haunch_length_end,
|
|
608
|
+
has_joint_length_end,
|
|
609
|
+
is_joint_inside_haunch_start,
|
|
610
|
+
is_joint_inside_haunch_end,
|
|
611
|
+
)
|
|
612
|
+
v202_target_beams: list[stb_v2_0_2.StbGirder | stb_v2_0_2.StbBeam] = (
|
|
613
|
+
v202_target_beams_dict.setdefault(key, [])
|
|
614
|
+
)
|
|
615
|
+
v210_target_beams: list[stb_v2_1_0.StbGirder | stb_v2_1_0.StbBeam] = (
|
|
616
|
+
v210_target_beams_dict.setdefault(key, [])
|
|
617
|
+
)
|
|
618
|
+
v202_target_beams.append(v202_beam)
|
|
619
|
+
v210_target_beams.append(v210_beam)
|
|
620
|
+
|
|
621
|
+
kind_index: int = 0
|
|
622
|
+
for beam_kind, v202_target_beams in v202_target_beams_dict.items():
|
|
623
|
+
(
|
|
624
|
+
kind_hanuch_start,
|
|
625
|
+
kind_hanuch_end,
|
|
626
|
+
has_haunch_length_start,
|
|
627
|
+
has_joint_length_start,
|
|
628
|
+
has_haunch_length_end,
|
|
629
|
+
has_joint_length_end,
|
|
630
|
+
is_joint_inside_haunch_start,
|
|
631
|
+
is_joint_inside_haunch_end,
|
|
632
|
+
) = beam_kind
|
|
633
|
+
v210_shapes: list[TShape] = []
|
|
634
|
+
v210_target_beams = v210_target_beams_dict[beam_kind]
|
|
635
|
+
try:
|
|
636
|
+
order: int = 1
|
|
637
|
+
if has_haunch_length_start and has_joint_length_start:
|
|
638
|
+
if is_joint_inside_haunch_start is None:
|
|
639
|
+
raise AssertionError("到達しないはずのコードに到達しました")
|
|
640
|
+
if five_types_start is None or five_types_haunch_s is None:
|
|
641
|
+
raise SchemaError("五断面の定義が不十分です")
|
|
642
|
+
if is_joint_inside_haunch_start:
|
|
643
|
+
if kind_hanuch_start == "DROP":
|
|
644
|
+
v210_shapes.append(
|
|
645
|
+
kind.straight_shape(
|
|
646
|
+
order,
|
|
647
|
+
stb_v2_1_0.StbSecSteelBeamStraight(
|
|
648
|
+
shape=five_types_start.shape_or_none,
|
|
649
|
+
strength_main=five_types_start.strength_main_or_none,
|
|
650
|
+
strength_web=five_types_start.strength_web_or_none,
|
|
651
|
+
),
|
|
652
|
+
)
|
|
653
|
+
)
|
|
654
|
+
order += 1
|
|
655
|
+
v210_shapes.append(
|
|
656
|
+
kind.straight_shape(
|
|
657
|
+
order,
|
|
658
|
+
stb_v2_1_0.StbSecSteelBeamStraight(
|
|
659
|
+
shape=five_types_haunch_s.shape_or_none,
|
|
660
|
+
strength_main=five_types_haunch_s.strength_main_or_none,
|
|
661
|
+
strength_web=five_types_haunch_s.strength_web_or_none,
|
|
662
|
+
),
|
|
663
|
+
)
|
|
664
|
+
)
|
|
665
|
+
else:
|
|
666
|
+
v210_taper = stb_v2_1_0.StbSecSteelBeamTaper(
|
|
667
|
+
start_shape=five_types_start.shape_or_none,
|
|
668
|
+
end_shape=five_types_haunch_s.shape_or_none,
|
|
669
|
+
strength_main=five_types_start.strength_main_or_none,
|
|
670
|
+
strength_web=five_types_start.strength_web_or_none,
|
|
671
|
+
)
|
|
672
|
+
v210_shapes.append(kind.taper_shape(order, v210_taper))
|
|
673
|
+
order += 1
|
|
674
|
+
v210_shapes.append(
|
|
675
|
+
kind.straight_shape(
|
|
676
|
+
order,
|
|
677
|
+
stb_v2_1_0.StbSecSteelBeamStraight(
|
|
678
|
+
shape=five_types_haunch_s.shape_or_none,
|
|
679
|
+
strength_main=five_types_haunch_s.strength_main_or_none,
|
|
680
|
+
strength_web=five_types_haunch_s.strength_web_or_none,
|
|
681
|
+
),
|
|
682
|
+
)
|
|
683
|
+
)
|
|
684
|
+
else:
|
|
685
|
+
if kind_hanuch_start == "DROP":
|
|
686
|
+
v210_shapes.append(
|
|
687
|
+
kind.straight_shape(
|
|
688
|
+
order,
|
|
689
|
+
stb_v2_1_0.StbSecSteelBeamStraight(
|
|
690
|
+
shape=five_types_start.shape_or_none,
|
|
691
|
+
strength_main=five_types_start.strength_main_or_none,
|
|
692
|
+
strength_web=five_types_start.strength_web_or_none,
|
|
693
|
+
),
|
|
694
|
+
)
|
|
695
|
+
)
|
|
696
|
+
order += 1
|
|
697
|
+
v210_shapes.append(
|
|
698
|
+
kind.straight_shape(
|
|
699
|
+
order,
|
|
700
|
+
stb_v2_1_0.StbSecSteelBeamStraight(
|
|
701
|
+
shape=five_types_haunch_s.shape_or_none,
|
|
702
|
+
strength_main=five_types_haunch_s.strength_main_or_none,
|
|
703
|
+
strength_web=five_types_haunch_s.strength_web_or_none,
|
|
704
|
+
),
|
|
705
|
+
)
|
|
706
|
+
)
|
|
707
|
+
order += 1
|
|
708
|
+
else:
|
|
709
|
+
edge_shape_start = get_haunch_edge_shape(
|
|
710
|
+
v210_sec_steel,
|
|
711
|
+
repo_sec_steel,
|
|
712
|
+
five_types_start.shape_or_none,
|
|
713
|
+
five_types_haunch_s.shape_or_none,
|
|
714
|
+
)
|
|
715
|
+
edge_shape_start_name: str | None = (
|
|
716
|
+
edge_shape_start.name
|
|
717
|
+
if edge_shape_start is not None
|
|
718
|
+
else five_types_haunch_s.shape_or_none
|
|
719
|
+
)
|
|
720
|
+
v210_taper = stb_v2_1_0.StbSecSteelBeamTaper(
|
|
721
|
+
start_shape=five_types_start.shape_or_none,
|
|
722
|
+
end_shape=edge_shape_start_name,
|
|
723
|
+
strength_main=five_types_haunch_s.strength_main_or_none,
|
|
724
|
+
strength_web=five_types_haunch_s.strength_web_or_none,
|
|
725
|
+
)
|
|
726
|
+
v210_shapes.append(kind.taper_shape(order, v210_taper))
|
|
727
|
+
order += 1
|
|
728
|
+
v210_taper = stb_v2_1_0.StbSecSteelBeamTaper(
|
|
729
|
+
start_shape=five_types_haunch_s.shape_or_none,
|
|
730
|
+
end_shape=five_types_center.shape_or_none,
|
|
731
|
+
strength_main=five_types_haunch_s.strength_main_or_none,
|
|
732
|
+
strength_web=five_types_haunch_s.strength_web_or_none,
|
|
733
|
+
)
|
|
734
|
+
v210_shapes.append(kind.taper_shape(order, v210_taper))
|
|
735
|
+
order += 1
|
|
736
|
+
elif has_haunch_length_start:
|
|
737
|
+
if five_types_start is None:
|
|
738
|
+
raise SchemaError("五断面の定義が不十分です")
|
|
739
|
+
if kind_hanuch_start == "DROP":
|
|
740
|
+
v210_shapes.append(
|
|
741
|
+
kind.straight_shape(
|
|
742
|
+
order,
|
|
743
|
+
stb_v2_1_0.StbSecSteelBeamStraight(
|
|
744
|
+
shape=five_types_start.shape_or_none,
|
|
745
|
+
strength_main=five_types_start.strength_main_or_none,
|
|
746
|
+
strength_web=five_types_start.strength_web_or_none,
|
|
747
|
+
),
|
|
748
|
+
)
|
|
749
|
+
)
|
|
750
|
+
order += 1
|
|
751
|
+
else:
|
|
752
|
+
v210_taper = stb_v2_1_0.StbSecSteelBeamTaper(
|
|
753
|
+
start_shape=five_types_start.shape_or_none,
|
|
754
|
+
end_shape=five_types_center.shape_or_none,
|
|
755
|
+
strength_main=five_types_start.strength_main_or_none,
|
|
756
|
+
strength_web=five_types_start.strength_web_or_none,
|
|
757
|
+
)
|
|
758
|
+
v210_shapes.append(kind.taper_shape(order, v210_taper))
|
|
759
|
+
order += 1
|
|
760
|
+
elif has_joint_length_start:
|
|
761
|
+
if five_types_start is None:
|
|
762
|
+
raise SchemaError("五断面の定義が不十分です")
|
|
763
|
+
v210_shapes.append(
|
|
764
|
+
kind.straight_shape(
|
|
765
|
+
order,
|
|
766
|
+
stb_v2_1_0.StbSecSteelBeamStraight(
|
|
767
|
+
shape=five_types_start.shape_or_none,
|
|
768
|
+
strength_main=five_types_start.strength_main_or_none,
|
|
769
|
+
strength_web=five_types_start.strength_web_or_none,
|
|
770
|
+
),
|
|
771
|
+
)
|
|
772
|
+
)
|
|
773
|
+
order += 1
|
|
774
|
+
else:
|
|
775
|
+
pass
|
|
776
|
+
|
|
777
|
+
v210_shapes.append(
|
|
778
|
+
kind.straight_shape(
|
|
779
|
+
order,
|
|
780
|
+
stb_v2_1_0.StbSecSteelBeamStraight(
|
|
781
|
+
shape=five_types_center.shape_or_none,
|
|
782
|
+
strength_main=five_types_center.strength_main_or_none,
|
|
783
|
+
strength_web=five_types_center.strength_web_or_none,
|
|
784
|
+
),
|
|
785
|
+
)
|
|
786
|
+
)
|
|
787
|
+
order += 1
|
|
788
|
+
|
|
789
|
+
if has_haunch_length_end and has_joint_length_end:
|
|
790
|
+
if is_joint_inside_haunch_end is None:
|
|
791
|
+
raise AssertionError("到達しないはずのコードに到達しました")
|
|
792
|
+
if five_types_end is None or five_types_haunch_e is None:
|
|
793
|
+
raise SchemaError("五断面の定義が不十分です")
|
|
794
|
+
if is_joint_inside_haunch_end:
|
|
795
|
+
if kind_hanuch_end == "DROP":
|
|
796
|
+
v210_shapes.append(
|
|
797
|
+
kind.straight_shape(
|
|
798
|
+
order,
|
|
799
|
+
stb_v2_1_0.StbSecSteelBeamStraight(
|
|
800
|
+
shape=five_types_haunch_e.shape_or_none,
|
|
801
|
+
strength_main=five_types_haunch_e.strength_main_or_none,
|
|
802
|
+
strength_web=five_types_haunch_e.strength_web_or_none,
|
|
803
|
+
),
|
|
804
|
+
)
|
|
805
|
+
)
|
|
806
|
+
order += 1
|
|
807
|
+
v210_shapes.append(
|
|
808
|
+
kind.straight_shape(
|
|
809
|
+
order,
|
|
810
|
+
stb_v2_1_0.StbSecSteelBeamStraight(
|
|
811
|
+
shape=five_types_end.shape_or_none,
|
|
812
|
+
strength_main=five_types_end.strength_main_or_none,
|
|
813
|
+
strength_web=five_types_end.strength_web_or_none,
|
|
814
|
+
),
|
|
815
|
+
)
|
|
816
|
+
)
|
|
817
|
+
order += 1
|
|
818
|
+
else:
|
|
819
|
+
v210_shapes.append(
|
|
820
|
+
kind.straight_shape(
|
|
821
|
+
order,
|
|
822
|
+
stb_v2_1_0.StbSecSteelBeamStraight(
|
|
823
|
+
shape=five_types_haunch_e.shape_or_none,
|
|
824
|
+
strength_main=five_types_haunch_e.strength_main_or_none,
|
|
825
|
+
strength_web=five_types_haunch_e.strength_web_or_none,
|
|
826
|
+
),
|
|
827
|
+
)
|
|
828
|
+
)
|
|
829
|
+
order += 1
|
|
830
|
+
v210_taper = stb_v2_1_0.StbSecSteelBeamTaper(
|
|
831
|
+
start_shape=five_types_haunch_e.shape_or_none,
|
|
832
|
+
end_shape=five_types_end.shape_or_none,
|
|
833
|
+
strength_main=five_types_end.strength_main_or_none,
|
|
834
|
+
strength_web=five_types_end.strength_web_or_none,
|
|
835
|
+
)
|
|
836
|
+
v210_shapes.append(kind.taper_shape(order, v210_taper))
|
|
837
|
+
order += 1
|
|
838
|
+
else:
|
|
839
|
+
if kind_hanuch_end == "DROP":
|
|
840
|
+
v210_shapes.append(
|
|
841
|
+
kind.straight_shape(
|
|
842
|
+
order,
|
|
843
|
+
stb_v2_1_0.StbSecSteelBeamStraight(
|
|
844
|
+
shape=five_types_haunch_e.shape_or_none,
|
|
845
|
+
strength_main=five_types_haunch_e.strength_main_or_none,
|
|
846
|
+
strength_web=five_types_haunch_e.strength_web_or_none,
|
|
847
|
+
),
|
|
848
|
+
)
|
|
849
|
+
)
|
|
850
|
+
order += 1
|
|
851
|
+
v210_shapes.append(
|
|
852
|
+
kind.straight_shape(
|
|
853
|
+
order,
|
|
854
|
+
stb_v2_1_0.StbSecSteelBeamStraight(
|
|
855
|
+
shape=five_types_end.shape_or_none,
|
|
856
|
+
strength_main=five_types_end.strength_main_or_none,
|
|
857
|
+
strength_web=five_types_end.strength_web_or_none,
|
|
858
|
+
),
|
|
859
|
+
)
|
|
860
|
+
)
|
|
861
|
+
else:
|
|
862
|
+
v210_taper = stb_v2_1_0.StbSecSteelBeamTaper(
|
|
863
|
+
start_shape=five_types_center.shape_or_none,
|
|
864
|
+
end_shape=five_types_haunch_e.shape_or_none,
|
|
865
|
+
strength_main=five_types_haunch_e.strength_main_or_none,
|
|
866
|
+
strength_web=five_types_haunch_e.strength_web_or_none,
|
|
867
|
+
)
|
|
868
|
+
v210_shapes.append(kind.taper_shape(order, v210_taper))
|
|
869
|
+
order += 1
|
|
870
|
+
|
|
871
|
+
edge_shape_end = get_haunch_edge_shape(
|
|
872
|
+
v210_sec_steel,
|
|
873
|
+
repo_sec_steel,
|
|
874
|
+
five_types_end.shape_or_none,
|
|
875
|
+
five_types_haunch_e.shape_or_none,
|
|
876
|
+
)
|
|
877
|
+
edge_shape_end_name: str | None = (
|
|
878
|
+
edge_shape_end.name
|
|
879
|
+
if edge_shape_end is not None
|
|
880
|
+
else five_types_haunch_e.shape_or_none
|
|
881
|
+
)
|
|
882
|
+
v210_taper = stb_v2_1_0.StbSecSteelBeamTaper(
|
|
883
|
+
start_shape=edge_shape_end_name,
|
|
884
|
+
end_shape=five_types_end.shape_or_none,
|
|
885
|
+
strength_main=five_types_end.strength_main_or_none,
|
|
886
|
+
strength_web=five_types_end.strength_web_or_none,
|
|
887
|
+
)
|
|
888
|
+
v210_shapes.append(kind.taper_shape(order, v210_taper))
|
|
889
|
+
order += 1
|
|
890
|
+
elif has_haunch_length_end:
|
|
891
|
+
if five_types_end is None:
|
|
892
|
+
raise SchemaError("五断面の定義が不十分です")
|
|
893
|
+
if kind_hanuch_end == "DROP":
|
|
894
|
+
v210_shapes.append(
|
|
895
|
+
kind.straight_shape(
|
|
896
|
+
order,
|
|
897
|
+
stb_v2_1_0.StbSecSteelBeamStraight(
|
|
898
|
+
shape=five_types_end.shape_or_none,
|
|
899
|
+
strength_main=five_types_end.strength_main_or_none,
|
|
900
|
+
strength_web=five_types_end.strength_web_or_none,
|
|
901
|
+
),
|
|
902
|
+
)
|
|
903
|
+
)
|
|
904
|
+
order += 1
|
|
905
|
+
else:
|
|
906
|
+
v210_taper = stb_v2_1_0.StbSecSteelBeamTaper(
|
|
907
|
+
start_shape=five_types_center.shape_or_none,
|
|
908
|
+
end_shape=five_types_end.shape_or_none,
|
|
909
|
+
strength_main=five_types_end.strength_main_or_none,
|
|
910
|
+
strength_web=five_types_end.strength_web_or_none,
|
|
911
|
+
)
|
|
912
|
+
v210_shapes.append(kind.taper_shape(order, v210_taper))
|
|
913
|
+
order += 1
|
|
914
|
+
elif has_joint_length_end:
|
|
915
|
+
if five_types_end is None:
|
|
916
|
+
raise SchemaError("五断面の定義が不十分です")
|
|
917
|
+
v210_shapes.append(
|
|
918
|
+
kind.straight_shape(
|
|
919
|
+
order,
|
|
920
|
+
stb_v2_1_0.StbSecSteelBeamStraight(
|
|
921
|
+
shape=five_types_end.shape_or_none,
|
|
922
|
+
strength_main=five_types_end.strength_main_or_none,
|
|
923
|
+
strength_web=five_types_end.strength_web_or_none,
|
|
924
|
+
),
|
|
925
|
+
)
|
|
926
|
+
)
|
|
927
|
+
order += 1
|
|
928
|
+
else:
|
|
929
|
+
pass
|
|
930
|
+
|
|
931
|
+
v210_sec_beam_s = next(
|
|
932
|
+
(s for s in v210_sec_beam_s_list if s.id == id_section), None
|
|
933
|
+
)
|
|
934
|
+
if kind_index > 0 and v210_sec_beam_s is not None:
|
|
935
|
+
new_id_section: int = max(s.id for s in v210_sec_beam_s_list) + 1
|
|
936
|
+
v210_sec_beam_s = copy.deepcopy(v210_sec_beam_s)
|
|
937
|
+
v210_sec_beam_s.id = new_id_section
|
|
938
|
+
v210_sec_beam_s.guid = uuid.uuid4()
|
|
939
|
+
kind.set_figure(v210_sec_beam_s, v210_shapes)
|
|
940
|
+
v210_sec_beam_s_list.append(v210_sec_beam_s)
|
|
941
|
+
for v210_target_beam in v210_target_beams:
|
|
942
|
+
v210_target_beam.id_section = new_id_section
|
|
943
|
+
elif v210_sec_beam_s is not None:
|
|
944
|
+
kind.set_figure(v210_sec_beam_s, v210_shapes)
|
|
945
|
+
kind_index += 1
|
|
946
|
+
except SchemaError as e:
|
|
947
|
+
reporter.warning(
|
|
948
|
+
message=f"StbSecSteelBeam_S_FiveTypesの変換中にエラーが発生しました: {e}",
|
|
949
|
+
code=Code.UNEXPECTED_ERROR,
|
|
950
|
+
phase=Phase.UPGRADE,
|
|
951
|
+
stb_element=figure.original_element,
|
|
952
|
+
)
|
|
953
|
+
_invalidate_target_beams()
|
|
954
|
+
|
|
955
|
+
|
|
956
|
+
def _post_sec_beam_steel[
|
|
957
|
+
TShape: StBridgeElement,
|
|
958
|
+
TSection: HasId,
|
|
959
|
+
TSectionFrom: HasId,
|
|
960
|
+
](
|
|
961
|
+
v202: stb_v2_0_2.StBridge,
|
|
962
|
+
v210: stb_v2_1_0.StBridge,
|
|
963
|
+
*,
|
|
964
|
+
kind: SteelBeamKind[TShape, TSection],
|
|
965
|
+
sections_from: Callable[[stb_v2_0_2.StbSections], list[TSectionFrom]],
|
|
966
|
+
sections_to: Callable[[stb_v2_1_0.StbSections], list[TSection]],
|
|
967
|
+
to_figure: Callable[[TSectionFrom], SteelFigure | None],
|
|
968
|
+
ng_section_id: set[int],
|
|
969
|
+
post: Callable[[stb_v2_1_0.StBridge], None] | None = None,
|
|
970
|
+
reporter: Reporter,
|
|
971
|
+
) -> None:
|
|
972
|
+
try:
|
|
973
|
+
v210_sec_steel: stb_v2_1_0.StbSecSteel = (
|
|
974
|
+
v210.stb_model.stb_sections.stb_sec_steel
|
|
975
|
+
)
|
|
976
|
+
except NoneAccessError:
|
|
977
|
+
return
|
|
978
|
+
v202_s_b_s_list: list[TSectionFrom] | None = None
|
|
979
|
+
v210_s_b_s_list: list[TSection] | None = None
|
|
980
|
+
try:
|
|
981
|
+
v202_s_b_s_list = sections_from(v202.stb_model.stb_sections)
|
|
982
|
+
v210_s_b_s_list = sections_to(v210.stb_model.stb_sections)
|
|
983
|
+
except NoneAccessError:
|
|
984
|
+
pass
|
|
985
|
+
try:
|
|
986
|
+
v202_girders: list[stb_v2_0_2.StbGirder] = (
|
|
987
|
+
v202.stb_model.stb_members.stb_girders.stb_girder
|
|
988
|
+
)
|
|
989
|
+
v210_girders: list[stb_v2_1_0.StbGirder] = (
|
|
990
|
+
v210.stb_model.stb_members.stb_girders.stb_girder
|
|
991
|
+
)
|
|
992
|
+
except NoneAccessError:
|
|
993
|
+
v202_girders = []
|
|
994
|
+
v210_girders = []
|
|
995
|
+
try:
|
|
996
|
+
v202_beams: list[stb_v2_0_2.StbBeam] = (
|
|
997
|
+
v202.stb_model.stb_members.stb_beams.stb_beam
|
|
998
|
+
)
|
|
999
|
+
v210_beams: list[stb_v2_1_0.StbBeam] = (
|
|
1000
|
+
v210.stb_model.stb_members.stb_beams.stb_beam
|
|
1001
|
+
)
|
|
1002
|
+
except NoneAccessError:
|
|
1003
|
+
v202_beams = []
|
|
1004
|
+
v210_beams = []
|
|
1005
|
+
repo_sec_steel: RepositoryV2_1_0 = RepositoryV2_1_0(v210_sec_steel)
|
|
1006
|
+
if v202_s_b_s_list and v210_s_b_s_list:
|
|
1007
|
+
for i, v202_s_b_s in enumerate(v202_s_b_s_list):
|
|
1008
|
+
v210_s_b_s = v210_s_b_s_list[i]
|
|
1009
|
+
figure = to_figure(v202_s_b_s)
|
|
1010
|
+
stb_sec_steel_figure_beam_s_to_v210(
|
|
1011
|
+
figure,
|
|
1012
|
+
v202_s_b_s.id,
|
|
1013
|
+
v210_s_b_s_list,
|
|
1014
|
+
kind,
|
|
1015
|
+
reporter=reporter,
|
|
1016
|
+
)
|
|
1017
|
+
stb_sec_steel_figure_beam_s_haunch_to_v210(
|
|
1018
|
+
figure,
|
|
1019
|
+
v210_s_b_s.id,
|
|
1020
|
+
v202_girders=v202_girders,
|
|
1021
|
+
v202_beams=v202_beams,
|
|
1022
|
+
v210_girders=v210_girders,
|
|
1023
|
+
v210_beams=v210_beams,
|
|
1024
|
+
v210_sec_beam_s_list=v210_s_b_s_list,
|
|
1025
|
+
ng_section_id=ng_section_id,
|
|
1026
|
+
kind=kind,
|
|
1027
|
+
reporter=reporter,
|
|
1028
|
+
)
|
|
1029
|
+
stb_sec_steel_figure_beam_s_five_types_to_v210(
|
|
1030
|
+
figure,
|
|
1031
|
+
v210_s_b_s.id,
|
|
1032
|
+
v202_girders=v202_girders,
|
|
1033
|
+
v202_beams=v202_beams,
|
|
1034
|
+
v210_girders=v210_girders,
|
|
1035
|
+
v210_beams=v210_beams,
|
|
1036
|
+
v210_sec_beam_s_list=v210_s_b_s_list,
|
|
1037
|
+
v210_sec_steel=v210_sec_steel,
|
|
1038
|
+
repo_sec_steel=repo_sec_steel,
|
|
1039
|
+
kind=kind,
|
|
1040
|
+
reporter=reporter,
|
|
1041
|
+
ng_section_id=ng_section_id,
|
|
1042
|
+
)
|
|
1043
|
+
if post is not None:
|
|
1044
|
+
post(v210)
|
|
1045
|
+
|
|
1046
|
+
|
|
1047
|
+
def post_sec_beam_s(
|
|
1048
|
+
v202: stb_v2_0_2.StBridge, v210: stb_v2_1_0.StBridge, *, reporter: Reporter
|
|
1049
|
+
) -> None:
|
|
1050
|
+
ng_section_id: set[int] = set()
|
|
1051
|
+
_post_sec_beam_steel(
|
|
1052
|
+
v202,
|
|
1053
|
+
v210,
|
|
1054
|
+
kind=BEAM_KIND_S,
|
|
1055
|
+
ng_section_id=ng_section_id,
|
|
1056
|
+
sections_from=lambda sections: sections.stb_sec_beam_s,
|
|
1057
|
+
sections_to=lambda sections: sections.stb_sec_beam_s,
|
|
1058
|
+
to_figure=lambda section: (
|
|
1059
|
+
SteelFigure(
|
|
1060
|
+
original_element=section.stb_sec_steel_figure_beam_s,
|
|
1061
|
+
straight=section.stb_sec_steel_figure_beam_s.stb_sec_steel_beam_s_straight_or_none,
|
|
1062
|
+
tapers=section.stb_sec_steel_figure_beam_s.stb_sec_steel_beam_s_taper,
|
|
1063
|
+
joints=section.stb_sec_steel_figure_beam_s.stb_sec_steel_beam_s_joint,
|
|
1064
|
+
haunches=section.stb_sec_steel_figure_beam_s.stb_sec_steel_beam_s_haunch,
|
|
1065
|
+
five_types=section.stb_sec_steel_figure_beam_s.stb_sec_steel_beam_s_five_types,
|
|
1066
|
+
)
|
|
1067
|
+
if section.stb_sec_steel_figure_beam_s_or_none is not None
|
|
1068
|
+
else None
|
|
1069
|
+
),
|
|
1070
|
+
reporter=reporter,
|
|
1071
|
+
)
|
|
1072
|
+
|
|
1073
|
+
if ng_section_id:
|
|
1074
|
+
v210.stb_model.stb_sections.stb_sec_beam_s = [
|
|
1075
|
+
stb_sec_beam_s
|
|
1076
|
+
for stb_sec_beam_s in v210.stb_model.stb_sections.stb_sec_beam_s
|
|
1077
|
+
if stb_sec_beam_s.id_or_none not in ng_section_id
|
|
1078
|
+
]
|
|
1079
|
+
|
|
1080
|
+
|
|
1081
|
+
def _set_src_s_vertical_offset(
|
|
1082
|
+
v210: stb_v2_1_0.StBridge, *, reporter: Reporter
|
|
1083
|
+
) -> None:
|
|
1084
|
+
"""SRC梁の鉄骨位置を下げる。
|
|
1085
|
+
|
|
1086
|
+
TODO:
|
|
1087
|
+
鉄骨の位置を一律-150にしているので、見直しが必要
|
|
1088
|
+
"""
|
|
1089
|
+
for v210_sec_beam in v210.stb_model.stb_sections.stb_sec_beam_src:
|
|
1090
|
+
figure_beam = v210_sec_beam.stb_sec_steel_figure_beam_src_or_none
|
|
1091
|
+
if figure_beam is None:
|
|
1092
|
+
continue
|
|
1093
|
+
for shape in figure_beam.stb_sec_steel_beam_src_shape:
|
|
1094
|
+
if shape.stb_sec_steel_beam_straight_or_none is not None:
|
|
1095
|
+
shape.stb_sec_steel_beam_straight.vertical_offset = -150.0
|
|
1096
|
+
reporter.warning(
|
|
1097
|
+
message="SRC梁の上下方向オフセットは仮定として-150.0を設定しました",
|
|
1098
|
+
code=Code.NOT_IMPLEMENTED,
|
|
1099
|
+
phase=Phase.UPGRADE,
|
|
1100
|
+
stb_element=shape.stb_sec_steel_beam_straight,
|
|
1101
|
+
attr_name="vertical_offset",
|
|
1102
|
+
)
|
|
1103
|
+
if shape.stb_sec_steel_beam_taper_or_none is not None:
|
|
1104
|
+
shape.stb_sec_steel_beam_taper.start_vertical_offset = -150.0
|
|
1105
|
+
shape.stb_sec_steel_beam_taper.end_vertical_offset = -150.0
|
|
1106
|
+
reporter.warning(
|
|
1107
|
+
message="SRC梁の上下方向オフセットは仮定として-150.0を設定しました",
|
|
1108
|
+
code=Code.NOT_IMPLEMENTED,
|
|
1109
|
+
phase=Phase.UPGRADE,
|
|
1110
|
+
stb_element=shape.stb_sec_steel_beam_taper,
|
|
1111
|
+
attr_name="start_vertical_offset",
|
|
1112
|
+
)
|
|
1113
|
+
reporter.warning(
|
|
1114
|
+
message="SRC梁の上下方向オフセットは仮定として-150.0を設定しました",
|
|
1115
|
+
code=Code.NOT_IMPLEMENTED,
|
|
1116
|
+
phase=Phase.UPGRADE,
|
|
1117
|
+
stb_element=shape.stb_sec_steel_beam_taper,
|
|
1118
|
+
attr_name="end_vertical_offset",
|
|
1119
|
+
)
|
|
1120
|
+
|
|
1121
|
+
|
|
1122
|
+
def post_sec_beam_src_s(
|
|
1123
|
+
v202: stb_v2_0_2.StBridge, v210: stb_v2_1_0.StBridge, *, reporter: Reporter
|
|
1124
|
+
) -> None:
|
|
1125
|
+
ng_section_id: set[int] = set()
|
|
1126
|
+
_post_sec_beam_steel(
|
|
1127
|
+
v202,
|
|
1128
|
+
v210,
|
|
1129
|
+
kind=BEAM_KIND_SRC,
|
|
1130
|
+
ng_section_id=ng_section_id,
|
|
1131
|
+
sections_from=lambda sections: sections.stb_sec_beam_src,
|
|
1132
|
+
sections_to=lambda sections: sections.stb_sec_beam_src,
|
|
1133
|
+
to_figure=lambda section: (
|
|
1134
|
+
SteelFigure(
|
|
1135
|
+
original_element=section.stb_sec_steel_figure_beam_src,
|
|
1136
|
+
straight=section.stb_sec_steel_figure_beam_src.stb_sec_steel_beam_src_straight_or_none,
|
|
1137
|
+
tapers=section.stb_sec_steel_figure_beam_src.stb_sec_steel_beam_src_taper,
|
|
1138
|
+
joints=section.stb_sec_steel_figure_beam_src.stb_sec_steel_beam_src_joint,
|
|
1139
|
+
haunches=section.stb_sec_steel_figure_beam_src.stb_sec_steel_beam_src_haunch,
|
|
1140
|
+
five_types=section.stb_sec_steel_figure_beam_src.stb_sec_steel_beam_src_five_types,
|
|
1141
|
+
)
|
|
1142
|
+
if section.stb_sec_steel_figure_beam_src_or_none is not None
|
|
1143
|
+
else None
|
|
1144
|
+
),
|
|
1145
|
+
post=lambda stb: _set_src_s_vertical_offset(stb, reporter=reporter),
|
|
1146
|
+
reporter=reporter,
|
|
1147
|
+
)
|
|
1148
|
+
if ng_section_id:
|
|
1149
|
+
v210.stb_model.stb_sections.stb_sec_beam_src = [
|
|
1150
|
+
stb_sec_beam_src
|
|
1151
|
+
for stb_sec_beam_src in v210.stb_model.stb_sections.stb_sec_beam_src
|
|
1152
|
+
if stb_sec_beam_src.id_or_none not in ng_section_id
|
|
1153
|
+
]
|