Scripted Parts: Ball Bearing - Part 1/de

Einleitung
Dieses Tutorial ist gedacht als Einführung wie man Modelle erstellt mit Hilfe von Python Skripten innerhalb von FreeCAD.

Dieses Tutorial erklärt wie man ein Kugellager erstellt mittels eines CSG-Arbeitsablaufes.

Der Code wird ein neues FreeCAD-Dokument erstellen mit 12 einzelnen Körpern (Innerer Ring, äußerer Ring und 10 Kugeln).

Da Ergebnis sieht so aus:



Workflow
The workflow is more or less identical how you would create the part in part workbench.

Just some small differences.


 * Create a new empty document and make it the active document
 * Insert Cylinder
 * Insert Cylinder
 * Do boolean cut to get basic shape of inner ring
 * Select all edges and apply a fillet
 * Insert torus
 * Move torus into position and do a boolean cut to create the groove for the balls
 * Repeat all steps for getting the shape for the outer ring
 * Insert first ball
 * Insert other balls using math to calculate the position of the balls
 * Set view to axometric
 * Zoom to fit all

Filleting edges
In part workbench using the GUI, you would select chamfers in the 3D view or in the menu for fillets and then apply the fillets.

Here we select all edges of a shape and apply fillets.

Therefore we need to select the edges BEFORE creating the groove.

Links
Scripted objects: The wiki page explaing the basics of scripting

Topological data scripting: A tutorial for covering basics of scripting

Scripted Parts: Ball Bearing - Part 2: Doing it with sketches

Bearing Script 1: Base for this tutorial, thanks to JMG ...