siconos.mechanics.collision.base.SiconosCollisionManager (Python class)

class siconos.mechanics.collision.base.SiconosCollisionManager[source]

Bases: siconos.kernel.InteractionManager

Constructors

SiconosCollisionManager()
inBoxQuery(array_like (np.float64, 1D) center, array_like (np.float64, 1D) dimensions, bool closestOnly=False, bool sorted=True) → vector< SiconosCollisionQueryResult >[source]

Find all shapes that are within a box defined by a center point and a dimensions (3-vector), and return them in an ordered list based on distance to the center.

Parameters:
  • center – The center of the box in inertial frame (world) coordinates.
  • dimensions – The dimensions of the box (3-vector).
  • closestOnly – If true, indicates only interested in first result closest to half-space boundary, max size of returned vector = 1.
  • sorted – If true, results are sorted by distance.
Returns:

  • A vector of SiconosCollisionQueryResult that contain information about the query
  • results.

inHalfSpaceQuery(array_like (np.float64, 1D) point, array_like (np.float64, 1D) normal, bool closestOnly=False, bool sorted=True) → vector< SiconosCollisionQueryResult >[source]

Find all shapes that are inside a half-space, defined by a point and a normal direction.

Parameters:
  • point – The point defining the boundary of the half-space.
  • normal – The normal pointing away from the surface of the half-space.
  • closestOnly – If true, indicates only interested in first result closest to half-space boundary, max size of returned vector = 1.
  • sorted – If true, results are sorted by distance.
Returns:

  • A vector of SiconosCollisionQueryResult that contain information about the query
  • results.

inSphereQuery(array_like (np.float64, 1D) center, double radius, bool closestOnly=False, bool sorted=True) → vector< SiconosCollisionQueryResult >[source]

Find all shapes that are within a sphere defined by a point and a radius and return them in an ordered list based on distance to the center.

Parameters:
  • center – The center of the sphere in inertial frame (world) coordinates.
  • radius – The radius of the sphere.
  • closestOnly – If true, indicates only interested in first result closest to half-space boundary, max size of returned vector = 1.
  • sorted – If true, results are sorted by distance.
Returns:

  • A vector of SiconosCollisionQueryResult that contain information about the query
  • results.

insertStaticContactorSet(SiconosContactorSet cs, array_like (np.float64, 1D) position=array_like (np.float64, 1D)()) → StaticContactorSetID[source]

Insert a static contactor set.

lineIntersectionQuery(array_like (np.float64, 1D) start, array_like (np.float64, 1D) end, bool closestOnly=False, bool sorted=True) → vector< SiconosCollisionQueryResult >[source]

Perform an intersection test on all shapes in the contactors and return a vector of all results, ordered by distance from start.

Parameters:
  • start – The starting point of the line segment in inertial frame (world) coordinates.
  • end – The ending point of the line segment in inertial frame (world) coordinates.
  • closestOnly – If true, indicates only interested in first result closest to half-space boundary, max size of returned vector = 1.
  • sorted – If true, results are sorted by distance.
Returns:

  • A vector of SiconosCollisionQueryResult that contain information about the query
  • results.

removeBody(BodyDS body) → None[source]

Remove a body from the collision detector.

This must be done after removing a body from the NonSmoothDynamicalSystem otherwise contact will occur with a non-graph body which results in failure.

removeStaticContactorSet(StaticContactorSetID id) → bool[source]

Remove a static contactor set.

Parameters:id – An identifier returned by insertStaticContactorSet.