Skip to content

johltn/IfcGraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

08fad33 · Aug 20, 2024

History

23 Commits
Mar 21, 2021
Feb 4, 2023
Aug 20, 2024
Feb 4, 2023
Feb 4, 2023

Repository files navigation

IfcGraph

Use Networkx to manipulate an IFC file as a directed graph.

#graph.py

import ifcopenshell
import ifcgraph
import networkx as nx
import sys

fn = sys.argv[1]
ifc_file = ifcopenshell.open(fn)

G = ifcgraph.create_graph(ifc_file)  
sorted = list(reversed(list(nx.topological_sort(G))))
      
SG = ifcgraph.get_subgraph(23946, G)

ifcgraph.draw_graph(SG)

python graph.py input.ifc

Output:

image

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages