Grasshopper

algorithmic modeling for Rhino

I was try to use Meshpatch in GH.

It is not in SDK for rhino 5.0 but rhino 6.

So other approach is using RhinoScript.

Then I run into the problem which is how to select multiple ID for the holes.

I wrote this.

private void RunScript(bool reset, Guid OutCrv, Guid Holes, ref object A)
{

if(reset)
{
// RhinoApp.RunScript(finalString, true);
RhinoApp.RunScript("_MeshPatch " + "_SelID " + OutCrv.ToString() + "_Enter" + "_SelID " + Holes.ToString() + "_Enter", true);
}

But the problem is "Holes" iincluding multiple ID.

Which means I should repeat ["_SelID " + Holes.ToString()] many times.

For example, if it is running in Rhino Macro, it is something like this.

 _MeshPatch
_SelID
126fc24e-6114-44d2-9756-99b8634ee3e0
_Enter
_SelID
0be95faf-dc82-455c-8b89-a97cac166e3e //OutCrv ID
_SelID
//Holes ID 2
_SelID
//Holes ID 3
_SelID
//Holes ID 4
_SelID
//Holes ID 5
_SelID
//Holes ID 6
_SelID
//Holes ID n
_Enter 
  
So how this work in c#?

Views: 283

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