algorithmic modeling for Rhino
Trying to force myself to use C# in a effort to learn more. I'm trying to recreate the Solid difference component and I'm running in to some logical errors. Can anyone point me in the right direction or show me what I'm doing wrong?
Im getting the following errors:
1. Error (CS0136): A local variable named 'stk' cannot be declared in this scope because it would give a different meaning to 'stk', which is already used in a 'parent or current' scope to denote something else (line 75)
2. Error (CS0029): Cannot implicitly convert type 'Rhino.Geometry.Brep[]' to 'Rhino.Geometry.Brep' (line 75)
Code below:
private void RunScript(List<Brep> x, Brep y, ref object A)
{
List<Rhino.Geometry.Brep> myBreplist = x;
Brep stk = y;
int i = 0;
while(i < myBreplist.Count){
Brep brepA = myBreplist[i];
Brep stk = Brep.CreateBooleanDifference(brepA, stk, .01);
i++;
}
A = stk;
Tags:
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
© 2025 Created by Scott Davidson.
Powered by