hypar-io / Elements

The smallest useful BIM.
https://www.hypar.io
MIT License
347 stars 74 forks source link

Got a IFC.STEPParameterMismatchException while deserializing a IFC2x3 file #1082

Open simpleSketche opened 5 months ago

simpleSketche commented 5 months ago

Any idea what might cause this?

This is the error message: IFC.STEPParameterMismatchException: IFC.IfcClassification's constructor expects 4 parameters but 7 parameters are provided. at STEP.STEPListener.ParseConstructor(Int32 id, ConstructorContext context, Type ifcType) at STEP.STEPListener.EnterConstructor(ConstructorContext context) at Antlr4.Runtime.Tree.ParseTreeWalker.Walk(IParseTreeListener listener, IParseTree t) at Antlr4.Runtime.Tree.ParseTreeWalker.Walk(IParseTreeListener listener, IParseTree t) at Antlr4.Runtime.Tree.ParseTreeWalker.Walk(IParseTreeListener listener, IParseTree t) at Antlr4.Runtime.Tree.ParseTreeWalker.Walk(IParseTreeListener listener, IParseTree t) at IFC.Document..ctor(String STEPfilePath, List1& errors) at Elements.Serialization.IFC.IFCModelExtensions.FromIFC(String path, List1& constructionErrors, IList1 idsToConvert) at IFCExtractor.Ifc.LoadIFC(String ifcName) `

Additional info:

simpleSketche commented 5 months ago

Update: So I also tried IFC4, and looks like got different error:

System.InvalidOperationException: Sequence contains no elements at System.Linq.ThrowHelper.ThrowNoElementsException() at STEP.STEPListener.GetConstructorForType(Type required, List1& ctorChain, Type fromSTEP) at STEP.STEPListener.ParseCollection(Type t, CollectionContext value) at STEP.STEPListener.ParseConstructor(Int32 id, ConstructorContext context, Type ifcType) at STEP.STEPListener.EnterConstructor(ConstructorContext context) at Antlr4.Runtime.Tree.ParseTreeWalker.Walk(IParseTreeListener listener, IParseTree t) at Antlr4.Runtime.Tree.ParseTreeWalker.Walk(IParseTreeListener listener, IParseTree t) at Antlr4.Runtime.Tree.ParseTreeWalker.Walk(IParseTreeListener listener, IParseTree t) at Antlr4.Runtime.Tree.ParseTreeWalker.Walk(IParseTreeListener listener, IParseTree t) at IFC.Document..ctor(String STEPfilePath, List1& errors) at Elements.Serialization.IFC.IFCModelExtensions.FromIFC(String path, List1& constructionErrors, IList1 idsToConvert) at IFCExtractor.Ifc.LoadIFC(String ifcName)

simpleSketche commented 5 months ago

I found @ikeough posted this PR for IFC4 last year, and I have had the similar parsing errors appearing in the console window. I'm guessing it's relevant to the error I'm having here?