All code has been re-written in order to make easier to create bearings reading their dimensions contained from a file. This way, bearings can be added using the BOLTS in a easy way. At the moment only an old version of the deep groove ball bearing is included, I have to talk with jreinhardt and see what we do. I have tried to include these bearings into bolts myself, but without result.
Some of this bearings have colours while others are just plain grey. This is something I am stuck with until someones helps me finding a command that allows to change the material/color of a shape
And another thing to do is convert the bearing into a single part. This is possibly what I will do next.
Without forgetting to create more bearings :D
Sorry, I will not upload the code of the bearings until they are concluded.
import math def NB(rout,rin,bth): rnd=(rout-rin)/2.00 cnd=((rout-rin)/2)+rin nnd=2*math.pi*cnd/(1.8*2*rnd) #Needle number nnd=math.floor(nnd) nnd=int(nnd) #needle cage-------------- ncrout=cnd+0.175*(rout-rin) ncrin=cnd-0.175*(rout-rin) nc1=Part.makeCylinder(ncrout,bth) nc2=Part.makeCylinder(ncrin,bth) nc=nc1.cut(nc2) #needle space on the cage- rsnd=rnd*1.2 thsnd=bth*0.8 for i in range(nnd): snd=Part.makeCylinder(rsnd,thsnd) Alpha=(i*2*math.pi)/nnd nv=(cnd*math.cos(Alpha),cnd*math.sin(Alpha),0.1*bth) snd.translate(nv) nc=nc.cut(snd) #Needle creation---------- for i in range(nnd): nd=Part.makeCylinder(rnd,thsnd) Alpha=(i*2*math.pi)/nnd nv=(cnd*math.cos(Alpha),cnd*math.sin(Alpha),0.1*bth) nd.translate(nv) Part.show(nd) Part.show(nc) Gui.SendMsgToActiveView("ViewFit")
The needle bearing is the more particular one because it carves the space for the needle in the ring and then creates the needle in that space. But this is nothing new, just a different combination of the same. Because of this there will not be a detailed guide for bearings until there is one that really needs of it.
In the engine part, I have worked in a new crankshaft. Not finished, but the major part is done.