public override bool CastFrom(object source) { if (source is GH_Brep gh_brep) { var interFile = SolidExchanger.GrasshopperExport(gh_brep.Value); Value = SolidExchanger.NXImport(interFile); return(true); } else { Console.WriteLine($"无法将 {source.GetType()} 转换为 NXOpen.Body"); return(base.CastFrom(source)); } }