From ef0b0dad910f315a7881f792e611fd43fe17c20c Mon Sep 17 00:00:00 2001 From: Leni Aniva Date: Fri, 30 May 2025 01:33:14 -0700 Subject: [PATCH] Add reinforcements to motor seat --- nhf/touhou/yasaka_kanako/onbashira.py | 31 ++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/nhf/touhou/yasaka_kanako/onbashira.py b/nhf/touhou/yasaka_kanako/onbashira.py index 9a31af1..b696ca0 100644 --- a/nhf/touhou/yasaka_kanako/onbashira.py +++ b/nhf/touhou/yasaka_kanako/onbashira.py @@ -1053,6 +1053,7 @@ class Onbashira(Model): theta = math.pi / self.n_side theta2 = theta * 0.5 theta1 = theta * 1.3 + cover_thickness = 4.0 track_width = 7.0 r0 = self.bulk_radius r1 = self.rotation_radius + gap @@ -1113,8 +1114,6 @@ class Onbashira(Model): Cq.Workplane() .sketch() .circle(r1) - .circle(self.rotation_radius+track_width/2, mode="s") - .circle(self.rotation_radius-track_width/2) .circle(r2_5, mode="s") .polygon([ (0, 0), @@ -1130,6 +1129,29 @@ class Onbashira(Model): .finalize() .extrude(t1) ) + channel = ( + Cq.Workplane() + .sketch() + .circle(self.rotation_radius+track_width/2) + .circle(self.rotation_radius-track_width/2, mode="s") + .finalize() + .extrude(t1) + .translate((0, 0, self.motor_seat_depth - t1)) + ) + channel_cover = ( + Cq.Workplane() + .sketch() + .circle(self.rotation_radius+track_width/2) + .circle(self.rotation_radius-track_width/2, mode="s") + .polygon([ + (0, 0), + (r0 * math.cos(theta1), r0 * math.sin(theta1)), + (r0 * math.cos(theta2), r0 * math.sin(theta2)), + ], mode="i") + .finalize() + .extrude(cover_thickness) + .translate((0, 0, self.motor_seat_depth - cover_thickness)) + ) # Construct the connection between the front and back @@ -1148,7 +1170,7 @@ class Onbashira(Model): profile_bridge_outer_top = ( Cq.Sketch() .circle(r1) - .circle(self.rotation_radius+track_width/2, mode="s") + .circle(self.rotation_radius, mode="s") .polygon([ (0, 0), (r0 * math.cos(theta1), r0 * math.sin(theta1)), @@ -1198,6 +1220,9 @@ class Onbashira(Model): + bridge_inner + bridge_inner.mirror("XZ") - hole_subtractor + - channel + + channel_cover + + channel_cover.mirror("XZ") ) # Mark the mount points