Giter VIP home page Giter VIP logo

tumcms / open-infra-platform Goto Github PK

View Code? Open in Web Editor NEW
48.0 10.0 22.0 129.35 MB

This is the official repository of the open-source Open Infra Platform software (as of April 2020).

License: Other

CMake 2.69% Python 2.97% HTML 1.77% C++ 75.63% Yacc 0.50% Lex 0.14% Batchfile 0.28% C 5.13% QMake 0.02% M4 7.82% Makefile 0.06% XSLT 1.70% QML 0.02% HLSL 1.07% Smalltalk 0.01% Berry 0.20%
ifc infrastructure boost point-cloud building-information-modelling okstra

open-infra-platform's Introduction

TUM Open Infra Platform

status DOI

Info

TUM Open Infra Platform (OIP in short) is a software for checking and viewing IFC data. It comes with its own EXPRESS parser and C++ classes generator.

The whole software underwent major overhaul as described by Hecht & Jaud (2019). As a consequence, OIP can be used in two ways:

  1. Using the installer which corresponds to the frozen state of the master branch from 2018:

Beta1_5_Windows8_1.png

  1. Compiling the newest developments yourself on the development branch - see below for instructions (Jaud et al. 2022).

News

See Release Notes

Documentation

Out-of-sync:

Installation, Usage & Updating

Operating Sytems

Currently, TUM Open Infra Platform only supports machines running on Windows. However, Linux support is considered for the future.

License

See TUM Open Infra Platform's license and third party licenses.

open-infra-platform's People

Contributors

carakazan avatar cbenghi avatar christophkaiser avatar danielskatz avatar duckerscheinl avatar elvira2227 avatar hechth avatar hugoledoux avatar jschlenger avatar mach0 avatar mauplatteau avatar nnjakoala avatar pjanck avatar samuilsrulovs avatar vertexwahn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

open-infra-platform's Issues

Add e57 support

Introduce at least the point cloud part of the e57 schema.

Comment UnitTest

  • Finish implementing comment unit test
  • Fix error in example file which leads to build failure

Reintroduce interpretation of openings

Through the refactoring of IFC, these part was commented out. The openings within geometries need to be reintroduced.

// Function 4: Convert openings.
void convertOpenings(const std::shared_ptr<typename IfcEntityTypesT::IfcElement>& ifcElement,
std::vector<std::shared_ptr<ShapeInputDataT<IfcEntityTypesT>>>& vecOpeningData,
std::stringstream& err)
{
// std::vector<std::weak_ptr<typename IfcEntityTypesT::IfcRelVoidsElement>> vec_rel_voids(
// ifcElement->HasOpenings_inverse);
// if (vec_rel_voids.size() == 0)
// {
// return;
// }
// const int product_id = ifcElement->getId();
// const double length_factor = UnitConvert()->getLengthInMeterFactor();
//
// // convert opening representation
// for (int i_void = 0; i_void<vec_rel_voids.size(); ++i_void)
// {
// std::weak_ptr<typename IfcEntityTypesT::IfcRelVoidsElement>& rel_voids_weak = vec_rel_voids[i_void];
// if (rel_voids_weak.expired())
// {
// continue;
// }
// std::shared_ptr<typename IfcEntityTypesT::IfcRelVoidsElement> rel_voids(rel_voids_weak);
// std::shared_ptr<typename IfcEntityTypesT::IfcFeatureElementSubtraction> opening = rel_voids->RelatedOpeningElement;
// if (!opening)
// {
// continue;
// }
// if (!opening->Representation)
// {
// continue;
// }
//
// const int opening_id = opening->getId();
//
// // opening can have its own relative placement
// std::shared_ptr<typename IfcEntityTypesT::IfcObjectPlacement> opening_placement = opening->ObjectPlacement; //optional
// carve::math::Matrix opening_placement_matrix(carve::math::Matrix::IDENT());
// if (opening_placement)
// {
// std::set<int> opening_placements_applied;
// PlacementConverterT<IfcEntityTypesT>::convertIfcObjectPlacement(opening_placement,
// opening_placement_matrix, length_factor, opening_placements_applied);
// }
//
// std::vector<std::shared_ptr<typename IfcEntityTypesT::IfcRepresentation>>& vec_opening_representations =
// opening->Representation->Representations;
//
// for (typename std::vector<std::shared_ptr<typename IfcEntityTypesT::IfcRepresentation>>::iterator
// it_representations = vec_opening_representations.begin();
// it_representations != vec_opening_representations.end(); ++it_representations)
// {
// std::shared_ptr<typename IfcEntityTypesT::IfcRepresentation> ifc_opening_representation = (*it_representations);
// std::shared_ptr<ShapeInputDataT<IfcEntityTypesT>> opening_representation_data(new ShapeInputDataT<IfcEntityTypesT>());
//
// opening_representation_data->representation = ifc_opening_representation;
//
// // TODO: Representation caching, one element could be used for several openings
// convertIfcRepresentation(ifc_opening_representation, opening_placement_matrix,
// opening_representation_data, err);
//
//
// vecOpeningData.push_back(opening_representation_data);
// }
// }
}

