Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</PropertyGroup>

<PropertyGroup>
<Version>0.9.0</Version>
<Version>0.10.0</Version>
<Authors>mahach666</Authors>
<Copyright>Copyright (c) 2026 IOExtend</Copyright>
<Product>IfcIO</Product>
Expand All @@ -24,7 +24,7 @@
<PackageProjectUrl>https://github.com/IOExtend/IfcIO</PackageProjectUrl>
<RepositoryUrl>https://github.com/IOExtend/IfcIO</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>ifc;ifc2x3;ifc4;step;iso-10303-21;bim;cad;brep;tessellation;glb;gltf;obj;ifczip;bcf;bcfzip;csg;mep;ids;ifcpatch;ifcselector;ifccsv;clash;diff;viewer;webgl;html-viewer;grids;measure;clash-grouping;buildingsmart</PackageTags>
<PackageTags>ifc;ifc2x3;ifc4;step;iso-10303-21;bim;cad;brep;tessellation;glb;gltf;obj;ifczip;bcf;bcfzip;sequence;4d;cost;5d;zones;csg;mep;ids;ifcpatch;ifcselector;ifccsv;clash;diff;viewer;webgl;html-viewer;grids;measure;clash-grouping;buildingsmart</PackageTags>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageIcon>icon.png</PackageIcon>
</PropertyGroup>
Expand Down
90 changes: 89 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,23 @@ Built clean-room under the [IOExtend](https://github.com/IOExtend) organization
- Full revision comparison between two IFC models detecting added, deleted, and modified elements (3D geometry displacement, property set deltas, quantity variations, and storey re-assignments) conforming to `ifcdiff`. Direct export to JSON and BCF 2.1 archives.
- **Standalone 3D WebGL HTML Viewer (`IfcHtmlViewerExporter`)**:
- Export any IFC model to an interactive, self-contained single-file 3D HTML viewer (`.html`) with zero external scripts, CDNs, or server dependencies.
- Includes orbit camera controls, live multi-axis section clipping planes (Cut X, Cut Y, Cut Z), spatial tree navigation, element property inspector, interactive 2-point 3D measurement tool, and 2D canvas overlay drawing of architectural grid axes and bubble labels.
- Includes orbit camera controls, live multi-axis section clipping planes (Cut X, Cut Y, Cut Z), spatial tree navigation, element property inspector, interactive 2-point 3D measurement tool, 2D canvas overlay drawing of architectural grid axes and bubble labels, and interactive 4D timeline simulation playback.
- **4D Construction Sequencing & Temporal Simulation (`IfcWorkSchedule`, `IfcTask`, `IfcTaskTime`, `IFCRELSEQUENCE`)**:
- Full support for construction work schedules, WBS hierarchies, task durations, milestones, and predecessor/successor relationships (`FinishToStart`, `StartToStart`, `FinishToFinish`, `StartToFinish`).
- Temporal 4D simulation engine: query active tasks, completed tasks, overall progress ratio, and element states (`Planned`, `InProgress`, `Completed`, `NotStarted`) at any given simulation date.
- Interactive 4D timeline playback in the standalone HTML viewer (`ifcio view`).
- **5D Cost Planning & Budgeting (`IfcCostSchedule`, `IfcCostItem`, `IfcCostValue`, `IFCAPPLIEDVALUE`)**:
- Hierarchical Cost Breakdown Structure (CBS), unit rates, quantities, and automatic cost rollup across tree nodes.
- Elements and physical quantities linked to cost items via `IFCRELASSIGNSTOCONTROL`.
- CLI command `ifcio cost` with CSV export.
- **Spatial Zones (`IfcZone`, `IFCZONE`)**:
- Grouping architectural spaces and rooms into thermal, fire safety, acoustic, security, and ventilation zones.
- **Bi-directional BCF 2.1 Archive Container (`BcfArchive`)**:
- Full in-memory or stream-based container for reading, inspecting, modifying, and writing buildingSMART BCF 2.1 zip archives (`.bcfzip`).
- High-level queries by element GUID (`FindTopicsByElement`), status (`FindTopicsByStatus`), and snapshot image attachments.
- CLI command `ifcio bcf` for inspection and topic listing.
- **High-Level IfcOpenShell-Compatible API Facade (`IfcApi`)**:
- Pythonic, clean API: `IfcApi.Sequence`, `IfcApi.Cost`, `IfcApi.Spatial`, and `IfcApi.Root` for rapid automation.
- **Zero Dependencies**: Pure C# targeting `.NET 8` and `.NET 10`.

---
Expand Down Expand Up @@ -470,6 +486,69 @@ model.SaveHtmlViewer("BuildingModel.html", new IfcHtmlViewerOptions
});
```

### 4D Construction Sequencing & Simulation

```csharp
using IfcIO.Model.Sequence;

