engine_web-ifc icon indicating copy to clipboard operation
engine_web-ifc copied to clipboard

[Bug]: IFCINTEGER(0) is parsed as null when inside a list

Open andy-wrks opened this issue 10 months ago • 2 comments

What happened?

When IFCINTEGER(0) occurs inside a list in an IFC file, it results in a null value instead of the usual value object in JavaScript.

Example: all of the highlighted values in this sample file are affected by this Image

For example, using GetLine() on line #5212, the result looks like this: Image

Note: As can be seen in the first screenshot, this also affects IFCREAL(0), but not IFCREAL(0.) or IFCREAL(0.0). I'm not sure if IFCREAL(0) is an allowed spelling though, the sample file has been written manually.

I attached the sample file that only contains an IfcColumn with the Pset seen in the screenshot to reproduce this.

Note: I'm using web-ifc 0.0.66, so I apologize if this doesn't occur in 0.0.68. However, the change log didn't look like anything related to this bug has been recently changed.

Version

0.0.66

What browsers are you seeing the problem on?

Chrome

Relevant log output

See screenshot

Anything else?

Testfile_column_integer_bug.zip

andy-wrks avatar Mar 30 '25 12:03 andy-wrks

OK so IFCREAL(0) is not allowed so this is fine - but the INTEGER one is definetly a bug

beachtom avatar Mar 31 '25 11:03 beachtom

I wasn't sure about IFCREAL(0). What's the best source to answer such questions, is this only defined in the Step ISO norm? (which is behind a paywall I think...)

andy-wrks avatar Apr 03 '25 14:04 andy-wrks