FreeCAD Workbench Programming 101: Difference between revisions

From Open Source Ecology
Jump to navigation Jump to search
 
(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
=Abstract=
=Abstract=
Abstract for Video *FreeCAD Programming 101*
CAD models are very important in OSE Development. Dedicated FreeCAD workbenches make the creation of CAD models easier, faster and more reliable.  
https://www.youtube.com/watch?v=35bdRHswD1o


Ruslan Krenzler
In this video we will show essential steps to create a FreeCAD workbench. The process starts with downloading OSE Linux distribution that includes development and continuous integration capacity in Python, so that new workbenches can be created readily. We go through examples of programmability in FreeCAD:
23 April 2018
#Using [[Spreadsheet Workbench]] to generate CAD
#Using the [[OpenSCAD Workbench]] to generate geometry
#Using [[FreeCAD Macros]]
#Adding bottons and menus to a toolbar
#Creating new workbenches
#Creating appimages for quick installation of new workbenches


Remark: I use mathematical writing style.
Rapid learning is achieved by this lesson being prepared in its entirety as a downloadable appimage that anyone can execute
 
==Resources==
=Step one - make notes=
*How to create macros - See [https://github.com/FreeCAD/FreeCAD-documentation/blob/main/wiki/How_to_install_macros.md]
 
*Adding buttons and menus - [https://wiki.freecad.org/Add_Button_to_FEM_Toolbar_Tutorial]
Where to find documentation.
*Creating custom appimages [https://wiki.freecad.org/AppImage#Personalized_AppImages]
How to setup/adjust view FreeCAD for programming.
Pythonconsole Autocompletion
Automatic python modules documentation
freecad homepage freecadweb.org
Code itself
FreeCAD Mod Dev Guide
Working Addons
 
install D3D Printer Workbench Module
Soft link trick
Anatomy of a workbench, which calls are called when workbench is first loaded and a button is clicked. Context menu,
right mouse click.
Recompute trick.
LGPL License
 
 
=Step tree - writing=
Automation of the CAD-processes can improve the OSE Development process. One of the important tools to achieve this goal
is creating of FreeCAD workbenches. In this video we will show essential steps and tricks required to create a workbench. We will setup FreeCAD for development. We we will talk about important documentation sources: Autocompletion, Automatic python modules documentation, freecadweb.org homepages, FreeCAD source code, and Addons source code.
 
As an example, we will create a simple D3D printer Workbench module. This will explain the internal calls in FreeCAD when a workbench is loaded, when the user clicks the toolbar button, and when she uses the context menu. We mention some tricks and insights for how to do this efficiently.
 
Finally a brief but important note on a FreeCAD license.
 
=Make text easier to read (rewrite, simplify, cut short, rewrite again, ...), keep the essence =
CAD models are very important in OSE-Development. Dedicated FreeCAD workbenches make their creation
easier, faster and more reliable.  
 
In this video we will show essential steps to create a FreeCAD workbench and provide with some tips and tricks.
We will setup FreeCAD for developing. Then we go through different important documentation sources:
auto-completion, automatic python modules documentation, FreeCAD homepage, FreeCAD source code, Module developer's guide,
and source code of FreeCAD add-ons. Then we will install the OSE D3D printer workbench module and explain how it works.
Finally, we will briefly talk about source code licensing.


=Video=
=Video=
Line 54: Line 25:
*Workbench starter kit - https://github.com/skaiser/FreeCAD_Workbench_Starter
*Workbench starter kit - https://github.com/skaiser/FreeCAD_Workbench_Starter
*3DP workbench started - https://github.com/skaiser/D3D-Printer-Workbench
*3DP workbench started - https://github.com/skaiser/D3D-Printer-Workbench
*[[How to write an abstract]]
*More thorough treatment - '''[[FreeCAD Workbench Python Programming]]
*'''[[FreeCAD Programming]]'''
*[[FreeCAD Workbench Programming 101]]
[[Category:FreeCAD]]

Latest revision as of 20:29, 2 January 2024

Abstract

CAD models are very important in OSE Development. Dedicated FreeCAD workbenches make the creation of CAD models easier, faster and more reliable.

In this video we will show essential steps to create a FreeCAD workbench. The process starts with downloading OSE Linux distribution that includes development and continuous integration capacity in Python, so that new workbenches can be created readily. We go through examples of programmability in FreeCAD:

  1. Using Spreadsheet Workbench to generate CAD
  2. Using the OpenSCAD Workbench to generate geometry
  3. Using FreeCAD Macros
  4. Adding bottons and menus to a toolbar
  5. Creating new workbenches
  6. Creating appimages for quick installation of new workbenches

Rapid learning is achieved by this lesson being prepared in its entirety as a downloadable appimage that anyone can execute

Resources

  • How to create macros - See [1]
  • Adding buttons and menus - [2]
  • Creating custom appimages [3]

Video

edit

Links