找回密码
 注册
搜索
查看: 29011|回复: 3

[在线求助] 新人求解 求一个用pycharm 写ghpython的方法

[复制链接]
发表于 2019-12-24 10:52:11 | 显示全部楼层 |阅读模式
ghpython中 用到了  import Rhino  和import Grasshopper  ,import system这些用法不知道怎么在pycharm里实现   
              求解
 楼主| 发表于 2019-12-24 10:54:23 | 显示全部楼层
GH标准py电池是这么写的
from ghpythonlib.componentbase import executingcomponent as component
import Grasshopper, GhPython       #这一行不知道怎么弄
import System                               #这一行不知道怎么弄
import Rhino                                 #这一行不知道怎么弄
import rhinoscriptsyntax as rs
回复

使用道具 举报

发表于 2019-12-24 16:07:30 | 显示全部楼层
Mercurial 发表于 2019-12-24 10:54
GH标准py电池是这么写的
from ghpythonlib.componentbase import executingcomponent as component
impor ...

B站有个搬运的视频不知道有没有:Grasshopper & Rhino Plugin Developmen__(Python & C# 插件开发)
回复

使用道具 举报

发表于 2020-2-17 14:51:34 | 显示全部楼层
非常简单。如果是visualstudio.看这个,注意需要Rhino7 wip
https://developer.rhino3d.com/guides/rhinopython/ghpython-debugging/
pytham+Rhino6,需要下载一个Ironpython2.7,把解释器切换为ironpython.
然后 把pythonspricpt的路径加进去。
然后import sys, sys.addpath("你的Rhinopython脚本的路径")
import clr clr.addRefence("Grasshopper.dll")
clr.AddRefence("Rhino.exe")
clr.AddRefence("GH_IO.dll")
回复

使用道具 举报

NCFZ微信公众号

手机版|小黑屋|NCF参数化建筑论坛 ( 浙ICP备2020044100号-2 ) 辽公网安备21021102000973号

GMT+8, 2026-11-23 18:43 , Processed in 0.038279 second(s), 19 queries , Gzip On.

Powered by Discuz! X5.0 Licensed

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表