public static SubentityId[]
GetAllEdges(this Entity entity)
{
if (entity is Db.Surface)
{
IntPtr pSubentityIdPE = entity.QueryX(Rt.RXObject.GetClass(typeof(AssocPersSubentityIdPE)));
if (pSubentityIdPE == IntPtr.Zero) return Array.Empty<SubentityId>();
using AssocPersSubentityIdPE subentityIdPE = Rt.RXObject.Create(pSubentityIdPE, false) as AssocPersSubentityIdPE;
if (subentityIdPE is null) return Array.Empty<SubentityId>();
return subentityIdPE.GetAllSubentities(entity, SubentityType.Edge);
}
else....
}
.....
SubentityId[] all = surface.GetAllEdges();
ObjectId gapSurfId = Db.Surface.CreateExtendSurface(surface.Id, all, gap, Db.Surface.EdgeExtensionType.StretchEdge, false);