diff --git a/nhf/build.py b/nhf/build.py index 106577c..576b1e3 100644 --- a/nhf/build.py +++ b/nhf/build.py @@ -275,7 +275,7 @@ class Model: """ Build all targets in this model and write the results to file """ - output_dir = Path(output_dir) + output_dir = Path(output_dir) / self.name targets = Target.methods(self) for t in targets.values(): file_name = t.file_name diff --git a/nhf/touhou/shiki_eiki/crown.py b/nhf/touhou/shiki_eiki/crown.py index f2b4b07..5e248d8 100644 --- a/nhf/touhou/shiki_eiki/crown.py +++ b/nhf/touhou/shiki_eiki/crown.py @@ -2,7 +2,7 @@ import math from dataclasses import dataclass, field import cadquery as Cq from nhf import Material, Role -from nhf.build import Model, target, assembly +from nhf.build import Model, target, assembly, TargetKind import nhf.utils @dataclass @@ -33,7 +33,7 @@ class Crown(Model): def facet_width_upper(self): return self.tilt_circ / self.facets - @target(name="side") + @target(name="side", kind=TargetKind.DXF) def profile_side(self) -> Cq.Sketch: # Generate the pentagonal shape @@ -51,7 +51,7 @@ class Crown(Model): ]) ) - @target(name="front") + @target(name="front", kind=TargetKind.DXF) def profile_front(self) -> Cq.Sketch: dx_l = self.facet_width_lower dx_u = self.facet_width_upper @@ -221,7 +221,7 @@ class Crown(Model): .clean() ) - @target(name="side-guard") + @target(name="side-guard", kind=TargetKind.DXF) def profile_side_guard(self) -> Cq.Sketch: dx = self.facet_width_lower / 2 dy = self.height diff --git a/nhf/touhou/shiki_eiki/rod.py b/nhf/touhou/shiki_eiki/rod.py index 9ae8f8e..b93c634 100644 --- a/nhf/touhou/shiki_eiki/rod.py +++ b/nhf/touhou/shiki_eiki/rod.py @@ -2,7 +2,7 @@ import math from dataclasses import dataclass, field import cadquery as Cq from nhf import Material, Role -from nhf.build import Model, target, assembly +from nhf.build import Model, target, assembly, TargetKind import nhf.utils @dataclass @@ -280,10 +280,7 @@ class Rod(Model): .moved(loc) ) - - - - @target(name="surface") + @target(name="surface", kind=TargetKind.DXF) def profile_top(self) -> Cq.Sketch: sketch = ( Cq.Sketch()