Grasshopper

algorithmic modeling for Rhino

Hi there, 

I am trying to import a library called Accord.NET into a C# component in GH. I can work with this library easily in Visual Studio but the import operation in the C# component fails for this library. I have previously imported many libraries successfully including libraries built by myself but I don't see what is the problem with this one. The only clue I have is that the .NET framework within which the latest version of grasshopper is written is 4.0 something. that is quite old compared to the framework used for this library (This is a major concern anyway...). However, I cannot even 'fully' import the previous version of the library written in .NET framework 4.0.

Any clue is very much appreciated!

Views: 984

Replies to This Discussion

I was working with accord.net both in visual studio and in grasshopper c# and python.

Several functions such as kmeans or linear regression worked well on both.

I am wondering if this really .NET framework issue. 

I have my own compiled libraries in 4.6 and it works within grasshopper scripting components.

Maybe there is very specific issue with net framework or related to C# 7

Hi Petras, thanks for your response. Actually, I realised I was mistaken about the .NET version. It turns out that the .NET framework with which GH is written is the newest. And to be precise, I have to say I have worked with many functions from Accord.NET in GH C# scripts but some namespaces do not import in GH C# component and I get error messages when trying to import the newest versions of Accord.Math.dll in the C# component. May I ask what is the version of Accord you have used successfully and where you downloaded it from?

I am wondering if you have managed to use the magic functionality of accord.net in "understanding" matrices and vectors. That is what I am missing mostly from accord.net in GH C# component: Let's say you declare a multi-dimensional array of doubles and then your c# editor must be able to understand it is potentially a matrix and provide you with the 'extension methods' operating on matrices: 

double[,] matrix =   {{1, 2},{3, 4},{5, 6}};
double[,] nextMatrix=matrix.Multiply(2);//this works in Visual studio but not in GH C#

Hi there,

If any GH developers need any help from the Accord.NET side, please do not hesitate to register this as an issue in the project's issue tracker.

Regards,

Cesar

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