public static IOpening SetOutlineElements1D(this IOpening opening, List <IElement1D> outlineElements1D) { IOpening clone = (IOpening)opening.GetShallowClone(); ICurve outline = Engine.Geometry.Compute.IJoin(outlineElements1D.Select(x => x.IGeometry()).ToList()).Single(); clone.Location = Engine.Geometry.Create.PlanarSurface(outline); return(clone); }
public static IOpening <TEdge> SetOutlineElements1D <TEdge>(this IOpening <TEdge> opening, IEnumerable <IElement1D> edges) where TEdge : IEdge { IOpening <TEdge> o = opening.GetShallowClone(true) as IOpening <TEdge>; o.Edges = ConvertToEdges <TEdge>(edges); return(o); }