1 of 36

Making Your Own Python Components

Chris Mackey

2 of 36

GH Python Scripting Tutorial Schedule

Making Your Own Python Components

Today

Oct. 20th

AEC Software Development 101

Today

Oct. 27th

3 of 36

Today’s Schedule

1 - Where to Start / What you Need

3 - Hitting the Limits of Grasshopper (Flow Analysis Example)

4 - Extending Your Capabilities with GHPython

20 minutes

30 minutes

30 minutes

2 - Simple Example - Unit Converter Component

30 minutes

4 of 36

This Workshop is for You if...

You have knowledge of scripting / software development and you are looking to expand your work into Rhino / Grasshopper.

5 of 36

OR

This Workshop is for You if...

You have knowledge of scripting / software development and you are looking to expand your work into Rhino / Grasshopper.

You have knowledge of Rhino / Grasshopper and you are looking to get into scripting.

6 of 36

What You Need to Learn

7 of 36

What You Need to Learn

A Reference (Video Series or Book)

8 of 36

A Reference (Video Series or Book)

9 of 36

What You Need to Learn

A Reference (Video Series or Book)

10 of 36

What You Need to Learn

A Reference (Video Series or Book)

A Community

11 of 36

A Community

For Python (general coding) Questions

12 of 36

A Community

For Python (general coding) Questions

For Rhino / GH Questions

13 of 36

A Community

For Python (general coding) Questions

For Rhino / GH Questions

For Climate / Energy Modeling

14 of 36

Learn to Code by Example

15 of 36

What You Need to Learn

A Reference (Video Series or Book)

A Community

16 of 36

What You Need to Learn

A Reference (Video Series or Book)

A Project

A Community

17 of 36

A Project

Software is something that can really only be learned by applying it.

18 of 36

19 of 36

20 of 36

A Project

21 of 36

A Project

22 of 36

What You Need to Learn

A Reference (Video Series or Book)

A Project

A Community

23 of 36

What You Need to Learn

A Reference (Video Series or Book)

A Project

Persistence

A Community

“Any Computer Issue is Solve-able if You Keep Trying Different Things.”

24 of 36

“Any Computer Issue is Solve-able if You Keep Trying Different Things.”

25 of 36

What You Need to Learn

A Reference (Video Series or Book)

A Project

Persistence

A Community

“Any Computer Issue is Solve-able if You Keep Trying Different Things.”

26 of 36

27 of 36

GHPython

28 of 36

GHPython

Ladybug uses Python because:

  1. The rules of coding are relaxed, meaning:
    1. It’s much faster to learn it
    2. It’s much easier to test things out

  • It’s not tied to a particular OS or platform.

  • It has all of the capabilities of a full language

(ie. object oriented programming)

29 of 36

GHPython

30 of 36

GHPython

Translates to

C#, VB, Python

31 of 36

32 of 36

Application Programming Interfaces (APIs)

aka. Software Development Kits (SDKs)

33 of 36

Application Programming Interfaces (APIs)

aka. Software Development Kits (SDKs)

A library of functions, objects, and protocols for building software and applications.

34 of 36

Application Programming Interfaces (APIs)

aka. Software Development Kits (SDKs)

A library of functions, objects, and protocols for building software and applications.

A good API makes it easier to develop a program by providing the building blocks.

35 of 36

RhinoCommon API

36 of 36

Ladybug API

Honeybee API