You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But on "SolidModel", the xBIM validation counts only objects with IIfcSolidModel interface
Functions.cs method ifcShapeRepresentationTypes Line 446
case "SolidModel":
Count = Items.Count(x => x is IIfcSolidModel)
break;
This excludes IfcBooleanClippingResult since this class has no IIfcSolidModel interface.
One way to fix would be that the validation counts the missing items, but in long term maybe it is more secure to adjust/add new interface.
Items.Count(x => x is IIfcSolidModel) + Items.Count(x => x is IIfcBooleanClippingResult);
Maybe counting is missing other items, like CSG.
Issue appears in IFC 2.3 and 4.x
The text was updated successfully, but these errors were encountered:
I get an validation error by xBIM on IfcShapeRepresentation with RepresentationIdentifier='SolidModel' containing boolean operations.
Assemblies and versions affected:
Xbim.Essentials 5.1.341 (and earlier)
Steps (or code) to reproduce the issue:
var solidRepresentation = model.Instances.New();
solidRepresentation.ContextOfItems = ..
solidRepresentation.RepresentationType = "SolidModel"
solidRepresentation.RepresentationIdentifier = "Body";
..
solidRepresentation.Items.Add(ifcExtrudedAreaSolid); //OK
solidRepresentation.Items.Add(ifcBooleanClippingResult); //Validation error
..
var res = solidRepresentation.Validate(); //res.Count() > 0
Minimal file to reproduce the issue:
TestModel.zip
Expected behavior:
No validation error related to IfcShapeRepresentation.CorrectItemsForType due boolean operations inside solid model
Actual behavior or exception details:
Validation error
Additional Details
The IFC Standard allows by Representation Identifier 'SolidModel':
SweptSolid, AdvancedSweptSolid, Brep, AdvancedBrep, CSG, Clipping
see https://standards.buildingsmart.org/IFC/DEV/IFC4_2/FINAL/HTML/schema/ifcrepresentationresource/lexical/ifcshaperepresentation.htm
But on "SolidModel", the xBIM validation counts only objects with IIfcSolidModel interface
Functions.cs method ifcShapeRepresentationTypes Line 446
case "SolidModel":
Count = Items.Count(x => x is IIfcSolidModel)
break;
This excludes IfcBooleanClippingResult since this class has no IIfcSolidModel interface.
One way to fix would be that the validation counts the missing items, but in long term maybe it is more secure to adjust/add new interface.
Items.Count(x => x is IIfcSolidModel) + Items.Count(x => x is IIfcBooleanClippingResult);
Maybe counting is missing other items, like CSG.
Issue appears in IFC 2.3 and 4.x
The text was updated successfully, but these errors were encountered: