Esempio n. 1
0
        /// <summary>
        /// 获取基准面最小半径
        /// </summary>
        /// <param name="face"></param>
        /// <returns></returns>
        public double GetBaseMinDia(Face baseFace)
        {
            double min = 9999;

            if (analysisBody == null)
            {
                AnalysisElectrode();
            }
            foreach (Edge eg in baseFace.GetEdges())
            {
                if (eg.SolidEdgeType == Edge.EdgeType.Circular)
                {
                    foreach (Face fe in eg.GetFaces())
                    {
                        if (!fe.Equals(baseFace))
                        {
                            AnalysisFaceSlopeAndDia af = this.analysisBody.AnaFaces.Find(a => a.Face.Equals(fe));
                            if (af.Data.IntNorm == -1 && af.MinDia != 0)
                            {
                                if (min > af.MinDia)
                                {
                                    min = af.MinDia;
                                }
                            }
                        }
                    }
                }
            }
            return(min);
        }
Esempio n. 2
0
        /// <summary>
        /// 创建面颜色
        /// </summary>
        /// <param name="analy"></param>
        /// <returns></returns>
        public static AbstractFaceSlopeColour Build(AnalysisFaceSlopeAndDia analy)
        {
            AbstractFaceSlopeColour plane = new PlaneFaceSlopeColour(analy);
            AbstractFaceSlopeColour vert  = new VerticalFaceSlopeColour(analy);
            AbstractFaceSlopeColour slant = new SlantFaceSlopeColour(analy);
            AbstractFaceSlopeColour back  = new BackOffFaceSlopeColour(analy);

            plane.SetNext(vert);
            vert.SetNext(slant);
            slant.SetNext(back);
            return(plane);
        }
Esempio n. 3
0
        /// <summary>
        /// 分析
        /// </summary>
        private void Analysis()
        {
            double min = 9999;

            foreach (Face face in body.GetFaces())
            {
                AnalysisFaceSlopeAndDia afs = new AnalysisFaceSlopeAndDia(face, vec);
                if (afs.Data.IntNorm == -1 && afs.MinDia != 0)
                {
                    if (min > afs.MinDia)
                    {
                        min = afs.MinDia;
                    }
                }
                anaFace.Add(afs);
            }
            anaFace.Sort();
            anaFace.RemoveAt(0);
            this.min = min;
        }
Esempio n. 4
0
 public SlantFaceSlopeColour(AnalysisFaceSlopeAndDia analy) : base(analy)
 {
 }
 public AbstractFaceSlopeColour(AnalysisFaceSlopeAndDia analy)
 {
     this.analy = analy;
 }
Esempio n. 6
0
 public BackOffFaceSlopeColour(AnalysisFaceSlopeAndDia analy) : base(analy)
 {
 }
Esempio n. 7
0
 public VerticalFaceSlopeColour(AnalysisFaceSlopeAndDia analy) : base(analy)
 {
 }