Skip to content

Commit

Permalink
Renamed main namespace and extended Readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Eri committed Jul 27, 2019
1 parent 42c4dc9 commit 01d1f8c
Show file tree
Hide file tree
Showing 8 changed files with 92 additions and 23 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.idea
bin
obj
*.zip
*.tar.gz
File renamed without changes.
62 changes: 61 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,61 @@
# xeokit-metadata-utils
# xeokit-metadata

The `xeokit-metadata` is a multi-platform command line tool for extracting
the structural hierarchy of the building elements within an `IFC` into the
[metadata format of the `xeokit-sdk`][0]. Currently only IFC 2x3 is supported.

## Usage

```
$ mkdir xeokit-metadata
$ wget https://github.com/bimspot/xeokit-metadata/releases/download/0.0.1/xeokit-metadata-linux-x64.tar.gz
$ tar -zxvf xeokit-metadata-linux-x64.tar.gz
$ chmod +x xeokit-metadata
$ ./xeokit-metadata /path/to/project/scene.ifc /path/to/project/metadata.json
```

[See the usage with `xeokit-sdk` here][0].

## JSON

See the JSON schema in the repo: `MetaModel.schema.json`.

Example:

```json
{
"id": "Geldropseweg 47",
"projectId": "344O7vICcwH8qAEnwJDjSU",
"metaObjects": [
{
"id": "344O7vICcwH8qAEnwJDjSU",
"name": "Geldropseweg 47",
"type": "IfcProject",
"parent": null
},
{
"id": "1GJdSmuaI6JvfGvF8t8fMD",
"name": "-01. Fundering",
"type": "IfcBuildingStorey",
"parent": null
},
{
"id": "1aR5aRgqnAJ9NEC7sfD6qG",
"name": "21_1 WAND NC",
"type": "IfcWall",
"parent": "1GJdSmuaI6JvfGvF8t8fMD"
}
]
}
```

## Credits

Created by [BIMspot][1] for the [`xeokit-sdk`][2] using the
[`XbimEssentials`][3] and the [NewtonSoft JSON][4] libraries.

[0]: https://github.com/xeokit/xeokit-sdk/wiki/Viewing-BIM-Models-Offline
[1]: https://bimspot.io
[2]: https://xeokit.io
[3]: https://github.com/xBimTeam/XbimEssentials
[4]: https://www.newtonsoft.com/json
18 changes: 0 additions & 18 deletions xeokit/Hierarchy/Hierarchy.csproj

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using Xbim.Ifc;
using Xbim.Ifc2x3.Interfaces;

namespace Hierarchy {
namespace XeokitMetadata {
/// <summary>
/// The MetaObject is used to serialise the building elements within the IFC
/// model. It is a representation of a single element (e.g. IfcProject,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.IO;

namespace Hierarchy {
namespace XeokitMetadata {
/// <summary>
/// This command line application extracts the hierarchical structure of
/// the building elements and creates a JSON output compatible with the
Expand All @@ -25,7 +25,7 @@ private static void Main(string[] args) {
Console.WriteLine(@"
Usage:
$ IfcHierarchy /path/to/some.ifc /path/to/output.json
$ xeokit-metadata /path/to/some.ifc /path/to/output.json
");
Environment.Exit(1);
Expand Down
25 changes: 25 additions & 0 deletions xeokit/xeokit-metadata/xeokit-metadata.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
<LangVersion>latest</LangVersion>
<PackageVersion>0.0.1</PackageVersion>
<Title>xeokit-metadata</Title>
<Authors>bimspot.io</Authors>
<Copyright>BIM SPOT GmbH</Copyright>
<PackageProjectUrl>https://github.com/bimspot/xeokit-metadata-utils</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/bimspot/xeokit-metadata-utils/LICENSE</PackageLicenseUrl>
<RepositoryUrl>https://github.com/bimspot/xeokit-metadata-utils</RepositoryUrl>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
<PackageReference Include="Xbim.Essentials" Version="5.1.259" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion xeokit/xeokit.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hierarchy", "Hierarchy\Hierarchy.csproj", "{3441B935-D5C5-4794-91C4-05D4F188E26C}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xeokit-metadata", "xeokit-metadata\xeokit-metadata.csproj", "{3441B935-D5C5-4794-91C4-05D4F188E26C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down

0 comments on commit 01d1f8c

Please sign in to comment.