Discussion on the motion modeling of analog gear measuring mechanism

INTRODUCTION In order to keep in line with the motion of the real measuring machine, the virtual parts and virtual probes in this system need to be interpolated on four axes. Here, the digital integration method is used for interpolation. Among them, the motion mode of the virtual part is rotated around the rotation axis θ. In OpenGL, the rotation transformation is realized by the function glRotate{fd}(TYPEangle, TYPEx, TYPEy, TYPEz); the motion of the virtual probe is a spatial linear motion, through the translation function glTranslatef (TYPEx, TYPEy, TYPEz) to achieve.
2 virtual measurement center motion simulation interface 2.2 return value in the virtual measurement process When the real gear measurement center performs measurement, the computer continuously collects the indication value of the micrometer and the actual position of each coordinate axis at the same time, and then records the measured surface actually. The shape is compared with the theoretical profile to obtain the measurement results. Therefore, the virtual measurement system needs to record the current coordinate position of the probe and the angle of rotation of the workpiece in real time, and then return these values ​​to the measurement software through the dynamic link library together with the small displacement value generated when the probe contacts the workpiece.
3 Measurement perception In the virtual computer software process environment, when the virtual probe collides with the part, the screen will show overlapping images, which will not appear in the real measurement. Therefore, when performing motion modeling, it is first necessary to study the collision problem.
3.1 Collision Detection The collision detection unit is the core part of motion modeling. In order to meet the real-time requirements in the virtual measurement process, the system uses a bounding box collision detection algorithm. The basic idea of ​​the algorithm is to enclose a complex geometric shape with a simple bounding box. When colliding two objects, first check whether the bounding boxes of the two intersect. If they do not intersect, the two objects are not Intersect, otherwise, you need to further test the two objects.
In the virtual CNC gear measurement center system, since the solid model of the ball that collides with the part is a sphere, it can be considered that the encircling ball collides with the AABB level bounding box. Collision detection unit process.
In order to optimize the algorithm, in view of the actual measurement, the probe moves along the contour curve of the part, so it is only necessary to completely traverse the enclosing tree of the part when the probe collides with the part for the first time. In the subsequent detection, it is only necessary to detect the geometric elements adjacent to the previously collided patches.
(1) Establishing a hierarchical part of a virtual part The body tree uses a bottom-up approach to store the virtual part as a binary tree. First find the leaf nodes, then adopt the strategy of merging the adjacent triangles, and the paired combination children generate the parent nodes, so recursively merge until the root node.
In addition, parts are rotated during the measurement of the virtual measurement center. In order to avoid the huge cost of rebuilding, when importing a virtual part, a local coordinate system can be established for it. When the part is rotated, the AABB box and its coordinate system are also rotated, thus eliminating the time spent on rebuilding the tree.
(2) The AABB box that surrounds the ball and the part of the collision detection part of the component is surrounded by the body. First, the collision detection of the AABB box surrounding the ball (probe) and the part is performed. If there are two cases, it can be seen that the encircled ball collides with the AABB box.
Case 1: The two bounding boxes intersect. The detection method is as follows: It is assumed that O(Ox, Oy, Oz) is the center of the sphere surrounding the ball, and R is the radius of the sphere.
M is the closest point to the center of the sphere on the AABB, and the coordinates of the M point are (Mx, My, Mz). If |OM|>R, the two bounding boxes do not intersect; conversely, if |OM|≤R, the two bounding boxes intersect.
Case 2: The encircled ball enters the inside of the AABB bounding box. The detection method is as follows: Let Pmin and Pmax be the two extreme points of the AABB bounding box respectively, the coordinates of the Pmin point are (Pmin.x, Pmin.y, Pmin.z); the coordinates of the Pmax point are (Pmax.x, Pmax). .y, Pmax.z). Calculate the Mx pseudo code as follows if (Pmin.x Finally, if the sphere bounding box traverses to the leaf node and the intersection is still detected, the problem is transformed into a collision detection of the bounding sphere and the vector triangular mesh.
(3) Collision detection of encircled ball and vector triangular facet The collision detection method of encircled ball and vector triangular facet is: first calculate the distance d from the center of the sphere to the plane of the triangle, such as d≤r (radius), then consider enclosing The ball intersects the plane. The bounding sphere and the vector triangular mesh are then projected onto the horizontal and vertical planes, respectively.
If the projected circle and the triangle intersect on both projection surfaces, it can be determined that the bounding sphere intersects the triangular face, otherwise there is no intersection.
(4) Calculating the micro-displacement of the probe and the coordinates of the collision point In order to simulate the function of the CNC gear measurement center, the system needs to return the coordinates of the collision point at the time of collision and the displacement of the micro-movement of the probe after the collision. According to the characteristics of the 3D probe of the real CNC gear measurement center, after the probe collides with the part, it will shift to the normal vector direction of the triangle with which it collides, and calculate the micro-displacement of the probe and the coordinates of the collision point: as shown, The coordinates of the midpoint M of the probe tail at the time of collision are (xm, ym, zm), and the midpoint of the tail becomes M' after the movement, and the coordinates are (xm', ym', zm'). During the movement of the probe, the system automatically returns the coordinates of the M point. Therefore, the coordinates of the M point and the M' point are always known during the micro movement of the probe after the collision. The formula for calculating the small displacement L is L = (xm' - xm) 2 (ym' - ym) 2 (zm' - zm) Let the coordinate of the collision point Z be (x, y, z), the coordinates of the O point of the ball center For (xo, yo, zo), since the vertex values ​​of the respective triangular patches that make up the part are already stored in the program when the part is imported, the coordinates of the triangle vertices A and C are known. The coordinates of the O point are known from the distance between the MOs. As described above, the coordinates of the M and O points are also known, and the angle OZM and the angle OZC are right angles.
Therefore, we can find Z(x, y, z) by the system of equations, and the equations are r2 (x-x1)2 (y-y1)2 (z-z1)2=(x0-x1)2 (y0-y1) 2 (z0-z1)2r2 (x-x2)2 (y-y2)2 (z-z2)2=(x0-x2)2 (y0-y2)2 (z0-z2)2(x-x0)2 (y-y0)2 (z-z0)2=r23.2 Collision response When the system detects that the virtual probe collides with the part, if the software continues to control the probe to move in the original direction, the probe needs to have a tiny Offset motion. At this point, the movement of the probe can be implemented in the system using the previously obtained offset value, and then the offset value is passed back to the measurement software.
4 Conclusion In this paper, the motion modeling method of virtual CNC gear measurement center is studied, and the collision detection method between virtual probe and virtual part is proposed. The virtual CNC gear measurement center can realize the motion mode of the real CNC gear measurement center, which lays a good foundation for the simulation work of the virtual gear measurement center.

Passenger Escalator

Escalatior Elevator,Shopping Mall Escalator,Passenger Elevator

FJZY Elevator Co., Ltd. , http://www.dz-elevator.com