cosplay: Touhou/Houjuu Nue #1
|
@ -36,7 +36,7 @@ class Handle:
|
|||
# Length for the rim on the female connector
|
||||
rim_length: float = 5
|
||||
|
||||
insertion_length: float = 60
|
||||
insertion_length: float = 30
|
||||
|
||||
# Amount by which the connector goes into the segment
|
||||
connector_length: float = 60
|
||||
|
@ -174,12 +174,15 @@ class Handle:
|
|||
)
|
||||
return result
|
||||
|
||||
def one_side_connector(self):
|
||||
def one_side_connector(self, height=None):
|
||||
if height is None:
|
||||
height = self.rim_length
|
||||
result = (
|
||||
Cq.Workplane('XY')
|
||||
.cylinder(
|
||||
radius=self.diam / 2,
|
||||
height=self.rim_length,
|
||||
height=height,
|
||||
centered=(True, True, False)
|
||||
)
|
||||
)
|
||||
result.faces(">Z").tag("mate")
|
||||
|
@ -197,7 +200,7 @@ class Handle:
|
|||
result
|
||||
.union(
|
||||
thread
|
||||
.located(Cq.Location((0, 0, self.connector_length / 2))))
|
||||
.located(Cq.Location((0, 0, height))))
|
||||
)
|
||||
return result
|
||||
|
||||
|
|
|
@ -223,7 +223,7 @@ def comma_assembly():
|
|||
)
|
||||
return result
|
||||
|
||||
@dataclass(frozen=True)
|
||||
@dataclass
|
||||
class TorsionJoint:
|
||||
"""
|
||||
This jonit consists of a rider puck on a track puck. IT is best suited if
|
||||
|
@ -260,6 +260,7 @@ class TorsionJoint:
|
|||
assert self.groove_radius_outer > self.groove_radius_inner
|
||||
assert self.groove_radius_inner > self.radius_spring
|
||||
assert self.spring_height > self.groove_depth, "Groove is too deep"
|
||||
assert self.radius_spring > self.radius_axle
|
||||
|
||||
@property
|
||||
def total_height(self):
|
||||
|
|
|
@ -5,9 +5,17 @@ from nhf.handle import Handle
|
|||
|
||||
def trident_assembly(
|
||||
handle: Handle,
|
||||
handle_segment_length: float = 24*25.4):
|
||||
handle_segment_length: float = 24*25.4,
|
||||
terminal_height=100):
|
||||
def segment():
|
||||
return handle.segment(handle_segment_length)
|
||||
|
||||
terminal = (
|
||||
handle
|
||||
.one_side_connector(height=terminal_height)
|
||||
.faces(">Z")
|
||||
.hole(15, terminal_height + handle.insertion_length - 10)
|
||||
)
|
||||
mat_i = Material.PLASTIC_PLA
|
||||
mat_s = Material.ACRYLIC_BLACK
|
||||
assembly = (
|
||||
|
@ -28,5 +36,7 @@ def trident_assembly(
|
|||
.constrain("s2?mate2", "i3?rim", "Plane", param=0)
|
||||
.add(handle.one_side_connector(), name="head", color=mat_i.color)
|
||||
.constrain("i3?mate", "head?mate", "Plane")
|
||||
.add(terminal, name="terminal", color=mat_i.color)
|
||||
.constrain("i0?mate", "terminal?mate", "Plane")
|
||||
)
|
||||
return assembly.solve()
|
||||
|
|
Loading…
Reference in New Issue