ThatOpen / engine_web-ifc

Reading and writing IFC files with Javascript, at native speeds.
https://thatopen.github.io/engine_web-ifc/demo
Mozilla Public License 2.0
623 stars 195 forks source link

[Bug]: IFCINTEGER limited to 2^31 (A 32-bit signed integer) #658

Closed ragnhmyr closed 7 months ago

ragnhmyr commented 8 months ago

What happened?

Hi!

We have an ifc model with a property value of IFCINTEGER(-2147483649) which fails if the number is below -2147483648 (2^31) BIM viewers like BIM Collab ZOOM can read the model with no problems

The method that fails is IfcApi.getLine(modelId,60)

where the line in the ifc is like:

#60= IFCPROPERTYSINGLEVALUE('FingerPrint',$,IFCINTEGER(-2147483649),$);

-2147483648 (2^31) works <= -2147483649 does not work

Assuming that it is due to IFCINTEGER being limited to a 32-bit signed integer

Version

0.0.49

What browsers are you seeing the problem on?

No response

Relevant log output

stoi: out of range

Anything else?

No response

beachtom commented 7 months ago

Closed as fixed