Exemplo n.º 1
0
        public static AbstractCircleFace Create(Face face)
        {
            FaceData           data = FaceUtils.AskFaceData(face);
            AbstractCircleFace abs  = null;

            switch (face.SolidFaceType)
            {
            case Face.FaceType.Cylindrical:
                abs = new CylinderFace(data);
                break;

            case Face.FaceType.Conical:
                abs = new CircularConeFace(data);
                break;

            case Face.FaceType.Planar:
                List <ArcEdgeData> edge = new List <ArcEdgeData>();
                if (CircleAnnylusFace.IsCircleAnnylus(face, out edge))
                {
                    abs = new CircleAnnylusFace(data, edge);
                }
                break;

            default:
                break;
            }
            return(abs);
        }
Exemplo n.º 2
0
 public BodyCircleFeater(Body body)
 {
     this.body = body;
     foreach (Face face in body.GetFaces())
     {
         AbstractCircleFace af = CircleFaceFactory.Create(face);
         if (af != null)
         {
             circleFaces.Add(af);
         }
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// 判断是否是一个凸台并添加
 /// </summary>
 /// <param name="cf"></param>
 /// <returns></returns>
 public bool IsInThisStep(AbstractCircleFace cf)
 {
     if (this.CircleFaceList.Count == 0 || this.CircleFaceList == null)
     {
         this.CircleFaceList.Add(cf);
         return(true);
     }
     else
     {
         if (this.CircleFaceList[0].IsCircleStep(cf))
         {
             this.CircleFaceList.Add(cf);
             return(true);
         }
     }
     return(false);
 }