TorusKnot[radius_,thickness_,pnum_,qnum_,npts_:50]:=Module[{rad=radius,thick=thickness,p=pnum,q=qnum,knot,tan,norm,binorm},knot={(Cos[q t]+rad)Cos[p t],(Cos[q t]+rad)Sin[p t],-Sin[q t]};tan={-(((Sqrt[2]) (p (rad+Cos[q t]) Sin[p t]+q Cos[p t] Sin[q t]))/(Sqrt[2 (q^2)+(p^2) (1+2 (rad^2))+(p^2) (4 rad Cos[q t]+Cos[2 q t])])),(((Sqrt[2]) (p Cos[p t] (rad+Cos[q t])-q Sin[p t] Sin[q t]))/(Sqrt[2 (q^2)+(p^2) (1+2 (rad^2))+(p^2) (4 rad Cos[q t]+Cos[2 q t])])),-(((Sqrt[2]) q Cos[q t])/(Sqrt[2 (q^2)+(p^2) (1+2 (rad^2))+(p^2) (4 rad Cos[q t]+Cos[2 q t])]))};norm={((Sqrt[2]) (p q (4 (q^2)+(p^2) (1+2 (rad^2))+(p^2) (4 rad Cos[q t]+Cos[2 q t])) Sin[p t] Sin[q t]+Cos[p t] (-((p^2) rad+((p^2)+(q^2)) Cos[q t]) (2 (q^2)+(p^2) (1+2 (rad^2))+(p^2) (4 rad Cos[q t]+Cos[2 q t]))-2 (p^2) (q^2) (rad+Cos[q t]) ((Sin[q t])^2))))/((((2 (q^2)+(p^2) (1+2 (rad^2))+(p^2) (4 rad Cos[q t]+Cos[2 q t])))^(3/2)) √((p^2)-(q^2)+((4 (q^4) ((q^2)+(p^2) (1+(rad^2))+2 (p^2) rad Cos[q t]))/(((2 (q^2)+(p^2) (1+2 (rad^2))+(p^2) (4 rad Cos[q t]+Cos[2 q t])))^2))+((2 (q^2) ((q^2)+(p^2) (2+(rad^2))+4 (p^2) rad Cos[q t]))/(2 (q^2)+(p^2) (1+2 (rad^2))+(p^2) (4 rad Cos[q t]+Cos[2 q t]))))),((Sqrt[2]) (-p q Cos[p t] (4 (q^2)+(p^2) (1+2 (rad^2))+(p^2) (4 rad Cos[q t]+Cos[2 q t])) Sin[q t]+Sin[p t] (-((p^2) rad+((p^2)+(q^2)) Cos[q t]) (2 (q^2)+(p^2) (1+2 (rad^2))+(p^2) (4 rad Cos[q t]+Cos[2 q t]))-2 (p^2) (q^2) (rad+Cos[q t]) ((Sin[q t])^2))))/((((2 (q^2)+(p^2) (1+2 (rad^2))+(p^2) (4 rad Cos[q t]+Cos[2 q t])))^(3/2)) √((p^2)-(q^2)+((4 (q^4) ((q^2)+(p^2) (1+(rad^2))+2 (p^2) rad Cos[q t]))/(((2 (q^2)+(p^2) (1+2 (rad^2))+(p^2) (4 rad Cos[q t]+Cos[2 q t])))^2))+((2 (q^2) ((q^2)+(p^2) (2+(rad^2))+4 (p^2) rad Cos[q t]))/(2 (q^2)+(p^2) (1+2 (rad^2))+(p^2) (4 rad Cos[q t]+Cos[2 q t]))))),(2 (Sqrt[2]) (q^2) ((q^2)+(p^2) (rad^2)+(p^2) rad Cos[q t]) Sin[q t])/((((2 (q^2)+(p^2) (1+2 (rad^2))+(p^2) (4 rad Cos[q t]+Cos[2 q t])))^(3/2)) √((p^2)-(q^2)+((4 (q^4) ((q^2)+(p^2) (1+(rad^2))+2 (p^2) rad Cos[q t]))/(((2 (q^2)+(p^2) (1+2 (rad^2))+(p^2) (4 rad Cos[q t]+Cos[2 q t])))^2))+((2 (q^2) ((q^2)+(p^2) (2+(rad^2))+4 (p^2) rad Cos[q t]))/(2 (q^2)+(p^2) (1+2 (rad^2))+(p^2) (4 rad Cos[q t]+Cos[2 q t])))))};binorm=Cross[tan,norm];ParametricPlot3D[knot+thick Cos[θ]norm+thick Sin[θ]binorm,{t,0,2π},{θ,0,2π},Mesh->None,Boxed->False,Axes->False,PlotPoints->npts]]

torus35=TorusKnot[1.5,.1,3,5,100]

ObjExport[NotebookDirectory[]<>"3,5-torus_knot.obj",torus35]

Printout3D[torus35,NotebookDirectory[]<>"3,5-torus_knot.stl"]