Page 1 of 3

Are you looking for help regarding FreeCAD python scripting?

Posted: Fri Nov 08, 2013 10:10 pm
by bernd
Welcome here, and thanks for your interest in python scripting features of FreeCAD! Our FreeCAD-Documentation allready offers some excellent articles regarding this topic.

- Short tutorial made for who is totally new to Python.

- Python scripting tutorial and FreeCAD Scripting Basics for a brief introduction of python scripting in FreeCAD.

- Part Module, Scripting explains the basics about scripting of geometric primitives and (topological) shapes.

- Topological data scripting describes lots of methods for creating and modifying Part shapes from python.

- FreeCAD TopoShape API docu lists all attributes and methods for TopoShapes and thus for all shapes of Part Modul.



- Code snippets contains examples, pieces, chunks of FreeCAD Python code collected from the forum.

- Macros recipes contains ready to use macros to add functionality to FreeCAD.

- Scripting examples contains some more complex scripting examples.

- Scripted objects Python Features, python-scripted objects which behave exactly as any other FreeCAD objects.

- FreeCAD dialog creation chunks of FreeCAD Python for creation of dialogs.

- Module Creation to add a new modules and workbenches in FreeCAD.

- Extra python modules has listed several external python modules that can be downloaded freely.

- External python tutorials has links to good generic tutorials, not specific to FreeCAD.

- More links you will find at the Power users hub and Category:Python_Code sections of the FreeCAD-Wiki.

- In the end the FreeCAD python API documentation will give you endless informations about all kind of functions.

- In the very last end FreeCAD Python Template Modules at the source code will give you some code to start with.


have fun, bernd

Re: Are you looking for help regarding FreeCAD python scripting?

Posted: Sat Aug 12, 2017 3:48 am
by suhasj123
Thanks for a awesome post I am new to python I simply want say thank you for the tutorial for who are new to python I haven't saw the topics but as I learn more about python surely come and visit other topics too. :) :) :)

Re: Are you looking for help regarding FreeCAD python scripting?

Posted: Wed Apr 24, 2019 9:38 pm
by muennemann
Hello Bernd:

Thank you for the tutorial on how to run FEA with calculix and Python. In my version of FreeCAD, we have fea.run() rather than fea.ccx_run().

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13541 (Git)
Build type: Release
Branch: releases/FreeCAD-0-17
Hash: 9948ee4f1570df9216862a79705afb367b2c6ffb
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedStates (en_US)

---
Frank[bug][/bug]

Re: Are you looking for help regarding FreeCAD python scripting?

Posted: Wed May 01, 2019 4:50 pm
by bernd
your version is outdated! Use 0.18.1 or even better 0.19 if you work with FEM.

Re: Are you looking for help regarding FreeCAD python scripting?

Posted: Fri Jun 05, 2020 8:39 pm
by keithsloan52
Should this not be also in the wiki or somewhere more permanent?

Could somebody pls help me in FC an Python.

Posted: Thu Dec 24, 2020 2:42 pm
by emanresu
Hi There,

My english is unpractised. My german is much better. I try it now on english.
I have a degree in mechanical engineering. I make my study in informatics. My programming experience is wide but shallow.
I make my student project in FreeCAD with Python. I have many years expertise in CAD design in quite all of the well-known CAD softwares. It takes wery long time, to find the FreeCAD and Python methods to realize my ideas. The task is quite hard. 3D-modelling in other programs -> search similar, feasible practices -> create my parametric modelling. Most of my experience is in ProE/Creo. I could think strictly parametric. I know CATIA too. I could think well in 3D chaos.
My questions:
-In a body there can be made some datums, like point, line, plane. Could I create these with names or there is only a label to refer them?
-If I create some datums in a body, how can I refer them later (rename, get...)?

Thanks in advance

With many good wishes for the season and the coming year

Tom

Re: Are you looking for help regarding FreeCAD python scripting?

Posted: Sat Jun 12, 2021 4:44 pm
by 937
bernd wrote: Fri Nov 08, 2013 10:10 pm - Code snippets contains examples, pieces, chunks of FreeCAD Python code collected from the forum.

- Macros recipes contains ready to use macros to add functionality to FreeCAD.
All the links I've tried give me "File not found."

Code snippets is here now for example: https://wiki.freecadweb.org/Code_snippets

Re: Are you looking for help regarding FreeCAD python scripting?

Posted: Sun Jun 13, 2021 12:04 pm
by Otuoniyo7
Links are not going anymore, kindly help us check the issue

Re: Are you looking for help regarding FreeCAD python scripting?

Posted: Sun Jun 13, 2021 5:11 pm
by jgg

Re: Are you looking for help regarding FreeCAD python scripting?

Posted: Mon Jun 14, 2021 6:58 pm
by Roy_043
jgg wrote: Sun Jun 13, 2021 5:11 pmLinks broken
Can you be more specific. All internal links appear in blue, so these are valid. And I think I have just checked all external links. All of them are valid as well.