示例#1
0
        public CombinedSegmentLists combine(SegmentList segments1, SegmentList segments2)
        {
            var i = new Intersecter(false, _log);

            return(new CombinedSegmentLists()
            {
                combined = i.calculate(
                    segments1, segments1.inverted,
                    segments2, segments2.inverted
                    ),
                inverted1 = segments1.inverted,
                inverted2 = segments2.inverted
            });
        }
示例#2
0
        public SegmentList segments(Polygon poly)
        {
            var i = new Intersecter(true, _log);

            foreach (var region in poly.regions)
            {
                i.addRegion(region);
            }

            var result = i.calculate(poly.inverted);

            result.inverted = poly.inverted;

            return(result);
        }