Add keyhole and set tilt to 60deg
This commit is contained in:
parent
eb6343fa32
commit
46a27ef543
|
@ -47,7 +47,7 @@ class Crown(Model):
|
||||||
# brass insert thickness
|
# brass insert thickness
|
||||||
slot_thickness: float = 2.0
|
slot_thickness: float = 2.0
|
||||||
slot_width: float = 20.0
|
slot_width: float = 20.0
|
||||||
slot_tilt: float = 45
|
slot_tilt: float = 60
|
||||||
|
|
||||||
material: Material = Material.METAL_BRASS
|
material: Material = Material.METAL_BRASS
|
||||||
material_side: Material = Material.PLASTIC_PLA
|
material_side: Material = Material.PLASTIC_PLA
|
||||||
|
@ -414,15 +414,17 @@ class Crown(Model):
|
||||||
|
|
||||||
def side_guard_frontal_slot(self) -> Cq.Workplane:
|
def side_guard_frontal_slot(self) -> Cq.Workplane:
|
||||||
angle = 360 / self.facets
|
angle = 360 / self.facets
|
||||||
|
inner_d = self.thickness / 2 - self.slot_thickness / 2
|
||||||
|
outer_d = self.thickness / 2 + self.slot_thickness / 2
|
||||||
outer = Cq.Solid.makeCone(
|
outer = Cq.Solid.makeCone(
|
||||||
radius1=self.radius_lower_front + self.thickness,
|
radius1=self.radius_lower_front + outer_d,
|
||||||
radius2=self.radius_upper_front + self.thickness,
|
radius2=self.radius_upper_front + outer_d,
|
||||||
height=self.height,
|
height=self.height,
|
||||||
angleDegrees=angle,
|
angleDegrees=angle,
|
||||||
)
|
)
|
||||||
inner = Cq.Solid.makeCone(
|
inner = Cq.Solid.makeCone(
|
||||||
radius1=self.radius_lower_front,
|
radius1=self.radius_lower_front + inner_d,
|
||||||
radius2=self.radius_upper_front,
|
radius2=self.radius_upper_front + inner_d,
|
||||||
height=self.height,
|
height=self.height,
|
||||||
angleDegrees=angle,
|
angleDegrees=angle,
|
||||||
)
|
)
|
||||||
|
@ -486,17 +488,27 @@ class Crown(Model):
|
||||||
#)
|
#)
|
||||||
result = shell * profile# - channel
|
result = shell * profile# - channel
|
||||||
|
|
||||||
# Create the slots
|
# Create the downward slots
|
||||||
for sign in [-1, 1]:
|
for sign in [-1, 1]:
|
||||||
slot = Cq.Solid.makeBox(
|
slot_box = Cq.Solid.makeBox(
|
||||||
length=self.height,
|
length=self.height,
|
||||||
width=self.slot_width,
|
width=self.slot_width,
|
||||||
height=self.slot_thickness,
|
height=self.slot_thickness,
|
||||||
).moved(
|
).moved(
|
||||||
|
Cq.Location(-self.slot_thickness,-self.slot_width/2, -self.slot_thickness/2)
|
||||||
|
)
|
||||||
|
# keyhole for threads to stay in place
|
||||||
|
slot_cyl = Cq.Solid.makeCylinder(
|
||||||
|
radius=self.slot_thickness/2,
|
||||||
|
height=self.height,
|
||||||
|
pnt=(0,0,self.slot_thickness/2),
|
||||||
|
dir=(1,0,0),
|
||||||
|
)
|
||||||
|
slot = slot_box + slot_cyl
|
||||||
|
slot = slot.moved(
|
||||||
Cq.Location.rot2d(sign * self.side_guard_slot_angle) *
|
Cq.Location.rot2d(sign * self.side_guard_slot_angle) *
|
||||||
Cq.Location(self.radius_lower + self.side_guard_thickness/2, 0, 0) *
|
Cq.Location(self.radius_lower + self.side_guard_thickness/2, 0, 0) *
|
||||||
Cq.Location(0,0,0,0,-180 + self.slot_tilt,0) *
|
Cq.Location(0,0,0,0,-180 + self.slot_tilt,0)
|
||||||
Cq.Location(-self.slot_thickness,-self.slot_width/2, -self.slot_thickness/2)
|
|
||||||
)
|
)
|
||||||
result = result - slot
|
result = result - slot
|
||||||
|
|
||||||
|
@ -553,7 +565,7 @@ class Crown(Model):
|
||||||
attach_left=AttachPoint.DOVETAIL_OUT,
|
attach_left=AttachPoint.DOVETAIL_OUT,
|
||||||
attach_right=AttachPoint.DOVETAIL_IN,
|
attach_right=AttachPoint.DOVETAIL_IN,
|
||||||
)
|
)
|
||||||
@target(name="side_guard_3")
|
@target(name="side_guard_4")
|
||||||
def side_guard_4(self) -> Cq.Workplane:
|
def side_guard_4(self) -> Cq.Workplane:
|
||||||
return self.side_guard(
|
return self.side_guard(
|
||||||
attach_left=AttachPoint.DOVETAIL_OUT,
|
attach_left=AttachPoint.DOVETAIL_OUT,
|
||||||
|
|
Loading…
Reference in New Issue