cosplay: Touhou/Shiki Eiki #7
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue