Mating structure for angle joint
This commit is contained in:
parent
b83bf5a57d
commit
4d4e4c7eab
|
@ -22,7 +22,7 @@ class Onbashira(Model):
|
||||||
side_thickness: float = 25.4 / 8
|
side_thickness: float = 25.4 / 8
|
||||||
|
|
||||||
# Joints between two sets of side panels
|
# Joints between two sets of side panels
|
||||||
angle_joint_thickness: float = 10.0
|
angle_joint_thickness: float = 15.0
|
||||||
# Z-axis size of each angle joint
|
# Z-axis size of each angle joint
|
||||||
angle_joint_depth: float = 60.0
|
angle_joint_depth: float = 60.0
|
||||||
# Gap of each angle joint to connect the outside to the inside
|
# Gap of each angle joint to connect the outside to the inside
|
||||||
|
@ -37,6 +37,9 @@ class Onbashira(Model):
|
||||||
])
|
])
|
||||||
angle_joint_flange_thickness: float = 7.8
|
angle_joint_flange_thickness: float = 7.8
|
||||||
angle_joint_flange_radius: float = 40.0
|
angle_joint_flange_radius: float = 40.0
|
||||||
|
angle_joint_conn_thickness: float = 6.0
|
||||||
|
angle_joint_conn_depth: float = 20.0
|
||||||
|
angle_joint_conn_width: float = 20.0
|
||||||
|
|
||||||
# Dimensions of gun barrels
|
# Dimensions of gun barrels
|
||||||
barrel_diam: float = 25.4 * 1.5
|
barrel_diam: float = 25.4 * 1.5
|
||||||
|
@ -77,6 +80,8 @@ class Onbashira(Model):
|
||||||
|
|
||||||
for (x, y) in self.angle_joint_bolt_position:
|
for (x, y) in self.angle_joint_bolt_position:
|
||||||
assert y < self.angle_joint_depth / 2
|
assert y < self.angle_joint_depth / 2
|
||||||
|
assert self.angle_joint_depth / 2 > self.angle_joint_conn_depth
|
||||||
|
assert self.angle_joint_thickness > self.angle_joint_conn_thickness
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def angle_side(self) -> float:
|
def angle_side(self) -> float:
|
||||||
|
@ -403,6 +408,23 @@ class Onbashira(Model):
|
||||||
.extrude(self.angle_joint_depth*4)
|
.extrude(self.angle_joint_depth*4)
|
||||||
.translate((0, 0, -self.angle_joint_depth*2))
|
.translate((0, 0, -self.angle_joint_depth*2))
|
||||||
)
|
)
|
||||||
|
# The mating structure
|
||||||
|
z1 = self.bulk_radius + (self.angle_joint_thickness - self.angle_joint_conn_thickness) / 2
|
||||||
|
z2 = z1 + self.angle_joint_conn_thickness
|
||||||
|
mating1n = (
|
||||||
|
Cq.Workplane()
|
||||||
|
.sketch()
|
||||||
|
.polygon([
|
||||||
|
(z1, 0),
|
||||||
|
(z1, self.angle_joint_conn_width),
|
||||||
|
(z2, self.angle_joint_conn_width),
|
||||||
|
(z2, 0),
|
||||||
|
])
|
||||||
|
.finalize()
|
||||||
|
.extrude(self.angle_joint_conn_depth)
|
||||||
|
)
|
||||||
|
mating1p = mating1n.rotate((0,0,0), (1,0,0), 180)
|
||||||
|
angle = 360 / self.n_side
|
||||||
result = (
|
result = (
|
||||||
Cq.Workplane()
|
Cq.Workplane()
|
||||||
.placeSketch(sketch)
|
.placeSketch(sketch)
|
||||||
|
@ -411,6 +433,10 @@ class Onbashira(Model):
|
||||||
.cut(slot.translate((0, 0, self.angle_joint_gap/2)))
|
.cut(slot.translate((0, 0, self.angle_joint_gap/2)))
|
||||||
.cut(slot.translate((0, 0, -self.angle_joint_depth-self.angle_joint_gap/2)))
|
.cut(slot.translate((0, 0, -self.angle_joint_depth-self.angle_joint_gap/2)))
|
||||||
.intersect(intersector)
|
.intersect(intersector)
|
||||||
|
.cut(mating1n)
|
||||||
|
.union(mating1p)
|
||||||
|
.union(mating1n.rotate((0,0,0),(0,0,1),angle))
|
||||||
|
.cut(mating1p.rotate((0,0,0),(0,0,1),angle))
|
||||||
)
|
)
|
||||||
h = self.bulk_radius + self.angle_joint_thickness
|
h = self.bulk_radius + self.angle_joint_thickness
|
||||||
hole_negative = Cq.Solid.makeCylinder(
|
hole_negative = Cq.Solid.makeCylinder(
|
||||||
|
|
Loading…
Reference in New Issue