Power users hub

From FreeCAD Documentation
Revision as of 13:03, 10 February 2015 by FuzzyBot (talk | contribs) (Updating to match new version of source page)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
150
150

Detta är platsen att komma till om du vill ha en djupare insikt i FreeCAD. Här kan du lära dig om hur du anpassar FreeCAD för dina behov.

Dessa sidor är i ett tidigt utvecklingsstadie. Om du inte kan hitta den information du letar efter, eller har hittat användbar information på något ställe sim vi inte har länkat till, var då snäll och lämna en kommentar på pratsidan, eller varför inte att du själv lägger till innehåll här!

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: Is there a special object you need 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.

Anpassa FreeCAD

Skriptning i FreeCAD

Allmänt

Modules

As the functionality of FreeCAD is separated in Modules which deal with special data types and applications. FreeCAD has built-in modules and Extension Modules (plug-ins). Once plugin modules are installed, they become availible to you as easily as the built-in modules. The modules described below are the default modules, includeed in every FreeCAD installation.

  • The Builtin modules are the principal FreeCAD modules. They contain tools for manipulating general FreeCAD configurations, documents and their contents.

""Arbeta med nät""

Använda OpenCasCade

Komma åt Coin scengrafen

Controlling the Qt interface

Arbeta med parametriska objekt

Exempel

  • Kodbitar en samling med FreeCAD python kod som du kan använda som ingredienser i dina skript...
  • Linjeritningsfunktionen: Hur man bygger ett enkelt verktyg att rita linjer med
  • Skapa dialoger: Hur man konstruerar dialoger med Qt designer, och använder dem i FreeCAD
  • Bädda in FreeCAD: Hur man importerar FreeCAD som en pythonmodul i andra applikationer
  • Skissmodulen adderar grundläggande 2D rintningsfunktioner till FreeCAD. Den är helt och hållet skriven i python, så den kan vara ett bra exempel om du vill skriva dina egna moduler.
  • FreeCAD's vektorbibliotek : Några praktiska funktioner för att manipulera FreeCAD vektorer. Detta bibliotek är även inkluderat i Skissmodulen.

API funktioner

Den kompletta API beskrivningen hittas här. Notera att den kan vara ofullständig, eftersom vi fortfarande inte har hittat ett sätt att automatiskt inkludera den på denna wiki. För mer rättvisande information, titta i modulerna direkt från FreeCAD.

Avancerade ändringar

Python övningar

Dessa är bra allmänna övningar, inte specifika för FreeCAD, som kan vara intressanta för dig om du är helt ny på python.

Python

PyQt - Hur man skapar och hanterar FreeCAD's Qt användargränssnitt från python

The following two references are PyQt specific (not PySide) but may offer some information of use:

Pivy' - Hur man interagerar med FreeCAD's 3D scener

Grupprojekt

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.