← Commit history

one shiny copper material for all four copper layers (inner gerber layers keep artwork as alpha cutout only)

John Lauer ·cd8dcff8d8 ·3mo ago ·parent 1c1f48d
3 files changed +33−11
package.json+1−1
@@ -2,7 +2,7 @@   "slug": "bq25792-charger",   "title": "BQ25792 Charger",   "type": "component",-  "version": "0.1.30",+  "version": "0.1.31",   "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.30",+  "version": "0.1.31",   "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+22−7
@@ -190,6 +190,15 @@ exported bodies + design rules.</p>     }     reg(compMeshes, 45*mm-1.582*mm);  // +7.5 slot: pins hang 7.8mm below seats and must clear the 30mm silk plane +    // ONE shiny copper material for ALL four copper layers (outer 3D bodies + inner+    // gerber layers) so every copper renders identically.+    const copperMat=new (B().StandardMaterial)("copper_shared",sc);+    copperMat.diffuseColor=new (B().Color3)(0.72,0.34,0.10);+    copperMat.specularColor=new (B().Color3)(1.0,0.78,0.45);+    copperMat.specularPower=48;+    copperMat.backFaceCulling=false;+    LAYERS.slice(0,2).forEach(L=>L.meshes.forEach(m=>{ if(m.material) m.material=copperMat; }));+     // 3) FR4 sublayers: clones of the REAL Board body (actual drill holes), z-scaled to     // each sublayer's thickness. Split fitted to the measured 1.516mm (Fusion design     // rules hold 2-layer defaults); matches the standard JLC 4-layer stack.@@ -215,14 +224,20 @@ exported bodies + design rules.</p>     boardMeshes.forEach(m=>{ m.setEnabled(false); });      // 4) gerber quads: silk, mask, inner copper-    function quad(name, tex, zc, delta, mirror){+    function quad(name, tex, zc, delta, mirror, copper){       const p=B().MeshBuilder.CreatePlane(name,{width:50.4*mm,height:26.4*mm},sc);       p.position=new (B().Vector3)(25.2*mm,13.2*mm,zc);-      p.rotation.x=0; // plane faces +Z in zUp after billboard? set below-      const mat=new (B().StandardMaterial)(name+"_m",sc);       const t=new (B().Texture)(R+tex,sc,false,false);-      t.hasAlpha=true; mat.diffuseTexture=t; mat.opacityTexture=t; mat.emissiveTexture=t;-      mat.backFaceCulling=false; mat.disableLighting=false;+      t.hasAlpha=true;+      let mat;+      if(copper){+        mat=copperMat.clone(name+"_cu");        // identical shiny copper, gerber = cutout only+        mat.opacityTexture=t; t.getAlphaFromRGB=false;+      }else{+        mat=new (B().StandardMaterial)(name+"_m",sc);+        mat.diffuseTexture=t; mat.opacityTexture=t; mat.emissiveTexture=t;+      }+      mat.backFaceCulling=false;       p.material=mat;       if(mirror){ p.scaling.x=-1; }       reg([p], delta);@@ -230,8 +245,8 @@ exported bodies + design rules.</p>     }     quad("silk_top","layer-silk-top.png", 1.600*mm, 30*mm-1.600*mm,false);     quad("mask_top","layer-mask-top.png", 1.592*mm, 24*mm-1.592*mm,false);-    quad("cu_l2","layer-cu-l2.png",       1.2985*mm, 6*mm-1.2985*mm,false);-    quad("cu_l15","layer-cu-l15.png",     0.2175*mm,-6*mm-0.2175*mm,false);+    quad("cu_l2","layer-cu-l2.png",       1.2985*mm, 6*mm-1.2985*mm,false,true);+    quad("cu_l15","layer-cu-l15.png",     0.2175*mm,-6*mm-0.2175*mm,false,true);     quad("mask_bot","layer-mask-bot.png",-0.075*mm,-24*mm+0.075*mm,true);     quad("silk_bot","layer-silk-bot.png",-0.083*mm,-30*mm+0.083*mm,true);