File tree Expand file tree Collapse file tree 2 files changed +19
-9
lines changed Expand file tree Collapse file tree 2 files changed +19
-9
lines changed Original file line number Diff line number Diff line change 11#coding=utf-8
2+
23import clr
3- import sys
4- RhinoSystem = "C:\\ Program Files\\ Rhino 6\\ System\\ "
5- RhinoPlugin = "C:\\ Program Files\\ Rhino 6\\ Plug-ins\\ "
6- clr .AddReferenceToFileAndPath (RhinoSystem + "RhinoCommon.dll" )
4+ clr .AddReference ("RhinoCommon" )
75clr .AddReference ("Eto" )
86clr .AddReference ("Eto.Wpf" )
97clr .AddReference ("System.Windows.Forms" )
108clr .AddReference ("System.Drawing" )
11- sys .path .append ("C:\\ Program Files\\ Rhino 6\\ Plug-ins\\ IronPython\\ Lib\\ " )
12- sys .path .append ("C:\\ Users\\ mahai\\ AppData\\ Roaming\\ McNeel\\ Rhinoceros\\ 6.0\\ Plug-ins\\ IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\\ settings\\ lib\\ " )
139
10+ # init sys.path
1411import Rhino
15- import scriptcontext
16- scriptcontext .doc = Rhino .RhinoDoc .ActiveDoc
12+ import sys
13+ sys .path .append (Rhino .ApplicationSettings .FileSettings .InstallFolder .FullName + "Plug-ins\\ IronPython\\ Lib\\ " )
14+ sys .path .append (Rhino .ApplicationSettings .FileSettings .GetDataFolder (True ) +
15+ "Plug-ins\\ IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\\ settings\\ lib\\ " )
1716
18- # todo 这部分为了与官方的RhinoPython.Host兼容
17+ ### init scriptcontext
18+ # the offical Rhino.Python.Host module can not working in this environment.
19+ # reimplement Rhino.Python.Host.Coerce3dPointFromEnumerables function.
1920import RhinoPython .Host
2021
22+ # the offical scriptcontext.doc can not working in this environment.
23+ # assignment Rhino.RhinoDoc.ActiveDoc to scriptcontext.doc
24+ import scriptcontext
25+ scriptcontext .doc = Rhino .RhinoDoc .ActiveDoc
2126
Original file line number Diff line number Diff line change 11import Rhino
2+
3+ ### init scriptcontext
4+ # the offical Rhino.Python.Host module can not working in this environment.
5+ # reimplement Rhino.Python.Host.Coerce3dPointFromEnumerables function.
6+ import RhinoPython .Host
27def Coerce3dPointFromEnumerables (point ):
38 return Rhino .Geometry .Point3d (point [0 ],point [1 ],point [2 ])
You can’t perform that action at this time.
0 commit comments