/// <summary> /// Enumerates the interior surfaces in a bounded shape. /// </summary> public static IEnumerableSurface <F> EnumerateInterior <T, F>(IBoundedShape <T> Source, Surfacize <T, F> SurfacizeFunc, F Excluded) where F : IEquatable <F> { IEnumerableInteriorSurfaceShape <T> eiss = Source.Extend <IEnumerableInteriorSurfaceShape <T> >(); if (eiss != null) { return(eiss.EnumerateInteriorBorders(SurfacizeFunc, Excluded)); } return(new EnumerableInteriorSurface <T, F>(Source, SurfacizeFunc, Excluded)); }
/// <summary> /// "Slices" the specified shape, returning a plane of the borders on the specified axis /// and level. /// </summary> public static IBoundedPlaneSurface <F> Slice <T, F>(IBoundedShape <T> Source, Axis Axis, int Level, Surfacize <T, F> SurfacizeFunc, F Excluded) where F : IEquatable <F> { IBoundedSliceableSurfaceShape <T> bsss = Source.Extend <IBoundedSliceableSurfaceShape <T> >(); if (bsss != null) { return(bsss.Slice(SurfacizeFunc, Excluded, Axis, Level)); } // Too sleepy to do this right now... throw new NotImplementedException(); }
/// <summary> /// Creates a filled infinite shape with the specified parameters. /// </summary> public static IFilledInfiniteShape <T> Fill <T>(IBoundedShape <T> Source, T Default) { IFillableBoundedShape <T> fbs = Source.Extend <IFillableBoundedShape <T> >(); if (fbs != null) { return(fbs.Fill(Default)); } return(new FilledInfiniteShape <T>() { Source = Source, Default = Default }); }