Outils pour utilisateurs

Outils du site


wiki:tutoriels:freecad_python_script_building

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
wiki:tutoriels:freecad_python_script_building [2016/12/06 14:14]
royce créée
wiki:tutoriels:freecad_python_script_building [2020/10/05 14:39] (Version actuelle)
Ligne 1: Ligne 1:
 +  **Introduction**
  FreeCAD has been built using the programming language Python. It should be understood that the use of modeling using the Python command line is not required. However, it can be beneficial in certain circumstances:  FreeCAD has been built using the programming language Python. It should be understood that the use of modeling using the Python command line is not required. However, it can be beneficial in certain circumstances:
  
Ligne 12: Ligne 13:
   *Screw drives   *Screw drives
  
-Setup FreeCAD for Python Script Building:+In this tutorial we will be making a very simplified version of this object: 
 +{{ :wiki:tutoriels:freecad4.jpg?300 |}} 
 + 
 +  **STEP 1 - Setup FreeCAD for Python Script Building:** 
  
 {{ :wiki:tutoriels:freecad1.png?800 |}} {{ :wiki:tutoriels:freecad1.png?800 |}}
Ligne 31: Ligne 36:
   *Select "Vue Combinée"   *Select "Vue Combinée"
   *Select "Console Python"   *Select "Console Python"
 +
 +  **Step 2 - Basics**
 +
 +Now that we have our Python Console open we will start with the very basics. We will simply create a new document named "Python_Pulley" then:
 +
 +  * Create two cylinders of a diameter = D with a thickness = T
 +  * Space them apart along the xy plane with a distance =d
 +  * Create a third cylinder with a thickness =d and a diameter<D
 +  * Merge all objects together to create our pulley
 +  * Create a final cylinder with the "diameter of our axel = a" to use to create a hole traversing the entire assembly
 +
 +
 +{{ :wiki:tutoriels:freecad5.png?800 |}}
 +In the Python Console we will first type:
 +  * doc = FreeCAD.newDocument("Python_Pulley")
 +  * this is the equivalent of using the GUI : fichier/noveau document /save as "Python_Pulley"
 +
  
  
wiki/tutoriels/freecad_python_script_building.1481033653.txt.gz · Dernière modification: 2016/12/06 14:14 de royce