local q=type local X=unpack local M=table.insert local C=Region3.new local V=Vector3.new local function h(q)local X=q[1]-q[1]for M=1,#q,1 do X=X+q[M]end return X/#q end local function w(q)if q.ClassName=="\080\097\114\116"then if q.Shape==Enum.PartType.Block then return region3.block(q.CFrame,q.Size)elseif q.Shape==Enum.PartType.Cylinder then return region3.cylinder(q.CFrame,q.Size)elseif q.Shape==Enum.PartType.Ball then return region3.ellipsoid(q.CFrame,q.Size)end elseif q.ClassName=="\087\101\100\103\101\080\097\114\116"then return region3.wedge(q.CFrame,q.Size)elseif q.ClassName=="\067\111\114\110\101\114\087\101\100\103\101\080\097\114\116"then return region3.cornerWedge(q.CFrame,q.Size)elseif q:IsA("\066\097\115\101\080\097\114\116")then return region3.block(q.CFrame,q.Size)end end


local type = type;
local unpack = unpack;
local insert = table.insert;
local R3 = Region3.new;

local v3 = Vector3.new;

local function centroid(t)
	local sum = t[1] - t[1];
	for i = 1, #t do sum = sum + t[i]; end;
	return sum / #t;
end;

local function classify(part)
	if (part.ClassName == "Part") then
		if (part.Shape == Enum.PartType.Block) then
			return region3.block(part.CFrame, part.Size);
		elseif (part.Shape == Enum.PartType.Cylinder) then
			return region3.cylinder(part.CFrame, part.Size);
		elseif (part.Shape == Enum.PartType.Ball) then
			return region3.ellipsoid(part.CFrame, part.Size);
		end;
	elseif (part.ClassName == "WedgePart") then
		return region3.wedge(part.CFrame, part.Size);
	elseif (part.ClassName == "CornerWedgePart") then
		return region3.cornerWedge(part.CFrame, part.Size);
	elseif (part:IsA("BasePart")) then -- mesh, CSG, truss, etc... just use block
		return region3.block(part.CFrame, part.Size);
	end;
end;
