
The research into surface selfintersection is motivated by the need to indicate problems caused by it, especially in mechanical engineering and milling. The path of the cutter has to be planned on an offset surface (in the case of 5axis milling where a cutter can do not only translation movement but also rotational movement around two different axis, i.e. it is always possible to move and rotate a milling machine in such a way that the normalized direction vector of a milling machine axis and the normalized normal vector of the desired surface in a given contact point of the milling machine with the desired surface are identical) or a general offset surface (in case of 3axis milling where a cutter is able to do only translation movement, not rotational) of the surface which should be machined. However, the offset surface (and, of course, also the general offset surface, but it is less surprising) can have different properties with respect to surface selfintersection  it can even have selfintersection, although the original surface has no selfintersection. The selfintersection of the offset surface (or general offset surface) causes "undercut" during the milling process, i.e. the milling machine cuts away more material than it should and this causes irreversible damage to the material used for milling. For this reason, it is desirable to decide automatically if the offset surface (or general offset surfaces) has selfintersection or not. Therefore, the main objective of this talk is to present implementation of the symbolicnumeric algorithm for the computation of selfintersection of surfaces with rational parametrization in Mathematica. The algorithm consists of several steps: 1. Elimination of variables from an initial system of equations where variable elimination methods are used (Groebner bases using the builtin function in Mathematica, or Dixon (or Dixon dialytic resultant) using the own implemented package for computation of various types of resultants developed in Mathematica); 2. Computation of start points on all components of the polynomial in two variables (variables are, in fact, parameters of the surface parametrization) which was obtained in the first step of the algorithm and which generally represents a plane curve; 3. Finding singular points of the plane curve because they can cause serious problems in the last step of the algorithm; 4. Removing improper components of the plane curve, i.e. components of the plane curve which do not correspond to real surface selfintersection; 5. Tracing, i.e. computation of sequences of points on each component using the component splitting in the parametric domain and local geometry of the plane curve. Thus, the output from the algorithm are sequences of points in the parametric domain of the parametric surface which can be either established into surface parametrization to display surface selfintersection or approximated to obtain parametric representation of selfintersection curves or anything else we need. The algorithm will be demonstrated on several examples. The first example contains computation of the surface selfintersection for typical surface used in CAGD  bicubic NURBS surface. The second example is devoted to practical example of a possible usage of the algorithm. We have a surface S which should be machined using the cutter E in 3axis milling (of course, E is a surface of revolution obtained as an envelope of rotational movement of the cutter around its axis). Both these surfaces are given by rational parametric equations. As it was mentioned above, we must compute general offset surface a for S with respect to E (as a convolution surface a = S * (E) ) to find possible locations of the reference point chosen on the cutter axis during the milling. Then the selfintersection of the surface a is computed to indicate the undercut during the milling  if there is no selfintersection of a, then the milling is without undercut. Otherwise, general offset surface contains selfintersection which causes undercut during the milling of surface S using the cutter E.

