-1

Currently i try to run a code but I keepr receiving errors, tried everything to fix error but unfortunatly no results. hoping someone can help me.


# Importeer de functies uit ifc_functions.py
import IFCOPENSHELL
from ifc_fucntions import *

# Definieer de naam van het IFC-bestand
ifc_file_name = "Centrale Bibliotheek Rotterdam,IFC"

# Open het IFC-bestand
ifc_file = open_ifc(ifc_file_name)

# Definieer lijst met entiteiten om te controleren
entity_list = ["IfcWall", "IfcSlab"]

# Maak lege lijst voor clashes
clash_list = []

# Loop door alle entiteiten in het IFC-bestand
for entity in ifc_file.by_type("IfcProduct"):
    
    # Controleer of de entiteit zich in de entity_list bevindt
    if entity.is_a() in entity_list:
        
        # Loop door alle entiteiten in het IFC-bestand
        for entity2 in ifc_file.by_type("IfcProduct"):
            
            # Controleer of de entiteit zich in de entity_list bevindt
            if entity2.is_a() in entity_list:
                
                # Controleer op botsingen tussen de twee entiteiten
                if entity.geometry and entity2.geometry:
                    if entity.geometry.intersects(entity2.geometry):
                        
                        # Voeg clash toe aan clash-lijst
                        clash_list.append([entity, entity2])
                        
# Print clash-lijst
print("Clashes:")
for clash in clash_list:
    print(clash[0].GlobalId, clash[1].GlobalId)



import IFCOPENSHELL

def open_ifc():
    ifc_file = IFCOPENSHELL.open("Centrale Bibliotheek Rotterdam.open_ifc")
    return ifc_file

from ifc_functions import open_ifc

ifc_file = open_ifc("Centrale Bibliotheek Rotterdam.IFC")

the errors that I keep receiving:

photo of error

I get errors and already tried to fix them but with no results.:

Tried different versions of python 3.9/3.10 Installed pip again / upgrade Put everything into one path

1 Answer 1

0

kinda boring error but I think you have an typo here :

from ifc_fucntions import *
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.