Using WeaverBird from C# Rhp plug in [SOLVED]


I am trying to make a new plugIn for Rhino in C#. Tests are working great so far.

In GH I was using WeaverBird to create a mesh from lines and I am experiencing some issues to make this happen in the plugIn.

  • I have imported WeaverBird Rhp into my C# project.
  • I have created an instance of WbMeshFromLinesCommand with no issues.

The problem comes when I am trying to run the command. It is asking for IRhinoCommandContext and I have no clue where I can get the context, so I can pass it as argument. If it is possible I would like to avoid RhinoApp.RunScript.

Any suggestion? Thanks

This has been implemented into RhinoCommon for RhinoWIP

is it the same algorithm used by weaverbird?

I believe they are related. @piac might be able to confirm.

1 Like

ok, thanks Luis. by the way,mesh from lines was already present in Rhino 5…

Yes. And Mesh.CreateFromLines() is available in RhinoCommon.


I think the main difference in the wip is being able to get ngons out.

mesh from lines was already present in Rhino 5…

I don’t recall it being available in RhinoCommon for Rhino 5, but I might be mistaken.
Yes, it is achievable with Weaverbird in rhino 5, but if you are writing a C# plugin, why script the command when you have a method?

you are right Luis, its not present in Rhino 5. I guess that I was in Rhino Wip when I used it… my memory is getting worse!

By the way, the “Aitor” who wrote the first message was not me… but a friend of mine! (basque country is a small place)

1 Like

Rhino Wip’s RhinoCommon library has that method implemented. But. cannot build plug-in for Rhino 5 with that library.
Anyway, it is good to know there is a solution for this in future versions. Right now I can keep going with a workaround.