private ICurve[] Intersect(IGeoObject go, PlaneSurface pls) { Plane plane = pls.Plane; if (go is Solid) { BoundingCube bc = go.GetBoundingCube(); if (bc.Interferes(plane)) { return((go as Solid).GetPlaneIntersection(pls)); } } if (go is Shell) { BoundingCube bc = go.GetBoundingCube(); if (bc.Interferes(plane)) { return((go as Shell).GetPlaneIntersection(pls)); } } if (go is Face) { BoundingCube bc = go.GetBoundingCube(); if (bc.Interferes(plane)) { return((go as Face).GetPlaneIntersection(pls)); } } List <ICurve> res = new List <ICurve>(); if (go is Block) { for (int i = 0; i < go.NumChildren; i++) { res.AddRange(Intersect(go.Child(i), pls)); } } return(res.ToArray()); }