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.

Woodworking formats

How to troubleshoot MPR and HOP machining previews

MPR and HOP programs can describe a complete panel, but they can also depend on variables, macros and machine databases outside the file. A useful diagnosis separates explicit operation data from assumptions made by the original CNC environment.

Verify workpiece dimensions before operations

Find the finished length, width and thickness declarations and compare them with the intended panel. Values can be direct numbers, named variables or arithmetic expressions. Do not treat every number in a dimension expression as the stock thickness; setup allowances and reference offsets may appear in the same expression.

If thickness is missing or ambiguous, request it from the user. A wrong thickness changes through-hole classification, bottom-face depth and the vertical position of side holes even when XY coordinates are correct.

Repeated coordinates may describe one operation

A macro can repeat setup, approach, machining and retract records for the same physical hole or channel. Counting every record as a separate operation produces stacked holes and an inflated statistics list. Group records only when their position, surface, direction, diameter and depth identify the same machining action.

Do not merge genuinely different operations merely because they share XY coordinates. A top hole and a bottom hole, or two coaxial holes with different diameters, can intentionally occupy the same plan position.

Surface and direction define the hole geometry

Top and bottom drilling primarily change Z. Horizontal drilling starts from an edge and travels along X or Y. For a side hole, the preview needs an entry edge, center height, diameter, depth and direction. If one of these is reversed, the bore can appear as a dark surface mark or extend outside the panel instead of removing material inside it.

Use front, back, left, right and bottom views to verify entry faces. The bore should be visible from its entry edge and terminate at the declared depth unless it is a through operation.

Channel width can come from several sources

Prefer an explicit operation width or diameter attached to the routing record. If no dedicated width exists, a groove or tool definition may provide the physical cutter width. A tool number alone is insufficient unless the file also maps that number to a diameter.

Distinguish a routed channel from a closed contour. A centerline groove removes only the cutter sweep. A boundary contour removes its wall and leaves the middle solid unless the file contains clearing passes or an explicit pocket operation.

External macros and tool databases create real limits

Some programs reference components installed in the original CAM or CNC system. The main file may contain a macro name and parameters but not the geometry generated by that macro. Likewise, the machine tool database may hold diameters, cutting lengths and orientation data that are absent from the exported program.

When external data cannot be recovered, the preview should state the assumption and request only the missing values needed for inspection. Inventing detailed geometry from a macro name can look convincing while being dimensionally wrong.

  • Resolve stock variables and expressions
  • Deduplicate operation records carefully
  • Keep top and bottom operations distinct
  • Verify every horizontal entry edge
  • Prefer explicit groove or tool width
  • Report unresolved external resources

Worked example: repeated records versus repeated machining

Suppose three MPR records resolve to X80 Y32 with an 8 mm diameter and 12 mm top drilling depth. If they share the same surface, direction and operation identifier after macro expansion, statistics should normally present one physical hole. Drawing three coincident cylinders adds work but does not change the finished part.

A second record at the same apparent point can still be genuine when it enters from the opposite edge, uses a different center height or changes diameter partway through the bore. Deduplication must compare operation type, face, axis, tool geometry and depth, not coordinates alone. Keeping a reference to the source record makes any merge auditable.