mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-28 03:05:33 +00:00
Use first layer/profile from the set to pick up the material #5238
As currently we do not support multilayer/profile geometry and therefore we can't correctly represent them when they have multiple styles. As a workaround we'll use the material/style from the first layer and apply it to the entire object.
This commit is contained in:
@@ -582,6 +582,7 @@ class Geometry(bonsai.core.tool.Geometry):
|
|||||||
settings = ifcopenshell.geom.settings()
|
settings = ifcopenshell.geom.settings()
|
||||||
settings.set("weld-vertices", True)
|
settings.set("weld-vertices", True)
|
||||||
settings.set("apply-default-materials", False)
|
settings.set("apply-default-materials", False)
|
||||||
|
settings.set("layerset-first", True)
|
||||||
settings.set("keep-bounding-boxes", True)
|
settings.set("keep-bounding-boxes", True)
|
||||||
context = representation.ContextOfItems
|
context = representation.ContextOfItems
|
||||||
|
|
||||||
|
|||||||
@@ -568,6 +568,7 @@ class Loader(bonsai.core.tool.Loader):
|
|||||||
settings.set("context-ids", [context.id()])
|
settings.set("context-ids", [context.id()])
|
||||||
settings.set("apply-default-materials", False)
|
settings.set("apply-default-materials", False)
|
||||||
settings.set("keep-bounding-boxes", True)
|
settings.set("keep-bounding-boxes", True)
|
||||||
|
settings.set("layerset-first", True)
|
||||||
if is_gross:
|
if is_gross:
|
||||||
settings.set("disable-opening-subtractions", True)
|
settings.set("disable-opening-subtractions", True)
|
||||||
results.append(settings)
|
results.append(settings)
|
||||||
|
|||||||
Reference in New Issue
Block a user