As jreinhardt said, there is a new function that generates axial thrust bearings:

Code: Select all

```
import Part
import math
def ATB(rout,rin, bth):
fth=0.3*bth #Thrust plate widh
#Edge fillet value
if rout<70:
RR=1
else:
RR=1.5
#shapes--
#shapes=[]
#Lower ring--------------------------
lr1=Part.makeCylinder(rout,fth)
lr2=Part.makeCylinder(rin,fth)
lr=lr1.cut(lr2)
lre=lr.Edges
lr=lr.makeFillet(RR,lre)
#Upper ring--------------------------
ur1=Part.makeCylinder(rout,fth)
ur2=Part.makeCylinder(rin,fth)
ur=ur1.cut(ur2)
ure=ur.Edges
ur=ur.makeFillet(RR,ure)
#Positioning Vector
Vur=(0,0,bth-fth)
ur.translate(Vur)
#Balltracks---------------------------
tbigradius=((rout-rin)/2.00)+rin
tsmradius=(bth/2.00)-(0.75*fth)
Vtorus=(0,0,bth/2.00)
torus=Part.makeTorus(tbigradius,tsmradius)
#Positioning vector
torus.translate(Vtorus)
#Booleans------------------------------
lr=lr.cut(torus)
ur=ur.cut(torus)
Part.show(lr)
Part.show(ur)
#shapes.append(ur)
#shapes.append(lr)
#Balls--------------------------------
RBall=tsmradius
CBall=tbigradius
#Ball number (constant multiplied by radius and rounded)
NBall=(2*math.pi*CBall)/(2*RBall)
NBall=math.floor(NBall)
NBall=NBall*0.9
NBall=int(NBall)
#Ball creator
for i in range (NBall):
Ball=Part.makeSphere(RBall)
Alpha=(i*2*math.pi)/NBall
BV=(CBall*math.cos(Alpha),CBall*math.sin(Alpha),bth/2.00)
Ball.translate(BV)
Part.show(Ball)
#shapes.append(Ball)
#BearingAT=Part.Compund(shapes)
#Part.show(BearingAT)
Gui.SendMsgToActiveView("ViewFit")
```

Simply type: ATB(outer radius, inner radius, bearing widh), and something should appear.

Some details:

-Balls are generated automatically with a function that measures how many of them will fit, and rounding down that number to assure that there is certain clearance between them.

-The disk thickness is also a proportion of the total bearing thickness.

-Disk fillet is 1 to bearings with an outer radius less than 110 units and 1.5 to bigger than this bearings. Just aesthetics.

Issues:

-Bearings take up to 7 seconds to generate. I don't know if this is normal.

-I have not succeed at creating shapes, the steps are commented at code. I am not seeing what is wrong.

jreinhardt, I will take a look a github later and see how can I code to make it easier to you.

My purpose to this bearings is that they should provide of exact external measures and a model to get an idea of the whole thing, but without focusing at internals or hyper-realistic looks.

So this is the explanation to not have ball cage and other minor aspects. Do you agree with that point of view?

Tell me anything about it, if you don't like, is not working, is horrible... Without problems.

Regards, Javier.