CNC Viewer

Prepared from parser behavior, machining-file examples and visual checks performed in CNC Viewer. Always confirm the result against the CAM setup and machine documentation before production.

Rendering methods

Height maps versus solid CNC simulation

A black-and-white displacement map and a solid 3D preview can represent the same top machining at different stages. They are not interchangeable for every operation, especially side holes and undercuts.

A height map stores one surface value per position

In a top-view height map, each pixel or cell represents the remaining surface height at an X and Y location. Light and dark values encode relative height or depth. Neighboring relief toolpaths are merged into one image, making display and zoom much cheaper than keeping every pass as a separate drawing object.

The value convention must be documented. If white means the original top and black means maximum removal, the conversion to millimetres needs the chosen depth range. Auto-normalizing every image can make two programs with different depths look deceptively similar.

Sweeping the tool creates the displacement

A flat end mill writes a flat-bottom footprint at each cutting sample. A ball nose tool produces a curved contribution based on the sphere profile. Taking the deepest valid contribution across all passes creates the final machined surface rather than a stack of visible path layers.

Tool changes matter. Each colored toolpath group should use its assigned cutter geometry before the results are merged. A cleanup tool does not cut the already removed stock again; it can only lower areas reached by its own path and shape.

Solid extrusion makes the result inspectable

The height field can be converted into a top mesh and joined to side walls and a bottom face. Proper indexing and normals are required so holes do not appear capped and the surface does not flicker against a coincident grid. The scene grid should sit below the stock rather than share its Z plane.

Lighting should reveal shallow slopes without changing the data. A neutral environment, directional key light and moderate roughness are more informative than very dark materials or high-contrast outlines that can hide small openings.

Know when a height map is insufficient

One height per X and Y cannot represent a horizontal bore, an undercut or two separate vertical surfaces at the same location. Those features need constructive solid geometry, voxel removal or dedicated meshes combined with the height-based top surface.

For verification, use the displacement map for dense top relief, explicit geometry for holes and edges, and the colored centerline as an independent source overlay. Agreement between the three views is stronger evidence than any one rendering alone.

  • Depth scale is stated
  • Each tool uses its own geometry
  • Side machining uses explicit 3D removal
  • Toolpath remains independently visible