From 76f2bb27aa109732a9d5cf2367cbd6dbc8569eec Mon Sep 17 00:00:00 2001 From: Diego Pereyra Date: Sat, 10 Jun 2023 16:22:44 -0300 Subject: [PATCH] Fix import_svg with folders --- src/build123d/importers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/build123d/importers.py b/src/build123d/importers.py index e137600..d243dad 100644 --- a/src/build123d/importers.py +++ b/src/build123d/importers.py @@ -149,7 +149,7 @@ def import_svg_as_buildline_code(file_name: str) -> tuple[str, str]: ], } paths, _path_attributes = svg2paths(file_name) - builder_name = file_name.split(".")[0] + builder_name = os.path.basename(file_name).split(".")[0] buildline_code = [ "from build123d import *", f"with BuildLine() as {builder_name}:",