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 # Antenna
ant = (cq.Workplane("XZ") ant = (cq.Workplane("XZ")
.box(15.5, 12.7, 11, centered=(True, True, True)) .box(17, 15, 11, centered=(True, True, True))
.fillet(2) .fillet(1)
) )
@@ -19,20 +19,20 @@ def lollipop():
ant = ant.cut(cut) 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(mass)
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)))
# Insert in tube # Insert in tube
ant = ant.cut( ant = ant.cut(
@@ -46,26 +46,26 @@ def lollipop():
cq.selectors.BoxSelector((6.5, -3, -3), (7.0, 3, 3))).fillet(1.0) cq.selectors.BoxSelector((6.5, -3, -3), (7.0, 3, 3))).fillet(1.0)
# Rotate and translate # Rotate and translate
ant = (ant.rotate((0, 0, 0), (0, 1, 0), 25) ant = (ant.rotate((0, 0, 0), (0, 1, 0), 45)
.translate((-8, 0, 7.5))) .translate((-8, 0, 9.5)))
# Support on standoff # Support on standoff
sup = (cq.Workplane("XY") sup = (cq.Workplane("XY")
.polyline([ .polyline([
(-3, 0), (-3, -3),
(-3, -4),
(-0.5, -14), (-0.5, -14),
(4.2, -13), (4.2, -13),
(1, -9), (2, -9),
(0, 0), (2, -3),
]).close() ]).close()
.mirrorX() .mirrorX()
.extrude(3/2, both=True) .extrude(4, both=True)
.translate((0,0,1))
) )
sup2 = (cq.Workplane("XY") sup2 = (cq.Workplane("XY")
.pushPoints([(2, 14), (2, -14)]) .pushPoints([(2, 14), (2, -14)])
.circle(5/2) .circle(6.5/2)
.extrude(5, both=True)) .extrude(5, both=True))
sup = sup.union(sup2) sup = sup.union(sup2)
@@ -77,12 +77,46 @@ def lollipop():
sup = sup.cut(cut) sup = sup.cut(cut)
p = ant.union(sup) 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 return p
result = lollipop() 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 if "show_object" not in globals(): # running outside CQ-editor
def show_object(*args, **kwargs): def show_object(*args, **kwargs):