algorithmic modeling for Rhino
Hi D and All,
I've moved the previous discussion here to avoid confusion.
The intent here is to write a plugin for Rhino 5 with RhinoCommon.
A very simple one which is written in Visual Studio Express 2010.
It is mainly to understand how to create the relationship between rhino / vb.net / rhinocommon, somewhat how grasshopper works.
The error which comes up is the following:
Could not load file or assembly 'RhinoCommon, Version=5.0.15005.0, Culture=neutral, PublicKeyToken=552281e97c755530' or one of its dependencies. The system cannot find the file specified.
It seems to be an issue with the RhinoCommon.dll file.
I am loaded this and made sure the Copy Local was false.
David you mentioned "
To make a .NET plugin for Rhino5 (rhp) you need to reference only RhinoCommon.dll and make sure you don't 'Copy Local'.**"
Now am I going about this the wrong way? Because the setup which I'm doing now is building a windows application file not a rhp. I would assume that you would be able to create an application in this manor to run operations in rhino. Perhaps I am wrong.
I have a gut feeling that the setup to create a plug in much more comples then just importing the rhino, rhino.geometry, rhino.collections libraries. Would you have to create some type of link to the rhino active window/application? Any thought, insights, or greatly appreciated when all have some free moments.
Many thanks as always!
Tags:
Yes, you are wrong. You cannot use RhinoCommon functions unless you are running inside the Rhino AppDomain. The only way to do this is to make an rhp and have Rhino load you.
An rhp is just a dll with a different extension (in fact a dll will also load as a plugin, you just can't drag+drop it into Rhino). So you need to make sure your project is a class library, not a standalone executable.
Did you download and install the project and class wizards from our wiki? If you did, you should have a RhinoCommon Plugin project item among your options when you create a new project.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Hi David
call me stupid, but if rhinocommon is now open source, why do we still need to run the rhino application to use any rhino common methods one might use in a custom class library which references rhinocommon classes such as a point?
I can understand this if we are making calls to the rhino application using a custom dll that references the rhinocommon library.
cheers
Because RhinoCommon is nothing more than a layer. A thin veneer of pure awesomeness around the Rhino C++ core. When you use a SurfaceSurface intersector, or a Curve Closest Point finder, the actual geometry and function calls all happen in the Rhino core, which is not Open Source.
Some operations have been re-implemented in RhinoCommon entirely, especially for simple data types like Points, Vectors, Planes and Transforms, but the hard-core stuff took decades to develop so it would be a waste of effort to try and rewrite everything in a different language while running on a platform that already supplies all of the required functions.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
ps. Only part of RhinoCommon is Open Source. The C# part. The C++ part I think we kept closed, at least for now.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Not all of it, I can find five places in the Vector3d type where it calls into unmanaged (C++) code. IsTiny, Unitize, Rotate, IsParallelTo & PerpendicularTo all place calls to the UnsafeNativeMethods class which contains PInvoke calls into C++ code.
But then these methods are implemented in OpenNURBS which is also open source, so if you want to know what they look like you can get them from over there.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by