I am trying to figure out the best way to script aligning geometric shape data I am collecting from a sensor. The part we are measuring is 'bottom aligned', and we get 250 equally spaced points starting from a fixed z-height. The problem is that parts are not all exactly the same height, and the goal is to understand the differences in features near the top, relative to a flange that helps secure the part in final application.
On the good side we get measurements of the side of the flange and the dimension of the part below that is always significantly smaller - so we can get the midpoint between the edge of the flange and the lower dimension. That is how I am manually aligning the data now - finding the X that is closest to the midpoint Y value between the two dimensions. (of course, for different fixture types, the absolute and relative values of the two dimensions differ).
Any thoughts on how to do this alignment? I know I can find the Max and Min of the final ~50 data points and the average will be right most of the time ... but is there a way to index backwards to find the matching X value and then set up a column to assign that as the new 'zero'?
Thanks!
(I cannot share the actual data, unfortunately)