Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
39da2ca
include defaults for ahu sim settings
HoeppJ Nov 17, 2025
062747e
bug fixes for teaser examples
HoeppJ Nov 17, 2025
b59a023
add fix not to check default ep_install_path, which is set to a linux…
HoeppJ Nov 17, 2025
871a64c
bugfix
HoeppJ Nov 18, 2025
bb1f92b
update
HoeppJ Nov 21, 2025
e497193
exclude PathSetting from pydantic validations when updating to defaults
HoeppJ Nov 21, 2025
db33b1d
test new version of ifcopenshell
HoeppJ Nov 21, 2025
12a549a
update new ifcopenshell 0.7.10
HoeppJ Nov 24, 2025
a3b337f
Merge branch '846-examples-pluginteaser-not-working' into 848-ifcopen…
HoeppJ Nov 24, 2025
b3a78eb
add danish custom usages
veronikarichter Nov 24, 2025
2a67f3a
Fix settings for ifcopenshell version 0.8.4
veronikarichter Nov 24, 2025
ac19d1a
Merge remote-tracking branch 'origin/848-ifcopenshell-070240627-no-lo…
veronikarichter Nov 24, 2025
759f627
Add space boundary viewer (works, but may contain bugs, has been gene…
veronikarichter Nov 24, 2025
c840fd7
add option to provide str for PathSettings
HoeppJ Nov 24, 2025
4bd49c2
Merge remote-tracking branch 'origin/848-ifcopenshell-070240627-no-lo…
HoeppJ Nov 24, 2025
fa47353
Change number of valid furniture according to new valid results.
veronikarichter Nov 25, 2025
2dd5549
fix cases where InnerBoundaries == None.
veronikarichter Nov 25, 2025
e4db553
hotfix for inner loops for ifcopenshell version 0.8.4
veronikarichter Nov 25, 2025
c4130e6
Set Precision to 1e-6
veronikarichter Nov 25, 2025
bb832b2
change valid test results to previous result after setting the correc…
veronikarichter Nov 25, 2025
e7d44d3
Downgrade ifcopenshell to 0.8.3.post2 for OCC compatibility
hochbean Nov 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion bim2sim/elements/base_elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@

logger = logging.getLogger(__name__)
quality_logger = logging.getLogger('bim2sim.QualityReport')
settings_products = ifcopenshell.geom.main.settings()
settings_products = ifcopenshell.geom.settings()
settings_products.set(settings_products.USE_PYTHON_OPENCASCADE, True)
settings_products.set(settings_products.USE_WORLD_COORDS, True)
settings_products.set(settings_products.PRECISION, 1e-6)


class ElementError(Exception):
Expand Down
46 changes: 40 additions & 6 deletions bim2sim/elements/bps_elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,15 @@ def _get_space_neighbors(self, name) -> list:

def _get_space_shape(self, name):
"""returns topods shape of the IfcSpace"""
settings = ifcopenshell.geom.main.settings()
settings = ifcopenshell.geom.settings()
settings.set(settings.USE_PYTHON_OPENCASCADE, True)
settings.set(settings.USE_WORLD_COORDS, True)
settings.set(settings.EXCLUDE_SOLIDS_AND_SURFACES, False)
settings.set(settings.INCLUDE_CURVES, True)
settings.set(settings.PRECISION, 1e-6)
settings.set(
"dimensionality",
ifcopenshell.ifcopenshell_wrapper.CURVES_SURFACES_AND_SOLIDS) # 2
# settings.set(settings.EXCLUDE_SOLIDS_AND_SURFACES, False)
# settings.set(settings.INCLUDE_CURVES, True)
return ifcopenshell.geom.create_shape(settings, self.ifc).geometry

def _get_space_center(self, name) -> float:
Expand Down Expand Up @@ -910,8 +914,12 @@ def _get_bound_shape(self, name):
settings = ifcopenshell.geom.settings()
settings.set(settings.USE_PYTHON_OPENCASCADE, True)
settings.set(settings.USE_WORLD_COORDS, True)
settings.set(settings.EXCLUDE_SOLIDS_AND_SURFACES, False)
settings.set(settings.INCLUDE_CURVES, True)
settings.set(settings.PRECISION, 1e-6)
settings.set(
"dimensionality",
ifcopenshell.ifcopenshell_wrapper.CURVES_SURFACES_AND_SOLIDS) # 2
# settings.set(settings.EXCLUDE_SOLIDS_AND_SURFACES, False)
# settings.set(settings.INCLUDE_CURVES, True)

# check if the space boundary shapes need a unit conversion (i.e.,
# an additional transformation to the correct size and position)
Expand All @@ -921,8 +929,9 @@ def _get_bound_shape(self, name):
try:
sore = self.ifc.ConnectionGeometry.SurfaceOnRelatingElement
# if sore.get_info()["InnerBoundaries"] is None:
if sore.InnerBoundaries is None:
sore.InnerBoundaries = ()
shape = ifcopenshell.geom.create_shape(settings, sore)

if sore.InnerBoundaries:
# shape = remove_inner_loops(shape) # todo: return None if not horizontal shape
# if not shape:
Expand All @@ -935,6 +944,31 @@ def _get_bound_shape(self, name):
temp_sore.InnerBoundaries = ()
shape = ifcopenshell.geom.create_shape(settings, temp_sore)
else:
# hotfix: ifcopenshell 0.8.4 does not sufficiently produce
# faces with inner holes (as opposed to ifcopenshell
# 0.7.0). This workaround "manually" performs a boolean
# operation to generate a TopoDS_Shape with inner holes
# before removing the inner loops with the dedicated
# inner_loop_remover function
### START OF HOTFIX #####
inners = []
for inn in sore.InnerBoundaries:
ifc_new = ifcopenshell.file()
temp_sore = ifc_new.create_entity(
'IfcCurveBoundedPlane',
OuterBoundary=inn,
BasisSurface=sore.BasisSurface)
temp_sore.InnerBoundaries = ()
compound = ifcopenshell.geom.create_shape(settings,
temp_sore)
faces = PyOCCTools.get_face_from_shape(compound)
inners.append(faces)
sore.InnerBoundaries = ()
outer_shape_data = ifcopenshell.geom.create_shape(settings,
sore)
shape = PyOCCTools.triangulate_bound_shape(
outer_shape_data, inners)
#### END OF HOTFIX ####
shape = remove_inner_loops(shape)
if not (sore.InnerBoundaries and not self.bound_element.ifc.is_a(
'IfcWall')):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def run_example_1():
'test/resources/weather_files/DEU_NW_Aachen.105010_TMYx.epw')
# Set the install path to your EnergyPlus installation according to your
# system requirements
# project.sim_settings.ep_install_path = 'C://EnergyPlusV9-4-0/'
project.sim_settings.ep_install_path = 'C://EnergyPlusV9-4-0/'

