mariuszhermansdorfer / SandWorm

Augmented Reality Sandbox for Grasshopper & Rhino
MIT License
20 stars 11 forks source link

Calibrate troubleshooting #70

Closed BarusXXX closed 2 years ago

BarusXXX commented 3 years ago

I have added a handle for the kinect type for calibration in my latest commit ebb1c3d,

However I am checking the runtime with breakpoints and runningSum Array is a Null throughout the calculation here... https://github.com/mariuszhermansdorfer/SandWorm/blob/2b53d409f3cc18aa32da5d14bd61c5a1802dead8/SandWorm/Components/SetupComponent.cs#L125

SetupKinect uses the elevation array to populate the runningSum if it is null? But elevation array is null at the moment runningSum is needed, so runningSum is also null... (maybe this is the issue)?

What function should be bringing it into the scope?

mariuszhermansdorfer commented 3 years ago

@BarusXXX, try logging a debug message from each part of this if statement to understand which one is triggered: https://github.com/mariuszhermansdorfer/SandWorm/blob/2b53d409f3cc18aa32da5d14bd61c5a1802dead8/SandWorm/Components/SetupComponent.cs#L123

Simply add: output.Add("My debug statement"); // Debug Info and it will be visible in the output node of the component

BarusXXX commented 3 years ago

image I did it with breakpoints earlier. At the point of of the error (marked with an arrow) it is still null. It should be declared earlier on no?

It is reflecting this line; but this has only the empty variable, so when it calls the array index it makes the component give this error... image (This only get triggered when one toggles calibrate)