Skip to content

Commit 10dc779

Browse files
authored
Merge pull request #12 from idaholab/feature/add-nuclear-containment-structure
Feature/add nuclear containment structure
2 parents 65c7c4c + 764c9e0 commit 10dc779

File tree

112 files changed

+1751
-1448
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+1751
-1448
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
3131
- name: Make IfcConvert executable
3232
run: |
33-
chmod +x src/bim2fem/bim2glb/ifc_convert/linux/IfcConvert
33+
chmod +x src/bim2glb/ifc_convert/linux/IfcConvert
3434
3535
- name: Run tests
3636
run: |

CONTRIBUTING.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -389,22 +389,21 @@ If you're using VS Code, you can use our recommended settings for better Python
389389
3. Add the following configuration:
390390
```json
391391
{
392+
"python.testing.unittestEnabled": false,
392393
"python.testing.pytestEnabled": true,
393-
"python.analysis.extraPaths": [
394-
"./src"
395-
],
396394
"python.testing.pytestArgs": [
397-
"."
395+
"tests", // or wherever your tests are
396+
"-v",
397+
"--tb=short"
398398
],
399-
"python.testing.unittestEnabled": false
399+
"python.testing.autoTestDiscoverOnSaveEnabled": true
400400
}
401401
```
402402

403403
This configuration:
404404

405405
- Enables pytest as the test framework
406-
- Adds the src/ directory to Python paths (fixes import warnings)
407-
- Configures pytest to discover tests from the project root
406+
- Automates pytest configuration in VS Code
408407
- Disables unittest to avoid conflicts
409408

410409
Note: The .vscode/ folder is gitignored, so these settings won't be tracked. Each developer can customize them as needed.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ Convert Building Information Models (BIM) to Finite Element Models (FEM) for str
1313
<td align="center"><strong>IFC4 StructuralAnalysisView</strong></td>
1414
</tr>
1515
<tr>
16-
<td><img src="src/bim2fem/images/Revit_original.png" alt="Original Revit model" width="300"/></td>
17-
<td><img src="src/bim2fem/images/Revit_IFC4_ReferenceView.png" alt="IFC4 ReferenceView" width="300"/></td>
18-
<td><img src="src/bim2fem/images/Revit_IFC4_StructuralAnalysisView.png" alt="IFC4 StructuralAnalysisView" width="300"/></td>
16+
<td><img src="images/Revit_original.png" alt="Original Revit model" width="300"/></td>
17+
<td><img src="images/Revit_IFC4_ReferenceView.png" alt="IFC4 ReferenceView" width="300"/></td>
18+
<td><img src="images/Revit_IFC4_StructuralAnalysisView.png" alt="IFC4 StructuralAnalysisView" width="300"/></td>
1919
</tr>
2020
</table>
2121

File renamed without changes.

src/bim2fem/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,15 @@
11
# Copyright 2025, Battelle Energy Alliance, LLC All Rights Reserved
2+
3+
"""Welcome to BIM2FEM. Package for converting IFC4 files from the architectural
4+
domain to the structural analysis domain."""
5+
6+
7+
import sys
8+
import os
9+
from datetime import datetime
10+
11+
sys.path.insert(0, os.path.dirname(__file__))
12+
13+
14+
def current_time():
15+
return datetime.now().strftime("%H:%M:%S")

src/bim2fem/core/adjust_element_connectivity_of_building_fem.py renamed to src/bim2fem/adjust_element_connectivity_of_building_fem.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66

77
import ifcopenshell
88

