F r e e C A D A hackable design platform Yorik van Havre FOSDEM - - PowerPoint PPT Presentation

f r e e c a d
SMART_READER_LITE
LIVE PREVIEW

F r e e C A D A hackable design platform Yorik van Havre FOSDEM - - PowerPoint PPT Presentation

F r e e C A D A hackable design platform Yorik van Havre FOSDEM 2015 Please tweet with #FreeCAD Interrupt me when you want PDF of this talk on http://yorik.uncreated.net This presentation is shamelessly copied from a talk by


slide-1
SLIDE 1

F r e e C A D

A hackable design platform Yorik van Havre

FOSDEM 2015

slide-2
SLIDE 2
  • Please tweet with #FreeCAD
  • Interrupt me when you want
  • PDF of this talk on

http://yorik.uncreated.net

  • This presentation is shamelessly

copied from a talk by Ryan Gordon

slide-3
SLIDE 3

Yorik van Havre

  • Architect (houses, not information),

and one of the main FreeCAD devs

  • http://yorik.uncreated.net
  • yorik@uncreated.net
  • @yorikvanhavre
slide-4
SLIDE 4

Self-promotion moment

(You can skip in 5...4...3...) http://www.uncreated.net http://www.uncreated.net

slide-5
SLIDE 5

http://www.freecadweb.org

  • Homepage with download info, etc
  • Documentation wiki
  • VERY active forum (← go there)
  • Bug tracker
slide-6
SLIDE 6

What is FreeCAD

  • Made to model “anything that will be

built in the real world”

  • Parametric (3D objects are

controlled by parameters, for ex. Height or Length, or another object)

  • LOVES standards
slide-7
SLIDE 7
slide-8
SLIDE 8
slide-9
SLIDE 9
slide-10
SLIDE 10
slide-11
SLIDE 11
slide-12
SLIDE 12
slide-13
SLIDE 13
slide-14
SLIDE 14
slide-15
SLIDE 15
slide-16
SLIDE 16
slide-17
SLIDE 17
slide-18
SLIDE 18

core

Modularity

mech design architecture ship design

GUI GUI GUI GUI

...

slide-19
SLIDE 19

Multi paradigm

  • Core provides only a container for

modules and a 3D viewer

  • The type of objects that can be

contained in a FreeCAD document are defined in modules

  • Any kind of stuff can coexist in a

same document

slide-20
SLIDE 20

Heavy dependencies

  • Qt (interface)
  • Python (scripting & more)
  • OpenCasCade (geometry kernel)
  • OpenInventor/Coin3D (3D display)
  • Many more, each module has its
  • wn: KDL, IfcOpenShell, matplotlib,
  • penSCAD, etc...
slide-21
SLIDE 21

Python everywhere

  • The “glue” between “core” and GUI
  • Some modules fully written in python
  • The user can access just anything,

and therefore gain the powers of a GOD full C++ developer

  • Learn while doing
slide-22
SLIDE 22
slide-23
SLIDE 23
slide-24
SLIDE 24
slide-25
SLIDE 25
slide-26
SLIDE 26
slide-27
SLIDE 27
slide-28
SLIDE 28
slide-29
SLIDE 29
slide-30
SLIDE 30
slide-31
SLIDE 31
slide-32
SLIDE 32
slide-33
SLIDE 33

Recording? wait... that means...

slide-34
SLIDE 34
slide-35
SLIDE 35

Your work can be replayed

slide-36
SLIDE 36

Separation between “core” and GUI? wait... that means...

slide-37
SLIDE 37

Yes.

slide-38
SLIDE 38

>>> import FreeCAD

slide-39
SLIDE 39
  • FreeCAD runs fully without the GUI
  • It is embeddable in other apps with
  • ne line of code
  • All its modules still work (without

their GUI too)

  • It can then act as a (web) server
  • It could have other GUIs
slide-40
SLIDE 40
slide-41
SLIDE 41
slide-42
SLIDE 42
slide-43
SLIDE 43