// Create 4D schedule with tasks, WBS, and element assignments
var schedule = model.AddWorkSchedule("Tower Schedule");
var task = schedule.AddTask("Construct Walls", "WBS-1.1", new DateTime(2026, 2, 1), new DateTime(2026, 3, 1));
task.AssignElement(wall);

// Query temporal state during construction
var activeTasks = schedule.GetActiveTasksAt(new DateTime(2026, 2, 15));
var state = schedule.GetElementStateAt(wall, new DateTime(2026, 2, 15)); // => IfcElementSimulationState.InProgress
```

### 5D Cost Planning & CBS Budgeting

```csharp
using IfcIO.Model.Cost;

// Create 5D cost schedule with CBS items, unit rates, and quantities
var budget = model.AddCostSchedule("Master Budget", "USD", IfcCostScheduleType.Budget);
var masonryItem = budget.AddCostItem("Wall Masonry", "04.20.00", unitRate: 150.0, quantity: 200.0, unitBasis: "m2");
masonryItem.AssignElement(wall);

Console.WriteLine($"Total Item Cost: {masonryItem.TotalCost} USD"); // => 30000 USD
Console.WriteLine($"Grand Budget: {budget.GetTotalCost()} USD");
```

### High-Level IfcOpenShell-Compatible API Facade (`IfcApi`)

```csharp
using IfcIO.Api;

var model = IfcApi.Root.CreateProject("Commercial Office", schema: IfcIO.Schema.IfcSchema.Ifc4);
var storey = IfcApi.Root.CreateStorey(model, "Ground Floor", 0.0);
var wall = IfcApi.Root.CreateWall(model, storey, "Exterior Wall");

// High-level 4D and 5D workflows
var ws = IfcApi.Sequence.AddWorkSchedule(model, "Main Schedule");
var task = IfcApi.Sequence.AddTask(model, ws, "Wall Framing", new DateTime(2026, 1, 10), new DateTime(2026, 2, 10));
IfcApi.Sequence.AssignProcess(task, wall);

var cs = IfcApi.Cost.AddCostSchedule(model, "Base Budget");
var ci = IfcApi.Cost.AddCostItem(cs, "Framing Labor", unitRate: 75.0, quantity: 120.0);
IfcApi.Cost.AssignCostControl(ci, wall);
```

### buildingSMART BCF 2.1 Archive Container (`BcfArchive`)

```csharp
using IfcIO.Bcf;

// Read, query, and modify BCF zip archives directly
using var bcf = BcfArchive.Open("Issues.bcfzip");
var activeTopics = bcf.FindTopicsByStatus("Active");
var wallIssues = bcf.FindTopicsByElement(wall.GlobalId);

// Add topic and export updated archive
bcf.AddTopic("Verify concrete cover thickness", "Architectural Review", priority: "High");
bcf.Save("Issues_Updated.bcfzip");
```

---

## Global CLI Tool (`ifcio`)
Expand All @@ -486,6 +565,15 @@ dotnet tool install --global IfcIO.Cli
# Inspect model metadata, storeys, spaces, systems, and element distribution
ifcio info Building.ifc --report --spaces --systems --export-grids Grids.xml

# 4D construction schedule temporal simulation and CSV export
ifcio schedule Building.ifc --sim-date 2026-06-01 --export-csv ScheduleReport.csv

# 5D cost breakdown and budget reporting
ifcio cost Building.ifc --export-csv CostBreakdown.csv

# Inspect BCF 2.1 archive topics and viewpoints
ifcio bcf Issues.bcfzip

# Query elements matching IfcOpenShell-style selector
ifcio query Building.ifc "IfcWall[LoadBearing=TRUE]"

Expand Down
65 changes: 65 additions & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,62 @@ IfcGlbExporter.Export(model, "Building.glb");
IfcObjExporter.Export(model, "Building.obj");
```

### 4D Construction Scheduling & Timeline Simulation

