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

REAL numbers written by ExportFileAsIFC() are in an invalid format

Open brunopostle opened this issue 1 year ago β€’ 5 comments

Files created using ExportFileAsIFC() have invalid real numbers, validation of a file generated by the hello-world/examples/web-ifc-three/editing/ tool gives lots of errors like this:

$ python -m ifcopenshell.validate ~/Downloads/modified.ifc
For instance:
    #6=IfcCartesianPoint((0,0,0))
                         ^^^^^^^ 
With attribute:
    <type IfcLengthMeasure: <real>>
Value:
    0
Not valid

Here is how IfcOpenShell writes reals

Basically, whole number real numbers need to be written with a trailing '.', like so:

#6=IfcCartesianPoint((0.,0.,0.));

..and exponents need to be written with a 'E' not 'e', i.e. this:

#13=IFCGEOMETRICREPRESENTATIONCONTEXT($,'Model',3,1.000000000000001e-05,#12,$);

should be:

#13=IFCGEOMETRICREPRESENTATIONCONTEXT($,'Model',3,1.000000000000001E-05,#12,$);

brunopostle avatar Aug 22 '22 21:08 brunopostle

Another error in the exported file, the FILE_NAME header should have 7 attributes not 5, i.e this is invalid:

FILE_NAME('no name', '', (''), (''), 'web-ifc-export');

See diagnosis in IfcOpenShell/IfcOpenShell#2358

brunopostle avatar Aug 26 '22 14:08 brunopostle

::take

aka-blackboots avatar Oct 11 '22 15:10 aka-blackboots

🟒🟒🟒

::take

Hi, @aka-blackboots! Thanks for taking this bounty! The due date is November 1, 2022 UTC.

If you need to submit some pull requests (PR) to complete the tasks, make sure that the last and only the last PR has a title that either starts with the bounty ID or is exactly the same as the bounty name. After the PR is merged, this bounty’s status will automatically changed to done.

If you do not need to make a PR, tell the manager @agviegas to run ::done command after your tasks is confirmed to be done.

Good luck!

agviegas avatar Oct 11 '22 15:10 agviegas

::drop

aka-blackboots avatar Oct 11 '22 15:10 aka-blackboots

🟒🟒🟒

::drop

Hi, @aka-blackboots! Thanks for giving it a try! It’s now once again available for anyone to take.

agviegas avatar Oct 11 '22 15:10 agviegas

::take

Mivit avatar Oct 27 '22 17:10 Mivit

🟒🟒🟒

::take

Hi, @Mivit! Thanks for taking this bounty! The due date is November 17, 2022 UTC.

If you need to submit some pull requests (PR) to complete the tasks, make sure that the last and only the last PR has a title that either starts with the bounty ID or is exactly the same as the bounty name. After the PR is merged, this bounty’s status will automatically changed to done.

If you do not need to make a PR, tell the manager @agviegas to run ::done command after your tasks is confirmed to be done.

Good luck!

agviegas avatar Oct 27 '22 17:10 agviegas

::done

agviegas avatar Nov 01 '22 11:11 agviegas

🟒🟒🟒

::done

Hi, @Mivit! Thanks for your contributions! Please submit an expense to IFC.js Open Collective. Then, tell us the invoice number via the ::expense::_____ command (replace the _____ with the invoice number).

agviegas avatar Nov 01 '22 11:11 agviegas

::expense::105043

Mivit avatar Nov 01 '22 11:11 Mivit

🟒🟒🟒

::expense::105043

Hi, @Mivit! Thanks for the confirmation! We’ll proceed to review the expense. Once it’s approved, the payment will be scheduled.

agviegas avatar Nov 01 '22 11:11 agviegas

🟒🟒🟒

Hi, @Mivit! Your expense has been approved!

agviegas avatar Nov 01 '22 11:11 agviegas

🟒🟒🟒

Hi, @Mivit! Your expense has been approved!

agviegas avatar Nov 04 '22 02:11 agviegas