Example #1
0
 public Isothetic(Isothetic otherIso)
 {
     this.Outline    = new Polyline(otherIso.Outline);
     this.BasePt     = otherIso.BasePt;
     this.WidthLine  = otherIso.WidthLine;
     this.HeightLine = otherIso.HeightLine;
 }
        //main
        /// <summary>
        /// 기준점과 축을 찾아 최대내접 다각형을 그립니다.
        /// </summary>
        public Isothetic Draw()
        {
            SearchInitialPts();
            List <IsoBlock> maxBlocks = SearchGlobalMaxIso();

            if (maxBlocks.Count == 0)
            {
                return(null);
            }

            Isothetic defaultIso = BakeIso(maxBlocks);

            return(defaultIso);
        }
        /// <summary>
        /// 지정한 벡터를 좌표 평면 기준으로 해서 가장긴 PCX라인들을 축으로 잡습니다.
        /// </summary>
        public Isothetic DrawStrict(Point3d basePt, Vector3d axis, Vector3d perpAxis)
        {
            InitialPt strictInit = new InitialPt(basePt, axis, perpAxis);

            strictInit.SetMainAxisForStrict(boundary);

            List <IsoBlock> maxBlocks = SearchLocalMaxIso(strictInit, ConcaveCount, true);

            if (maxBlocks.Count == 0)
            {
                return(null);
            }

            Isothetic strictIso = BakeIso(maxBlocks);

            return(strictIso);
        }
        /// <summary>
        /// 지정한 라인을 축으로 기준점애서 최대내접 다각형을 그립니다.
        /// </summary>
        public Isothetic DrawStrict(Point3d basePt, Line longAxis, Line shortAxis)
        {
            InitialPt superInit = new InitialPt(basePt, longAxis.UnitTangent, shortAxis.UnitTangent);

            superInit.MainAxis = longAxis;
            superInit.SubAxis  = shortAxis;

            List <IsoBlock> maxBlocks = SearchLocalMaxIso(superInit, ConcaveCount, true);

            if (maxBlocks.Count == 0)
            {
                return(null);
            }

            Isothetic strictIso = BakeIso(maxBlocks);

            return(strictIso);
        }