Improve geometry of angle joint

This commit is contained in:
Leni Aniva 2025-05-14 13:13:44 -07:00
parent 22a4f4ceec
commit 670d4a8c21
Signed by: aniva
GPG Key ID: D5F96287843E8DFB
1 changed files with 11 additions and 8 deletions

View File

@ -28,7 +28,9 @@ class Onbashira(Model):
# Gap of each angle joint to connect the outside to the inside
angle_joint_gap: float = 10.0
angle_joint_bolt_length: float = 50.0
angle_joint_bolt_diam: float = 8.0
angle_joint_bolt_diam: float = 6.0
angle_joint_bolt_head_diam: float = 13.0
angle_joint_bolt_head_depth: float = 3.0
# Position of the holes, with (0, 0) being the centre of each side
angle_joint_bolt_position: list[float] = field(default_factory=lambda: [
(20, 10),
@ -54,7 +56,7 @@ class Onbashira(Model):
bearing_disk_thickness: float = 25.4 / 8
rotor_inner_radius: float = 40.0
rotor_bind_bolt_diam: float = 8.0
rotor_bind_bolt_diam: float = 6.0
rotor_bind_radius: float = 85.0
rotor_spacer_outer_diam: float = 15.0
stator_bind_radius: float = 140.0
@ -364,7 +366,7 @@ class Onbashira(Model):
self.n_side
)
.regularPolygon(
self.side_width - self.angle_joint_extra_width,
self.side_width_inner,
self.n_side, mode="s"
)
)
@ -392,11 +394,17 @@ class Onbashira(Model):
.cut(slot.translate((0, 0, -self.angle_joint_depth-self.angle_joint_gap/2)))
.intersect(intersector)
)
h = self.bulk_radius + self.angle_joint_thickness
hole_negative = Cq.Solid.makeCylinder(
radius=self.angle_joint_bolt_diam/2,
height=h,
pnt=(0,0,0),
dir=(1,0,0),
) + Cq.Solid.makeCylinder(
radius=self.angle_joint_bolt_head_diam/2,
height=self.angle_joint_bolt_head_depth,
pnt=(h,0,0),
dir=(-1,0,0),
)
dy = self.angle_joint_gap / 2
locrot = Cq.Location(0, 0, 0, 0, 0, 360/self.n_side)
@ -413,21 +421,16 @@ class Onbashira(Model):
# Mark the absolute locations of the mount points
dr = self.bulk_radius + self.angle_joint_thickness
dr0 = self.bulk_radius
dri = self.bulk_radius - self.angle_joint_thickness
for i, (x, y) in enumerate(self.angle_joint_bolt_position):
py = dy + y
result.tagAbsolute(f"holeLPO{i}", (dr, x, py), direction="+X")
result.tagAbsolute(f"holeRPO{i}", (dr, x, -py), direction="+X")
result.tagAbsolute(f"holeLPM{i}", (dr0, x, py), direction="-X")
result.tagAbsolute(f"holeRPM{i}", (dr0, x, -py), direction="-X")
result.tagAbsolute(f"holeLPI{i}", (dri, x, py), direction="-X")
result.tagAbsolute(f"holeRPI{i}", (dri, x, -py), direction="-X")
result.tagAbsolute(f"holeLSO{i}", locrot * Cq.Location(dr, -x, py), direction="+X")
result.tagAbsolute(f"holeRSO{i}", locrot * Cq.Location(dr, -x, -py), direction="+X")
result.tagAbsolute(f"holeLSM{i}", locrot * Cq.Location(dr0, -x, py), direction="-X")
result.tagAbsolute(f"holeRSM{i}", locrot * Cq.Location(dr0, -x, -py), direction="-X")
result.tagAbsolute(f"holeLSI{i}", locrot * Cq.Location(dri, -x, py), direction="-X")
result.tagAbsolute(f"holeRSI{i}", locrot * Cq.Location(dri, -x, -py), direction="-X")
return result
@target(name="angle-joint-flanged")