private static List<string> GetFacesProps(Solid3d solid)
{
List<string> ret = new List<string>();
ObjectId[] ids = new ObjectId[] { solid.ObjectId };
SubentityId subentId = new SubentityId(SubentityType.Null, IntPtr.Zero);
using (Brep brep = new Brep(new FullSubentityPath(ids, subentId)))
{
if (brep == null) return ret;
foreach (BrFace face in brep.Faces)
using (Entity faceEnt = solid.GetSubentity(face.SubentityPath))
{
if (!faceEnt.Color.IsNone && faceEnt.Color != solid.Color)
{
if (!ret.Contains(faceEnt.Color.ToString())) ret.Add(faceEnt.Color.ToString());
}
if (!string.IsNullOrEmpty(faceEnt.Material) && faceEnt.Material != solid.Material)
{
if (!ret.Contains(faceEnt.Material)) ret.Add(faceEnt.Material);
}
}
}
return ret;
}