main
John Lauer
Select explicit prototype cooling model and preserve pending assembly qualification
b777c73
"""Local-only pilot drilling study; not a fabrication release or thread strength proof."""
from pathlib import Path
import json,hashlib,math
import cadquery as cq
from step_geometry import load_step
R=Path(__file__).resolve().parents[1];O=R/'mechanical/passive-contact-study'
p=R/'mechanical/passive-assembly-study/vendor-125319-machined-local-only.step'
s=load_step(p);x,y,z=127.46,65.34,7.25
# Proposed2.5mm drill for M3x0.5:7.5mm cylindrical depth plus118degree point.
depth=7.5;radius=1.25;tip=radius/math.tan(math.radians(59))
cyl=cq.Solid.makeCylinder(radius,depth+.01,cq.Vector(x,y,z-.01));cone=cq.Solid.makeCone(radius,0,tip,cq.Vector(x,y,z+depth));tool=cyl.fuse(cone)
cut=s.cut(tool);assert cut.isValid() and len(cut.Solids())==1
cq.exporters.export(cut,str(O/'vendor-q1-pilot-local-only.step'))
r={'status':'proposed-machining-not-release','sourceSha256':hashlib.sha256(p.read_bytes()).hexdigest(),'pilotDiameterMm':2.5,'pilotXYmm':[x,y],'cylindricalDepthMm':depth,'drillPointIncludedMm':tip,'pilotMaximumZmm':z+depth+tip,'baseTopZmm':14.362,'extendsIntoFinRootMm':z+depth+tip-14.362,'fullThreadDepthTargetMm':6.5,'screwEngagementNominalMm':5.935,'removedVolumeMm3':s.Volume()-cut.Volume(),'validSingleSolid':True,'limitations':['This explicitly removes material beyond the7.112mm base into a local fin root. Stock heatsink is not predrilled.','A bottoming-tap process must achieve the stated full-thread depth; supplier DFM and tap lead clearance remain to verify.','Thread helices, tolerances, burrs, machining access fixtures, preload and PEEK creep are not qualified.','Published thermal resistance is retained only as a design assumption; machining and installed obstruction require later measurement.','Manufacturer CAD derivative remains local; public asset is an original context model.']}
(O/'machining-review.json').write_text(json.dumps(r,indent=2)+'\n');print(json.dumps(r,indent=2))