molecule
BQ25792 Charger
Public Made by Adomby adom
Buck-boost 1S-4S battery charger board (TI BQ25792) with 14 Adom machine pins, by Adonis
← Commit history
per-part components: classify each mesh by XY vs the 14 CPL machine-pin positions -> machine pins anchored, all else in Components (source-of-truth split, no more merged-blob guessing)
4 files changed
+35−16
grp-components-parts.glb.pngadded⋯ 1 unchanged line ⋯
package.json+1−1@@ -2,7 +2,7 @@ "slug": "bq25792-charger", "title": "BQ25792 Charger", "type": "component",- "version": "0.1.50",+ "version": "0.1.51", "description": "BQ25792 Charger - buck-boost 1S-4S battery charger board by Adonis, with real 3D copper traces and measured stackup.", "tags": [ "hardware"
page.json+10−3@@ -4,9 +4,16 @@ "slug": "bq25792-charger", "title": "BQ25792 Charger", "brief": "Buck-boost 1S-4S battery charger board (TI BQ25792) with 14 Adom machine pins, by Adonis",- "version": "0.1.50",+ "version": "0.1.51", "tags": [- "hardware"+ "adom",+ "adom-modular",+ "component",+ "charger",+ "battery",+ "bq25792",+ "power",+ "usb-c" ], "license": "proprietary", "component": {@@ -49,7 +56,7 @@ "email": "[email protected]" }, "visibility": "public",- "description": "BQ25792 Charger - buck-boost 1S-4S battery charger board by Adonis, with real 3D copper traces and measured stackup.",+ "description": "BQ25792 Charger - a buck-boost 1S-4S battery charger board (Texas Instruments BQ25792) designed by Adonis in Fusion 360, with 14 Adom machine pins for the modular stack. Interactive colored 3D model, schematic and layout views.", "dependencies": {}, "files": [ "README.md",
readme.html+24−12@@ -228,24 +228,36 @@ exported bodies + design rules.</p> async function build(){ const sc=viewer.getScene(); SC=sc; set("loading board...");- // components via plain AppendAsync like every other group - the bundle's loadModel- // reparents/normalizes its model under a transformed root, which swallows our- // local z offsets (components neither animated nor highlighted).- const compBytes=await loadPngBytes(R+"grp-components.glb.png");+ // PER-PART components (non-join export keeps each occupant as its own mesh). Classify by+ // XY against the 14 machine-pin positions from the CPL: a mesh whose footprint covers an+ // MP position is a machine pin -> anchored layer; everything else -> Components.+ const MP=[[1.2,1.2],[1.2,25.2],[49.2,25.2],[49.2,1.2],[19.2,1.2],[21.2,1.2],[23.2,1.2],+ [25.2,1.2],[27.2,1.2],[19.2,15.2],[19.2,17.2],[19.2,11.2],[19.2,9.2]].map(p=>[p[0]*mm,p[1]*mm]);+ const compBytes=await loadPngBytes(R+"grp-components-parts.glb.png"); let pre=sc.meshes.length; await B().SceneLoader.AppendAsync("", new File([compBytes],"components.glb",{type:"model/gltf-binary"}), sc, null, ".glb"); try{ if(viewer.toggleAxes) viewer.toggleAxes("world",false); }catch(e){}- // split: THROUGH-HOLE = geometry penetrating below the board bottom (pins/contacts in- // vias) - anchored, never animated. SMD = everything seated on top. {- const all=sc.meshes.slice(pre), smd=[], tht=[];+ const all=sc.meshes.slice(pre).filter(m=>m.getTotalVertices&&m.getTotalVertices()>0), pins=[], comps=[]; all.forEach(function(m){- let below=false;- try{ m.computeWorldMatrix(true); below=m.getBoundingInfo().boundingBox.minimumWorld.z < -0.0005; }catch(e){}- (below?tht:smd).push(m);+ let isPin=false;+ try{+ m.computeWorldMatrix(true);+ const bb=m.getBoundingInfo().boundingBox, mn=bb.minimumWorld, mx=bb.maximumWorld;+ const cx=(mn.x+mx.x)/2, cy=(mn.y+mx.y)/2;+ const tall=(mx.z-mn.z)>1.8*mm; // machine pins stand tall+ for(const p of MP){+ if(cx>=mn.x-0.5*mm && Math.abs(cx-p[0])<1.6*mm && Math.abs(cy-p[1])<1.6*mm){+ // footprint covers an MP location+ if(mn.x-1*mm<=p[0]&&mx.x+1*mm>=p[0]&&mn.y-1*mm<=p[1]&&mx.y+1*mm>=p[1]){ isPin=true; break; }+ }+ }+ if(!isPin && tall && mn.z< -0.3*mm){ isPin=true; } // tall through-hole = pin/contact+ }catch(e){}+ (isPin?pins:comps).push(m); });- attach("components", smd);- attach("tht", tht);+ attach("components", comps);+ attach("tht", pins); } for (const g of [["grp-cu1.glb.png","cu1"],["grp-cu16.glb.png","cu16"]]){