I slowly start to think it is a problem in serialiser of ifcos. I know how to determine this.
I will come back with results.
[fixed] IFC export with serializer has wrong placement
Re: IFC export with serializer has wrong placement
the base is the file from this post ... viewtopic.php?t=77403&start=10#p674929
in export I added some lines of code to export the brep which will be used by the IfcOS serializer.
in this post will be the files for this code lines in exportIFC.py
One IFC ist the one exported from FC, the other was created newly by pure IfcOS and the use of the brep file.
in export I added some lines of code to export the brep which will be used by the IfcOS serializer.
in this post will be the files for this code lines in exportIFC.py
Code: Select all
sh = obj.Shape.copy()
sh.Placement = obj.getGlobalPlacement()
One IFC ist the one exported from FC, the other was created newly by pure IfcOS and the use of the brep file.
Re: IFC export with serializer has wrong placement
in this post will be the files for this code lines in exportIFC.py
One IFC ist the one exported from FC, the other was created newly by pure IfcOS and the use of the brep file.
Code: Select all
sh = obj.Shape.removeSplitter()
One IFC ist the one exported from FC, the other was created newly by pure IfcOS and the use of the brep file.
Re: IFC export with serializer has wrong placement
- If the both brep are loaded into FreeCAD the cylinder are on the same place
- if the ifc exported from FreeCAD are loaded the cylinder are on different places
- if the ifc created with IfcOS are loaded the cylinder are on different places
It means both brep are on the same place but when from these breps IFCs are generated with the serializer these ifc are on totally different places. Seams a proble in serializer.
If we change the code to removeSplitter() we just bypass the problem in serializer of ifcos.
Very interesting if you compare the brep only the last two lines are different. I have no idea what this means ...
- if the ifc exported from FreeCAD are loaded the cylinder are on different places
- if the ifc created with IfcOS are loaded the cylinder are on different places
It means both brep are on the same place but when from these breps IFCs are generated with the serializer these ifc are on totally different places. Seams a proble in serializer.
If we change the code to removeSplitter() we just bypass the problem in serializer of ifcos.
Very interesting if you compare the brep only the last two lines are different. I have no idea what this means ...
Code: Select all
$ diff cyl_removeSplitter.brep cyl_copyGlobPlace.brep
110c110
< -2 1 *
---
> -2 0 *
112c112
< +1 0
\ No newline at end of file
---
> +1 1
\ No newline at end of file
Re: IFC export with serializer has wrong placement
- viewtopic.php?p=675456#p675456 says removeSplitter() moves the placement not to the vertexes but to the direct child shapes.
- https://github.com/IfcOpenShell/IfcOpen ... ssues/2992 confirms IfcOS has a problem if placement it applied to the outer level of a shape.
That is why removeSplitter() helps to get around this problem the time being this is not fixed in IfcOS
- https://github.com/IfcOpenShell/IfcOpen ... ssues/2992 confirms IfcOS has a problem if placement it applied to the outer level of a shape.
That is why removeSplitter() helps to get around this problem the time being this is not fixed in IfcOS
I will try and go for this if it works.