Projeto: fiacao da versao 35x35 e remocao dos rasgos da cinta da bateria

- fiacao_35x35.py: mesmo esquema eletrico do modelo original, com rotas refeitas
  para a caixa mais baixa e o novo arranjo interno; inclui checagem de colisao
- montagem_base_35x35.py: sem os rasgos da cinta na Base (ficavam a 2,25 mm do
  rasgo da nervura) e sem o modelo da cinta; furos extras serao feitos a mao
- partes/mdf_35x35: pecas e chapas regeneradas

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mguinhosandClaude Opus 5.5 committed 2026-11-04 09:48:50 -03:00
1 parent f90b14df3a
commit 2675bcb348
10 files changed
+347 -287

No files matched your search

+345
View File
@@ -0,0 +1,345 @@
# -*- coding: utf-8 -*-
"""Fiação da base móvel 35x35 (adiciona ao documento RoboMovel_Base_35x35).
Mesmo esquema elétrico de fiacao.py; só as rotas mudam, porque na versão reduzida
a caixa é mais baixa (tampo em z = 118,38) e o interior foi reorganizado.
Os fios cruzam as nervuras pelas aberturas (z 76,38..102,38):
nervura transversal: x = 0 (±25) e x = ±130 (±20)
nervuras longitudinais: y = -60 (±25) e y = -125 (±20)
Uso: build(doc) adiciona os fios; checar(doc) acusa colisões com os sólidos.
"""
import json, os, sys
AQUI = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, AQUI)
sys.path.insert(0, os.path.join(AQUI, "pecas"))
import importlib
from lib_rm import *
import cabos; importlib.reload(cabos)
import montagem_base_35x35 as MB
import protoboard_830 as PB
import esp32_cam as EC
import cnc_shield as CS
import energia as EN
import nema17 as NM
D_JMP = 1.4 # jumper DuPont
D_22 = 1.6
D_18 = 2.2
P = 2.54
OBJS = []
ROUTES = [] # (nome, pontos, diâmetro): usado pela checagem de colisão
ROTAS = os.path.join(MB.MONT, "rotas_fios_35x35.json")
ZR = sum(MB.OPEN_Z) / 2 # altura de passagem pelas aberturas das nervuras
PIN_BASE = 2.5 # altura do plástico das barras macho
DUP = 14.0 # comprimento do housing DuPont
LEAD_SHIELD = 4.0 # pouco espaço acima da shield: o fio dobra logo depois do housing
UP, DOWN = V(0, 0, 1), V(0, 0, -1)
BACK = V(0, -1, 0)
# ------------------------------------------------------------------ coordenadas
def bb(bbpl, col, row):
return bbpl.multVec(PB.hole(col, row))
def bb_rail(bbpl, key, x_near):
pos = min(PB.rail_positions(), key=lambda k: abs(PB.rail_x(k) - x_near))
return bbpl.multVec(V(PB.rail_x(pos), PB.RAIL_Y[key], PB.ZTOP))
def shield_top(xy, dz):
return MB.shield_w(xy[0], xy[1], CS.T + dz)
def shield_female(xy):
"""Ponto do fio saindo de um DuPont fêmea encaixado num pino da shield."""
return shield_top(xy, PIN_BASE + DUP)
def cam_pin_out(name, side):
x, y = EC.pin_xy(name, side)
return MB.cam_w(x, y, -PIN_BASE - DUP)
# ------------------------------------------------------------------ construtores
def add_obj(doc, g, name, shape, color, label=None):
o = add(doc, name, shape, color, label or name, group=g)
OBJS.append(o)
return o
def jumper(doc, g, name, color, a, da, b, db, kind="MF", via=(), label=None, leads=(8.0, 8.0)):
"""Jumper DuPont. a/b = ponto de saída do fio em cada ponta; da/db = direção em
que o fio sai do housing. kind: 'M' ponta macho (entra em furo de protoboard,
pino apontando para -da), 'F' ponta fêmea."""
pts = [a, a + da * leads[0]] + [V(*v) for v in via] + [b + db * leads[1], b]
ROUTES.append((name, [tuple(p) for p in pts], D_JMP))
parts = [cabos.wire(pts, D_JMP)]
metal = []
for p, d, k in ((a, da, kind[0]), (b, db, kind[1])):
if k == "M":
h, pin = cabos.male_pin_end(p, -d)
parts.append(h)
metal.append(pin)
else:
parts.append(cabos.female_end(p, -d))
add_obj(doc, g, name, Part.makeCompound(parts), color, label)
if metal:
add_obj(doc, g, name + "_pinos", Part.makeCompound(metal), "aco")
def solid_wire(doc, g, name, color, pts, d=D_22, bare=6.0, ends=(True, True)):
"""Fio rígido/flexível com pontas decapadas (estanhadas)."""
ROUTES.append((name, [tuple(V(p)) for p in pts], d))
add_obj(doc, g, name, cabos.wire(pts, d), color)
tips = []
for i, use in zip((0, -1), ends):
if not use:
continue
p = V(pts[i])
q = V(pts[1 if i == 0 else -2])
dv = p - q
dv.normalize()
tips.append(cyl(d * 0.3, bare, p - dv * 0.5, dv))
if tips:
add_obj(doc, g, name + "_pontas", Part.makeCompound(tips), "aco")
def resistor(doc, g, name, pa, pb, bands):
"""Resistor 1/4 W axial (Ø2,3 x 6,3) com terminais dobrados nos furos pa/pb."""
h = 3.0
top_a, top_b = pa + V(0, 0, h), pb + V(0, 0, h)
ax = top_b - top_a
ax.normalize()
mid = (top_a + top_b) * 0.5
body = cyl(1.15, 6.3, mid - ax * 3.15, ax)
body = body.fuse([Part.makeSphere(1.25, mid - ax * 2.6), Part.makeSphere(1.25, mid + ax * 2.6)]).removeSplitter()
add_obj(doc, g, name, body, "bege", name)
for i, c in enumerate(bands): # 4 faixas; a de tolerância afastada
off = -2.2 + i * 1.2 + (0.6 if i == len(bands) - 1 else 0)
add_obj(doc, g, "%s_f%d" % (name, i), cyl(1.2, 0.55, mid + ax * off, ax), c)
leads = cabos.wire([pa - V(0, 0, 6), pa, top_a, top_b, pb, pb - V(0, 0, 6)], 0.6)
add_obj(doc, g, name + "_terminais", leads, "aco")
def elco(doc, g, name, p_pos, p_neg, h=11.0, d=6.3):
c = (p_pos + p_neg) * 0.5 + V(0, 0, 1.0)
add_obj(doc, g, name, cyl(d / 2, h, c), "preto", "C1 100 µF 16 V")
n = p_neg - p_pos
n.normalize()
# faixa do terminal negativo: setor do invólucro voltado para p_neg
stripe = cyl(d / 2 + 0.01, h, c).common(Part.makeBox(d, d, h + 1, c + n * 0.8 - V(d / 2, d / 2, 0.5)))
add_obj(doc, g, name + "_faixa", stripe, "cinza", "Faixa (−)")
add_obj(doc, g, name + "_topo", cyl(d / 2 - 0.3, 0.05, c + V(0, 0, h)), "aco")
leads = [cyl(0.25, 7.5, p - V(0, 0, 6.0)) for p in (p_pos, p_neg)]
add_obj(doc, g, name + "_terminais", Part.makeCompound(leads), "aco")
def faston(p, direction):
"""Terminal fêmea 4,8 mm isolado (vermelho)."""
return placed(cbox(6.8, 3.6, 13.0, 0, 0, 0), p, Rotation(V(0, 0, 1), direction))
# ------------------------------------------------------------------ fiação
def motores(doc, gm):
for (xs, ys), axis in MB.AXIS_OF.items():
tag = ("D" if xs > 0 else "E") + ("F" if ys > 0 else "T")
mpl = MB.motor_pl(xs, ys)
zc = -NM.LB + NM.L_REAR / 2
p0 = mpl.multVec(V(NM.A / 2 + 4.0, 0, zc))
t0 = mpl.Rotation.multVec(V(1, 0, 0))
n0 = mpl.Rotation.multVec(V(0, 0, 1))
hole = V(mpl.multVec(V(0, 0, -34.75)).x, ys * MB.CABLE_HOLE_Y, 0)
hp = CS.motor_header_pins(axis)
pend = MB.shield_w(sum(p[0] for p in hp) / 4, sum(p[1] for p in hp) / 4, CS.T + PIN_BASE + DUP)
pts = [p0, p0 + t0 * 12, V(hole.x, p0.y + t0.y * 22, MB.Z_B0 - 8), V(hole.x, hole.y, MB.Z_B0 - 2),
V(hole.x, hole.y, MB.Z_B1 + 8)]
yr = pend.y + (-6.0 if axis in "YA" else 6.0) # posição na abertura y = -125
if ys > 0: # motores da frente: atravessam a nervura transversal
pts += [V(xs * 112, 45, 92), V(xs * 130, 12, ZR), V(xs * 130, -12, ZR + 3), V(xs * 125, -40, 100), V(xs * 110, -80, 98)]
else:
pts += [V(xs * 105, -85, 92)]
pts += [V(xs * 104, yr, 92), V(xs * 90, yr, 91), V(xs * 70, yr, 98), V(xs * 45, (yr + pend.y) / 2, 106),
V(pend.x + xs * 14, pend.y, 113.5), pend + V(0, 0, LEAD_SHIELD), pend]
ROUTES.append(("Cabo_" + tag, [tuple(p) for p in pts], 4 * cabos.PITCH))
parts, L = cabos.stepper_cable(pts, n0, n_end=V(0, 1, 0))
for k, (sh, cor) in parts.items():
add_obj(doc, gm, "Cabo_%s_%s" % (tag, k.replace(".", "_")), sh, cor)
print("cabo motor %s -> %s: %.0f mm (sobra do cabo de 1 m presa com abraçadeira)" % (tag, axis, L))
def potencia(doc, gp, gs):
B1, B2 = MB.BB1_PL, MB.BB2_PL
xt = doc.getObject("XT60").Placement
cup = lambda lx, ly: xt.multVec(V(lx, ly, 0))
f_red, f_blk = cup(-12, -3.6), cup(-12, 3.6)
m_red, m_blk = cup(12, -3.6), cup(12, 3.6)
# bateria (BMS na face +Y) -> XT60 fêmea: abertura y = 60 da nervura esquerda
solid_wire(doc, gp, "Bat_pos", "vermelho", [V(-66, 68, 78), V(-68, 75, 82), V(-82, 74, 85), V(-90, 60, 87), V(-112, 38, 84), V(-120, 18, 80),
V(f_red.x, f_red.y - 8, f_red.z + 1), V(f_red.x, f_red.y - 4, f_red.z), f_red], D_18, 3.0)
solid_wire(doc, gp, "Bat_neg", "preto", [V(-62, 68, 78), V(-64, 75, 82), V(-82, 72, 88), V(-90, 54, 87), V(-112, 32, 84), V(-122, 14, 80),
V(f_blk.x, f_blk.y - 8, f_blk.z + 1), V(f_blk.x, f_blk.y - 4, f_blk.z), f_blk], D_18, 3.0)
fz = doc.getObject("PortaFusivel").Placement.Base
fl, fr = fz + V(-15, 0, 0), fz + V(15, 0, 0)
solid_wire(doc, gp, "XT60_fusivel", "vermelho",
[m_red, m_red + V(0, 6, 0), V(-116, 60, 80), V(-113, 30, 84), V(-122, 6, ZR), V(-130, -8, ZR), V(-152, -30, 82), fl + V(-10, 0, 0), fl], D_18, 3.0)
sw_t1 = V(MB.SWITCH_POS.x, MB.SWITCH_POS.y + 24, MB.SWITCH_POS.z - 3.8)
sw_t2 = V(MB.SWITCH_POS.x, MB.SWITCH_POS.y + 24, MB.SWITCH_POS.z + 3.8)
add_obj(doc, gp, "Faston", Part.makeCompound([faston(sw_t1 - V(0, 2, 0), V(0, 1, 0)), faston(sw_t2 - V(0, 2, 0), V(0, 1, 0))]), "vermelho", "Terminais faston 4,8")
s1, s2 = sw_t1 + V(0, 11, 0), sw_t2 + V(0, 11, 0)
# fusível -> chave: atravessa as duas nervuras longitudinais pelas aberturas y = -60
solid_wire(doc, gp, "Fusivel_chave", "vermelho",
[fr, fr + V(8, 0, 0), V(-100, -50, 84), V(-90, -58, 90), V(-60, -60, 98), V(60, -60, 98), V(90, -58, 92), V(108, -85, 92),
V(122, -118, 92), s1 + V(0, 12, 0), s1], D_18, 0)
wp = doc.getObject("Wago_pos").Placement
wn = doc.getObject("Wago_neg").Placement
went = lambda pl, k: pl.multVec(V((k - 1) * 5.9, -10.2 + 3.0, 4.0))
wdir = wp.Rotation.multVec(V(0, -1, 0))
solid_wire(doc, gp, "Chave_WagoPos", "vermelho", [s2, s2 + V(0, 12, 0), V(140, -115, 88), went(wp, 0) + wdir * 25, went(wp, 0) + wdir * 3, went(wp, 0)], D_18, 11.0, (False, True))
solid_wire(doc, gp, "XT60_WagoNeg", "preto",
[m_blk, m_blk + V(0, 6, 0), V(-146, 40, 80), V(-140, 8, ZR), V(-135, -8, ZR), V(-108, -52, 90), V(-90, -52, 92), V(-60, -54, 100), V(60, -54, 100),
V(90, -52, 94), V(130, -72, 92), V(155, -100, 88), went(wn, 0) + wdir * 20, went(wn, 0)], D_18, 11.0, (False, True))
# Wago -> borne CNC: abertura y = -125 da nervura direita e por trás da shield (entrada do borne vinda de -X)
for k, (nm, cor, tx) in enumerate((("WagoPos_Borne", "vermelho", 8.84), ("WagoNeg_Borne", "preto", 3.76))):
pl = wp if k == 0 else wn
ent = MB.shield_w(tx, 51.6 - 7.0, CS.T + 3.8)
out = MB.shield_w(tx, 51.6, CS.T + 3.8)
dvec = out - ent
dvec.normalize()
yb = -162.0 - 2.5 * k
solid_wire(doc, gp, nm, cor, [went(pl, 1), went(pl, 1) + wdir * 18, V(146, -116 - 8 * k, 86), V(110, -132 - 4 * k, 92), V(90, -132 - 4 * k, 92),
V(58, -146, 102), V(36, yb + 5, 100), V(20, yb, 100), V(-20, yb, 100), V(-36, yb + 3, 101), out + dvec * 18 + V(0, 0, 8), out + dvec * 6, ent], D_18, 7.0)
# Wago -> LM2596 IN (solda nos pads, por cima)
lm = MB.LM_PL
for k, (nm, cor, pad) in enumerate((("WagoPos_LMin", "vermelho", "IN+"), ("WagoNeg_LMin", "preto", "IN-"))):
pl = wp if k == 0 else wn
pp = lm.multVec(V(*EN.LM_PADS[pad], 1.6))
e0 = went(pl, 2)
solid_wire(doc, gp, nm, cor, [e0, e0 + wdir * 14, e0 + wdir * 22 + V(0, 8, 14), V(pp.x + 6, pp.y - 14, pp.z + 16),
pp + V(0, 0, 8), pp - V(0, 0, 2.0)], D_22, 6.0)
# LM2596 OUT -> PB2 trilhos (fio rígido 22 AWG)
for k, (nm, cor, pad, rail) in enumerate((("LMout_PB2pos", "vermelho", "OUT+", "t_out"), ("LMout_PB2neg", "preto", "OUT-", "t_in"))):
pp = lm.multVec(V(*EN.LM_PADS[pad], 1.6))
rh = bb_rail(B2, rail, 71.0 - 2.54 * k)
solid_wire(doc, gp, nm, cor, [pp - V(0, 0, 2.0), pp + V(0, 0, 8), V(pp.x - 12, pp.y, 100), V(90, -45 - 5 * k, 92), V(rh.x + 4, rh.y, rh.z + 14), rh + V(0, 0, 6), rh - V(0, 0, 6)], D_22, 6.0)
# pontes entre trilhos superior/inferior (PB2 e PB1), lado direito
for bbpl, tag, col_x in ((B2, "PB2", 55.9), (B1, "PB1", 58.4)):
for k, (a, b, cor) in enumerate((("t_out", "b_in", "vermelho"), ("t_in", "b_out", "preto"))):
pa = bb_rail(bbpl, a, col_x + 2.54 * k)
pb = bb_rail(bbpl, b, col_x + 2.54 * k)
solid_wire(doc, gp, "Ponte_%s_%s" % (tag, a), cor, [pa - V(0, 0, 6), pa + V(0, 0, 3), (pa + pb) * 0.5 + V(0, 0, 6 + 2 * k), pb + V(0, 0, 3), pb - V(0, 0, 6)], 1.4, 6.0)
# PB1: pontes na divisão central dos trilhos t (MB-102 tem trilho dividido)
for k, (rail, cor) in enumerate((("t_out", "vermelho"), ("t_in", "preto"))):
pa, pb = bb_rail(B1, rail, -5.08), bb_rail(B1, rail, 5.08)
solid_wire(doc, gs, "Ponte_meio_PB1_" + rail, cor, [pa - V(0, 0, 6), pa + V(0, 0, 2.5), pb + V(0, 0, 2.5), pb - V(0, 0, 6)], 1.4, 6.0)
# PB2 -> PB1 (alimentação 5 V): abertura x = 0 da nervura transversal, ao lado da bateria
for k, (a, b, cor) in enumerate((("t_out", "b_in", "vermelho"), ("t_in", "b_out", "preto"))):
pa = bb_rail(B2, a, 22.86 + 2.54 * k)
pb = bb_rail(B1, b, 22.86 + 2.54 * k)
jumper(doc, gp, "Jumper_PB2_PB1_" + cor, cor, pa + V(0, 0, DUP), UP, pb + V(0, 0, DUP), UP, "MM",
via=[V(pa.x - 4 * k, pa.y + 14, 100), V(12 + 4 * k, 0, 92), V(pb.x - 4 * k, pb.y - 20, 100)])
# PB2 -> barra 5V/GND da shield: contorna os drivers por +X
for k, (rail, col, cor) in enumerate((("b_in", 0, "vermelho"), ("b_out", 1, "preto"))):
pa = bb_rail(B2, rail, 7.62 + 2.54 * k)
pb = shield_female(CS.left_pin("5V/GND", col))
jumper(doc, gp, "Jumper_5V_shield_" + cor, cor, pa + V(0, 0, DUP), UP, pb, UP, "MF",
via=[V(pa.x + 12, -88, 104), V(27 + 2 * k, -110, 108), V(28 + 2 * k, -146, 110), V(pb.x + 8, pb.y - 1.5, 113.5)], leads=(8.0, LEAD_SHIELD))
def sinais(doc, gs):
B1 = MB.BB1_PL
# ESP32-CAM: 5V e GND (header esquerdo local -> mundo +X)
for nm, pin, side, rail, xn, cor in (("ESP_5V", "5V", "L", "t_out", 33.02, "vermelho"), ("ESP_GND", "GND", "L", "t_in", 38.1, "preto")):
a = cam_pin_out(pin, side)
b = bb_rail(B1, rail, xn)
jumper(doc, gs, "Jumper_" + nm, cor, a, BACK, b + V(0, 0, DUP), UP, "FM", via=[V(a.x + 3, a.y - 8, a.z + 4)], leads=(4.0, 8.0))
# ESP TX -> PB1 (28, j) ; A1 (Hold) <- PB1 (28, g). Os pinos ficam abaixo do topo da PB1: o fio sobe antes de passar sobre ela
a = cam_pin_out("U0T", "R")
b = bb(B1, 28, "j")
jumper(doc, gs, "Jumper_ESP_TX", "amarelo", a, BACK, b + V(0, 0, DUP), UP, "FM", via=[V(a.x, 134.5, 84)], leads=(4.0, 8.0))
a = bb(B1, 28, "g")
b = shield_female(CS.endstop_pin("Hold"))
jumper(doc, gs, "Jumper_A1_Hold_RX", "amarelo", a + V(0, 0, DUP), UP, b, UP, "MF",
via=[V(a.x, 75, 100), V(-8, 0, 92), V(-8, -20, 98), V(b.x, -60, 104), V(b.x, b.y + 16, 109), V(b.x, b.y + 6, 112)], leads=(8.0, LEAD_SHIELD))
# A0 (Abort) -> PB1 (20, g) ; R1 1k (20,h)-(24,h) ; R2 2k (24,i)-GND ; ESP RX <- (24, j)
a = bb(B1, 20, "g")
b = shield_female(CS.endstop_pin("Abort"))
jumper(doc, gs, "Jumper_A0_Abort_TX", "verde", a + V(0, 0, DUP), UP, b, UP, "MF",
via=[V(a.x, 75, 102), V(-14, 0, 96), V(-14, -20, 100), V(b.x, -60, 104), V(b.x, b.y + 16, 109), V(b.x, b.y + 6, 112)], leads=(8.0, LEAD_SHIELD))
resistor(doc, gs, "R1_1k", bb(B1, 20, "h"), bb(B1, 24, "h"), ["marrom", "preto", "vermelho", "ouro"])
resistor(doc, gs, "R2_2k", bb(B1, 24, "i"), bb_rail(B1, "t_in", (24 - 32) * P), ["vermelho", "preto", "vermelho", "ouro"])
a = cam_pin_out("U0R", "R")
b = bb(B1, 24, "j")
jumper(doc, gs, "Jumper_ESP_RX", "verde", a, BACK, b + V(0, 0, DUP), UP, "FM", via=[V(a.x - 4, 134.5, 86)], leads=(4.0, 8.0))
# C1 100 µF entre trilhos t_out (+) e t_in (−)
elco(doc, gs, "C1", bb_rail(B1, "t_out", 48.26), bb_rail(B1, "t_in", 48.26))
def build(doc=None):
doc = doc or App.getDocument(MB.DOC)
def purge(o):
for ch in list(getattr(o, "Group", [])):
purge(ch)
doc.removeObject(o.Name)
if doc.getObject("Fiacao"):
purge(doc.getObject("Fiacao"))
OBJS.clear()
ROUTES.clear()
g = doc.addObject("App::DocumentObjectGroup", "Fiacao")
g.Label = "Fiação"
gm = doc.addObject("App::DocumentObjectGroup", "Fiacao_Motores")
gm.Label = "Cabos dos motores"
gp = doc.addObject("App::DocumentObjectGroup", "Fiacao_Potencia")
gp.Label = "Potência / 5 V"
gs = doc.addObject("App::DocumentObjectGroup", "Fiacao_Sinais")
gs.Label = "Sinais / protoboards"
for x in (gm, gp, gs):
g.addObject(x)
motores(doc, gm)
potencia(doc, gp, gs)
sinais(doc, gs)
with open(ROTAS, "w") as fh:
json.dump(ROUTES, fh)
doc.recompute()
return doc
def checar(doc=None, passo=2.0, ignora_pontas=12.0):
"""Amostra o eixo de cada fio e acusa pontos dentro de sólidos (mesmo critério de
checa_fios.py). Devolve a lista de colisões."""
doc = doc or App.getDocument(MB.DOC)
SKIP = ("Fiacao", "Barra_", "M8", "M4", "M3", "Esp_", "Abracadeira", "Prat_")
fios = set()
def junta(o):
for c in o.Group:
fios.add(c.Name)
if hasattr(c, "Group"):
junta(c)
junta(doc.getObject("Fiacao"))
solidos = []
for o in doc.Objects:
if o.TypeId not in ("App::Link", "Part::Feature") or o.Name.startswith(SKIP) or o.Name in fios:
continue
for s in Part.getShape(o, "", needSubElement=False, transform=True).Solids:
solidos.append((o.Name, s, s.BoundBox))
hits = {}
zmax = {}
for name, pts, d in json.load(open(ROTAS)):
spl = Part.BSplineCurve()
spl.interpolate([V(*p) for p in pts])
e = spl.toShape()
L = e.Length
n = max(2, int(L / passo))
r = d / 2.0
for k in range(n + 1):
s = min(L * k / n, L - 1e-6) # arredondamento: getParameterByLength recusa s > L
p = e.valueAt(e.getParameterByLength(s))
zmax[name] = max(zmax.get(name, -1e9), p.z + r)
if s < ignora_pontas or s > L - ignora_pontas:
continue
for oname, so, bb_ in solidos:
if bb_.isInside(p) and so.isInside(p, r * 0.8, True):
h = hits.setdefault((name, oname), [0, p])
h[0] += 1
res = ["%-22s x %-22s pontos=%3d em (%.0f, %.0f, %.0f)" % (w, o, c, p.x, p.y, p.z) for (w, o), (c, p) in sorted(hits.items())]
return res, sorted(zmax.items(), key=lambda kv: -kv[1])[:10], len(solidos)
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
"""Montagem da BASE MÓVEL, versão reduzida 350 x 350 mm (derivada de montagem_base.py).
Sem fiação. Motores, rodas e eletrônica têm o mesmo tamanho da versão 500 x 500;
Fiação em fiacao_35x35.py. Motores, rodas e eletrônica têm o mesmo tamanho da versão 500 x 500;
o interior foi reorganizado. Caixa com paredes de 50 mm; altura total 740 mm
(mesma proporção do original), com barras M8 cortadas em 680 mm.
@@ -469,8 +469,6 @@ def mdf_parts():
for hx, hy in EN.LM_HOLES:
p = LM_PL.multVec(V(hx, hy, 0))
cuts.append(cyl(1.6, T + 2, V(p.x, p.y, Z_B0 - 1)))
for dx in (-44.5, 44.5): # cinta da bateria
cuts.append(box(3.5, 22.0, T + 2, BAT_C.x + dx - 1.75, BAT_C.y - 11.0, Z_B0 - 1))
base = base.cut(Part.makeCompound(cuts))
# tampo
deck = box(2 * HALF, 2 * HALF, T, -HALF, -HALF, Z_D0)
@@ -596,10 +594,6 @@ def build():
# ---------------- energia
link(doc, "Bateria", "Bateria_4S1P_18650", "Bateria_4S1P_18650",
PL(BAT_C, Rotation(V(0, 0, 1), 0)), g_ener)
strap = box(92.0, 20.0, 1.2, BAT_C.x - 46.0, BAT_C.y - 10.0, BAT_C.z + EN.BAT[2])
strap = strap.fuse([box(1.2, 20.0, EN.BAT[2] + T + 1.2, BAT_C.x + sx * 45.4 - 0.6, BAT_C.y - 10.0, Z_B0 - 1.2) for sx in (-1, 1)])
strap = strap.fuse(box(92.0, 20.0, 1.2, BAT_C.x - 46.0, BAT_C.y - 10.0, Z_B0 - 1.2))
add(doc, "Cinta_Bateria", strap.removeSplitter(), "preto", "Cinta de velcro 20 mm", group=g_ener)
link(doc, "LM2596", "LM2596_Buck", "LM2596_Buck", LM_PL, g_ener, "LM2596 (5,0 V)")
for i, (hx, hy) in enumerate(EN.LM_HOLES):
p = LM_PL.multVec(V(hx, hy, 0))
Binary file not shown.
@@ -0,0 +1 @@
[["Cabo_DT", [[101.42000000000002, -84.85, 30.0], [101.42000000000002, -72.85, 30.0], [101.42000000000002, -62.849999999999994, 57.379999999999995], [101.42000000000002, -65.0, 63.379999999999995], [101.42000000000002, -65.0, 76.38], [105.0, -85.0, 92.0], [104.0, -120.75, 92.0], [90.0, -120.75, 91.0], [70.0, -120.75, 98.0], [45.0, -123.75, 106.0], [24.47000000000001, -126.75, 113.5], [10.47000000000001, -126.75, 113.28], [10.47000000000001, -126.75, 109.28]], 5.4], ["Cabo_DF", [[101.42000000000002, 84.85, 30.0], [101.42000000000002, 72.85, 30.0], [101.42000000000002, 62.849999999999994, 57.379999999999995], [101.42000000000002, 65.0, 63.379999999999995], [101.42000000000002, 65.0, 76.38], [112.0, 45.0, 92.0], [130.0, 12.0, 89.38], [130.0, -12.0, 92.38], [125.0, -40.0, 100.0], [110.0, -80.0, 98.0], [104.0, -111.75, 92.0], [90.0, -111.75, 91.0], [70.0, -111.75, 98.0], [45.0, -108.75, 106.0], [24.470000000000013, -105.75, 113.5], [10.470000000000013, -105.75, 113.28], [10.470000000000013, -105.75, 109.28]], 5.4], ["Cabo_ET", [[-101.42000000000002, -84.85, 30.0], [-101.42000000000002, -72.85, 30.0], [-101.42000000000002, -62.849999999999994, 57.379999999999995], [-101.42000000000002, -65.0, 63.379999999999995], [-101.42000000000002, -65.0, 76.38], [-105.0, -85.0, 92.0], [-104.0, -120.75, 92.0], [-90.0, -120.75, 91.0], [-70.0, -120.75, 98.0], [-45.0, -123.75, 106.0], [-24.929999999999993, -126.75, 113.5], [-10.929999999999993, -126.75, 113.28], [-10.929999999999993, -126.75, 109.28]], 5.4], ["Cabo_EF", [[-101.42000000000002, 84.85, 30.0], [-101.42000000000002, 72.85, 30.0], [-101.42000000000002, 62.849999999999994, 57.379999999999995], [-101.42000000000002, 65.0, 63.379999999999995], [-101.42000000000002, 65.0, 76.38], [-112.0, 45.0, 92.0], [-130.0, 12.0, 89.38], [-130.0, -12.0, 92.38], [-125.0, -40.0, 100.0], [-110.0, -80.0, 98.0], [-104.0, -111.75, 92.0], [-90.0, -111.75, 91.0], [-70.0, -111.75, 98.0], [-45.0, -108.75, 106.0], [-24.929999999999986, -105.75, 113.5], [-10.929999999999986, -105.75, 113.28], [-10.929999999999986, -105.75, 109.28]], 5.4], ["Bat_pos", [[-66.0, 68.0, 78.0], [-68.0, 75.0, 82.0], [-82.0, 74.0, 85.0], [-90.0, 60.0, 87.0], [-112.0, 38.0, 84.0], [-120.0, 18.0, 80.0], [-126.4, 18.0, 73.58], [-126.4, 22.0, 72.58], [-126.4, 26.0, 72.58]], 2.2], ["Bat_neg", [[-62.0, 68.0, 78.0], [-64.0, 75.0, 82.0], [-82.0, 72.0, 88.0], [-90.0, 54.0, 87.0], [-112.0, 32.0, 84.0], [-122.0, 14.0, 80.0], [-133.6, 18.0, 73.58], [-133.6, 22.0, 72.58], [-133.6, 26.0, 72.58]], 2.2], ["XT60_fusivel", [[-126.39999999999999, 50.0, 72.58], [-126.39999999999999, 56.0, 72.58], [-116.0, 60.0, 80.0], [-113.0, 30.0, 84.0], [-122.0, 6.0, 89.38], [-130.0, -8.0, 89.38], [-152.0, -30.0, 82.0], [-155.0, -40.0, 72.88], [-145.0, -40.0, 72.88]], 2.2], ["Fusivel_chave", [[-115.0, -40.0, 72.88], [-107.0, -40.0, 72.88], [-100.0, -50.0, 84.0], [-90.0, -58.0, 90.0], [-60.0, -60.0, 98.0], [60.0, -60.0, 98.0], [90.0, -58.0, 92.0], [108.0, -85.0, 92.0], [122.0, -118.0, 92.0], [125.0, -123.0, 89.2], [125.0, -135.0, 89.2]], 2.2], ["Chave_WagoPos", [[125.0, -135.0, 96.8], [125.0, -123.0, 96.8], [140.0, -115.0, 88.0], [157.2, -105.9, 72.38], [135.2, -105.9, 72.38], [132.2, -105.9, 72.38]], 2.2], ["XT60_WagoNeg", [[-133.6, 50.0, 72.58], [-133.6, 56.0, 72.58], [-146.0, 40.0, 80.0], [-140.0, 8.0, 89.38], [-135.0, -8.0, 89.38], [-108.0, -52.0, 90.0], [-90.0, -52.0, 92.0], [-60.0, -54.0, 100.0], [60.0, -54.0, 100.0], [90.0, -52.0, 94.0], [130.0, -72.0, 92.0], [155.0, -100.0, 88.0], [152.2, -125.9, 72.38], [132.2, -125.9, 72.38]], 2.2], ["WagoPos_Borne", [[132.2, -100.0, 72.38], [150.2, -100.0, 72.38], [146.0, -116.0, 86.0], [110.0, -132.0, 92.0], [90.0, -132.0, 92.0], [58.0, -146.0, 102.0], [36.0, -157.0, 100.0], [20.0, -162.0, 100.0], [-20.0, -162.0, 100.0], [-36.0, -159.0, 101.0], [-42.93, -150.81, 104.58], [-30.93, -150.81, 96.58], [-17.93, -150.81, 96.58]], 2.2], ["WagoNeg_Borne", [[132.2, -120.0, 72.38], [150.2, -120.0, 72.38], [146.0, -124.0, 86.0], [110.0, -136.0, 92.0], [90.0, -136.0, 92.0], [58.0, -146.0, 102.0], [36.0, -159.5, 100.0], [20.0, -164.5, 100.0], [-20.0, -164.5, 100.0], [-36.0, -161.5, 101.0], [-42.93, -155.89, 104.58], [-30.93, -155.89, 96.58], [-17.93, -155.89, 96.58]], 2.2], ["WagoPos_LMin", [[132.2, -94.1, 72.38], [146.2, -94.1, 72.38], [154.2, -86.1, 86.38], [116.60000000000001, -46.75, 93.97999999999999], [110.60000000000001, -32.75, 85.97999999999999], [110.60000000000001, -32.75, 75.97999999999999]], 1.6], ["WagoNeg_LMin", [[132.2, -114.1, 72.38], [146.2, -114.1, 72.38], [154.2, -106.1, 86.38], [116.60000000000001, -61.25, 93.97999999999999], [110.60000000000001, -47.25, 85.97999999999999], [110.60000000000001, -47.25, 75.97999999999999]], 1.6], ["LMout_PB2pos", [[149.4, -32.75, 75.97999999999999], [149.4, -32.75, 85.97999999999999], [137.4, -32.75, 100.0], [90.0, -45.0, 92.0], [75.12, -24.6, 91.88], [71.12, -24.6, 83.88], [71.12, -24.6, 71.88]], 1.6], ["LMout_PB2neg", [[149.4, -47.25, 75.97999999999999], [149.4, -47.25,Line truncated
Binary file not shown.
@@ -1331,70 +1331,6 @@ LINE
8
CORTE
10
98.2500
20
208.0000
30
0
11
94.7500
21
208.0000
31
0
0
LINE
8
CORTE
10
98.2500
20
208.0000
30
0
11
98.2500
21
230.0000
31
0
0
LINE
8
CORTE
10
98.2500
20
230.0000
30
0
11
94.7500
21
230.0000
31
0
0
LINE
8
CORTE
10
94.7500
20
208.0000
30
0
11
94.7500
21
230.0000
31
0
0
LINE
8
CORTE
10
14.0000
20
276.0000
@@ -1803,70 +1739,6 @@ LINE
8
CORTE
10
187.2500
20
208.0000
30
0
11
183.7500
21
208.0000
31
0
0
LINE
8
CORTE
10
187.2500
20
208.0000
30
0
11
187.2500
21
230.0000
31
0
0
LINE
8
CORTE
10
187.2500
20
230.0000
30
0
11
183.7500
21
230.0000
31
0
0
LINE
8
CORTE
10
183.7500
20
208.0000
30
0
11
183.7500
21
230.0000
31
0
0
LINE
8
CORTE
10
241.0000
20
179.5000
-128
View File
@@ -1331,70 +1331,6 @@ LINE
8
CORTE
10
92.2500
20
202.0000
30
0
11
88.7500
21
202.0000
31
0
0
LINE
8
CORTE
10
92.2500
20
202.0000
30
0
11
92.2500
21
224.0000
31
0
0
LINE
8
CORTE
10
92.2500
20
224.0000
30
0
11
88.7500
21
224.0000
31
0
0
LINE
8
CORTE
10
88.7500
20
202.0000
30
0
11
88.7500
21
224.0000
31
0
0
LINE
8
CORTE
10
8.0000
20
270.0000
@@ -1803,70 +1739,6 @@ LINE
8
CORTE
10
181.2500
20
202.0000
30
0
11
177.7500
21
202.0000
31
0
0
LINE
8
CORTE
10
181.2500
20
202.0000
30
0
11
181.2500
21
224.0000
31
0
0
LINE
8
CORTE
10
181.2500
20
224.0000
30
0
11
177.7500
21
224.0000
31
0
0
LINE
8
CORTE
10
177.7500
20
202.0000
30
0
11
177.7500
21
224.0000
31
0
0
LINE
8
CORTE
10
235.0000
20
173.5000
@@ -86,10 +86,6 @@
<line x1="151.0000" y1="420.5000" x2="151.0000" y2="417.5000"/>
<line x1="151.0000" y1="417.5000" x2="121.0000" y2="417.5000"/>
<line x1="121.0000" y1="420.5000" x2="121.0000" y2="417.5000"/>
<line x1="98.2500" y1="392.0000" x2="94.7500" y2="392.0000"/>
<line x1="98.2500" y1="392.0000" x2="98.2500" y2="370.0000"/>
<line x1="98.2500" y1="370.0000" x2="94.7500" y2="370.0000"/>
<line x1="94.7500" y1="392.0000" x2="94.7500" y2="370.0000"/>
<line x1="14.0000" y1="324.0000" x2="11.0000" y2="324.0000"/>
<line x1="14.0000" y1="324.0000" x2="14.0000" y2="284.0000"/>
<line x1="14.0000" y1="284.0000" x2="11.0000" y2="284.0000"/>
@@ -116,10 +112,6 @@
<line x1="174.0000" y1="264.0500" x2="174.0000" y2="261.0500"/>
<line x1="174.0000" y1="261.0500" x2="164.0000" y2="261.0500"/>
<line x1="164.0000" y1="264.0500" x2="164.0000" y2="261.0500"/>
<line x1="187.2500" y1="392.0000" x2="183.7500" y2="392.0000"/>
<line x1="187.2500" y1="392.0000" x2="187.2500" y2="370.0000"/>
<line x1="187.2500" y1="370.0000" x2="183.7500" y2="370.0000"/>
<line x1="183.7500" y1="392.0000" x2="183.7500" y2="370.0000"/>
<line x1="241.0000" y1="420.5000" x2="211.0000" y2="420.5000"/>
<line x1="241.0000" y1="420.5000" x2="241.0000" y2="417.5000"/>
<line x1="241.0000" y1="417.5000" x2="211.0000" y2="417.5000"/>

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 64 KiB

@@ -86,10 +86,6 @@
<line x1="151.0000" y1="420.5000" x2="151.0000" y2="417.5000"/>
<line x1="151.0000" y1="417.5000" x2="121.0000" y2="417.5000"/>
<line x1="121.0000" y1="420.5000" x2="121.0000" y2="417.5000"/>
<line x1="98.2500" y1="392.0000" x2="94.7500" y2="392.0000"/>
<line x1="98.2500" y1="392.0000" x2="98.2500" y2="370.0000"/>
<line x1="98.2500" y1="370.0000" x2="94.7500" y2="370.0000"/>
<line x1="94.7500" y1="392.0000" x2="94.7500" y2="370.0000"/>
<line x1="14.0000" y1="324.0000" x2="11.0000" y2="324.0000"/>
<line x1="14.0000" y1="324.0000" x2="14.0000" y2="284.0000"/>
<line x1="14.0000" y1="284.0000" x2="11.0000" y2="284.0000"/>
@@ -116,10 +112,6 @@
<line x1="174.0000" y1="264.0500" x2="174.0000" y2="261.0500"/>
<line x1="174.0000" y1="261.0500" x2="164.0000" y2="261.0500"/>
<line x1="164.0000" y1="264.0500" x2="164.0000" y2="261.0500"/>
<line x1="187.2500" y1="392.0000" x2="183.7500" y2="392.0000"/>
<line x1="187.2500" y1="392.0000" x2="187.2500" y2="370.0000"/>
<line x1="187.2500" y1="370.0000" x2="183.7500" y2="370.0000"/>
<line x1="183.7500" y1="392.0000" x2="183.7500" y2="370.0000"/>
<line x1="241.0000" y1="420.5000" x2="211.0000" y2="420.5000"/>
<line x1="241.0000" y1="420.5000" x2="241.0000" y2="417.5000"/>
<line x1="241.0000" y1="417.5000" x2="211.0000" y2="417.5000"/>

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 65 KiB

@@ -113,10 +113,6 @@
<line x1="151.0000" y1="420.5000" x2="151.0000" y2="417.5000"/>
<line x1="151.0000" y1="417.5000" x2="121.0000" y2="417.5000"/>
<line x1="121.0000" y1="420.5000" x2="121.0000" y2="417.5000"/>
<line x1="98.2500" y1="392.0000" x2="94.7500" y2="392.0000"/>
<line x1="98.2500" y1="392.0000" x2="98.2500" y2="370.0000"/>
<line x1="98.2500" y1="370.0000" x2="94.7500" y2="370.0000"/>
<line x1="94.7500" y1="392.0000" x2="94.7500" y2="370.0000"/>
<line x1="14.0000" y1="324.0000" x2="11.0000" y2="324.0000"/>
<line x1="14.0000" y1="324.0000" x2="14.0000" y2="284.0000"/>
<line x1="14.0000" y1="284.0000" x2="11.0000" y2="284.0000"/>
@@ -143,10 +139,6 @@
<line x1="174.0000" y1="264.0500" x2="174.0000" y2="261.0500"/>
<line x1="174.0000" y1="261.0500" x2="164.0000" y2="261.0500"/>
<line x1="164.0000" y1="264.0500" x2="164.0000" y2="261.0500"/>
<line x1="187.2500" y1="392.0000" x2="183.7500" y2="392.0000"/>
<line x1="187.2500" y1="392.0000" x2="187.2500" y2="370.0000"/>
<line x1="187.2500" y1="370.0000" x2="183.7500" y2="370.0000"/>
<line x1="183.7500" y1="392.0000" x2="183.7500" y2="370.0000"/>
<line x1="241.0000" y1="420.5000" x2="211.0000" y2="420.5000"/>
<line x1="241.0000" y1="420.5000" x2="241.0000" y2="417.5000"/>
<line x1="241.0000" y1="417.5000" x2="211.0000" y2="417.5000"/>

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 68 KiB