mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +00:00
Fix error adding typed text annotations #5300
Apparently it's part of #4832, previously creating a shape for IfcTypeProduct with literals would error, we ignored the error and type product end up being an empty. After 0.8.0 create_shape for literals creates an empty shape (0 verts) and we need to skip it, otherwise there would be an empty mesh representaiton.
This commit is contained in:
@@ -570,7 +570,10 @@ class IfcImporter:
|
||||
mesh = self.meshes.get(mesh_name)
|
||||
if mesh is None:
|
||||
shape = tool.Loader.create_generic_shape(representation)
|
||||
if shape:
|
||||
# Skip elements without geometry - e.g. annotations with IfcTextLiterals.
|
||||
if shape and not shape.verts_buffer:
|
||||
pass
|
||||
elif shape:
|
||||
mesh = self.create_mesh(element, shape)
|
||||
tool.Loader.link_mesh(shape, mesh)
|
||||
self.meshes[mesh_name] = mesh
|
||||
|
||||
Reference in New Issue
Block a user