Output Emtpy Branches from a custom component

Hey all,

I have a simple custom component I’m writing in VS 2019. It’s a basic slicing logic for 3-d printing. Takes a series of tweened SubD surfaces (I’ll call them cutting surfaces and for logistical reasons, the script converts them to breps in this instance) and then iteratively intersects them with a brep. It’s working more or less correctly, the only issue is the output. In an area where there is no geo for the cutting surfaces to intersect, I’ve written it add an empty branch. This is to maintain a list structure so you can compare multiple geos using the same cutting surfaces. This worked fine when the code was in a c# component, but the moment I put it through VS to create a plugin, the output doesn’t have the empty branches. This GH_paths are correct. Here’s the code.

        for (int i = 0; i < CuttingSubD.BranchCount; i++)
        {
            SubDToBrepOptions basic = new SubDToBrepOptions();
            Brep plane = CuttingSubD.Branch(i)[0].ToBrep(basic);
            Curve[] intersections = null;
            Point3d[] intersectionPts = null;
            Rhino.Geometry.Intersect.Intersection.BrepBrep(geo, plane, 0.001, out intersections, out intersectionPts);
            if (intersections.Length > 0)
            {
                foreach (Curve c in intersections)
                {
                    paths.Add(c, new GH_Path(i));
                }
            }
            else
            {
                paths.EnsurePath(new GH_Path(i));
            }
        }