Skip to content

Commit

Permalink
fix:Remove systems without any neighbors (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
Giulcoo authored Jun 4, 2024
1 parent 91ffb18 commit b539155
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/system/systemgenerator.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ export class SystemGeneratorService {
//Connect clusters
this.connectClusters(clusters, clustersCenter, avgRadius*3);

//Remove systems with no neighbors
for(let i = 0; i < clusters.length; i++){
clusters[i] = clusters[i].filter(system => Object.keys(system.links).length > 0);
}

return this.removeIntersectingEdges(clusters.flat());
}

Expand Down

0 comments on commit b539155

Please sign in to comment.