Beispiel #1
0
        public void GetInterferenceOfArea()
        {
            Body        eleBody       = GetOccsInBods(this.eleModel.PartTag)[0];
            Body        workpieceBody = GetOccsInBods(this.workpiece)[0];
            List <Face> faces         = AnalysisUtils.SetInterferenceOutFace(eleBody, workpieceBody);
            double      minArea       = 0;

            for (int i = 0; i < (faces.Count) / 2 - 1; i++)
            {
                FaceData data1 = FaceUtils.AskFaceData(faces[i * 2]);
                FaceData data2 = FaceUtils.AskFaceData(faces[i * 2 + 1]);
                if (data1.Equals(data2))
                {
                    double area1 = FaceUtils.GetFaceArea(faces[i * 2]);
                    double area2 = FaceUtils.GetFaceArea(faces[i * 2 + 1]);
                    if (area1 > area2)
                    {
                        minArea += area2;
                    }
                    else
                    {
                        minArea += area1;
                    }
                }
            }
            AttributeUtils.AttributeOperation("Area", minArea, this.eleModel.PartTag);
        }
Beispiel #2
0
 /// <summary>
 /// 获取接触面积
 /// </summary>
 /// <returns></returns>
 private double GetContactArea()
 {
     if (this.DischargeFace.Count == 0)
     {
         return(0);
     }
     return(FaceUtils.GetFaceArea(this.DischargeFace.ToArray()));
 }