This limitation is because IfcOpenShell currently triangulates all input geometry, which means that these triangles keep on getting reintroduced. @aothms is working on CGAL integration which may allow us to preserve the exact quads and ngons originally modeled (but still, due to Blender limitation, not preserve faces with holes which will need to be triangulated).

The addition of the shape builder utility was intended to make it possible to build solids easily but no UI has been designed yet.

Maybe as a stop gap we can force limited dissolve on all meshed elements for drawings.

could there be a solution on the svg writer side of things, where it ignores edges when adjacent faces are more than 179.9 degrees from each other? Just spitballing. :)

could there be a solution on the svg writer side of things, where it ignores edges when adjacent faces are more than 179.9 degrees from each other? Just spitballing. :)

That's possible, using the svgfill to dissolve and geom.tree api will give you surface normals when reassociating the 2d cells to the original ifc.

However, it's not very efficient. IfcOpenShell will also give you a vector of edges when you create geometry to identify the set of triangulation edges that were true edges in the IFC model. That way you actually also reduce the amount of edges and faces that needs to be fed into the HLR.

@aothms said:
IfcOpenShell will also give you a vector of edges when you create geometry to identify the set of triangulation edges that were true edges in the IFC model.

Wow I had no idea! Where do you get this output? How does it work?

## Comments

As far as I know, yes

This limitation is because IfcOpenShell currently triangulates all input geometry, which means that these triangles keep on getting reintroduced. @aothms is working on CGAL integration which may allow us to preserve the exact quads and ngons originally modeled (but still, due to Blender limitation, not preserve faces with holes which will need to be triangulated).

The addition of the shape builder utility was intended to make it possible to build solids easily but no UI has been designed yet.

Maybe as a stop gap we can force limited dissolve on all meshed elements for drawings.

could there be a solution on the svg writer side of things, where it ignores edges when adjacent faces are more than 179.9 degrees from each other? Just spitballing. :)

... something similar to https://github.com/IfcOpenShell/IfcOpenShell/commit/955c0d19a6ac6ca69da668dfe458ecec89073209

?

That's possible, using the svgfill to dissolve and geom.tree api will give you surface normals when reassociating the 2d cells to the original ifc.

However, it's not very efficient. IfcOpenShell will also give you a vector of edges when you create geometry to identify the set of triangulation edges that were true edges in the IFC model. That way you actually also reduce the amount of edges and faces that needs to be fed into the HLR.

Wow I had no idea! Where do you get this output? How does it work?

We're using something similar here to colour based on the surf normal (for lack of a better demonstration):

https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/src/ifcopenshell-python/ifcopenshell/draw.py#L315

Merging happens here based on edge indices in the arrangement:

https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/src/ifcopenshell-python/ifcopenshell/draw.py#L332-L351

Should be possible to tie those things together (if they not already are...)