private void Init() { var faces = _closedShell.PointIds.Select(_model.Get <AdvancedFace>); // create convertable for all faces and merge points and indices var convertables = faces.Select(face => new AdvancedFaceConvertable(face, _model)).Select(c => Wuple.New(c.Points, c.Indices)); Points = convertables.Select(c => c.First).SelectMany(p => p).ToList(); Indices = convertables.Aggregate(Wuple.New(0, new List <int>()), Wuple.AggregateIndices).Second; }
private void Init() { var bounds = _face.BoundIds.Select(_model.Get <Bound>); var surface = _model.Get <Surface>(_face.SurfaceId); var surfaceConvertable = new SurfaceConvertable(surface, _model); // create convertable for all faces and merge points and indices var convertables = bounds.Select(bound => new BoundConvertable(bound, _model)).Select(c => Wuple.New(c.Points, c.Indices)).ToList(); convertables.Add(Wuple.New(surfaceConvertable.Points, surfaceConvertable.Indices)); Points = convertables.Select(c => c.First).SelectMany(p => p).ToList(); Indices = convertables.Aggregate(Wuple.New(0, new List <int>()), Wuple.AggregateIndices).Second; }