From a330f5038e7b88d8f336fda24ebf2bec78ac40a0 Mon Sep 17 00:00:00 2001 From: Gerion Nabbefeld <68555047+NabbefeldG@users.noreply.github.com> Date: Fri, 16 May 2025 18:31:20 +0100 Subject: [PATCH] Fixed indexing error causing broken projections I'll write an issue demonstrating the bug, but currently the CreatVertexGrid function mixes up rows and cols resulting in broken quads whenever the number of rows and cols don't happen to be the same. --- BonVision/CreateVertexGrid.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BonVision/CreateVertexGrid.cs b/BonVision/CreateVertexGrid.cs index 6ca7691..a6f7dcf 100644 --- a/BonVision/CreateVertexGrid.cs +++ b/BonVision/CreateVertexGrid.cs @@ -17,7 +17,7 @@ public IObservable Process(IObservable source) return source.ToArray().Select(value => { // The number of rows in the grid is equal to the number of distinct values of 'v' - var rows = value.Select(row => row[3]).Distinct().Count(); + var rows = value.Select(row => row[2]).Distinct().Count(); var cols = value.Length / rows; var i = 0;