Based on the analysis of origination of the machining errors, and selection of major influencing factors - those errors rising from the machine tool, the fixture, and the cutting tool, the error signal source library was created at the sampling points on coordinates X, Y, and Z. By making use of the written knowledge and workshop experience, the library was extendable and built with technique of ADO database access. And virtual real-time presentation of machining errors on the machined surfaces was also constructed with a mathematical model of weighed random method, considering the error of the sampling points and the drifting of the sampling points themselves from the perfect position. And a virtual measurement system was formed for the test of errors of the machined surfaces of mechanical components programmed with Visual C++ 6.0and OpenGL 3Dgraphical library. An example of the step-shaft with five kinds of tolerances was given and has been shown that the virtual system with the extendable library of errors and model for weighed random method was practical. Such weighed random method presented well the real errors of processing operations on the field with the proper model showing the principle of the error origination in metal machining.