Difference between revisions of "Power users hub"

From FreeCAD Documentation
Jump to: navigation, search
(Marked this version for translation)
Line 1: Line 1:
 
<translate>
 
<translate>
  
 +
<!--T:1-->
 
[[Image:Crystal_Clear_app_terminal.png|right|150]]
 
[[Image:Crystal_Clear_app_terminal.png|right|150]]
  
 +
<!--T:2-->
 
This is the place to come if you want to have a deeper insight into FreeCAD. Here you can learn about customizing FreeCAD for your needs.  
 
This is the place to come if you want to have a deeper insight into FreeCAD. Here you can learn about customizing FreeCAD for your needs.  
  
 +
<!--T:3-->
 
These pages are in early stage of development.  If you can't find the information you are looking for, or have found useful information somewhere we have not linked to, then please leave a comment on [[Talk:Power_users_hub|the talk page]], or, why not? [[Help_FreeCAD| Add some more content here yourself!]]
 
These pages are in early stage of development.  If you can't find the information you are looking for, or have found useful information somewhere we have not linked to, then please leave a comment on [[Talk:Power_users_hub|the talk page]], or, why not? [[Help_FreeCAD| Add some more content here yourself!]]
  
 +
<!--T:4-->
 
One of the nicest features of FreeCAD is that you can script and extend it extremely far without the need to compile anything or touch the source code. All the scripting part is done in [http://en.wikipedia.org/wiki/Python_(programming_language) Python], a very powerful but simple programming language. With simple Python scripts, you have total access to about any part of FreeCAD. For example, you can:
 
One of the nicest features of FreeCAD is that you can script and extend it extremely far without the need to compile anything or touch the source code. All the scripting part is done in [http://en.wikipedia.org/wiki/Python_(programming_language) Python], a very powerful but simple programming language. With simple Python scripts, you have total access to about any part of FreeCAD. For example, you can:
 
* '''Create and modify geometry''': There is a kind of special object you need but that's not present in the default FreeCAD installation? You can easily create a new object type, either from scratch or by adapting an existing type.
 
* '''Create and modify geometry''': There is a kind of special object you need but that's not present in the default FreeCAD installation? You can easily create a new object type, either from scratch or by adapting an existing type.
Line 13: Line 17:
 
*'''Modify the scene representation''': FreeCAD has separate processes for building up and computing the geometry and displaying that geometry on your screen. You have full access to the way the scene contents are displayed on screen, therefore you can modify that representation, interact with it, or add all kinds of custom behaviours and screen widgets, like information, draggers, anchors or temporary entities.
 
*'''Modify the scene representation''': FreeCAD has separate processes for building up and computing the geometry and displaying that geometry on your screen. You have full access to the way the scene contents are displayed on screen, therefore you can modify that representation, interact with it, or add all kinds of custom behaviours and screen widgets, like information, draggers, anchors or temporary entities.
  
== Customizing FreeCAD ==
+
== Customizing FreeCAD == <!--T:5-->
  
 +
<!--T:6-->
 
* [[Interface Customization]]: Starting with the beginning: Toolbars and shortcuts
 
* [[Interface Customization]]: Starting with the beginning: Toolbars and shortcuts
 
* [[Macros|Working with Macros]]: Easily record often repeated tasks or Python code
 
* [[Macros|Working with Macros]]: Easily record often repeated tasks or Python code
  
== Scripting in FreeCAD ==
+
== Scripting in FreeCAD == <!--T:7-->
  
 +
<!--T:8-->
 
'''General'''
 
'''General'''
 
* [[Introduction to python]] - See also other Python tutorials at the bottom of this page
 
* [[Introduction to python]] - See also other Python tutorials at the bottom of this page
Line 27: Line 33:
 
* Using mixed [[Units]] in FreeCAD
 
* Using mixed [[Units]] in FreeCAD
  
 +
<!--T:9-->
 
'''Working with Meshes'''
 
'''Working with Meshes'''
 
* [[Mesh Scripting]]: How to interact with the [[Mesh Module]]
 
* [[Mesh Scripting]]: How to interact with the [[Mesh Module]]
  
 +
<!--T:10-->
 
'''Working with Parts'''
 
'''Working with Parts'''
 
* [[Part Module|The Part Module]]: How [http://en.wikipedia.org/wiki/Open_CASCADE Open CASCADE Technology] tools and structure is used in FreeCAD
 
* [[Part Module|The Part Module]]: How [http://en.wikipedia.org/wiki/Open_CASCADE Open CASCADE Technology] tools and structure is used in FreeCAD
Line 36: Line 44:
 
* [[Mesh to Part]]: Converting between object types
 
* [[Mesh to Part]]: Converting between object types
  
 +
<!--T:11-->
 
'''Accessing the Coin scenegraph'''
 
'''Accessing the Coin scenegraph'''
 
* [[Scenegraph|The Coin/Inventor scenegraph]]: How the FreeCAD scene representation works
 
* [[Scenegraph|The Coin/Inventor scenegraph]]: How the FreeCAD scene representation works
 
* [[Pivy]]: How to access and modify the scenegraph
 
* [[Pivy]]: How to access and modify the scenegraph
  
 +
<!--T:12-->
 
'''Controlling the Qt interface'''
 
'''Controlling the Qt interface'''
 
* [[PyQt]]: How to access the interface, and modify its contents
 
* [[PyQt]]: How to access the interface, and modify its contents
 
* [[Embedding FreeCADGui|Using the FreeCAD GUI]] in another Qt application with PyQt
 
* [[Embedding FreeCADGui|Using the FreeCAD GUI]] in another Qt application with PyQt
  
 +
<!--T:13-->
 
'''Working with parametric objects'''
 
'''Working with parametric objects'''
 
* [[Scripted objects]]: How to make 100% Python-scripted objects in FreeCAD
 
* [[Scripted objects]]: How to make 100% Python-scripted objects in FreeCAD
 
* [[Drawing Module]]: Automating the 3D-to-2D process
 
* [[Drawing Module]]: Automating the 3D-to-2D process
  
 +
<!--T:14-->
 
'''Examples'''
 
'''Examples'''
 
* [[Code snippets]] : A collection of pieces of FreeCAD Python code, to serve as ingredients in your scripts...
 
* [[Code snippets]] : A collection of pieces of FreeCAD Python code, to serve as ingredients in your scripts...
Line 56: Line 68:
 
* [[FreeCAD vector math library]] : A couple of handy functions to manipulate FreeCAD vectors. This library is also included in the Draft module.
 
* [[FreeCAD vector math library]] : A couple of handy functions to manipulate FreeCAD vectors. This library is also included in the Draft module.
  
== API Functions ==
+
== API Functions == <!--T:15-->
  
 +
<!--T:16-->
 
The complete API description can be found [[:Category:API|here]]. Note that it can be incomplete, since we still didn't find a way to include it automatically on this wiki. For more accurate information, browse the modules directly from FreeCAD.
 
The complete API description can be found [[:Category:API|here]]. Note that it can be incomplete, since we still didn't find a way to include it automatically on this wiki. For more accurate information, browse the modules directly from FreeCAD.
  
== Advanced modification ==
+
== Advanced modification == <!--T:17-->
  
 +
<!--T:18-->
 
* [[Start up and Configuration]]: Startup and command line options
 
* [[Start up and Configuration]]: Startup and command line options
 
* [[Install on Windows]]: Using the windows installer
 
* [[Install on Windows]]: Using the windows installer
Line 68: Line 82:
 
* [[Extra python modules]] : Extend the FreeCAD python interpreter with these powerful modules!
 
* [[Extra python modules]] : Extend the FreeCAD python interpreter with these powerful modules!
  
== Python tutorials ==
+
== Python tutorials == <!--T:19-->
  
 +
<!--T:20-->
 
These are good generic tutorials, not specific to FreeCAD, that might interest you if you are totally new to python.
 
These are good generic tutorials, not specific to FreeCAD, that might interest you if you are totally new to python.
  
 +
<!--T:21-->
 
'''Python'''
 
'''Python'''
 
* [http://docs.python.org/tut/tut.html Official python tutorial] - A very complete tutorial for discovering python
 
* [http://docs.python.org/tut/tut.html Official python tutorial] - A very complete tutorial for discovering python
Line 77: Line 93:
 
* [http://npt.cc.rsu.ru/user/wanderer/ODP/Python_for_Newbies.htm Python for newbies] - one big tutorial covering all the basics
 
* [http://npt.cc.rsu.ru/user/wanderer/ODP/Python_for_Newbies.htm Python for newbies] - one big tutorial covering all the basics
  
 +
<!--T:22-->
 
'''PyQt''' - How to create and manage FreeCAD's Qt UI interface from python
 
'''PyQt''' - How to create and manage FreeCAD's Qt UI interface from python
 
* [http://www.cs.usfca.edu/~afedosov/qttut/ Basic PyQt tutorial] : A simple and short linux-based tutorial that will explain how to work with PyQt and Qt Designer
 
* [http://www.cs.usfca.edu/~afedosov/qttut/ Basic PyQt tutorial] : A simple and short linux-based tutorial that will explain how to work with PyQt and Qt Designer
Line 82: Line 99:
 
* [http://vizzzion.org/?id=pyqt programming Qt applications in python] : A more in-depth tutorial covering all the process of working with qt and python.
 
* [http://vizzzion.org/?id=pyqt programming Qt applications in python] : A more in-depth tutorial covering all the process of working with qt and python.
  
 +
<!--T:23-->
 
'''Pivy''' - How to interact with FreeCAD's 3D scenes
 
'''Pivy''' - How to interact with FreeCAD's 3D scenes
 
* [http://pivy.coin3d.org/documentation/pycon Basic Pivy tutorial] : A very simple tutorial form the official Pivy site
 
* [http://pivy.coin3d.org/documentation/pycon Basic Pivy tutorial] : A very simple tutorial form the official Pivy site
 
* [http://www.google.com.br/url?sa=U&start=3&q=http://studierstube.icg.tu-graz.ac.at/doc/pdf/PivyStudierstubeTutorial.pdf&ei=XyC1Sc2wOeCKmQem_eHnBQ&usg=AFQjCNEYhb-0DcUc6OxFVijAe1epBb-4aA Introducing Pivy into studierstube] : A document that is not really a tutorial, but that illustrates well how Pivy works
 
* [http://www.google.com.br/url?sa=U&start=3&q=http://studierstube.icg.tu-graz.ac.at/doc/pdf/PivyStudierstubeTutorial.pdf&ei=XyC1Sc2wOeCKmQem_eHnBQ&usg=AFQjCNEYhb-0DcUc6OxFVijAe1epBb-4aA Introducing Pivy into studierstube] : A document that is not really a tutorial, but that illustrates well how Pivy works
  
== Community projects ==  
+
== Community projects == <!--T:24-->
  
 +
<!--T:25-->
 
On the [[free-cad:Community Portal|Community portal]], you can find other FreeCAD-based projects run by the FreeCAD users community. If you are starting a new FreeCAD project, be sure to list it there! We also have a page with things you can do if you would like to [[Help FreeCAD]].
 
On the [[free-cad:Community Portal|Community portal]], you can find other FreeCAD-based projects run by the FreeCAD users community. If you are starting a new FreeCAD project, be sure to list it there! We also have a page with things you can do if you would like to [[Help FreeCAD]].
  
 +
<!--T:26-->
 
{{languages | {{es|Power users hub/es}} {{fr|Power users hub/fr}} {{it|Power users hub/it}} {{jp|Power users hub/jp}} {{ru|Power users hub/ru}} {{se|Power users hub/se}} }}
 
{{languages | {{es|Power users hub/es}} {{fr|Power users hub/fr}} {{it|Power users hub/it}} {{jp|Power users hub/jp}} {{ru|Power users hub/ru}} {{se|Power users hub/se}} }}
  
 +
<!--T:27-->
 
[[Category:Hubs]]
 
[[Category:Hubs]]
 
[[Category:Poweruser Documentation]]
 
[[Category:Poweruser Documentation]]
  
 
</translate>
 
</translate>

Revision as of 16:38, 7 August 2013

150

This is the place to come if you want to have a deeper insight into FreeCAD. Here you can learn about customizing FreeCAD for your needs.

These pages are in early stage of development. If you can't find the information you are looking for, or have found useful information somewhere we have not linked to, then please leave a comment on the talk page, or, why not? Add some more content here yourself!

One of the nicest features of FreeCAD is that you can script and extend it extremely far without the need to compile anything or touch the source code. All the scripting part is done in Python, a very powerful but simple programming language. With simple Python scripts, you have total access to about any part of FreeCAD. For example, you can:

  • Create and modify geometry: There is a kind of special object you need but that's not present in the default FreeCAD installation? You can easily create a new object type, either from scratch or by adapting an existing type.
  • Create custom tools and commands: At the moment, FreeCAD already has extensive functionality, but there aren't many convenient tools and commands for the final user yet. But it is already easy to create your own sets of tools.
  • Modify the interface: The FreeCAD user interface is still very basic at this stage. But everything is there for you to extend it to your needs. You can, for example, create toolbars to put your own tools, create special panels for interacting with your tools, etc.
  • Modify the scene representation: FreeCAD has separate processes for building up and computing the geometry and displaying that geometry on your screen. You have full access to the way the scene contents are displayed on screen, therefore you can modify that representation, interact with it, or add all kinds of custom behaviours and screen widgets, like information, draggers, anchors or temporary entities.

Customizing FreeCAD

Scripting in FreeCAD

General

Working with Meshes

Working with Parts

Accessing the Coin scenegraph

Controlling the Qt interface

Working with parametric objects

Examples

  • Code snippets : A collection of pieces of FreeCAD Python code, to serve as ingredients in your scripts...
  • Line drawing function: How to build a simple tool to draw lines
  • Dialog creation: How to construct dialogs with Qt designer, and use them in FreeCAD
  • Embedding FreeCAD: How to import FreeCAD as a Python module in other applications
  • The Draft Module adds basic 2d drawing functions to freecad. It is written entirely in Python, so it can be a good example if you want to write your own modules.
  • FreeCAD vector math library : A couple of handy functions to manipulate FreeCAD vectors. This library is also included in the Draft module.

API Functions

The complete API description can be found here. Note that it can be incomplete, since we still didn't find a way to include it automatically on this wiki. For more accurate information, browse the modules directly from FreeCAD.

Advanced modification

Python tutorials

These are good generic tutorials, not specific to FreeCAD, that might interest you if you are totally new to python.

Python

PyQt - How to create and manage FreeCAD's Qt UI interface from python

Pivy - How to interact with FreeCAD's 3D scenes

Community projects

On the Community portal, you can find other FreeCAD-based projects run by the FreeCAD users community. If you are starting a new FreeCAD project, be sure to list it there! We also have a page with things you can do if you would like to Help FreeCAD.

Available translations of this page: Flag-es.jpg Flag-fr.jpg Flag-it.jpg Flag-jp.jpg Flag-ru.jpg Template:Se