Pipes coming out as Goo

I am creating pipes and want to pass them to output A. But the result is System.Collections.Generic.List[System.Object] which is Goo. How do I pass these Brep arrays out so they are not Goo?

	List<Curve> x,
	double startRadius,
	double endRadius,
	ref object a)
    {
        List<Brep[]> answer = new List<Brep[]>();
        foreach (Rhino.Geometry.Curve c in x)
    {
        // Write your logic here
        var pipe = Brep.CreatePipe(c, new double[]{0,1}, new double[]{startRadius, endRadius}, true, PipeCapMode.Round, true, 0.01, Math.PI);
        answer.Add(pipe);
    }
    a = answer;
    }
}

Hello
it is good to post some code, it could be a bit better to post also the Grasshopper file.
But whatever, as you have a List<Brep> Brep is not a standard output of Grasshopper script.
If you want to keep datastructure, use DataTree.
Do that and it must work better
May I ask why you use PI as angle tolerance. It is a bit way toooo large.

pipe variable radius.gh (8.7 KB)

    private void RunScript(
	List<Curve> x,
	double startRadius,
	double endRadius,
	ref object a)
    {
        // Write your logic here
        List<Brep> answer = new List<Brep>();
        foreach (Rhino.Geometry.Curve c in x)
    {
        // Write your logic here
        var pipe = Brep.CreatePipe(c, new double[]{0,1}, new double[]{startRadius, endRadius}, false, PipeCapMode.None, false, 0.01, 0.1);
        answer.AddRange(pipe);
    }
    a = answer;
    }
}
1 Like