From 1a8e93775f117cbf8af9b920c010f1cc31bb8c00 Mon Sep 17 00:00:00 2001 From: Roberto Alsina Date: Sat, 8 Apr 2023 14:43:29 -0300 Subject: [PATCH] Call model only once --- notebook_nueva/screen_mount.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/notebook_nueva/screen_mount.py b/notebook_nueva/screen_mount.py index 4bfc54b..3daaa2f 100644 --- a/notebook_nueva/screen_mount.py +++ b/notebook_nueva/screen_mount.py @@ -132,14 +132,13 @@ def model(): if __name__ == "__main__": - print("Exporting") - exporters.export(model(), "screen_mount.stl") + model = model() + exporters.export(model, "screen_mount.stl") offset_width = -width / 2 right_side = ( - model() - .faces(">X") + model.faces(">X") .workplane(centerOption="CenterOfBoundBox", offset=offset_width) .split(keepTop=True) ) @@ -147,8 +146,7 @@ if __name__ == "__main__": exporters.export(right_side, "right_screen_mount.stl") left_side = ( - model() - .faces(">X") + model.faces(">X") .workplane(centerOption="CenterOfBoundBox", offset=offset_width) .split(keepBottom=True) )