component
NCD0402G1
Public Made by Adomby adom
Foshan NationStar Optoelectronics LED Indication - Discrete, 0402. Pinout cross-checked by two models against the datasheet, KiCad symbol/footprint/3D.
← Commit history
Correct resistor hero binding to LED; add gentle one-shot preview and descriptive component identity
6 files changed
+111−15
HERO-PROVENANCE.mdadded+16@@ -0,0 +1,16 @@+# NationStar NCD0402G1 - Green 0402 LED: hero provenance and audit++Authored by Codex Astra for Adom, 2026-09-16. New animation code is CC0-1.0; upstream body licensing remains in LED-SOURCE-LICENSE.md.++Input: `ncd0402g1-mpn-led-on.glb`, SHA-256 `50dd107f690fcaa786ffd6cf3b5451f53bf6faf2c125e57c33acb7776638986f`.+Output: `ncd0402g1-hero.glb`, SHA-256 `22967e48439044d97fb6ab3d8b8e63940064049fd793e5c00bf9dd730ade8e11`.++[Generator](generate-hero.py) adds standard glTF rotation and KHR_animation_pointer channels for material emission, base color and KHR_lights_punctual intensity. Ten seconds, one fade down/up, 36-degree eased turn ending at +18 degrees, final light on. No additional spill light. Model units remain metres, Adom Z-up; source physical geometry is unchanged. Initial/static frame is lit. Use static downloads for engineering assemblies.++[Base geometry and optical assumptions](LED-STATES.md). The source remains a generic KiCad LED; these changes do not establish exact manufacturer package fidelity or electrical/thermal qualification.++## Skills audit++Reviewed current wiki-component, wiki-publish-safely, wiki-hero, adom-lbr-component-fidelity and chip-thumbnailer guidance. Corrected descriptive title in both manifests, manufacturer metadata, generic prose, explicit asset bindings and one-play viewer configuration. Preserved source files and licenses.++Remaining: manufacturer-qualified body/polarity comparison, full symbol/footprint/native-tool parity, annotated footprint artwork and shared outline/LOD caches have not been established by this hero repair. The original GLB is explicitly rejected as a resistor representation. No claim that every component-creation acceptance criterion has passed.
README.md+10−2@@ -1,6 +1,6 @@-# NCD0402G1+# NationStar NCD0402G1 - Green 0402 LED -Foshan NationStar Optoelectronics NCD0402G1 (led, 0402). Used on the Adom workcell control boards.+Foshan NationStar Optoelectronics NCD0402G1 (led, 0402). - Manufacturer: Foshan NationStar Optoelectronics - Package: 0402@@ -23,3 +23,11 @@ Foshan NationStar Optoelectronics NCD0402G1 (led, 0402). Used on the Adom workce [Optional lit LED STEP/GLB variants, independent light/MPN groups, previews and provenance](LED-STATES.md)++## 3D preview and model status++The main viewer now uses the LED hero derivative: one slow fade off and on, a gentle 36-degree turn, then it stays lit and still after 10 seconds. Replay is optional. The MPN is an AI-added visual identification overlay, not factory marking. The single embedded spotlight is illustrative, not calibrated photometry.++**Correction:** the original `ncd0402g1.glb` contains a mesh named `R_0402_1005Metric`, a resistor model, and is not a valid LED representation. It is retained only for history; do not use it. The original STEP remains unverified. The replacement is based on generic KiCad LED_0402_1005Metric geometry with retained upstream licensing, not a manufacturer-qualified package model. Exact body, terminal and polarity fidelity still require manufacturer drawing comparison.++Use the static [lit GLB](ncd0402g1-mpn-led-on.glb) or [unlit GLB](ncd0402g1-mpn-led-off.glb) for board assemblies; the [hero GLB](ncd0402g1-hero.glb) is presentation-only. [Hero generation and audit](HERO-PROVENANCE.md).
generate-hero.pyadded+29@@ -0,0 +1,29 @@+import pathlib,json,struct,math,hashlib+B=pathlib.Path(__file__).resolve().parent+for slug in ['ncd0402g1','ncd0402b1']:+ p=B/slug/(slug+'-mpn-led-on.glb');raw=p.read_bytes();n=struct.unpack_from('<I',raw,12)[0];j=json.loads(raw[20:20+n]);bl=bytearray(raw[28+n:]);bl=bl[:j['buffers'][0]['byteLength']]+ def acc(vals,typ):+ nonlocal_dummy=0+ while len(bl)%4:bl.append(0)+ off=len(bl);flat=[x for v in vals for x in (v if isinstance(v,list) else [v])];bl.extend(struct.pack('<'+'f'*len(flat),*flat));vi=len(j['bufferViews']);j['bufferViews'].append({'buffer':0,'byteOffset':off,'byteLength':len(flat)*4});ai=len(j['accessors']);a={'bufferView':vi,'componentType':5126,'count':len(vals),'type':typ}+ if typ=='SCALAR':a.update(min=[min(vals)],max=[max(vals)])+ j['accessors'].append(a);return ai+ times=[i/20 for i in range(201)];ti=acc(times,'SCALAR');a={'name':'Gentle LED preview - one play then lit and still','samplers':[],'channels':[]}+ def chan(vals,typ,target):+ si=len(a['samplers']);a['samplers'].append({'input':ti,'output':acc(vals,typ),'interpolation':'LINEAR'});a['channels'].append({'sampler':si,'target':target})+ def pointer(vals,typ,path):chan(vals,typ,{'path':'pointer','extensions':{'KHR_animation_pointer':{'pointer':path}}})+ def smooth(t):t=max(0,min(1,t));return t*t*(3-2*t)+ # Lit at initial/static frame, fade down once and gently back up, then hold.+ level=[1-smooth((t-1)/2.5) if t<3.5 else smooth((t-4)/3) for t in times]+ root=len(j['nodes']);roots=j['scenes'][j.get('scene',0)]['nodes'];j['nodes'].append({'name':'Adom.Hero.Presentation','children':roots,'extras':{'adomRole':'hero-presentation','nonphysical':True}});j['scenes'][j.get('scene',0)]['nodes']=[root]+ angles=[math.radians(-18+36*smooth(t/8)) for t in times]+ chan([[0,0,math.sin(v/2),math.cos(v/2)] for v in angles],'VEC4',{'node':root,'path':'rotation'})+ for i,m in enumerate(j['materials']):+ if m.get('name','').startswith('Adom.LED.Emissive'):+ rgb=m['emissiveFactor'];pointer([[x*f for x in rgb] for f in level],'VEC3',f'/materials/{i}/emissiveFactor')+ pointer([[(.12*(1-f)+x*f) for x in rgb]+[1] for f in level],'VEC4',f'/materials/{i}/pbrMetallicRoughness/baseColorFactor')+ light=j['extensions']['KHR_lights_punctual']['lights'][0];pointer([light['intensity']*f for f in level],'SCALAR','/extensions/KHR_lights_punctual/lights/0/intensity')+ j['animations']=[a];j.setdefault('extensionsUsed',[]).append('KHR_animation_pointer');j['buffers'][0]['byteLength']=len(bl)+ j['asset']['extras']['heroPreview']={'seconds':10,'repeat':1,'final':'LED on, rotation stopped','source':p.name,'sourceSha256':hashlib.sha256(raw).hexdigest(),'notice':'Presentation-only animation; use static LED variants in boards. Generic KiCad LED body, not manufacturer-qualified geometry.'}+ js=json.dumps(j,separators=(',',':')).encode();js+=b' '*(-len(js)%4);bl+=b'\0'*(-len(bl)%4);out=struct.pack('<III',0x46546c67,2,28+len(js)+len(bl))+struct.pack('<II',len(js),0x4e4f534a)+js+struct.pack('<II',len(bl),0x004e4942)+bl+ dest=B/slug/(slug+'-hero.glb');dest.write_bytes(out);print(dest,len(out))
ncd0402g1-hero.glbadded⋯ 1 unchanged line ⋯
package.json+27−6@@ -1,27 +1,48 @@ { "slug": "ncd0402g1",- "title": "NCD0402G1",+ "title": "NationStar NCD0402G1 - Green 0402 LED", "version": "1.0.0", "type": "component", "category": "other",- "description": "Foshan NationStar Optoelectronics NCD0402G1 \u2014 -30\u2103~+85\u2103 130\u00b0 2.6V~3.6V 20mA 270mcd 515nm~530nm 520nm 72mW Discrete Diode Emerald Green 0402 LED Indication - Discrete ROHS. Used on Adom workcell control boards.",+ "description": "NationStar NCD0402G1 green 0402 indicator LED. Reusable CAD with explicit provenance and an illustrative illuminated 3D preview.", "tags": [ "component", "led",- "0402"+ "0402",+ "green",+ "nationstar" ], "component": { "mpn": "NCD0402G1", "manufacturer": "Foshan NationStar Optoelectronics",- "category": "led",+ "category": "Optoelectronics", "package": "0402", "datasheet": "https://www.lcsc.com/datasheet/lcsc_datasheet_2008201033_Foshan-NationStar-Optoelectronics-NCD0402G1_C130723.pdf",- "lcsc": "C130723"+ "lcsc": "C130723",+ "parts": {+ "symbol": "ncd0402g1.kicad_sym",+ "footprint": "ncd0402g1.kicad_mod",+ "model_3d": "ncd0402g1-hero.glb",+ "step": "ncd0402g1-mpn-led-on.step"+ },+ "viewer_3d": {+ "ground": false,+ "animate": true,+ "repeat": 1,+ "shadows": false,+ "tooltips": "authored"+ } }, "dependencies": {}, "hero": { "headline": "NCD0402G1", "subhead": "led \u00b7 0402 \u00b7 Foshan NationStar Optoelectronics", "screenshot": "screenshots/hero.png"- }+ },+ "brief": "NationStar NCD0402G1 green 0402 indicator LED. Reusable CAD with explicit provenance and an illustrative illuminated 3D preview.",+ "discovery_triggers": [+ "NCD0402G1",+ "NationStar green 0402 LED",+ "green indicator LED"+ ] }
page.json+29−7@@ -2,16 +2,32 @@ "slug": "ncd0402g1", "version": "1.0.0", "type": "component",- "description": "Everlight NCD0402G1 — 20mA 100mcd~270mcd 515nm~530nm -30℃~+85℃ Emerald 130° 72mW 2.6V~3.6V 0402 LED Indication - Discrete ROHS",+ "description": "NationStar NCD0402G1 green 0402 indicator LED. Reusable CAD with explicit provenance and an illustrative illuminated 3D preview.", "tags": [ "component",- "jlcpcb",- "other"+ "led",+ "0402",+ "green",+ "nationstar" ], "component": { "mpn": "NCD0402G1",- "manufacturer": "Everlight",- "category": "Optoelectronics"+ "manufacturer": "Foshan NationStar Optoelectronics",+ "category": "Optoelectronics",+ "package": "0402",+ "parts": {+ "symbol": "ncd0402g1.kicad_sym",+ "footprint": "ncd0402g1.kicad_mod",+ "model_3d": "ncd0402g1-hero.glb",+ "step": "ncd0402g1-mpn-led-on.step"+ },+ "viewer_3d": {+ "ground": false,+ "animate": true,+ "repeat": 1,+ "shadows": false,+ "tooltips": "authored"+ } }, "dependencies": {}, "hero": {@@ -27,6 +43,12 @@ "email": "[email protected]" }, "kind": "component",- "brief": "NationStar NCD0402G1 green 0402 LED; optional MPN-marked and illuminated STEP/GLB variants with documented provenance",- "updated_at": "2026-09-16T17:10:40.431Z"+ "brief": "NationStar NCD0402G1 green 0402 indicator LED. Reusable CAD with explicit provenance and an illustrative illuminated 3D preview.",+ "updated_at": "2026-09-16T17:10:40.431Z",+ "title": "NationStar NCD0402G1 - Green 0402 LED",+ "discovery_triggers": [+ "NCD0402G1",+ "NationStar green 0402 LED",+ "green indicator LED"+ ] }