Motor and bolt models
This commit is contained in:
parent
a8c80a307f
commit
40c32213e1
|
@ -11,6 +11,7 @@ class FlatHeadBolt(Item):
|
|||
height_head: float
|
||||
diam_thread: float
|
||||
height_thread: float
|
||||
pitch: float = 1.0
|
||||
|
||||
@property
|
||||
def name(self) -> str:
|
||||
|
|
|
@ -1,11 +1,56 @@
|
|||
from nhf.build import Model, TargetKind, target, assembly, submodel
|
||||
from nhf.materials import Role, Material
|
||||
import nhf.utils
|
||||
from nhf.parts.fasteners import FlatHeadBolt, HexNut, Washer
|
||||
|
||||
import math
|
||||
from dataclasses import dataclass, field
|
||||
import cadquery as Cq
|
||||
|
||||
NUT_COMMON = HexNut(
|
||||
# FIXME: measure
|
||||
mass=0.0,
|
||||
diam_thread=6.0,
|
||||
pitch=1.0,
|
||||
thickness=5.0,
|
||||
width=9.89,
|
||||
)
|
||||
WASHER_COMMON = Washer(
|
||||
# FIXME: measure
|
||||
mass=0.0,
|
||||
diam_thread=6.0,
|
||||
diam_outer=11.68,
|
||||
thickness=1.5,
|
||||
)
|
||||
BOLT_COMMON = FlatHeadBolt(
|
||||
# FIXME: measure
|
||||
mass=0.0,
|
||||
diam_head=12.8,
|
||||
height_head=2.8,
|
||||
diam_thread=6.0,
|
||||
height_thread=30.0,
|
||||
pitch=1.0,
|
||||
)
|
||||
|
||||
@dataclass
|
||||
class Motor(Model):
|
||||
|
||||
mass: float = 589.7
|
||||
voltage: float = 12.0 # V
|
||||
power: float = 30.0 # watts
|
||||
|
||||
diam_thread: float = 4.0
|
||||
diam_body: float = 51.82
|
||||
height_body: float = 70.87
|
||||
height_shaft: float = 37.85
|
||||
|
||||
def __post_init__(self):
|
||||
pass
|
||||
|
||||
def model(self) -> Cq.Workplane:
|
||||
pass
|
||||
|
||||
|
||||
@dataclass
|
||||
class Onbashira(Model):
|
||||
|
||||
|
@ -48,7 +93,9 @@ class Onbashira(Model):
|
|||
|
||||
# Dimensions of gun barrels
|
||||
barrel_diam: float = 25.4 * 1.5
|
||||
barrel_length: float = 300.0
|
||||
barrel_wall_thickness: float = 25.4 / 8
|
||||
barrel_length: float = 25.4 * 12
|
||||
|
||||
# Radius from barrel centre to axis
|
||||
rotation_radius: float = 66.0
|
||||
n_bearing_balls: int = 12
|
||||
|
@ -77,6 +124,7 @@ class Onbashira(Model):
|
|||
material_bearing: Material = Material.PLASTIC_PLA
|
||||
material_spacer: Material = Material.PLASTIC_PLA
|
||||
material_bearing_ball: Material = Material.ACRYLIC_TRANSPARENT
|
||||
material_barrel: Material = Material.ACRYLIC_BLACK
|
||||
material_brace: Material = Material.PLASTIC_PLA
|
||||
|
||||
def __post_init__(self):
|
||||
|
@ -96,6 +144,8 @@ class Onbashira(Model):
|
|||
# Ensure the stator could be printed on a 12x12in board
|
||||
assert self.side_width * 2 < 12 * 25.4
|
||||
|
||||
assert self.barrel_wall_thickness * 2 < self.barrel_diam
|
||||
|
||||
@property
|
||||
def angle_side(self) -> float:
|
||||
return 360 / self.n_side
|
||||
|
|
Loading…
Reference in New Issue