component
Sunon FG-4 40 mm fan guard
Public Made by Adomby adom
Metal fan guard with 32 mm mounting pitch; approximate drawing-led mechanical assets.
main
John Lauer
Correct guard support geometry to 5 mm height and clear mounting hardware; include Fusion library
fa540fc
8d ago
"""Independent, approximate drawing-led Sunon FG-04 guard. No manufacturer CAD."""
from pathlib import Path
import json,hashlib
import cadquery as cq
O=Path(__file__).resolve().parent
parts=[]
for r in [8,13.6]:parts.append(cq.Solid.makeTorus(r,.8,cq.Vector(0,0,4.2)))
for x in [-16,16]:
for y in [-16,16]:
parts.append(cq.Solid.makeTorus(2.8,.8,cq.Vector(x,y,.8)))
start=cq.Vector(x*(1-2.8/(16*2**.5)),y*(1-2.8/(16*2**.5)),.8)
pts=[cq.Vector(x*(1-4.5/(16*2**.5)),y*(1-4.5/(16*2**.5)),.8),cq.Vector(x*.70,y*.70,.8),cq.Vector(x*.45,y*.45,4.2),cq.Vector(x*.30,y*.30,4.2)]
e=cq.Edge.makeBezier(pts)
parts.append(cq.Workplane(cq.Plane(origin=start,normal=e.tangentAt(0))).circle(.8).sweep(cq.Wire.assembleEdges([cq.Edge.makeLine(start,pts[0]),e]),isFrenet=True).val())
a=cq.Assembly(name='Sunon_FG4_APPROXIMATE_DRAWING_LED')
for i,s in enumerate(parts):
assert s.isValid();a.add(s,name=f'IllustrativeWire_{i}',color=cq.Color(.65,.69,.72))
from OCP.Bnd import Bnd_Box
from OCP.BRepBndLib import BRepBndLib
b=Bnd_Box(); BRepBndLib.AddOptimal_s(cq.Compound.makeCompound(parts).wrapped,b,False,False)
bounds=b.Get(); assert bounds[2]>=-1e-6 and bounds[5]<=5+1e-6,bounds
a.save(str(O/'FG-4-approximate.step'))
p={'schemaVersion':1,'mpn':'FG-4','manufacturer':'Sunon','status':'incomplete-drawing-led-model','origin':'independently drawn from dimensioned manufacturer sheet; unspecified geometry illustrative','sourceUrl':'https://www.sunon.com/eu/MANAGE/Docs/PRODUCT/338/380/metal%20filter%20guard.pdf','sourceDrawingLabel':'FG-04 For 40mm Fan','sourcePage':1,'sourceSha256':'65d846ecd0413d24fba82d2fa773c7384e244ef980510335199d1fed87b1becc','retrievedOn':'2026-10-12','specifiedMm':{'mountingPitch':32,'mountingOpeningDiameter':4,'wireDiameter':1.6,'overallHeight':5},'tolerances':'No applicable tolerances identified on this sheet; never treat nominal dimensions as guaranteed limits.','inferredMm':{'ringCenterRadii':[8,13.6],'mountingEyeCenterRadius':2.8,'ringCenterHeight':4.2,'eyeCenterHeight':.8},'omitted':['Exact wire bend profile and weld geometry','Physical coating and manufacturing tolerances','Guard compliance and strength qualification'],'verifiedOptimalBoundsMm':bounds,'generator':'build_model.py','generatorSha256':hashlib.sha256(Path(__file__).read_bytes()).hexdigest(),'stepSha256':hashlib.sha256((O/'FG-4-approximate.step').read_bytes()).hexdigest(),'redistribution':'Original generator and independently drawn model licensed MIT. Source PDF is linked, not redistributed.','mechanicalRole':'Off-board fan accessory; no electrical pins or implied PCB holes','safety':'No finger-protection, IP, load-bearing or manufacturing qualification.'}
(O/'provenance.json').write_text(json.dumps(p,indent=2)+'\n')