From e0857e915d695a936e16ec4742b928400855ced0 Mon Sep 17 00:00:00 2001 From: Kenneth Weiss Date: Fri, 7 Aug 2026 17:37:02 -0700 Subject: [PATCH] Adds a sphere shaping deck with a scaling factor that can be overridden --- shaping/sphere_callbacks.lua | 19 +++++++++++++++++++ shaping/sphere_initialization.lua | 3 +++ 2 files changed, 22 insertions(+) create mode 100644 shaping/sphere_callbacks.lua create mode 100644 shaping/sphere_initialization.lua diff --git a/shaping/sphere_callbacks.lua b/shaping/sphere_callbacks.lua new file mode 100644 index 0000000..649553e --- /dev/null +++ b/shaping/sphere_callbacks.lua @@ -0,0 +1,19 @@ +-- The sphere scale has a default value of 1.0 that can be overridden +local sphere_scale = sphere_scale or 1.0 + +dimensions = 3 + +shapes = { + { + name = "sphere", + material = "steel", + geometry = { + format = "stl", + path = "../quest/sphere.stl", + units = "cm", + operators = { + { scale = function() return {sphere_scale} end } + } + } + } +} diff --git a/shaping/sphere_initialization.lua b/shaping/sphere_initialization.lua new file mode 100644 index 0000000..e5a2587 --- /dev/null +++ b/shaping/sphere_initialization.lua @@ -0,0 +1,3 @@ +return { + sphere_scale = 0.8 +}