Esempio n. 1
0
            private static List <Polyline> TrimDifferenceByCore(List <Polyline> difference, Polyline coreUnion)
            {
                List <Polyline> pureOutline = new List <Polyline>();

                foreach (Polyline i in difference)
                {
                    PolylineTools.SetPolylineAlignCCW(i);
                    List <Polyline> tempTrimmed = RemoveOverlapSeg(i, coreUnion);
                    pureOutline.AddRange(tempTrimmed);
                }

                return(pureOutline);
            }
Esempio n. 2
0
            private static List <Polyline> TrimDifferenceByOutline(List <Polyline> difference, Polyline outline)
            {
                List <Polyline> pureCore = new List <Polyline>();

                foreach (Polyline i in difference)
                {
                    PolylineTools.SetPolylineAlignCCW(i);
                    List <Polyline> tempTrimmed = RemoveOverlapSeg(i, outline);
                    pureCore.AddRange(tempTrimmed);
                }

                foreach (Polyline i in pureCore)
                {
                    if (i.IsClosed)
                    {
                        PolylineTools.SetPolylineAlignCW(i);
                    }
                }

                return(pureCore);
            }