Model of the motor
This commit is contained in:
parent
b565ab05a0
commit
bec15c5136
|
@ -40,15 +40,48 @@ class Motor(Model):
|
|||
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
|
||||
diam_body: float = 51.0
|
||||
height_body: float = 83.5
|
||||
diam_ring: float = 25.93
|
||||
height_ring: float = 6.55
|
||||
height_shaft: float = 38.1
|
||||
# Distance between anchor and the body
|
||||
dx_anchor: float = 20.2
|
||||
height_anchor: float = 10.4
|
||||
|
||||
def __post_init__(self):
|
||||
assert self.diam_ring < self.diam_body
|
||||
assert self.height_ring < self.height_body
|
||||
assert self.dx_anchor < self.diam_body / 2
|
||||
pass
|
||||
|
||||
def model(self) -> Cq.Workplane:
|
||||
pass
|
||||
def generate(self) -> Cq.Workplane:
|
||||
result = (
|
||||
Cq.Workplane()
|
||||
.cylinder(
|
||||
radius=self.diam_body/2,
|
||||
height=self.height_body - self.height_ring,
|
||||
centered=(True, True, False)
|
||||
)
|
||||
.faces(">Z")
|
||||
.cylinder(
|
||||
radius=self.diam_ring/2,
|
||||
height=self.height_ring,
|
||||
centered=(True, True, False)
|
||||
)
|
||||
)
|
||||
shaft = Cq.Solid.makeCylinder(
|
||||
radius=self.diam_thread/2,
|
||||
height=self.height_shaft,
|
||||
pnt=(0, 0, self.height_body)
|
||||
)
|
||||
anchor = Cq.Solid.makeCylinder(
|
||||
radius=self.diam_thread/2,
|
||||
height=self.height_anchor,
|
||||
pnt=(0, 0, self.height_body - self.height_ring)
|
||||
)
|
||||
result = result + shaft + anchor.moved(self.dx_anchor, 0, 0) + anchor.moved(-self.dx_anchor, 0, 0)
|
||||
return result
|
||||
|
||||
|
||||
@dataclass
|
||||
|
|
Loading…
Reference in New Issue