Comands from Rhino to C#

Hi guys,

In Rhino in the command line I can invoke commands like SelBoundary and CurveBoolean

There are similar methods in C# without using RunScript?

tks.

Hi @0904,

The Rhino SDK does not have functional equivalents to Rhino commands. That is, if you don’t want to script a Rhino command, you’ll need to write your own version of the command.

– Dale

Hi @dale

I understand the meaning, but it is not clear to me:

in practice I should use combinations of the various methods present in C# to obtain the same result as the command in Rhino. . .

Is even a minimal code example possible or could you point me to a link?

Hi @0904,

Yes correct.

For SelBoundary, you might start with ObjectTable.FindByWindowRegion. I don’t have a sample that uses this. But the parameters’ are pretty simple.

For CurveBoolean, use Curve.CreateBooleanRegions. I do have a sample of this:

SampleCsCreateBooleanRegions.cs

All of the RhinoCommon samples can be found on GitHub.

GitHub - mcneel/rhino-developer-samples: Rhino and Grasshopper developer sample code

– Dale

ok @dale thanks for reply :+1:

ps therefore even if there are no dedicated functions, equivalent to the commands in Rhino, with C# by combining various methods it is possible to replicate (almost all) the commands typed in the Rhino toolbar.

Hi @0904,

That’s a reasonable assessment.

– Dale