1. A computer-implemented method for simulating machining of a workpiece with a cutting tool having at least one cutting part and at least one non-cutting part, the method comprising: providing to a machining simulation: a set of dexels that represents the workpiece, each dexel having one or more segments, the one or more segments collectively representing the intersection between a line and the workpiece, a trajectory of the cutting tool, the trajectory of the cutting tool being a rigid motion, and a set of meshes each representing a respective cutting part or non-cutting part of the cutting tool; and then, for each dexel in the provided set: computing, for each mesh, the extremity points of all polylines that describe a time of intersection between the line of the dexel and the mesh as a function of a height of intersection, according to the trajectory of the cutting tool; and testing a collision of the cutting tool with the workpiece along the dexel, wherein the testing includes determining if, for a value of height that corresponds to a position that belongs to a lower envelope of the set of all polylines of all meshes, the polyline to which the position belongs being associated to a non-cutting part, the value of height belongs to one of the segments of the dexel.