XmiSchema.Core 0.9.1

Suggested Alternatives

XmiSchema

dotnet add package XmiSchema.Core --version 0.9.1
                    
NuGet\Install-Package XmiSchema.Core -Version 0.9.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="XmiSchema.Core" Version="0.9.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="XmiSchema.Core" Version="0.9.1" />
                    
Directory.Packages.props
<PackageReference Include="XmiSchema.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add XmiSchema.Core --version 0.9.1
                    
#r "nuget: XmiSchema.Core, 0.9.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package XmiSchema.Core@0.9.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=XmiSchema.Core&version=0.9.1
                    
Install as a Cake Addin
#tool nuget:?package=XmiSchema.Core&version=0.9.1
                    
Install as a Cake Tool

XmiSchema Library

Build NuGet Version License Downloads

Overview

XmiSchema.Core is a .NET 8 class library that models Cross Model Information (XMI) graphs for built-environment data. The package exposes strongly-typed entities (materials, storeys, geometries, relationships) plus the XmiManager helper so downstream projects or NuGet consumers can build, query, and export graph payloads consistently.

Installation

dotnet add package XmiSchema.Core

The package targets .NET 8.0 and ships as a reusable dependency for desktop, web, or service workloads.

Quick Start

using System.Collections.Generic;
using XmiSchema.Core.Enums;
using XmiSchema.Core.Entities;
using XmiSchema.Core.Manager;
using XmiSchema.Core.Models;
using XmiSchema.Core.Parameters;

var manager = new XmiManager();
manager.Models.Add(new XmiModel());

var storey = manager.CreateStorey(0, "Storey-1", "Level 1", "ifc-guid", "LEVEL_1", "Ground floor", 0, 900, "Fx", "Fy", "Fz");
var point = manager.CreatePoint3D(0, "pt-1", "Grid A/1", "pt-guid", "PT_A1", "Column base", 0, 0, 0);
var connection = manager.CreateStructuralPointConnection(0, "pc-1", "Node", "pc-guid", "PC_A1", "Column node", storey, point);

var material = manager.CreateMaterial(0, "mat-1", "Steel", "mat-guid", "MAT_S355", "Sample material", XmiMaterialTypeEnum.Steel, 50, 78.5, "210000", "81000", "0.3", 1.2);
var section = manager.CreateCrossSection(
    0,
    "sec-1",
    "IPE300",
    "sec-guid",
    "SEC_IPE300",
    "Beam section",
    material,
    XmiShapeEnum.IShape,
    new IShapeParameters(0.3, 0.15, 0.02, 0.012, 0.008),
    0.0009,
    0.00012,
    0.00035,
    0.045,
    0.09,
    0.0003,
    0.0004,
    0.0005,
    0.0006,
    0.00007);

var curveMember = manager.CreateStructuralCurveMember(0, "cur-1", "Beam A", "cur-guid", "BEAM_A", "Sample beam", section, storey, XmiStructuralCurveMemberTypeEnum.Beam,
    new List<XmiStructuralPointConnection> { connection, connection }, new List<XmiSegment> { new("seg-1", "Segment", "seg-guid", "SEG_1", "Segment", 0f, XmiSegmentTypeEnum.Line) },
    XmiSystemLineEnum.MiddleMiddle, connection, connection, 5, "1,0,0", "0,1,0", "0,0,1", 0, 0, 0, 0, 0, 0, "Fixed", "Pinned");

var json = manager.BuildJson(0);
Console.WriteLine(json);

For a full runnable sample see tests/Examples/StructuralGraphSample.

Folder Layout

xmi-schema-csharp/
├── IXmiManager.cs / XmiManager.cs      # Public orchestration API
├── Models/                             # Bases, entities, geometries, relationships, and XmiModel helpers
├── Utils/                              # Shared utilities (enum converters, extensions)
├── tests/
│   ├── Unit/XmiSchema.Core.Tests       # xUnit project with one fixture per production class
│   └── Examples/StructuralGraphSample  # Console sample showing library usage
├── AGENTS.md / PLAN.md / README.md     # Contributor docs
└── xmi-schema-Csharp.Core.csproj       # Library project file

Each subdirectory within Models/ includes its own README that documents constructor expectations and naming conventions.

Testing & CI

  • Local workflow:
    dotnet restore xmi-schema-Csharp.Core.sln
    dotnet test xmi-schema-Csharp.Core.sln --configuration Release
    
    Run these commands before every commit or pull request so the xUnit suite (one fixture per production class) stays green. Builders under tests/Unit/XmiSchema.Core.Tests/Support provide deterministic sample models for the tests.
  • Examples: run dotnet run --project tests/Examples/StructuralGraphSample/StructuralGraphSample.csproj to see how XmiManager composes a graph; treat it as an integration sanity check when touching graph construction logic.
  • GitHub Actions:
    • Pull Request Tests restores, builds, and tests the solution on every pull request targeting any branch.
    • Release Build & Publish runs after pushes to main, repeats restore/build/test, and then packs/pushes the NuGet package (using the README captured in the .csproj). Both workflows rely on the same commands shown above, so matching them locally avoids surprises in CI.

Contributing

  1. dotnet restore
  2. Update or add XML documentation whenever a public API changes.
  3. Add or update tests in tests/Unit/XmiSchema.Core.Tests and ensure dotnet test passes.
  4. Document new behavior in the relevant README (folder-level or root).

See AGENTS.md for detailed contributor guidelines and the long-term plan in PLAN.md.

License

Distributed under the terms of the project LICENSE.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.9.1 500 12/5/2025 0.9.1 is deprecated because it is no longer maintained.
0.9.0 208 12/5/2025
0.8.0 215 12/4/2025
0.7.0 693 12/3/2025
0.6.0 690 12/2/2025
0.5.1 683 12/2/2025
0.5.0 679 12/2/2025
0.4.0 697 12/2/2025
0.3.0 681 12/2/2025
0.2.19 206 6/24/2025
0.2.18 194 6/24/2025
0.2.17 219 6/17/2025
0.2.16 198 6/17/2025
0.2.15 199 6/17/2025
0.2.14 205 6/17/2025
0.2.13 201 6/17/2025
0.2.12 195 6/16/2025
0.2.11 356 6/10/2025
0.2.10 351 6/10/2025
0.2.9 331 6/10/2025
Loading failed