[Wall - Subtraction ] PartExtrusion / Sketch Direction Length Puzzle in IFCExport

This forum section is only for IFC-related issues
paullee
Posts: 2502
Joined: Wed May 04, 2016 3:58 pm

[Wall - Subtraction ] PartExtrusion / Sketch Direction Length Puzzle in IFCExport

Postby paullee » Sun Aug 02, 2020 4:28 am

Hi, whilst working on the Open Source House with Open Source CAD, find some problems about the captioned
Discussion
Discussion

FreeCAD_0.19-21329-Linux-Conda_glibc2.12-x86_64
on
Fedora 31

Simplify the model :-
  1. 2 Walls in Rectangle layout
  2. A Sketch with Roof profile Extruded to superimposed 1st Wall
  3. Extrusion put in Wall Subtration
  4. ... so far so good...
2nd Wall with Sketch and Extrusion reverse in direction :-
  1. Copy and Reverse the direction of Sketch, put in position of 2nd Wall
  2. Extrusion in 'reverse' direction so it superimpose 2nd Wall
  3. The 2nd Wall appears just same as 1st Wal, just inherently Sketch/ Extrusion in reverse direction
Result in IFCexport :-
  1. As discussed in other thread - 1st Wall do not have the roof outline cut
  2. The extrusion is in wrong direction, the length is also wrong
  3. Surprise to see 2nd extrusion is exagerated - 1000 times of original ? (mm interpreted as m?)
  4. 2nd Wall is in the Tree but nothing [EDIT] in IFC++
  5. [EDIT] 2nd Wall is shown in BIMServer

Screenshot from 2020-08-02 12-06-06.png
Screenshot from 2020-08-02 12-06-06.png (329.45 KiB) Viewed 276 times
Screenshot from 2020-08-02 12-11-41.png
Screenshot from 2020-08-02 12-11-41.png (151.37 KiB) Viewed 276 times
User avatar
bernd
Posts: 10523
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: [Wall - Subtraction ] PartExtrusion / Sketch Direction Length Puzzle in IFCExport

Postby bernd » Mon Aug 03, 2020 2:12 pm

I can not confirm the unit problem ...

- Start FreeCAD
- make sure force brep is deacivated
- export to ifc
- debug output

Code: Select all

16:23:19  Exporting an IFC2X3 file...
16:23:19  1    :  IfcBuildingElementProxy  ( no shape ) :  BuildingPart
16:23:19  ArchSketchObject add-on module is not installed yet
16:23:19  ArchSketchObject add-on module is not installed yet
16:23:19  2    :  IfcWall  ( extrusion ) :  Wall__GF
16:23:19        subtracting  extrusion  :  Extru__Roof-Subtration
16:23:19  ArchSketchObject add-on module is not installed yet
16:23:19  ArchSketchObject add-on module is not installed yet
16:23:19  3    :  IfcWall  ( extrusion ) :  Wall__GF001
16:23:19        subtracting  extrusion  :  Extru__Roof-Subtration001
16:23:19  No site found. Adding default site
16:23:19  No building found. Adding default building
16:23:19  No floor found. Adding default floor
16:23:19  writing  C:/Users/BHA/Downloads/Test_ ArchWall_ To_ IFC_ 10_ Subtraction - Part Extrusion_ bug_ 01_ Full Parametricd_03.ifc ...
16:23:19  ArchSketchObject add-on module is not installed yet
16:23:19  ArchSketchObject add-on module is not installed yet
16:23:19  ArchSketchObject add-on module is not installed yet
16:23:19  ArchSketchObject add-on module is not installed yet
16:23:19  Compression ratio: 21 %

screen.png
screen.png (179.87 KiB) Viewed 210 times
User avatar
bernd
Posts: 10523
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: [Wall - Subtraction ] PartExtrusion / Sketch Direction Length Puzzle in IFCExport

Postby bernd » Mon Aug 03, 2020 2:19 pm

paullee wrote:
Sun Aug 02, 2020 4:28 am
[*]Surprise to see 2nd extrusion is exagerated - 1000 times of original ? (mm interpreted as m?)
Screenshot from 2020-08-02 12-11-41.png
attached your ifc in BIMCollabZoom, the correct subtration (typo in your file) are exported as openings (red), but additionaly there are these extrusion with a length of 1000 (transparent)
Attachments
screen.png
screen.png (147.02 KiB) Viewed 204 times
User avatar
bernd
Posts: 10523
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: [Wall - Subtraction ] PartExtrusion / Sketch Direction Length Puzzle in IFCExport

Postby bernd » Mon Aug 03, 2020 2:26 pm

If I export the ifc I only have 2 walls and 2 openings in the ifc. In your ifc are 2 walls, 2 opening, and 2 IfcBuildingElementProxies. The last ones are these huge extrusions.
User avatar
bernd
Posts: 10523
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: [Wall - Subtraction ] PartExtrusion / Sketch Direction Length Puzzle in IFCExport