9-
from bim2fem.core.helpers.snap_frame_members import snap_frame_members
10-
from bim2fem.core.helpers.snap_floor_beam_systems import snap_floor_beam_systems
11-
from bim2fem.core.helpers.snap_beams_to_walls import snap_beams_to_walls
12-
from bim2fem.core.helpers.snap_walls_to_slabs import snap_walls_to_slabs
13-
from bim2fem.core.helpers.snap_walls_to_walls import (
9+
from bim2fem.helpers.snap_frame_members import snap_frame_members
10+
from bim2fem.helpers.snap_floor_beam_systems import snap_floor_beam_systems
11+
from bim2fem.helpers.snap_beams_to_walls import snap_beams_to_walls
12+
from bim2fem.helpers.snap_walls_to_slabs import snap_walls_to_slabs
13+
from bim2fem.helpers.snap_walls_to_walls import (
1414
snap_walls_to_perpendicular_walls,
1515
)
16-
import bim2fem.ifcplus.api.structural
16+
import ifcplus.api.structural
1717

1818

1919
def adjust_element_connectivity_of_ifc4_sav_file(
@@ -29,39 +29,39 @@ def adjust_element_connectivity_of_ifc4_sav_file(
2929
ifc4_sav_file = snap_frame_members(
3030
ifc4_sav_file=ifc4_sav_file,
3131
)
32-
bim2fem.ifcplus.api.structural.merge_all_coincident_structural_point_connections(
32+
ifcplus.api.structural.merge_all_coincident_structural_point_connections(
3333
ifc4sav_file=ifc4_sav_file
3434
)
3535

3636
if execute_snap_floor_beam_systems:
3737
ifc4_sav_file = snap_floor_beam_systems(
3838
ifc4_sav_file=ifc4_sav_file,
3939
)
40-
bim2fem.ifcplus.api.structural.merge_all_coincident_structural_point_connections(
40+
ifcplus.api.structural.merge_all_coincident_structural_point_connections(
4141
ifc4sav_file=ifc4_sav_file
4242
)
4343

4444
if execute_snap_walls_to_slabs:
4545
ifc4_sav_file = snap_walls_to_slabs(
4646
ifc4_sav_file=ifc4_sav_file,
4747
)
48-
bim2fem.ifcplus.api.structural.merge_all_coincident_structural_point_connections(
48+
ifcplus.api.structural.merge_all_coincident_structural_point_connections(
4949
ifc4sav_file=ifc4_sav_file
5050
)
5151

5252
if execute_snap_walls_to_walls:
5353
ifc4_sav_file = snap_walls_to_perpendicular_walls(
5454
ifc4_sav_file=ifc4_sav_file,
5555
)
56-
bim2fem.ifcplus.api.structural.merge_all_coincident_structural_point_connections(
56+
ifcplus.api.structural.merge_all_coincident_structural_point_connections(
5757
ifc4sav_file=ifc4_sav_file
5858
)
5959

6060
if execute_snap_beams_to_walls:
6161
ifc4_sav_file = snap_beams_to_walls(
6262
ifc4_sav_file=ifc4_sav_file,
6363
)
64-
bim2fem.ifcplus.api.structural.merge_all_coincident_structural_point_connections(
64+
ifcplus.api.structural.merge_all_coincident_structural_point_connections(
6565
ifc4sav_file=ifc4_sav_file
6666
)
6767

src/bim2fem/core/convert_building_to_fem.py renamed to src/bim2fem/convert_building_to_fem.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66

77
import ifcopenshell
8-
import inlbim.api.file
8+
import ifcplus.api.project
99
import ifcopenshell.util.selector
1010
from bim2fem.helpers.convert_linear_building_element import (
1111
convert_linear_beam_to_structural_curve_member,
@@ -16,12 +16,12 @@
1616
convert_planar_slab_to_structural_surface_members,
1717
convert_planar_wall_to_structural_surface_members,
1818
)
19-
from inlbim import REGION
19+
from ifcplus import REGION
2020
import ifcopenshell.util.element
21-
import inlbim.api.structural
21+
import ifcplus.api.structural
2222
import ifcopenshell.api.root
2323
import ifcopenshell.api.aggregate
24-
import inlbim.api.geometry
24+
import ifcplus.api.placement
2525

2626

2727
def convert_building_from_reference_view_to_structural_analysis_view(
@@ -35,7 +35,7 @@ def convert_building_from_reference_view_to_structural_analysis_view(
3535
element_selection_query = "IfcColumn, IfcSlab, IfcWall, IfcBeam, IfcMember"
3636

3737
# Create empty IFC4 StructuralAnalysisView File
38-
ifc4_destination_file = inlbim.api.file.create_ifc4_file(
38+
ifc4_destination_file = ifcplus.api.project.create_ifc4_file(
3939
model_view_definition="StructuralAnalysisView",
4040
precision=1e-4,
4141
)
@@ -56,7 +56,7 @@ def convert_building_from_reference_view_to_structural_analysis_view(
5656
products=[site],
5757
relating_object=project,
5858
)
59-
inlbim.api.geometry.edit_object_placement(
59+
ifcplus.api.placement.edit_object_placement(
6060
product=site,
6161
place_object_relative_to_parent=True,
6262
)
@@ -134,7 +134,7 @@ def convert_building_from_reference_view_to_structural_analysis_view(
134134
print(f"IfcWalls: {len(walls_from_source_file)}")
135135

136136
# Add StructuralAnalysisModel
137-
structural_analysis_model = inlbim.api.structural.add_structural_analysis_model(
137+
structural_analysis_model = ifcplus.api.structural.add_structural_analysis_model(
138138
ifc4_file=ifc4_destination_file,
139139
name=None,
140140
)
@@ -247,7 +247,7 @@ def convert_building_from_reference_view_to_structural_analysis_view(
247247
print(f"\t{key.GlobalId} {key.is_a()}: {result}")
248248

249249
# Merge Nodes
250-
inlbim.api.structural.merge_all_coincident_structural_point_connections(
250+
ifcplus.api.structural.merge_all_coincident_structural_point_connections(
251251
ifc4sav_file=ifc4_destination_file
252252
)
253253

src/bim2fem/core/convert_ifc_to_fem.py renamed to src/bim2fem/convert_ifc_to_fem.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@
55

66

77
import ifcopenshell
8-
import bim2fem.ifcplus.api.placement
9-
import bim2fem.ifcplus.api.project
8+
import ifcplus.api.placement
9+
import ifcplus.api.project
1010
import ifcopenshell.util.selector
11-
from bim2fem.core.helpers.convert_linear_building_element import (
11+
from bim2fem.helpers.convert_linear_building_element import (
1212
convert_linear_building_element_to_structural_curve_member,
1313
)
14-
from bim2fem.core.helpers.convert_planar_building_element import (
14+
from bim2fem.helpers.convert_planar_building_element import (
1515
convert_planar_building_element_to_structural_surface_members,
1616
)
17-
from bim2fem.ifcplus import REGION
17+
from ifcplus import REGION
1818
import ifcopenshell.util.element
19-
import bim2fem.ifcplus.api.structural
19+
import ifcplus.api.structural
2020
import ifcopenshell.api.root
2121
import ifcopenshell.api.aggregate
22-
import bim2fem.ifcplus.api.geometry
22+
import ifcplus.api.geometry
2323

2424

2525
def convert_ifc_to_fem(
@@ -31,7 +31,7 @@ def convert_ifc_to_fem(
3131
"""Convert IFC to FEM"""
3232

3333
# Create empty IFC4 StructuralAnalysisView File
34-
ifc4_destination_file = bim2fem.ifcplus.api.project.create_ifc4_file(
34+
ifc4_destination_file = ifcplus.api.project.create_ifc4_file(
3535
model_view_definition="StructuralAnalysisView",
3636
precision=1e-4,
3737
)
@@ -52,7 +52,7 @@ def convert_ifc_to_fem(
5252
products=[site],
5353
relating_object=project,
5454
)
55-
bim2fem.ifcplus.api.placement.edit_object_placement(
55+
ifcplus.api.placement.edit_object_placement(
5656
product=site,
5757
place_object_relative_to_parent=True,
5858
)
@@ -134,7 +134,7 @@ def convert_ifc_to_fem(
134134

135135
# Add StructuralAnalysisModel
136136
structural_analysis_model = (
137-
bim2fem.ifcplus.api.structural.add_structural_analysis_model(
137+
ifcplus.api.structural.add_structural_analysis_model(
138138
ifc4_file=ifc4_destination_file,
139139
name=None,
140140
)
@@ -251,7 +251,7 @@ def convert_ifc_to_fem(
251251
print(f"\t{key.GlobalId} {key.is_a()}: {result}")
252252

253253
# Merge Nodes
254-
bim2fem.ifcplus.api.structural.merge_all_coincident_structural_point_connections(
254+
ifcplus.api.structural.merge_all_coincident_structural_point_connections(
255255
ifc4sav_file=ifc4_destination_file
256256
)
257257

src/bim2fem/core/convert_piping_to_fem.py renamed to src/bim2fem/convert_piping_to_fem.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@
55

66

77
import ifcopenshell
8-
import inlbim.api.file
8+
import ifcplus.api.project
99
import ifcopenshell.util.selector
1010
from bim2fem.helpers.convert_pipe_segment import (
1111
convert_linear_pipe_segment_to_structural_curve_member,
1212
)
1313
from bim2fem.helpers.convert_pipe_fitting import (
1414
convert_pipe_fitting_to_structural_items,
1515
)
16-
from inlbim import REGION
16+
from ifcplus import REGION
1717
import ifcopenshell.util.element
18-
import inlbim.api.structural
18+
import ifcplus.api.structural
1919
import ifcopenshell.api.root
2020
import ifcopenshell.api.aggregate
21-
import inlbim.api.geometry
21+
import ifcplus.api.placement
2222

2323

2424
def convert_piping_from_reference_view_to_structural_analysis_view(
@@ -32,7 +32,7 @@ def convert_piping_from_reference_view_to_structural_analysis_view(
3232
element_selection_query = "IfcPipeSegment, IfcPipeFitting"
3333

3434
# Create empty IFC4 StructuralAnalysisView File
35-
ifc4_destination_file = inlbim.api.file.create_ifc4_file(
35+
ifc4_destination_file = ifcplus.api.project.create_ifc4_file(
3636
model_view_definition="StructuralAnalysisView",
3737
precision=1e-4,
3838
)
@@ -53,7 +53,7 @@ def convert_piping_from_reference_view_to_structural_analysis_view(
5353
products=[site],
5454
relating_object=project,
5555
)
56-
inlbim.api.geometry.edit_object_placement(
56+
ifcplus.api.placement.edit_object_placement(
5757
product=site,
5858
place_object_relative_to_parent=True,
5959
)
@@ -108,7 +108,7 @@ def convert_piping_from_reference_view_to_structural_analysis_view(
108108
print(f"IfcPipeFittings: {len(pipe_fittings_from_source_file)}")
109109

110110
# Add StructuralAnalysisModel
111-
structural_analysis_model = inlbim.api.structural.add_structural_analysis_model(
111+
structural_analysis_model = ifcplus.api.structural.add_structural_analysis_model(
112112
ifc4_file=ifc4_destination_file,
113113
name=None,
114114
)
@@ -194,7 +194,7 @@ def convert_piping_from_reference_view_to_structural_analysis_view(
194194
print(f"\t{key.GlobalId} {key.is_a()}: {result}")
195195

196196
# Merge Nodes
197-
inlbim.api.structural.merge_all_coincident_structural_point_connections(
197+
ifcplus.api.structural.merge_all_coincident_structural_point_connections(
198198
ifc4sav_file=ifc4_destination_file
199199
)
200200

src/bim2fem/core/__init__.py

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)