Parse "INVERSE" attributes from IFC schema

Many (previously existing) functionalities can only be implemented, when the INVERSE attributes in the IFC schema are parsed and corresponding members generated. One of such functionalities is #34 .

Make object selectable in viewport

The viewport currently does not allow objects to be selected. This was possible in previous versions with alignment objects. Reintroduce lost functionality.

Handle comments within IFC STEP Physical Files

The current implementation of reader functionality does not handle comments within STEP Physical Files. These can be introduced by // for single line or /* */ for multiline comments.

Simplify addition of new IFC schema

As noted here:

// TODO: Have this generated by cmake configure file
enum class IfcSchema : short { IFC2X3, IFC4, IFC4X1, IFC4X2_BIM4ROAD, IFC4X2_DRAFT_1, UNKNOWN };

simplify the generation of the corresponding code passages.

Currently, a lot of code still needs to be added manually if a new IFC schema is to be supported.

There are many possible solutions, please discuss them first with @pjanck and/or @hechth.

Unify handling of not supported geometry representations

Within IfcGeometryConverter, the geometric representations not currently supported by OIP are handled very differently. Sometimes there is a message to the console, sometimes there is an exception thrown, mostly the case is ignored and foreseen with a comment "TODO". Unify this to support a transparent and clear message to the user as well as to the development process.

Doxymentation directory

Currently, doxymentation is being built to "Documentation\doxymentation\html" within the repository. Change this to be within the "build" folder as chosen in CMake GUI.

Group generated IFC entities alphabetically

Currently, the generation from an IFC schema produces a project with all IFC entities grouped in the "entity"-filter with VS. Since there are >800, it is somehow inconvenient to find the one entity in the long list in the project browser.

It would be nice to group them alphabetically for easier access:

  • A*
  • B*
  • ...
    according to the first letter after "Ifc" in the name.

Review current state of selection system

Tasks

  • Document all findings to create a guideline of how to implement selectable objects using the BlueFramework in OIP.
  • Get familiar with the selection system by looking at the ViewCube implementation.
  • Inspect the ViewCube shader and effect files to get familiar with the idea of render targets and the pick buffer.
  • Browse the code in the BlueFramework Rasterizer related to the IEffect and IRenderSystem classes and how they work (Effect.h, Resources/IEffectCore.h, IRenderSystem.h and the respective implementations in D3D11 or D3D12).
  • Get familiar with basic shader programming in HLSL for rendering on the GPU.
  • Get familiar with the PickIdGenerator class and how to assign IDs to objects.
  • Find out how the pickID of an object is passed to the GPU in the VertexBuffer.
  • Evaluate which vertex format is suitable for rendering IFC files with selection.
  • Review written documentation and include in the OIP Documentation.

Handle renaming of attributes between different IFC versions

IfcLinearPlacement has a relationship to a base curve, along which it is positioned. This attribute is named "PlacementRelTo" in IFC4x1 but "PlacementMeasuredAlong" in IFC4x2.

How to correctly handle this in code?

See here (active is IFC4x1):

// IFC4x1
std::shared_ptr<typename IfcEntityTypesT::IfcCurve>& ifcCurve = linear_placement->PlacementRelTo.lock();
std::shared_ptr<typename IfcEntityTypesT::IfcBoundedCurve> ifcBoundedCurve =
std::dynamic_pointer_cast<typename IfcEntityTypesT::IfcBoundedCurve>(ifcCurve);
if (!ifcBoundedCurve)
{
BLUE_LOG(error) << linear_placement->getErrorLog() << ": Placement along a " << ifcCurve->classname() << " is not supported!";
return;
}
// IFC4x2+
//std::shared_ptr<typename IfcEntityTypesT::IfcCurve>& ifcCurve = linear_placement->PlacementMeasuredAlong.lock();

Implement unit conversion factors from IFC

