예제 #1
0
        // Return a new CSG solid representing space both this solid and in the
        // solid `csg`. Neither this solid nor the solid `csg` are modified.
        public static CSG_Node Intersect(CSG_Node a1, CSG_Node b1)
        {
            CSG_Node a = a1.Clone();
            CSG_Node b = b1.Clone();

            a.Invert();
            b.ClipTo(a);
            b.Invert();
            a.ClipTo(b);
            b.ClipTo(a);
            a.Build(b.AllPolygons());
            a.Invert();

            CSG_Node ret = new CSG_Node(a.AllPolygons());

            return(ret);
        }
예제 #2
0
        public Mesh getMesh()
        {
            CSG_Model result = new CSG_Model(current_object.AllPolygons());

            return(result.ToMesh());
        }