I try to open some simple C# components that work on windows and also on mac v7, but on the WIP version they all throw many errors about missing assemblies?
E.g. I can add System.Drawing without errors in the editor, but as soon as i use even the simplest thing like ‘Color’ in the actual code, I get errors about missing assemblies.
Basically .NET 6 doesn’t have all the API the older .NET framework came with. To be future proof you should move drawing code to Eto.Forms and stop using other non-supported API.
I see - but this is not about drawing interfaces.
I cant even add a color to a pointcloud at this point.
Stackoverflow says to use System.Drawing.Common instead, but this is not linked, rendering a big chunk of the rhino api not useable right now.
System.Drawing still should work though. I just tested with
# EditPythonScript
import scriptcontext as sc
import Rhino.Geometry as rg
import System.Drawing as sd
pc = rg.PointCloud()
for i in range(10):
for j in range(10):
pc.Add(rg.Point3d(i,j,0), sd.Color.FromName("Orange"))
sc.doc.Objects.AddPointCloud(pc)
sc.doc.Views.Redraw()
and with
# RhinoCode
#! python3
import Rhino as r
import Rhino.Geometry as rg
import System.Drawing as sd
pc = rg.PointCloud()
for i in range(10):
for j in range(10):
pc.Add(rg.Point3d(i, j, 0), sd.Color.FromName("Orange"))
ad = r.RhinoDoc.ActiveDoc
ad.Objects.AddPointCloud(pc)
ad.Views.Redraw()
Hey @atair, thanks for reporting the issue. A similar issue was reported here and I filed it as RH-70150. A fix is going through that I believe will resolve this for the next WIP build.
It would certainly help if you could post a sample GH file or steps to reproduce so I can verify the fix for your scenario.
@atair great, thanks for the sample. Yes, I think this will be resolved with the next WIP release. You can give our daily build a try with this link Rhino WIP 8.0.22280.04306.