Postby bernd » Mon Aug 03, 2020 3:11 pm

in my ifc file these values are wrong ...

Code: Select all

#73=IFCDIRECTION((0.,-5.33066907387547E-16,-1.));
#74=IFCEXTRUDEDAREASOLID(#69,#72,#73,0.2);
it would work with

Code: Select all

#73=IFCDIRECTION((0.,-5.33066907387547E-16,1.));
#74=IFCEXTRUDEDAREASOLID(#69,#72,#73,10.2);
but they might not be correct, because may be the placement is wrong and thus the direction would be correct. But the length is wrong for sure.

if you add here print you will see the wrong values printed. The culiprit is somewhere in the lines above ...
https://github.com/FreeCAD/FreeCAD/blob ... C.py#L1984

Code: Select all

            shapes.append(shape)
            solidType = "SweptSolid"
            shapetype = "extrusion"
            print(edir)
            print(shape)

Code: Select all

17:05:15  Exporting an IFC2X3 file...
17:05:15  1    :  IfcBuildingElementProxy  ( no shape ) :  BuildingPart
17:05:15  ArchSketchObject add-on module is not installed yet
17:05:15  ArchSketchObject add-on module is not installed yet
17:05:15  2    :  IfcWall  ( extrusion ) :  Wall__GF
17:05:15  #73=IfcDirection((0.,-5.33066907387547E-16,-1.))
17:05:15  #74=IfcExtrudedAreaSolid(#69,#72,#73,0.2)
17:05:15        subtracting  extrusion  :  Extru__Roof-Subtration
17:05:15  ArchSketchObject add-on module is not installed yet
17:05:15  ArchSketchObject add-on module is not installed yet
17:05:15  3    :  IfcWall  ( extrusion ) :  Wall__GF001
17:05:15  #122=IfcDirection((1.36992628631457E-17,-2.20446049250313E-17,-1.))
17:05:15  #123=IfcExtrudedAreaSolid(#117,#121,#122,9.84)
17:05:15        subtracting  extrusion  :  Extru__Roof-Subtration001
17:05:15  No site found. Adding default site
17:05:15  No building found. Adding default building
17:05:15  No floor found. Adding default floor
17:05:15  writing  C:/Users/BHA/Downloads/Test_ ArchWall_ To_ IFC_ 10_ Subtraction - Part Extrusion_ bug_ 01_ Full Parametricd_03.ifc ...
17:05:15  ArchSketchObject add-on module is not installed yet
17:05:15  ArchSketchObject add-on module is not installed yet
17:05:15  ArchSketchObject add-on module is not installed yet
17:05:15  ArchSketchObject add-on module is not installed yet
17:05:15  Compression ratio: 21 %
paullee
Posts: 2502
Joined: Wed May 04, 2016 3:58 pm

Re: [Wall - Subtraction ] PartExtrusion / Sketch Direction Length Puzzle in IFCExport

Postby paullee » Mon Aug 03, 2020 4:55 pm

Thanks for testing !

So it seems to be a combination of IFCExport problems and/or BIM Viewer interpretation problems ?
User avatar
bernd
Posts: 10523
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: [Wall - Subtraction ] PartExtrusion / Sketch Direction Length Puzzle in IFCExport

Postby bernd » Tue Aug 04, 2020 5:12 am

paullee wrote:
Mon Aug 03, 2020 4:55 pm
Thanks for testing !

So it seems to be a combination of IFCExport problems and/or BIM Viewer interpretation problems ?
IMHO only export problems.

I wonder why FreeCAD exported these large extrusions for you? I am not able to reproduce this. Might because I have not installed your SketchWB?
paullee
Posts: 2502
Joined: Wed May 04, 2016 3:58 pm

Re: [Wall - Subtraction ] PartExtrusion / Sketch Direction Length Puzzle in IFCExport

Postby paullee » Tue Aug 04, 2020 5:21 am

Thanks, I may try ordinary sketch .
carlopav
Posts: 1450
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: [Wall - Subtraction ] PartExtrusion / Sketch Direction Length Puzzle in IFCExport

Postby carlopav » Tue Aug 04, 2020 6:36 am

Just one general question out of curiousity: is it semantically correct to represent this usecase with a opening in IFC?
follow my experiments on BIM modelling for architecture design
User avatar
bernd
Posts: 10523
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: [Wall - Subtraction ] PartExtrusion / Sketch Direction Length Puzzle in IFCExport

Postby bernd » Tue Aug 04, 2020 8:26 am

carlopav wrote:
Tue Aug 04, 2020 6:36 am
Just one general question out of curiousity: is it semantically correct to represent this usecase with a opening in IFC?
This was the first what came in my mind too when I started to find the export problems, but I did not went further on this.