void setIfcProject(std::shared_ptr<typename IfcEntityTypesT::IfcProject> project)
{
m_length_unit_factor = 1.0;
m_plane_angle_factor = 1.0; // defaulting to radian
if(!project->UnitsInContext) {
return;
}
std::shared_ptr<typename IfcEntityTypesT::IfcUnitAssignment> unit_assignment = project->UnitsInContext;
std::vector<std::shared_ptr<typename IfcEntityTypesT::IfcUnit> >& units = unit_assignment->Units;
//std::vector<std::shared_ptr<typename IfcEntityTypesT::IfcUnit> >::iterator it;
//for (it = units.begin(); it != units.end(); ++it)
/*
for(auto unit : project->UnitsInContext->Units) {
std::shared_ptr<typename IfcEntityTypesT::IfcSIUnit> si_unit = std::dynamic_pointer_cast<typename IfcEntityTypesT::IfcSIUnit>(&unit);
if (si_unit)
{
std::shared_ptr<typename IfcEntityTypesT::IfcUnitEnum> unit_type = si_unit->UnitType;
std::shared_ptr<typename IfcEntityTypesT::IfcSIUnitName> unit_name = si_unit->Name;
if (unit_type)
{
if (*unit_type == eIfcUnitEnum::ENUM_LENGTHUNIT)
{
if (si_unit->Prefix)
{
if (m_prefix_map.find(si_unit->Prefix) != m_prefix_map.end())
{
m_length_unit_factor = m_prefix_map[si_unit->Prefix];
}
}
}
else if (unit_type->m_enum == IfcUnitEnum::ENUM_PLANEANGLEUNIT)
{
if (unit_name->m_enum == IfcSIUnitName::ENUM_RADIAN)
{
m_plane_angle_factor = 1.0;
}
}
}
continue;
}
shared_ptr<IfcConversionBasedUnit> conversion_based_unit = dynamic_pointer_cast<IfcConversionBasedUnit>(unit);
if (conversion_based_unit)
{
if (conversion_based_unit->m_ConversionFactor)
{
shared_ptr<IfcMeasureWithUnit> conversion_factor = conversion_based_unit->m_ConversionFactor;
if (conversion_factor->m_UnitComponent)
{
shared_ptr<IfcUnit> unit_component = conversion_factor->m_UnitComponent;
shared_ptr<IfcSIUnit> unit_component_si = dynamic_pointer_cast<IfcSIUnit>(unit_component);
if (unit_component_si)
{
shared_ptr<IfcUnitEnum> type = unit_component_si->m_UnitType;
if (type)
{
if (type->m_enum == IfcUnitEnum::ENUM_PLANEANGLEUNIT)
{
if (conversion_factor->m_ValueComponent)
{
shared_ptr<IfcValue> plane_angle_value = conversion_factor->m_ValueComponent;
if (dynamic_pointer_cast<IfcPlaneAngleMeasure>(plane_angle_value))
{
shared_ptr<IfcPlaneAngleMeasure> plane_angle_measure = dynamic_pointer_cast<IfcPlaneAngleMeasure>(plane_angle_value);
m_plane_angle_factor = plane_angle_measure->m_value;
}
else if (dynamic_pointer_cast<IfcRatioMeasure>(plane_angle_value))
{
shared_ptr<IfcRatioMeasure> plane_angle_measure = dynamic_pointer_cast<IfcRatioMeasure>(plane_angle_value);
m_plane_angle_factor = plane_angle_measure->m_value;
}
else if (conversion_based_unit->m_Name)
{
if (_stricmp(conversion_based_unit->m_Name->m_value.c_str(), "DEGREE") == 0)
{
m_plane_angle_factor = M_PI / 180.0;
}
}
}
}
}
}
}
}
}
}
*/

The unit conversion factors present in an IFC file are not interpreted.

Update master branch with newest developments

Development is the main branch for some time and master has not been updated in a long time. The complete overhaul of foundations and software architecture is reaching a good enough form to update the master. To achieve that, there are some tasks to be considered as well:

  • Update Readme.md
  • Update Documentation
    • user documentation
    • developer documentation
  • Clear out legacy code (currently commented out)

Add tasks as need be. Please add individual issues for functionality that will be lost but was there before (e.g. import / export of LandXML files).

Group projects in the solution to make it look clean

Currently, all projects belonging to OpenInfraPlatform are grouped nicely in a OpenInfraPlatform folder:

image

I would like to see other projects currently wildly swimming around grouped as well, in order to minimize confusion:

grafik

Path in dependencies (libLAS)

After building the OIP solution with MSVC, the libLAS .lib files are stored in Open-Infra-Platform\bin_deps\dep_liblas-build\bin\Release, where there are two folders called "Debug" and "Release", making the full path a bit confusing (e.g. Open-Infra-Platform\bin_deps\dep_liblas-build\bin\Release\Debug\liblasd.lib).

Finish implementing support for linear placement

The functionality is not finished:

// (3/3) IfcLinearPlacement SUBTYPE OF IfcObjectPlacement
std::shared_ptr<typename IfcEntityTypesT::IfcLinearPlacement > linear_placement =
std::dynamic_pointer_cast<typename IfcEntityTypesT::IfcLinearPlacement>(object_placement);
if (linear_placement) {
// TODO implement
// ENTITY IfcLinearPlacement
// SUBTYPE OF(IfcObjectPlacement);
// PlacementRelTo : IfcCurve; // IFC4x1
// PlacementMeasuredAlong: IfcCurve; // from IFC4x2+
// Distance: IfcDistanceExpression;
// Orientation: OPTIONAL IfcOrientationExpression;
// CartesianPosition: OPTIONAL IfcAxis2Placement3D;
// END_ENTITY;
// IFC4x1
std::shared_ptr<typename IfcEntityTypesT::IfcCurve>& ifcCurve = linear_placement->PlacementRelTo.lock();
std::shared_ptr<typename IfcEntityTypesT::IfcBoundedCurve> ifcBoundedCurve =
std::dynamic_pointer_cast<typename IfcEntityTypesT::IfcBoundedCurve>(ifcCurve);
if (!ifcBoundedCurve)
{
BLUE_LOG(error) << linear_placement->getErrorLog() << ": Placement along a " << ifcCurve->classname() << " is not supported!";
return;
}
// IFC4x2+
//std::shared_ptr<typename IfcEntityTypesT::IfcCurve>& ifcCurve = linear_placement->PlacementMeasuredAlong.lock();
auto& distExpr = linear_placement->Distance;
auto& orientExpr = linear_placement->Orientation;
carve::math::Matrix absolute_placement(carve::math::Matrix::IDENT());
if (linear_placement->CartesianPosition)
convertIfcAxis2Placement3D(linear_placement->CartesianPosition.get().lock(), absolute_placement);
double length_factor = UnitConvert()->getLengthInMeterFactor();
// evaluate distance expression
// ENTITY IfcDistanceExpression
// SUBTYPE OF (IfcGeometricRepresentationItem);
// DistanceAlong : IfcLengthMeasure;
// OffsetLateral : OPTIONAL IfcLengthMeasure;
// OffsetVertical : OPTIONAL IfcLengthMeasure;
// OffsetLongitudinal : OPTIONAL IfcLengthMeasure;
// AlongHorizontal : OPTIONAL IfcBoolean;
// END_ENTITY;
double distAlong = distExpr->DistanceAlong * length_factor;
carve::geom::vector<3> offsetFromCurve(carve::geom::VECTOR(0.0, 0.0, 0.0));
bool alongHorizontal = true;
if (distExpr->OffsetLongitudinal)
offsetFromCurve.x = distExpr->OffsetLongitudinal.get() * length_factor;
if (distExpr->OffsetLateral)
offsetFromCurve.y = distExpr->OffsetLateral.get() * length_factor;
if (distExpr->OffsetVertical)
offsetFromCurve.z = distExpr->OffsetVertical.get() * length_factor;
alongHorizontal = distExpr->AlongHorizontal;
// calculate the position on and the direction of the base curve
carve::geom::vector<3> pointOnCurve ( carve::geom::VECTOR(0.0, 0.0, 0.0) ),
directionOfCurve ( carve::geom::VECTOR(1.0, 0.0, 0.0) );
convertAlignmentCurveDistAlongToPoint3D(
ifcBoundedCurve, distAlong, alongHorizontal,
pointOnCurve, directionOfCurve);
// calculate the position
object_placement_matrix = absolute_placement; //TODO wrong
// PlacementRelTo type IfcObjectPlacement [0:1] (introduced in IFC4x2)
if (linear_placement->PlacementRelTo) {
// Reference to Object that provides the relative placement by its local coordinate system.
decltype(local_placement->PlacementRelTo)::type& local_object_placement = local_placement->PlacementRelTo;
carve::math::Matrix relative_placement(carve::math::Matrix::IDENT());
convertIfcObjectPlacement(local_object_placement.lock(), relative_placement, already_applied);
object_placement_matrix = relative_placement * object_placement_matrix;
}
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.