# run annual simulation for EnergyPlus
project.sim_settings.run_full_simulation = True
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def run_example_complex_building_energyplus():

# Set the install path to your EnergyPlus installation according to your
# system requirements
# project.sim_settings.ep_install_path = 'C://EnergyPlusV9-4-0/'
project.sim_settings.ep_install_path = Path('C://EnergyPlusV9-4-0/')

# combine spaces to thermal zones based on their usage
# use cooling
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ class EnergyPlusSimSettings(BuildingSimSettings):
for_frontend=True,
any_string=True
)
ep_install_path = PathSetting(
# ep_install_path is instantiated without validation using BaseModel.model_construct
# to enable linux path as default value for CI pipeline
ep_install_path = PathSetting.model_construct(
value=Path('/usr/local/EnergyPlus-9-4-0/'),
description='Choose EnergyPlus Installation Path',
for_frontend=False,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def init_idf(sim_settings: EnergyPlusSimSettings, paths: FolderStructure,
"""
logger.info("Initialize the idf ...")
# set the installation path for the EnergyPlus installation
ep_install_path = sim_settings.ep_install_path
ep_install_path = Path(sim_settings.ep_install_path)
# set the plugin path of the PluginEnergyPlus within the BIM2SIM Tool
plugin_ep_path = str(Path(__file__).parent.parent.parent)
# set Energy+.idd as base for new idf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,12 @@ def visualize_zones(zone_dict, export_path, paths):
settings = ifcopenshell.geom.settings()
settings.set(settings.USE_PYTHON_OPENCASCADE, True)
settings.set(settings.USE_WORLD_COORDS, True)
settings.set(settings.EXCLUDE_SOLIDS_AND_SURFACES, False)
settings.set(settings.INCLUDE_CURVES, True)
settings.set(settings.PRECISION, 1e-6)
settings.set(
"dimensionality",
ifcopenshell.ifcopenshell_wrapper.CURVES_SURFACES_AND_SOLIDS) # 2
# settings.set(settings.EXCLUDE_SOLIDS_AND_SURFACES, False)
# settings.set(settings.INCLUDE_CURVES, True)

display, start_display, add_menu, add_function_to_menu = init_display(
display_triedron=False, background_gradient_color1=3 * [255],
Expand Down
Loading