Grasshopper

algorithmic modeling for Rhino

I would like to write some of my own functions to be driven by the Leap Motion using they Python component in grasshopper.  

I am not sure how to begin this setup.  I have the leap SDK downloaded, but I do not know where to place the files that support its programming.  Any advice would be greatly appreciated.  I have been having trouble finding support for this issue.  Please let me know if there is any additional information from my end that may help to find a solution.

Kind Regards,

Jake

Views: 1879

Replies to This Discussion

there is a minor mistake in your Python code. You need to either use / or \\ in the path or put an "r" before the path.

yourFolder = r"C:\Users\jake_newsum\Documents\Programs\Leap\CSetup"

import sys
import clr

import os


clr.AddReferenceToFileAndPath(os.path.join(yourFolder, "Leap.dll"))

if yourFolder not in sys.path:
  sys.path.append(yourFolder)

import Leap

I can't seem to get this to work.  I have tried with r"", \\, and /.

I tried it on a windows 7 computer to see if it was just my windows 8, but no luck.  It wont recognize the Leap.dll file.  I tried moving the file to a folder on the desktop as well.

yourFolder = r"C:\Users\Jake\Desktop\CSetup"
import sys
import clr
import os

clr.AddReferenceToFileAndPath(os.path.join(yourFolder, "Leap.dll"))

if yourFolder not in sys.path:
    sys.path.append(yourFolder)
import Leap

Thank you for all of your help.  I will keep playing with it.

Hi Jake,
How is the licensing of the libraries. Can you share it with me over dropbox? I'm so curious to know why this is happening.
You may also let Giulio know about your problem. He may already know why this is happening.
Mostapha

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service