| name | nobim-image-generator |
| description | Generate images and visualizations from Revit/IFC files without BIM software. Python-based noBIM tool for batch processing. |
| homepage | https://datadrivenconstruction.io |
| metadata | {"openclaw":{"emoji":"🖼️","os":["win32"],"homepage":"https://datadrivenconstruction.io","requires":{"bins":["python3"],"anyBins":["ifcopenshell"]}}} |
noBIM Image Generator
Business Case
Problem Statement
Creating visualizations from BIM models typically requires:
- Expensive BIM software licenses
- Manual screenshot capture
- Time-consuming rendering
- Impossible to batch process
Solution
noBIM tool extracts data and generates visualizations using Python libraries, processing hundreds of projects without BIM software.
Business Value
- No license required - Pure Python solution
- Batch processing - Generate images for 1000s of projects
- Customizable - Create exactly the visualizations you need
- Automatable - Integrate into data pipelines
Technical Implementation
Installation
pip install pandas matplotlib seaborn plotly ifcopenshell
Core Functionality
pandas pd
matplotlib.pyplot plt
mpl_toolkits.mplot3d Axes3D
numpy np
pathlib Path
typing , ,
:
():
.elements =
.project_name =
() -> :
.elements = pd.read_excel(xlsx_path, sheet_name=)
.project_name = Path(xlsx_path).stem
(.elements)
() -> :
(col .elements.columns
col [, , ]):
ValueError()
fig = plt.figure(figsize=size)
ax = fig.add_subplot(, projection=)
categories = .elements[color_by].unique()
colors = plt.cm.tab20(np.linspace(, , (categories)))
color_map = ((categories, colors))
cat categories:
subset = .elements[.elements[color_by] == cat]
ax.scatter(
subset[],
subset[],
subset[],
c=[color_map[cat]],
label=cat[:],
alpha=,
s=
)
ax.set_xlabel()
ax.set_ylabel()
ax.set_zlabel()
ax.set_title()
ax.legend(loc=, fontsize=, ncol=)
plt.savefig(output_path, dpi=, bbox_inches=)
plt.close()
output_path
() -> :
level_elements = .elements[.elements[] == level]
level_elements.empty:
ValueError()
fig, ax = plt.subplots(figsize=size)
walls = level_elements[level_elements[] == ]
_, wall walls.iterrows():
rect = plt.Rectangle(
(wall[], wall[]),
wall[] - wall[],
wall[] - wall[],
fill=, facecolor=, edgecolor=, alpha=
)
ax.add_patch(rect)
rooms = level_elements[level_elements[] == ]
_, room rooms.iterrows():
center_x = (room[] + room[]) /
center_y = (room[] + room[]) /
ax.annotate(room.get(, ),
(center_x, center_y), ha=, fontsize=)
ax.set_aspect()
ax.set_title()
ax.set_xlabel()
ax.set_ylabel()
plt.savefig(output_path, dpi=, bbox_inches=)
plt.close()
output_path
() -> :
cat_counts = .elements[].value_counts().head()
fig, ax = plt.subplots(figsize=size)
bars = ax.barh(cat_counts.index, cat_counts.values,
color=plt.cm.viridis(np.linspace(, , (cat_counts))))
ax.set_xlabel()
ax.set_title()
bar, count (bars, cat_counts.values):
ax.text(bar.get_width() + , bar.get_y() + bar.get_height()/,
, va=, fontsize=)
plt.tight_layout()
plt.savefig(output_path, dpi=, bbox_inches=)
plt.close()
output_path
() -> :
plotly.express px
vol_by_cat = .elements.groupby()[].().reset_index()
vol_by_cat = vol_by_cat[vol_by_cat[] > ].sort_values(, ascending=)
fig = px.treemap(
vol_by_cat.head(),
path=[],
values=,
title=
)
fig.write_image(output_path)
output_path
() -> []:
output_dir = Path(output_dir)
output_dir.mkdir(parents=, exist_ok=)
generated = []
xlsx xlsx_files:
:
.load_from_excel(xlsx)
base_name = Path(xlsx).stem
.generate_3d_scatter((output_dir / ))
.generate_category_chart((output_dir / ))
generated.append(base_name)
()
Exception e:
()
generated