Improve the lollipop antenna mount

Signed-off-by: Arnaud Morin <arnaud.gfpv@mailops.fr>
This commit is contained in:
Arnaud Morin
2026-09-05 10:45:57 +02:00
parent 2740431c14
commit 61025489a4

View File

@@ -9,8 +9,8 @@ def lollipop():
# Antenna
ant = (cq.Workplane("XZ")
.box(15.5, 12.7, 11, centered=(True, True, True))
.fillet(2)
.box(17, 15, 11, centered=(True, True, True))
.fillet(1)
)
@@ -19,20 +19,20 @@ def lollipop():
ant = ant.cut(cut)
# Add mass around the tube
mass = (cq.Workplane("XZ")
.polyline([
(0, 0),
(2, 0),
(13, 12),
(0, 12),
])
.close()
.extrude(10)
.fillet(1)
.translate((7, 5, -6)))
# tube
ant = ant.union(
cq.Workplane("YZ")
.circle(3.5)
.extrude(4.0)
.translate((7.75, 0, 0)))
# Hole in tube
ant = ant.cut(
cq.Workplane("YZ")
.circle(1.5)
.extrude(9.5)
.translate((6.5, 0, 0)))
ant = ant.union(mass)
# Insert in tube
ant = ant.cut(
@@ -46,26 +46,26 @@ def lollipop():
cq.selectors.BoxSelector((6.5, -3, -3), (7.0, 3, 3))).fillet(1.0)
# Rotate and translate
ant = (ant.rotate((0, 0, 0), (0, 1, 0), 25)
.translate((-8, 0, 7.5)))
ant = (ant.rotate((0, 0, 0), (0, 1, 0), 45)
.translate((-8, 0, 9.5)))
# Support on standoff
sup = (cq.Workplane("XY")
.polyline([
(-3, 0),
(-3, -4),
(-3, -3),
(-0.5, -14),
(4.2, -13),
(1, -9),
(0, 0),
(2, -9),
(2, -3),
]).close()
.mirrorX()
.extrude(3/2, both=True)
.extrude(4, both=True)
.translate((0,0,1))
)
sup2 = (cq.Workplane("XY")
.pushPoints([(2, 14), (2, -14)])
.circle(5/2)
.circle(6.5/2)
.extrude(5, both=True))
sup = sup.union(sup2)
@@ -77,12 +77,46 @@ def lollipop():
sup = sup.cut(cut)
p = ant.union(sup)
# Cut to have a flat printable object
cut = (cq.Workplane("XY")
.box(50, 50, 30, centered=(True, True, False))
.translate((0,0,-30))
)
p = p.cut(cut)
# Cut to reduce weight
cut = (cq.Workplane("XY")
.box(50, 15, 30, centered=(False, True, True))
.translate((2,0,0))
)
p = p.cut(cut)
# Translate back to ease next cut and hole
p = (p.rotate((0, 0, 0), (0, 1, 0), -45)
.translate((0, 0, -1)))
# Hole in tube
p = p.faces("<X").workplane().hole(2)
# Split half
cut = (cq.Workplane("XY")
.box(50, 1, 20, centered=(True, True, True))
.translate((0,0,-10))
)
p = p.cut(cut)
# Translate back to ease assembly
p = (p.rotate((0, 0, 0), (0, 1, 0), 45)
.translate((0, 0, 1)))
return p
result = lollipop()
#assert result.solids().size() == 1, "lollipop is not one solid"
assert result.solids().size() == 1, "lollipop is not one solid"
if "show_object" not in globals(): # running outside CQ-editor
def show_object(*args, **kwargs):