private static bool IsPathFullyCovered( [NotNull] IPath path, [NotNull] IPolygon insideSourcePolygon, [NotNull] IEnumerable <CutSubcurve> bySubCurves) { IPolyline classicCurvesPolyline = GeometryFactory.CreateEmptyPolyline(path); object missing = Type.Missing; foreach (IPath classicCurve in bySubCurves.Select( cutSubcurve => cutSubcurve.Path)) { ((IGeometryCollection)classicCurvesPolyline).AddGeometry(classicCurve, ref missing, ref missing); } IGeometry highLevelPath = GeometryUtils.GetHighLevelGeometry(path); IGeometry highLevelPathInside = IntersectionUtils.GetIntersectionLines( (IPolyline)highLevelPath, insideSourcePolygon, true, true); IGeometry difference = ReshapeUtils.GetDifferencePolyline( (IPolyline)highLevelPathInside, classicCurvesPolyline); // Test: Simplify required? return(difference.IsEmpty); }
public StickyIntersectionConnectLineCalculator( [NotNull] IPolyline highLevelSketch, [NotNull] IPolyline individuallyReshapedPolyline, [NotNull] List <KeyValuePair <IPoint, IPoint> > intersectingSourceTargetPoints, [NotNull] Dictionary <IGeometry, IList <ReshapeInfo> > individualReshapes) { _highlevelSketchGeometry = highLevelSketch; _intersectingSourceTargetPoints = intersectingSourceTargetPoints; _individualReshapes = individualReshapes; UnreshapedBoundaryPart = ReshapeUtils.GetDifferencePolyline(individuallyReshapedPolyline, _highlevelSketchGeometry); }