app
Fusion - the Fusion 360 Bridge
Public Made by Adomby adom
Drive Autodesk Fusion 360 from the cloud via Adom Bridge: component libraries, IPC package generation, board layout, exports (STEP/Gerbers/BOM/CPL), fast APS cloud search, and parametric modeling.
← Commit history
Publish 1.11.12
11 files changed
+149−19
.insiders-stage/fusion-bridge/version.json+4−4@@ -1,10 +1,10 @@ { "manifest_version": 1, "name": "fusion360",- "version": "1.11.11",- "url": "https://wiki.adom.inc/download/adom/fusion-bridge/1.11.11/adom-bridge-fusion-v1.11.11.zip",- "sha256": "33aa2c3e45419675bba18a139a503a0564f3c520ea926409c22799474de6803b",- "size": 6551083,+ "version": "1.11.12",+ "url": "https://wiki.adom.inc/download/adom/fusion-bridge/1.11.12/adom-bridge-fusion-v1.11.12.zip",+ "sha256": "8bdf2b1bcd5eb1dd7d0315b40a28c0e535fab2baa43850c54393b9aed9756b9d",+ "size": 6553960, "verbPrefixes": [ "fusion_" ],
.release-page-head+1−1@@ -1 +1 @@-8b746b0bcf4d9c516e68e58a92ddc1188712b7ef+5e6f47a958492817f099304487bc756a6e38e8e3
install.shpage.json+25−9@@ -11,10 +11,6 @@ "uninstall": "./uninstall.sh" }, "tags": [- "ab",- "bridge",- "fusion",- "desktop-app", "fusion360", "autodesk", "cad",@@ -80,9 +76,6 @@ "add a 3d model to a component", "make a fusion 360 library with 3d", "set up the fusion bridge",- "fusion dashboard",- "fusion status page",- "open the fusion launch page", "aps not configured", "share aps client id across my org", "set up fusion cloud search for my company",@@ -115,5 +108,28 @@ "label": "Part volume", "prompt": "How much material does each printed part in this assembly use?" }- ]-}+ ],+ "agent_permissions": {+ "allow_bash": [],+ "allow": [+ "adom-desktop-fusion-bridge read-only verbs (via the adom-bridge CLI): fusion_readiness, fusion_get_app_state, fusion_addin_status, fusion_check_dialogs - state queries; they change nothing.",+ "adom-desktop-fusion-bridge read-only verbs: fusion_alerts (reads Fusion's own log for toasts), fusion_document_info, fusion_window_info, fusion_board_info, fusion_library_parts - inspect only.",+ "adom-desktop-fusion-bridge read-only verbs: fusion_prove_result (a persisted run report), fusion_plan_library_import (report-only preflight), fusion_list_cloud_projects, fusion_describe.",+ "adom-desktop-fusion-bridge evidence captures fusion_screenshot_fusion and fusion_capture_library_views read pixels and write local image files only."+ ],+ "soft_deny": [+ "adom-desktop-fusion-bridge lifecycle verbs fusion_stop, fusion_kill, fusion_restart_for_addin close or kill the Fusion application - keep the human prompt.",+ "adom-desktop-fusion-bridge fusion_install_fusion silently installs Autodesk Fusion on the user's machine.",+ "adom-desktop-fusion-bridge fusion_cleanup_cloud_files deletes files from the user's Autodesk cloud hub.",+ "adom-desktop-fusion-bridge managed-library verbs (fusion_managed_library_push/pull/create/link/unlink) publish to or overwrite the user's library.io libraries."+ ],+ "environment": [+ "adom-desktop-fusion-bridge is the Fusion 360 bridge for Adom Bridge; its fusion_* verbs are invoked through the adom-bridge CLI and drive Autodesk Fusion on the user's own desktop.",+ "adom-desktop-fusion-bridge desktop actions also pass Adom Bridge's own human-approval gate (caller identity, per-call reason, Activity Log) - a container approval is the first of two gates."+ ]+ },+ "author": {+ "name": "John Lauer",+ "email": "[email protected]"+ }+}
rust/Cargo.lock+5−5@@ -10,7 +10,7 @@ checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "adom-fusion-bridge"-version = "1.11.11"+version = "1.11.12" dependencies = [ "base64", "chrono",@@ -273,7 +273,7 @@ dependencies = [ [[package]] name = "fusion-core"-version = "1.11.11"+version = "1.11.12" dependencies = [ "serde", "serde_json",@@ -283,7 +283,7 @@ dependencies = [ [[package]] name = "fusion-lbr"-version = "1.11.11"+version = "1.11.12" dependencies = [ "regex", "roxmltree",@@ -295,14 +295,14 @@ dependencies = [ [[package]] name = "fusion-os-mac"-version = "1.11.11"+version = "1.11.12" dependencies = [ "fusion-core", ] [[package]] name = "fusion-os-win"-version = "1.11.11"+version = "1.11.12" dependencies = [ "fusion-core", "windows-sys 0.59.0",
rust/bridge/src/routing_script.py+114@@ -131,6 +131,65 @@ def state(board, meta): 'drc':{'checked':False,'note':'Use fusion_routing_drc for a fresh Autodesk DRC'}} +def shoelace(pts):+ a=0.0+ for i in range(len(pts)):+ x1,y1=pts[i]; x2,y2=pts[(i+1)%len(pts)]; a+=x1*y2-x2*y1+ return abs(a)/2+++def pours(board):+ """Every Fusion pour on the board: net, layer, outline, isolate, rank, and its filled area+ from Fusion's own fill (polygonfilldetails: each island's outline minus its holes)."""+ out=[]+ for s in board.findall('signals/signal'):+ for p in list(s.findall('polygonpour'))+list(s.findall('polygon')):+ if p.tag=='polygonpour':+ ol=p.find('polygonoutlineobjects'); outline=[[float(v.get('x')),float(v.get('y'))] for v in (ol.findall('vertex') if ol is not None else [])]+ else:+ outline=[[float(v.get('x')),float(v.get('y'))] for v in p.findall('vertex')]+ filled=0.0; islands=0+ fd=p.find('polygonfilldetails')+ if fd is not None:+ for sh in fd.findall('polygonshape'):+ seg=sh.find('polygonoutlinesegments')+ if seg is None: continue+ a=shoelace([(float(v.get('x')),float(v.get('y'))) for v in seg.findall('vertex')])+ for h in sh.iter('polygonholesegments'):+ a-=shoelace([(float(v.get('x')),float(v.get('y'))) for v in h.findall('vertex')])+ filled+=a; islands+=1+ out.append({'net':s.get('name'),'layer':int(p.get('layer','1')),'outline':outline,+ 'isolate':float(p.get('isolate','0')),'rank':int(p.get('rank','1')),+ 'filledMm2':round(filled,3),'islands':islands,'filled':fd is not None})+ return out+++def pour_state(board):+ rows=pours(board); by_layer={}; by_net={}+ for r in rows:+ by_layer[str(r['layer'])]=round(by_layer.get(str(r['layer']),0)+r['filledMm2'],3)+ by_net[r['net']]=round(by_net.get(r['net'],0)+r['filledMm2'],3)+ return {'pours':rows,'filledAreaByLayerMm2':by_layer,'filledAreaByNetMm2':by_net,+ 'unfilled':[r['net'] for r in rows if not r['filled']]}+++def same_outline(a,b,tol=0.01):+ if len(a)!=len(b): return False+ return all(abs(p[0]-q[0])<=tol and abs(p[1]-q[1])<=tol for p,q in zip(a,b))+++def element_rows(board):+ return {el.get('name'):{'x':float(el.get('x')),'y':float(el.get('y')),'rot':el.get('rot','R0')} for el in board.findall('elements/element')}+++def rot_of(v):+ if isinstance(v,(int,float)) and not isinstance(v,bool):+ d=float(v)%360.0+ return 'R'+('%g'%d)+ if isinstance(v,str) and re.fullmatch(r'M?R-?[\d.]+',v): return v+ fail('invalid_geometry','rotation must be degrees or an EAGLE rotation like R90 / MR180')++ def point_distance(p,a,b): dx,dy=b[0]-a[0],b[1]-a[1] t=max(0,min(1,((p[0]-a[0])*dx+(p[1]-a[1])*dy)/(dx*dx+dy*dy))) if dx or dy else 0@@ -323,6 +382,61 @@ def handle(app,args,action): report=native_drc(app) _,board,meta=snapshot(app,args) return {'success':report['checked'],**state(board,meta),'drc':report}+ if action=='pour_state':+ return {'success':True,'mutated':False,**meta,**pour_state(board)}+ if action=='move_parts':+ # one MOVE (and ROTATE) per part, absolute; each its own undo step and its own moment on camera+ want=args.get('parts')+ if not isinstance(want,list) or not want: fail('invalid_args','parts must be a non-empty list of {ref,x,y,rotation}')+ have=element_rows(board); done=[]+ for p in want:+ ref=identifier(p.get('ref')); x=number(p.get('x')); y=number(p.get('y'))+ if ref not in have: fail('unknown_part','No element named %s on the board'%ref)+ rot=rot_of(p.get('rotation',have[ref]['rot']))+ cmd="MOVE '%s' (%.6fmm %.6fmm); ROTATE =%s '%s';"%(ref,x,y,rot,ref)+ attempted=True; app.executeTextCommand('Electron.run '+cmd); commands.append(cmd); done.append(ref)+ app.executeTextCommand('Electron.run RATSNEST;')+ app.executeTextCommand('Electron.ImmediateRepaint /full')+ _,after,after_meta=snapshot(app,args); got=element_rows(after); bad=[]+ for p in want:+ g=got.get(p['ref']); r=rot_of(p.get('rotation',g['rot'] if g else 'R0'))+ if not g or abs(g['x']-p['x'])>0.001 or abs(g['y']-p['y'])>0.001 or g['rot'].lstrip('S')!=r: bad.append({'ref':p['ref'],'want':[p['x'],p['y'],r],'got':g})+ return {'success':not bad,'mutated':True,'verified':not bad,'errorCode':None if not bad else 'readback_mismatch',+ 'mismatched':bad,'moved':done,'commands':commands,**state(after,after_meta)}+ if action=='place_vias':+ want=args.get('vias')+ if not isinstance(want,list) or not want: fail('invalid_args','vias must be a non-empty list of {net,x,y,diameter,drill}')+ for v in want:+ cmd="CHANGE DRILL %.6fmm; VIA '%s' %.6fmm ROUND 1-16 (%.6fmm %.6fmm);"%(number(v.get('drill',0.3),True),identifier(v.get('net')),number(v.get('diameter',0.6),True),number(v.get('x')),number(v.get('y')))+ attempted=True; app.executeTextCommand('Electron.run '+cmd); commands.append(cmd)+ app.executeTextCommand('Electron.run RATSNEST;')+ _,after,after_meta=snapshot(app,args); vs=objects(after)[3]+ missing=[v for v in want if not any(o['net']==v['net'] and abs(o['at'][0]-v['x'])<0.001 and abs(o['at'][1]-v['y'])<0.001 for o in vs)]+ return {'success':not missing,'mutated':True,'verified':not missing,'errorCode':None if not missing else 'readback_mismatch','missing':missing,'commands':commands,**state(after,after_meta)}+ if action=='apply_pours':+ # draw each planned pour that is not already on the board (same net, layer and outline),+ # then RATSNEST fills them; the reply is Fusion's own fill per pour+ want=args.get('pours')+ if not isinstance(want,list) or not want: fail('invalid_args','pours must be a non-empty list of {net,layer,points,isolate,rank}')+ existing=pours(board); added=[]; kept=[]+ for p in want:+ net=identifier(p.get('net')); layer=int(p.get('layer',1))+ if layer not in (1,16): fail('invalid_geometry','pour layer must be 1 (top) or 16 (bottom)')+ pts=[[number(a),number(b)] for a,b in p.get('points') or []]+ if len(pts)<3: fail('invalid_geometry','a pour needs at least three points')+ if any(e['net']==net and e['layer']==layer and same_outline(e['outline'],pts) for e in existing): kept.append(net); continue+ width=number(p.get('width',0.25),True); iso=number(p.get('isolate',0.25),True); rank=int(p.get('rank',1))+ if not 1<=rank<=6: fail('invalid_args','rank must be 1..6 (1 fills first)')+ path=' '.join('(%.6fmm %.6fmm)'%(x,y) for x,y in pts+[pts[0]])+ cmd=("CHANGE ISOLATE %.6fmm; CHANGE RANK %d; CHANGE POUR SOLID; CHANGE ORPHANS %s; CHANGE THERMALS %s; "+ "LAYER %d; POLYGON '%s' %.6fmm %s;")%(iso,rank,'ON' if p.get('orphans') else 'OFF','OFF' if p.get('thermals') is False else 'ON',layer,net,width,path)+ attempted=True; app.executeTextCommand('Electron.run '+cmd); commands.append(cmd); added.append(net)+ app.executeTextCommand('Electron.run RATSNEST;')+ app.executeTextCommand('Electron.ImmediateRepaint /full')+ _,after,after_meta=snapshot(app,args); ps=pour_state(after)+ missing=[p['net'] for p in want if not any(e['net']==p['net'] and e['layer']==int(p.get('layer',1)) and same_outline(e['outline'],[[float(a),float(b)] for a,b in p['points']]) for e in ps['pours'])]+ return {'success':not missing,'mutated':bool(added),'verified':not missing,'errorCode':None if not missing else 'readback_mismatch',+ 'added':added,'kept':kept,'missing':missing,'commands':commands,**ps,**state(after,after_meta)} if action!='route_net': fail('unknown_action','Unknown routing action') candidate=plan(board,args) if 'dryRun' in args and not isinstance(args['dryRun'],bool): fail('invalid_args','dryRun must be boolean')
tests/reports/daily-cron-2026-10-05.logaddedtools/check-naming.shtools/check-portable.shtools/promote.shtools/release.sh