@@ -0,0 +1,1960 @@
+import numpy as np%0Aimport pyqtgraph.opengl as pygl%0Afrom hc.ui.glitems import displaylist, HCItem%0A%0A%0Aclass ProbeResult(pygl.GLSurfacePlotItem):%0A    probe_results = %5B%5D%0A    offset = 0%0A    multiply = 1%0A    snapz = 1%0A    colormap = None%0A    data = None%0A    snapped_data = None%0A%0A    def process(self):%0A        res = self.data%5B:%5D%0A        sres = sorted(res, key=lambda x: x%5B2%5D)%0A        self.minz = sres%5B0%5D%5B2%5D%0A        self.maxz = sres%5B-1%5D%5B2%5D%0A        self.range = self.maxz - self.minz%0A%0A        nres = %5B%5D%0A%0A        for x, y, z in res:%0A            nz = z - self.minz%0A            nz = nz%0A            nres.append((x, y, nz))%0A%0A        if self.range == 0:%0A            self.range = 1%0A        self.snapped_data = nres%0A%0A    def update_data(self):%0A        if not self.data:%0A            return%0A%0A        self.process()%0A%0A        if self.snapz:%0A            data = self.snapped_data%0A        else:%0A            data = self.data%0A%0A        lx = len(set(map(lambda x: x%5B0%5D, data)))%0A        ly = len(set(map(lambda x: x%5B1%5D, data)))%0A%0A        x = %5B%5D%0A        y = %5B%5D%0A        z = np.zeros((lx, ly))%0A        colors = np.zeros((lx, ly, 4))%0A%0A        row = -1%0A%0A        for i, r in enumerate(data):%0A            if r%5B0%5D not in x:%0A                x.append(r%5B0%5D)%0A%0A            if r%5B1%5D not in y:%0A                y.append(r%5B1%5D)%0A                row += 1%0A%0A            z%5Bi %25 lx, row%5D = (r%5B2%5D + self.offset) * self.multiply%0A%0A            if self.snapz:%0A                index = r%5B2%5D * 1 / self.range%0A            else:%0A                index = (r%5B2%5D - self.minz) * 1 / self.range%0A%0A            if self.colormap:%0A                c = self.colormap.map(index)%0A                c = c / 255.%0A            else:%0A                c = 0.5%0A%0A            colors%5Bi %25 lx, row%5D = c%0A%0A        self.setData(x=np.array(x), y=np.array(y), z=z, colors=colors)%0A        # like self.redraw but this one does not inherit HCItem%0A        self._display_list = None%0A%0A    @displaylist%0A    def paint(self):%0A        pygl.GLSurfacePlotItem.paint(self)%0A%0A

add missing proberesult