From afb2742c2f3d902b77aac90a8059301cbaa34d2d Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Wed, 16 Jul 2025 16:46:25 +0500 Subject: [PATCH] standalone_drawer - print example args --- src/bonsai/scripts/standalone_drawer.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/bonsai/scripts/standalone_drawer.py b/src/bonsai/scripts/standalone_drawer.py index 320c474485..eee2432143 100644 --- a/src/bonsai/scripts/standalone_drawer.py +++ b/src/bonsai/scripts/standalone_drawer.py @@ -4,8 +4,9 @@ import ifcopenshell.util.element import ifcopenshell.geom import multiprocessing from typing import NamedTuple +import ifcopenshell.ifcopenshell_wrapper as W -# python standalone_drawer.py model.ifc guid_of_drawing guids,of,bad,elements output.svg +# W.turn_on_detailed_logging() class LineworkContexts(NamedTuple): @@ -15,6 +16,13 @@ class LineworkContexts(NamedTuple): class Drawer: def execute(self): + if len(sys.argv) < 5: + print(f"Expected 4 arguments, got {len(sys.argv) - 1}. Example usage:") + print( + "python standalone_drawer.py drawing.ifc drawing_guid drawing_element_guid1,drawing_element_guid2,drawing_element_guid3 output.svg" + ) + exit(1) + ifc: ifcopenshell.file ifc = ifcopenshell.open(sys.argv[1]) self.camera_element = ifc.by_guid(sys.argv[2])