The web!

  • Web applications that use FreeCAD

in the background

  • WebGL interfaces for FreeCAD
  • Anything that has not yet been

imagined

slide-44
SLIDE 44

Why python, after all?

  • Powerful C API, very easy to embed

and make dialog with the C++ core

  • Almost every lib has python bindings

nowadays

  • The open-source community is fond
  • f it, easy adoption
slide-45
SLIDE 45

Useful apps that use python

  • pensource
  • Blender: yes
  • Inkscape: yes
  • OpenSCAM: yes
  • GRASS: yes
  • Salome: yes
  • OpenSCAD: yes

... proprietary

  • Autocad: yes
  • SolidWorks: no
  • Catia: yes
  • Rhino: yes
  • SolidEdge: yes
  • Revit: yes

...

slide-46
SLIDE 46

Why would users want it?

  • Making objects in real-life already

involves a lot of tinkering

  • Technical and precise 3D modeling

quickly becomes very complex (lots

  • f ways to do things)
  • Paradigms evolve constantly
slide-47
SLIDE 47

Now for some serious stuff...

slide-48
SLIDE 48

Access the geometry kernel

via FreeCAD's own API

>>> import Part >>> l = Part.makeLine((0,0,0),(2,2,0)) >>> Part.show(l) >>> c = Part.makeBox(2,2,2) >>> Part.show(c)

slide-49
SLIDE 49

Access the geometry kernel

directly

>>> import OCC >>> from OCC.BRepPrimAPI import BrepPrimAPI_MakeBox >>> c = BrepPrimAPI_MakeBox(10,20, 30).Shape() >>> p = Part.__fromPythonOCC__(c) >>> Part.show(p)

slide-50
SLIDE 50
slide-51
SLIDE 51

Access the interface

via Qt's own python libs

>>> from PySide import QtGui, QtCore >>> mw = FreeCADGui.getMainWindow() >>> d = QtGui.QDockWidget() >>> d.setWidget(QtGui.QCalendarWidget()) >>> mw.addDockWidget(d)

slide-52
SLIDE 52
slide-53
SLIDE 53
slide-54
SLIDE 54

Access the OpenGL 3D view

via Coin3D's python lib

>>> from pivy import coin >>> win = FreeCADGui.ActiveDocument. ActiveView.getSceneGraph() >>> win.addChild(coin.SoCube())

slide-55
SLIDE 55
slide-56
SLIDE 56

Root Separator Position xyz Color red Cube Separator

slide-57
SLIDE 57
slide-58
SLIDE 58

The user can

  • Quickly record a couple of actions
  • Tweak it afterwards
  • Create highly complex GUI elements
  • Create the needed screen behaviour
slide-59
SLIDE 59
slide-60
SLIDE 60

Typical learning path

  • Start by recording some actions: my

first macro!

  • Publish it on the FreeCAD website
  • Tweak it, add some salt
  • Man, I need a dialog...
slide-61
SLIDE 61
slide-62
SLIDE 62
slide-63
SLIDE 63

The community usually

  • Suffocates cool new users with help
  • Guides through the complex world of

technical 3D

  • Provides a lot of feedback and

testing

  • Decides about anything
slide-64
SLIDE 64

The FreeCAD development

  • No goals, no schedule, no law
  • No release plan. No plan at all,

actually

  • No typical “user-to-developer” thing
  • Most of the problems get solved

directly on the forum

slide-65
SLIDE 65

And the developers?

  • Just 3 people with write permission
  • General knowledge of the whole app
  • Very tight attention to the structure

and the principles

  • Promote FWD (FreeCAD World

Domination)

slide-66
SLIDE 66
slide-67
SLIDE 67
slide-68
SLIDE 68
slide-69
SLIDE 69

“We're moving into this future where the factory is everywhere, and the design team is

  • everyone. That is an industrial

revolution” Alastair Parvin (TED talk) http://www.wikihouse.cc

slide-70
SLIDE 70

Thank you!