/// <summary>
        /// 得到放电面积
        /// </summary>
        /// <param name="bodys"></param>
        /// <param name="workpiece"></param>
        private void AskComputeDischargeFace(List <Body> bodys, Part workpiece)
        {
            List <string>             err           = new List <string>();
            Body                      workpieceBody = workpiece.Bodies.ToArray()[0];
            Matrix4                   inv           = this.work.Info.Matr.GetInversMatrix();
            CartesianCoordinateSystem csys          = BoundingBoxUtils.CreateCoordinateSystem(this.work.Info.Matr, inv);

            foreach (Body by in bodys)
            {
                if (!BodyInfo.IsContactArea(by))
                {
                    ComputeDischargeFace cdf = new ComputeDischargeFace(by, workpieceBody, this.work.Info.Matr, csys);
                    cdf.GetBodyInfoForInterference(false, out err);
                }
            }
        }
        private BodyInfo GetDischargeFace(CartesianCoordinateSystem csys, Component ct)
        {
            List <string> err  = new List <string>();
            Part          host = work.GetHostWorkpiece();

            if (host == null)
            {
                return(null);
            }
            Body workBody           = host.Bodies.ToArray()[0];
            Body eleBody            = elePart.Bodies.ToArray()[0];
            Body comBody            = AssmbliesUtils.GetNXObjectOfOcc(ct.Tag, eleBody.Tag) as Body;
            ComputeDischargeFace cp = new ComputeDischargeFace(comBody, workBody, work.Info.Matr, csys);

            return(cp.GetBodyInfoForInterference(false, out err));
        }
        /// <summary>
        /// 分析放电面积
        /// </summary>
        /// <param name="csys"></param>
        /// <param name="ct"></param>
        /// <returns></returns>
        private BodyInfo GetDischargeFace(CartesianCoordinateSystem csys, Body eleCtBody)
        {
            List <string> err      = new List <string>();
            Component     hostComp = GetPartInOcc(hostPart);

            if (hostComp != null)
            {
                Body workBody = GetOccsInBods(hostComp);
                if (workBody != null)
                {
                    ComputeDischargeFace cp = new ComputeDischargeFace(eleCtBody, workBody, work.Info.Matr, csys);
                    return(cp.GetBodyInfoForInterference(false, out err));
                }
            }

            return(null);
        }