예제 #1
0
        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()));
        }
예제 #2
0
 public CsgNode(CsgSolid solid) : this()
 {
     Build(solid.Polygons.ToList());
 }