Cosplay/nhf/touhou/shiki_eiki/rod.py

30 lines
614 B
Python

from dataclasses import dataclass, field
import cadquery as Cq
from nhf import Material, Role
from nhf.build import Model, target, assembly
import nhf.utils
@dataclass
class Rod(Model):
@target(name="surface")
def top_profile(self) -> Cq.Sketch:
w, h = 10, 20
sketch = (
Cq.Sketch()
.polygon([
(w, h),
(w, -h),
(-w, -h),
(-w, h),
])
)
return sketch
@assembly()
def assembly(self) -> Cq.Assembly:
a = (
Cq.Assembly()
)
return a