From 35a44e5be33f1f2d48c66c7d5bdee426a254c04a Mon Sep 17 00:00:00 2001 From: Leni Aniva Date: Tue, 3 Jun 2025 09:55:30 -0700 Subject: [PATCH] Clownpiece stub --- nhf/touhou/clownpiece/__init__.py | 27 +++++++++++++++++++++++++++ nhf/touhou/clownpiece/torch.py | 23 +++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 nhf/touhou/clownpiece/__init__.py create mode 100644 nhf/touhou/clownpiece/torch.py diff --git a/nhf/touhou/clownpiece/__init__.py b/nhf/touhou/clownpiece/__init__.py new file mode 100644 index 0000000..8ad8ab9 --- /dev/null +++ b/nhf/touhou/clownpiece/__init__.py @@ -0,0 +1,27 @@ +import nhf.touhou.clownpiece.torch as MT + +from nhf.build import Model, TargetKind, target, assembly, submodel +import nhf.utils + +from dataclasses import dataclass, field +import cadquery as Cq + +@dataclass +class Parameters(Model): + + torch: MT.Torch = field(default_factory=lambda: MT.Torch()) + + def __post_init__(self): + super().__init__(name="clownpiece") + + @submodel(name="torch") + def submodel_torch(self) -> Model: + return self.torch + +if __name__ == '__main__': + import sys + + p = Parameters() + if len(sys.argv) == 1: + p.build_all() + sys.exit(0) diff --git a/nhf/touhou/clownpiece/torch.py b/nhf/touhou/clownpiece/torch.py new file mode 100644 index 0000000..125a2ff --- /dev/null +++ b/nhf/touhou/clownpiece/torch.py @@ -0,0 +1,23 @@ +from nhf import Material, Role +from nhf.build import Model, target, assembly, TargetKind +import nhf.utils + +import math +from dataclasses import dataclass, field +from typing import Tuple +import cadquery as Cq + +@dataclass +class Torch(Model): + """ + The torch modeled after Lady Liberty's Torch + """ + diam_pan: float = 200.0 + diam_handle: float = 80.0 + height_pan: float = 30.0 + height_handle: float = 300.0 + + material_handle: Material = Material.PLASTIC_PLA + + def __post_init__(self): + pass