Grasshopper

algorithmic modeling for Rhino

Hello can anyone tell me whether there is apossibility to combine karamba and python script in grasshopper, because after designing structure in python and if we want karamba to calculate the loads , is it possible??

Views: 862

Replies to This Discussion

Hi muralimanoj,

Try using the newest ghPython component with its node-in-code feature:

import ghpythonlib.components as ghc

import rhinoscriptsyntax as rs

vec_3d = rs.coerce3dvector([0,0,-1])

selfweight = ghc.Karamba.Gravity(vec_3d, 0)

Thanks will try and update it

Hello,

it is possible to combine karamba and python. Details can be found in the 'Karamba Hacker's Essentials'-manual (see http://www.food4rhino.com/project/karamba or http://www.karamba3d.com/downloads/downloadkaramba/).

Best,

Clemens

thanks wil try and update it

Hello,

I tried to follows your example and the hacker's essentials 1.1 (and I have v 1.2.2). I am struggling with importing the py library from the grasshopper library as follows:

import ghpythonlib.components as gh
import karamba

I have copied all the folder named '64bit' in grasshopper library folder (items are not in a sub-folder). The karamba.py gives me back an in-script error, i.e.

Runtime error (ImportException): No module named _karamba
Traceback:
line 20, in swig_import_helper, "C:\Users\Claudio\AppData\Roaming\Grasshopper\Libraries\karamba.py"
line 28, in <module>, "C:\Users\Claudio\AppData\Roaming\Grasshopper\Libraries\karamba.py"
line 2, in script

Just wondering if I could have an help about this. I tried the IronPython example, but it keeps saying that the karamba.gha does not exist in my plugin folder (but it's there). This occurs on line 3 of your example on the operation clr.AddReferenceToFileAndPath(*the path it finds*)

Many thanks

Claudio

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service