public CsgSolid Union(CsgSolid solid) { var a = new CsgNode(this); var b = new CsgNode(solid); a.ClipTo(b); b.ClipTo(a); b.Invert(); b.ClipTo(a); b.Invert(); a.Build(b.AllPolygons()); return(new CsgSolid(a.AllPolygons())); }
public CsgNode(CsgSolid solid) : this() { Build(solid.Polygons.Select(x => x.Clone()).ToList()); }