```csharp
using IfcIO;
using IfcIO.Model.Sequence;

var model = IfcModel.Open("Project.ifc");

// Access work schedules and tasks
var schedule = model.WorkSchedules.FirstOrDefault();
if (schedule is not null)
{
Console.WriteLine($"Schedule: {schedule.Name}");
DateTime simDate = DateTime.UtcNow;

// Temporal 4D simulation
var activeTasks = schedule.GetActiveTasksAt(simDate);
double progress = schedule.GetProgressAt(simDate);
Console.WriteLine($"Progress at {simDate:d}: {progress:P1} ({activeTasks.Count} active tasks)");
}
```

### 5D Cost Planning & CBS Budgeting

```csharp
using IfcIO;
using IfcIO.Model.Cost;

var model = IfcModel.Open("Project.ifc");

// Inspect 5D cost schedules
foreach (var costSchedule in model.CostSchedules)
{
Console.WriteLine($"Cost Plan: {costSchedule.Name} - Grand Total: {costSchedule.GetTotalCost():N2} {costSchedule.Currency}");
foreach (var item in costSchedule.AllCostItems)
{
Console.WriteLine($" - [{item.CostCode}] {item.Name}: {item.TotalCost:N2} {costSchedule.Currency}");
}
}
```

### BCF 2.1 Archive Container

```csharp
using IfcIO.Bcf;

// Open a BCF archive directly from disk or stream
using var archive = BcfArchive.Open("Issues.bcfzip");
Console.WriteLine($"Found {archive.Topics.Count} coordination topic(s):");

foreach (var topic in archive.Topics)
{
Console.WriteLine($"[{topic.TopicStatus}] {topic.Title} (Priority: {topic.Priority})");
}
```

---

## CLI Usage
Expand All @@ -93,6 +149,15 @@ Run standard operations from your terminal:
# Display summary info, schema version, and element counts
ifcio info Building.ifc

# Run 4D construction schedule simulation at a specific date
ifcio schedule Building.ifc --sim-date 2026-06-01 --export-csv ScheduleReport.csv

# Inspect 5D cost budgets and export tabular breakdown
ifcio cost Building.ifc --export-csv CostBreakdown.csv

# Inspect BCF coordination topics
ifcio bcf Issues.bcfzip

# Convert IFC to binary glTF 2.0 and Wavefront OBJ
ifcio export Building.ifc --glb scene.glb --obj scene.obj

Expand Down
24 changes: 24 additions & 0 deletions docs/public-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,27 @@ The `IfcIO` package is the supported surface listed here.
| `IfcDiffEngine` | Revision comparison engine detecting added, deleted, and modified IFC elements and geometry shifts. |
| `IfcValidator` | Structural STEP syntax and buildingSMART schema conformance validator. |
| `IfcBcfExporter` | buildingSMART BIM Collaboration Format (BCF 2.1 `.bcfzip`) issue and viewpoint generator. |
| `BcfArchive` | Bidirectional BCF 2.1 archive container for reading, querying, editing, and saving `.bcfzip` files. |

## 4D Construction Sequencing & Temporal Simulation

| Type | Description |
|---|---|
| `IfcWorkSchedule` | Construction schedule container managing WBS hierarchies, baseline dates, temporal simulation, and progress tracking. |
| `IfcTask` | Individual construction activity or milestone with duration, planned/actual dates, and predecessor/successor links. |
| `IfcTaskTime` | Time entity conforming to `IFCTASKTIME` capturing early/late dates, durations, completion ratio, and milestones. |

## 5D Cost Planning & CBS Budgeting

| Type | Description |
|---|---|
| `IfcCostSchedule` | 5D budget, tender, estimate, or cost plan conforming to `IFCCOSTSCHEDULE` with currency and rollups. |
| `IfcCostItem` | Cost breakdown structure (CBS) node with unit rates, quantities, linked elements, and sub-items. |
| `IfcCostValue` | Applied monetary value breakdown conforming to `IFCAPPLIEDVALUE`. |

## High-Level IfcOpenShell-Compatible API Facade

| Type | Description |
|---|---|
| `IfcApi` | Unified top-level facade conforming to IfcOpenShell high-level API conventions (`IfcApi.Sequence`, `IfcApi.Cost`, `IfcApi.Spatial`, `IfcApi.Root`). |
| `IfcZone` | Functional spatial zone grouping spaces into thermal, fire safety, acoustic, or ventilation zones (`IFCZONE`). |
Loading
Loading