Categories:
-
3d 96 articles
-
animations 16 articles
-
architecture 47 articles
-
blender 98 articles
-
bédé 19 articles
-
techdrawing 24 articles
-
freecad 189 articles
-
gaming 1 articles
-
idsampa 8 articles
-
inthepress 8 articles
-
linux 57 articles
-
music 1 articles
-
nativeifc 30 articles
-
opensource 266 articles
-
orange 4 articles
-
photo 16 articles
-
projects 35 articles
-
receitas 176 articles
-
saopaulo 18 articles
-
sketches 163 articles
-
talks 25 articles
-
techdrawing 24 articles
-
textes 7 articles
-
trilhas 3 articles
-
urbanoids 1 articles
-
video 47 articles
-
webdesign 7 articles
-
works 151 articles
Archives:
-
2007 22 articles
-
2008 32 articles
-
2009 66 articles
-
2010 74 articles
-
2011 74 articles
-
2012 47 articles
-
2013 31 articles
-
2014 38 articles
-
2015 28 articles
-
2016 36 articles
-
2017 41 articles
-
2018 46 articles
-
2019 59 articles
-
2020 18 articles
-
2021 20 articles
-
2022 7 articles
-
2023 25 articles
-
2024 14 articles
FreeCAD programming
1 hr Workshop @ HSBXL for Software Freedom Day, 18.09.2021
by Yorik van Havre - https://yorik.uncreated.net
Abstract: FreeCAD is a well known 3D modelling platform, but its real power lies in how easily it can be programmed and extended with very simple Python scripts. Come discover and practice a few things with us!
Requirements: Your computer with FreeCAD installed - No programming experience needed
Level:: basic understanding of FreeCAD
Contents
1. Python starter anyone? A quick intro to Python
- Python FTW: Why Python is awesome
- The interpreter
- Variables:
a = "yorik"; b = 48.2; c = b
- Functions:
print("something")
- Classes and modules:
import FreeCAD
- A peek at a complete Python script
2. Python in FreeCAD
- The Python console
- Macros
- Code / Workbenches
- Documentation
- What you can do with it
- Create/modify document contents
- Modify the interface
- Modify the 3D scene
- Just about anything else
3. Recording a macro
- Draw a Draft rectangle with filleted corners
- Extrude it
- Tweak the recorded macro
4. Create a shape from Python code
- Create 4 vectors
- Create a closed wire
- Create a face + extrude
- Create a cylinder
- Duplicate it + make a compound
- Create a subtraction
Useful links
- FreeCAD documentation
- Power-users hub: Python scripting documentation
- General intro to Python
- Shapes creation
- Code examples
Read next:
Inserção do FreeCAD com solução BIM em ambiente empresarial e institucional no Brasil:
Ideias, problemas e soluções