Skip to content

Commit a17c44c

Browse files
committed
IfcOpenShell#1153 update draw.py with two new options
1 parent eccf72e commit a17c44c

File tree

1 file changed

+6
-0
lines changed
  • src/ifcopenshell-python/ifcopenshell

1 file changed

+6
-0
lines changed

src/ifcopenshell-python/ifcopenshell/draw.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ class draw_settings:
5454
include_entities: str = ""
5555
exclude_entities: str = "IfcOpeningElement"
5656
drawing_guid: str = ""
57+
profile_threshold: int = -1
58+
cells: bool = True
5759

5860

5961
def main(settings, files, iterators=None, merge_projection=True, progress_function=DO_NOTHING):
@@ -115,6 +117,7 @@ def yield_from_iterator(it):
115117
# sane default?
116118
sr.setAlwaysProject(True)
117119

120+
sr.setProfileThreshold(settings.profile_threshold)
118121
sr.setBoundingRectangle(settings.width, settings.height)
119122
sr.setScale(settings.scale)
120123
sr.setAutoElevation(settings.auto_elevation)
@@ -167,6 +170,9 @@ def yield_from_iterator(it):
167170

168171
if not merge_projection:
169172
return svg_data_1
173+
174+
if not settings.cells:
175+
return svg_data_1.encode("ascii", "xmlcharrefreplace")
170176

171177
# Parse SVG into vector of line segments
172178
#

0 commit comments

Comments
 (0)