mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
More changes to pass around logger to parse-related calls
This commit is contained in:
@@ -105,7 +105,10 @@ def main(
|
||||
iterators: Sequence[ifcopenshell.geom.iterator] = (),
|
||||
merge_projection: bool = True,
|
||||
progress_function: Callable = DO_NOTHING,
|
||||
logger=None,
|
||||
):
|
||||
if logger is None:
|
||||
logger = ifcopenshell.logger.Root()
|
||||
|
||||
def by_guid(g):
|
||||
for f in files:
|
||||
@@ -147,7 +150,7 @@ def main(
|
||||
iterator_kwargs["include"] = list(
|
||||
filter(has_selected_parent, sum((f.by_type(x) for x in iterator_kwargs["include"]), []))
|
||||
)
|
||||
return ifcopenshell.geom.iterator(geom_settings, f, **iterator_kwargs)
|
||||
return ifcopenshell.geom.iterator(geom_settings, f, logger=logger, **iterator_kwargs)
|
||||
|
||||
# We have to keep the iterator in memory because otherwise
|
||||
# the styles are cleared up.
|
||||
@@ -458,7 +461,6 @@ def main(
|
||||
g1.appendChild(g2)
|
||||
|
||||
if settings.arrange_spaces or settings.arrange_zones:
|
||||
|
||||
if settings.storey_filter:
|
||||
# delete storey groups not selected by filter
|
||||
# sometimes happens in case of elements protruding multiple stories
|
||||
@@ -541,6 +543,7 @@ def main(
|
||||
arranged = W.arrange_polygons(
|
||||
*filter(None, (ARRANGE_POLYGON_SETTINGS,)),
|
||||
polies, # ty: ignore[too-many-positional-arguments]
|
||||
logger,
|
||||
)
|
||||
svg_data_3 = W.polygons_to_svg(arranged, False)
|
||||
dom3 = parseString(svg_data_3)
|
||||
|
||||
Reference in New Issue
Block a user