xBimTeam / XbimEssentials

A .NET library to work with data in the IFC format. This is the core component of the Xbim Toolkit
https://xbimteam.github.io/
Other
497 stars 173 forks source link

IFC 4.3 schema implementation in Essentials #450

Open martin1cerny opened 2 years ago

martin1cerny commented 2 years ago

We need to implement the latest IFC schema to support IFC4.3 ADD1.

martin1cerny commented 2 years ago

Initial schema implemented b7b0002e042b301c669bdd271e57bdb4fb5b6b6b

martin1cerny commented 2 years ago

We need to run the generated schema against the testing data set: https://github.com/buildingSMART/Sample-Test-Files/tree/master/IFC%204.3

andyward commented 1 year ago

PR Looks good Martin. What are your thoughts on what we do with the Ifc4 Interfaces. i.e. so we can find IIfcWalls regardless of schema - including IFC4x3? Part of me thinks we should just have an xbim.LatestSchemaInterfaces concept and implement that in the older schemas - rather than implementing Ifc4 & Ifc43 (and Ifc5 etc)

On a related note it feels like we should revisit the Create and IfcValueHelper functions to support 4x3?

BTW I think Create should be renamed EntityFactory or similar to represent what it does. And it would be great to take ExpressTypes as inputs so we can late bind.

martin1cerny commented 1 year ago

IFC4 interfaces can already be used to retrieve IFC4x3 data. It doesn't support the new classes introduced in IFC4x3 of course.

The intention is to convert the interfaces to always reflect the latest as you suggest and everything only implements a that interface. That is the case now as well, but everything just implements IFC4 interfaces.

Intention of the Create object is to be safe, so it only allows to create entities which exist across the schemas. We already have entity factories in all schemas which can create instances based on the ExpressType.

andyward commented 1 year ago

I'll take a look. I guess I was expecting Ifc4x3.IfcWall to implement Ifc4.IIfcWall in https://github.com/xBimTeam/XbimEssentials/blob/1418eb729eed8bca840bc4797053ddc86f222373/Xbim.Ifc4x3/SharedBldgElements/IfcWall.cs#L25

I must be missing something?

For future compatibility don't we want to be able to access say IFCRail domain elements via the schema agnostic interface?

model.Instances.OfType<xbim.Interfaces.IIfcRailwayPart>() rather than model.Instances.OfType<xbim.Ifc4x3.IfcRailwayPart>()

martin1cerny commented 1 year ago

It does it here https://github.com/xBimTeam/XbimEssentials/blob/1418eb729eed8bca840bc4797053ddc86f222373/Xbim.Ifc4x3/Interfaces/IFC4/IfcWall.cs

And yes, we want to be able to do that. That will be in v6.

Cobse commented 1 year ago

When's the ETA on finishing up 4x3-implementation?