需要地工具包括:
Rhino
Rhino插件:Codelistener
https://www.food4rhino.com/en/app/code-listener
VScode
VScode插件:
Python
https://marketplace.visualstudio.com/items?itemName=ms-python.python
RhinoPython
https://marketplace.visualstudio.com/items?itemName=designtoproduction.rhinopython
详细配置过程:
https://github.com/ccc159/RhinoPythonForVscode/blob/master/README.md
配置过程补充说明:
1、安装CodeListener插件之后,右击插件属性找到该路径:
C:\Program Files\Common Files\McNeel\Rhinoceros\7.0\Plug-ins\CodeListener (8c4235b6-64bc-4508-9166-bef8aa151085)\0.1.7.0\AutoComplete(注意该路径以Autocomplete结尾)
2、打开RhinoPython编辑面板,在选项中找到这三个路径。
3、打开VScode,搜索python.autoComplete.extraPaths。
将上述两步找到的路径一并添加至该处,值得注意的是似乎这几个路径文件的顺序有所影响。按照如图所示的顺序,才会在使用中出现代码自动补全的效果,否则不会。
(注意这几个路径文件的顺序,另外要注意每行结尾加上逗号!)
如果是需要VScode和GHpython进行联动,则需要首先在VScode中建立文件,之后保存到电脑本地。
然后打开Grasshoper,读取本地文件即可。