Book Image

FreeCAD

By : Brad Collette, Daniel Falck
Book Image

FreeCAD

By: Brad Collette, Daniel Falck

Overview of this book

FreeCAD is a general purpose platform for CAD development. It can be extended to use different workbenches to solve different problems. Targeted squarely at the engineering community, FreeCAD is an open source design application built to be extended. Python, the powerful scripting language, is woven deeply into FreeCAD's DNA and gives users unprecedented power to automate and invent. "FreeCAD [How-to]" is a lean, fast tour of FreeCAD's major workbenches and design philosophy. The reader will get a hands-on introduction to several modeling techniques and learn how Python makes macro automation and design possible. FreeCAD allows users to design in a variety of ways; from drawing 2D designs as lines and circles to combining primitive solids into complex 3D shapes. Objects can even be created or modified by code you write in Python. FreeCAD even allows power users to extend the application itself with new dialogs, panels, and scripts. This book will not only show you how to get started using FreeCAD in a traditional GUI mode, but will teach you how to harness its powerful scripting language for more power.
Table of Contents (9 chapters)

Understanding the FreeCAD interface (Must know)


FreeCAD is designed to be flexible, extensible, and task oriented.

The core functionality is divided into workbenches. Each workbench gathers the most frequently used tools for a particular task. This recipe will guide you through the FreeCAD user interface and introduce some concepts that are common across all workbenches.

Getting ready

Launch FreeCAD and orient yourself with the screenshot and the names of the major parts of the interface. The images and examples in this book are from a 0.13 development snapshot.

The default view is Start page—an embedded browser showing interesting video links, examples, and other news.

The user interface is divided into three main areas:

  1. The 3D area allows you to see and navigate around your design in space.

  2. The combo view shows a hierarchical view of the project or the state of the current task.

  3. The tool bars and workbench switcher gives access to the various tools.

How to do it...

  1. Open a new document by clicking on the menu File | New. The 3D view will switch to show an empty space. In the default orientation the camera position is looking down onto a plane defined by the X and Y axes. The Z axis is pointed directly at the camera. A coordinate indicator in the corner helps you orient yourself in the 3D space.

  2. Click on the workbench switcher and select the Part workbench. Then click on the Create a box solid icon to insert a cube into the project.

  3. You can have multiple projects open at the same time. You can also open multiple views of the same project. Open a second view of the project by clicking on the menu View | Create new view. You can switch views with the tabs below the 3D window or you can tile the views to have multiple perspectives at once. In this following screenshot, two projects are open, each with two views:

  4. You can change the view of your project by panning, rotating, and zooming. Select objects by clicking on them to change their properties. The specific mouse and keyboard commands for doing this are called "navigation styles". FreeCAD supports four styles by default: Inventor, CAD, Blender, and Touchpad.

    You can change the style used in the current view by right-clicking on the 3D canvas.

    Changing the style through the Edit | Preferences menu will change the style for all views currently open and set the selection as the default for new views. The default style, CAD navigation, is unintuitive for some users since it requires clicking both the left and center mouse buttons at the same time to rotate. The Mouse... button in the Display preferences will show which button combinations perform each action.

  5. Select the box and tap the space bar to toggle the object visibility property. Visibility is one of many properties of any object on screen. With the box still selected, examine the lower part of the combo-view. The properties of the selected object are shown on the two tabs (View and Data).

  6. Click on the Measure distance icon, and then click two points on the box in the 3D window. A dimension will be shown and a distance object will be added to the tree.

  7. You can select the distance object in the tree and explore its properties.

  8. As the project complexity grows, you may need to perform an action on multiple objects at the same time. Select multiple objects by holding the Ctrl key while selecting with the mouse.

How it works...

The View/Data tabs reflect a deep design characteristic of FreeCAD. The data necessary to construct the object (size, type, placement, and rotation) is separated from the data needed to show it on screen (color, line style, visibility, and transparency).

Most operations in FreeCAD are non-destructive and result in new objects being added to the project tree. Each new object has its own View and Data tabs and preserves its relationship to its simple precursor. This makes it possible to delete the later objects and revert to the simpler object if needed.

As objects are added and modified, they are organized in the combo-view tree in a hierarchical way. Generally, the last child object is displayed and parent objects are hidden automatically.

There's more...

FreeCAD uses the term "view" to refer to several related concepts.

Default views

Eight default views are provided with icons in the tool bar to make it easy to position the project on the screen. These views are actually orientations of your work and shouldn't be confused with the view windows described previously.

The term view also refers to the camera projection type: orthographic or perspective.

Freezing and Saving views

You can preserve a favorite orientation of your work by freezing it (Shift+F). This adds a menu item for the frozen view to let you easily return to this orientation later.

Python and Report views

FreeCAD has two other important windows that are hidden by default and that are confusingly also called "views". The Python console will be discussed at length in the later sections of this book. The Report views provide useful information about what FreeCAD is doing behind the scenes.