NC Macro Collision Avoidance Strategies

When programming a Prismatic, or Five Axis Machine, NC macros are often used. The result is collision free, but when a collision is detected on an NC Macro, its parameters are locally modified to avoid collision with the part. A collision avoidance strategy is automatically applied with the operation computation to avoid collisions reducing time to have to tune parameters.

This page discusses:

Concept

NC macros allow controlling the tool position between two machining areas. They contain retract, linking and approach motions.

By default there is no motion selected for Approach and Retract.



  1. Tool
  2. Machining path
  3. Retract motion
  4. Linking motion
  5. Approach motion
  6. Part

Select one of the following elementary motions for each approach and retract:

All following NC Macro descriptions are based in the following diagram:

  1. Linking motion
  2. Macro motion
  3. Tangent vector
  4. Macro point
  5. Machining motion
  6. Tool axis

Note: Macro point is defined as the point on which macro is to be built.

In Yellow is the NC Macro.

In RED appear parameters used for the initial macro build.

In BLACK appear parameters used for the collision avoidance strategy macro build.

Prismatic and Five Axis Machines

Axial Motion

This motion is a linear motion, built with:

  • Length (L), defined along Tool Axis direction.

This motion is always collision free. Then it is the last solution when all NC Macro modification strategies have failed.

  1. Linking motion
  2. Axial motion
  3. Macro point
  4. Machining motion
  5. Tool axis

Horizontal Motion

This motion is a linear motion, built with:

  • Horizontal angle (HA).
  • Vertical angle (VA).
  • Length (L).

In case of collision, the first step is to:

  • Reduce macro length (L); the residual length, in plane, must be greater than tool diameter.

If no solution is found, a new strategy is applied:

  • Horizontal angle (HA) varies around its initial value.
  • If required, vertical angle (VA) is increased (up to Tool Axis).
  • And length (L) can be reduced as described.

If no solution is found again, a last strategy is applied.

Axial motion is called with the following parameters: length (L) value.



  1. Macro reduction due to collision detection
  2. Tangent vector
  3. Macro point
  4. Horizontal motion
  5. Tool axis

Tangent Motion

This motion is a linear motion, built with:

  • Tangent Vector (tangent to trajectory on macro point)
  • Length (L)

If collision is detected, a new strategy is applied.

Horizontal motion is called with the following parameters:

  • Horizontal angle (HA) = 0 rad.
  • Vertical angle (VA) = 0 rad.
  • Length (L) does not change.



  1. Linking motion
  2. Tangent motion
  3. Tangent vector
  4. Macro point
  5. Machining motion
  6. Tool axis

Motion to a Point

This motion is a linear motion, built with:

  • Selected Point

If collision is detected, a new strategy is applied.

Horizontal motion is called with the following parameters:

  • Horizontal angle (HA) see picture.
  • Vertical angle (VA) see picture.
  • Length (L) distance between Macro point and Selected Point.



  1. Selected point
  2. Motion to a point
  3. Tangent vector
  4. Macro point
  5. Tool axis

Motion to a Line

This motion is a linear motion, built with:

  • Selected Line on which the Macro point will be projected.

If collision is detected, a new strategy is applied.

Horizontal motion is called with the following parameters:

  • Horizontal angle (HA) see picture.
  • Vertical angle (VA) see picture.
  • Length (L) distance between Macro point and projected point



  1. Selected Line
  2. Projection of macro point on the selected line
  3. Motion to a line
  4. Tangent vector
  5. Macro point
  6. Machining motion
  7. Tool axis

Motion Perpendicular to a Plane

This motion is a linear motion, built with:

  • Selected Plane on which the Macro point will be projected.

If collision is detected, a new strategy is applied.

Horizontal motion is called with the following parameters:

  • Horizontal angle (HA) see picture.
  • Vertical angle (VA) see picture.
  • Length (L) distance between Macro point and projected point



  1. Selected plane
  2. Projection of macro point on the selected plane
  3. Motion perpendicular to a plane
  4. Macro point
  5. Tangent vector
  6. Tool axis

Distance Along a Line Motion

This motion is a linear motion, built with:

  • Selected Line that gives a direction.
  • Length (L), to reach.

If collision is detected, a new strategy is applied.

Horizontal motion is called with the following parameters:

  • Horizontal angle (HA) = 0 rad.
  • Vertical angle (VA) = 0 rad.
  • Length (L) does not change.



  1. Selected line
  2. Distance along a line motion
  3. Macro point
  4. Tangent vector
  5. Tool axis

Axial Motion up to a Plane

This motion is a linear motion, built with:

  • Selected Plane

This motion is always collision free.



  1. Selected plane
  2. Axial motion up to a plane
  3. Macro point
  4. Tool axis

Tool Axis Motion

This motion is a linear motion, built with:

  • Selected Axis

If collision is detected, Tool Axis motion varies between the selected axis and initial tool axis to find a position without collision.

If no position is found, macro is not applied.

Note: This behavior is the current one.



  1. Selected axis
  2. Tool axis motion
  3. Initial tool axis
  4. Macro point
  5. Tool axis

Normal Motion

This motion is a linear motion, built with:

  • Selected Normal to a Surface
  • Length (L)

If collision is detected, a new strategy is applied.

Horizontal motion is called with the following parameters:

  • Horizontal angle (HA) see picture.
  • Vertical angle (VA) see picture.
  • Length (L) does not change.



  1. Selected normal to a surface
  2. Normal motion
  3. Macro point
  4. Tangent vector
  5. Tool Axis

Ramping Motion

This motion is a linear motion, built with:

  • Horizontal Safety Distance (HD).
  • Vertical Safety Distance (VD).
  • Ramping Angle (RA).

If collision is detected, a new strategy is applied.

Axial motion is called with the following parameters:

  • Length (L) = Vertical Safety Distance (VD)



  1. Ramping motion
  2. Macro point
  3. Tangent vector
  4. Tool axis

Circular Motion

This motion is a linear motion, built with:

  • Angular Sector (AS).
  • Angular Orientation (AO).
  • Radius (R).

If collision is detected, the first step is to:

  • Increase Angular Orientation (AO) up to 90 degrees.
  • Reduce Angular Sector (AS) by keeping distance in plane between macro point and arc extremity, greater than tool radius.

If no solution is found, a new strategy is applied.

Horizontal motion is called with the following parameters:

  • Horizontal angle (HA) see picture.
  • Vertical angle (VA) see picture.
  • Length (L) see picture.



  1. Circular motion
  2. Macro point
  3. Tangent vector
  4. Tool axis

Helix Motion

This motion is a helix motion, built with:

  • Radius (R)
  • Height (H)
  • Angle (A)

If collision is detected, the first step is to:

  • Reduce macro length by keeping distance in plane between macro point and helix extremity, greater than tool radius.

If no solution is found, a new strategy is applied.

Ramping motion is called with the following parameters:

  • Horizontal Safety Distance (HD) = 2 x Radius (R).
  • Vertical Safety Distance (VD) = Height (H).
  • Ramping Angle (RA) = Angle (A).



  1. Helix motion
  2. Macro point
  3. Tangent vector
  4. Tool axis

PP Word List

This motion is collision free.