mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-27 02:31:09 +00:00
#1153 update draw.py with two new options
This commit is contained in:
@@ -54,6 +54,8 @@ class draw_settings:
|
|||||||
include_entities: str = ""
|
include_entities: str = ""
|
||||||
exclude_entities: str = "IfcOpeningElement"
|
exclude_entities: str = "IfcOpeningElement"
|
||||||
drawing_guid: str = ""
|
drawing_guid: str = ""
|
||||||
|
profile_threshold: int = -1
|
||||||
|
cells: bool = True
|
||||||
|
|
||||||
|
|
||||||
def main(settings, files, iterators=None, merge_projection=True, progress_function=DO_NOTHING):
|
def main(settings, files, iterators=None, merge_projection=True, progress_function=DO_NOTHING):
|
||||||
@@ -115,6 +117,7 @@ def main(settings, files, iterators=None, merge_projection=True, progress_functi
|
|||||||
# sane default?
|
# sane default?
|
||||||
sr.setAlwaysProject(True)
|
sr.setAlwaysProject(True)
|
||||||
|
|
||||||
|
sr.setProfileThreshold(settings.profile_threshold)
|
||||||
sr.setBoundingRectangle(settings.width, settings.height)
|
sr.setBoundingRectangle(settings.width, settings.height)
|
||||||
sr.setScale(settings.scale)
|
sr.setScale(settings.scale)
|
||||||
sr.setAutoElevation(settings.auto_elevation)
|
sr.setAutoElevation(settings.auto_elevation)
|
||||||
@@ -167,6 +170,9 @@ def main(settings, files, iterators=None, merge_projection=True, progress_functi
|
|||||||
|
|
||||||
if not merge_projection:
|
if not merge_projection:
|
||||||
return svg_data_1
|
return svg_data_1
|
||||||
|
|
||||||
|
if not settings.cells:
|
||||||
|
return svg_data_1.encode("ascii", "xmlcharrefreplace")
|
||||||
|
|
||||||
# Parse SVG into vector of line segments
|
# Parse SVG into vector of line segments
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user