newton.count_rigid_contact_points#

newton.count_rigid_contact_points(model, rigid_contact_max_per_pair=None)[source]#

Counts the maximum number of rigid contact points that need to be allocated for a given model.

This function estimates the upper bound on the number of rigid contact points that may be generated during collision detection, based on the current set of shape contact pairs and their geometry.

Parameters:
  • model (Model) – The simulation model containing shape and geometry information.

  • rigid_contact_max_per_pair (int | None, optional) – Maximum number of contact points per shape pair. If None or <= 0, no limit is applied.

Returns:

The potential number of rigid contact points that may need to be allocated.

Return type:

int