Skip to content

Instantly share code, notes, and snippets.

@radzionc
Created October 5, 2017 12:41
Show Gist options
  • Select an option

  • Save radzionc/3a4e6a5327ecae8fcd3c7e795a7301c2 to your computer and use it in GitHub Desktop.

Select an option

Save radzionc/3a4e6a5327ecae8fcd3c7e795a7301c2 to your computer and use it in GitHub Desktop.
public void InitSiblings(List<WallGeometry> possibleSiblings)
{
var filtered = possibleSiblings.Where(wall => wall != this);
Siblings = filtered.Aggregate(new List<WallSibling>(), (walls, wall) =>
{
var point = SU.RealIntersection(wall.Basis, Basis);
return point == null ? walls : walls.Concat(new List<WallSibling> { new WallSibling(point.Value, wall) }).ToList();
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment