siconos.mechanics.collision.base

Module documentation

class siconos.mechanics.collision.base.nullDeleter(*args, **kwargs)[source]

Bases: object

Using a shared_ptr to hold a pointer to a statically allocated

object use create<type>SPtr(<type> &x) cf http://www.boost.org/doc/

class siconos.mechanics.collision.base.SiconosContactor(*args)[source]

Bases: object

Class to hold the shape assigned to a body, and to associate each shape with an offset and collision group.

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

Bases: siconos.kernel.NewtonEuler3DR

constructor

computeh(time, q0, y)[source]

to compute the output y = h(t,q,z) of the Relation

Parameters
  • time (float) – current time value

  • q – coordinates of the dynamical systems involved in the relation

  • y (SiconosVector) – the resulting vector

updateContactPoints(pos1, pos2, normal)[source]

Update this contact point information.

Parameters
  • pos1 (SiconosVector) – Position on ds1 in ds1 frame.

  • pos2 (SiconosVector) – Position on ds2 in ds2 frame (or world frame if ds2=null).

  • normal (SiconosVector) – Normal in ds2 frame (or world frame if ds2=null).

display()[source]

main relation members display

class siconos.mechanics.collision.base.RigidBodyDS(*args)[source]

Bases: siconos.kernel.NewtonEulerDS

Overload 1: Default constructor


Overload 2: constructor from a minimum set of data

Parameters
  • position (SiconosVector) – initial coordinates of this DynamicalSystem

  • twist (SiconosVector) – initial twist of this DynamicalSystem

  • mass (float) – the mass

  • inertia (SiconosMatrix) – the inertia matrix

allowSelfCollide()[source]

Return the value of the _allowSelfCollide flag.

setAllowSelfCollide(x)[source]

Set the value of the _allowSelfCollide flag.

contactors()[source]

Access the contactor set associated with this body.

Return type

SiconosContactorSet

Returns

A SP::SiconosContactorSet

setContactors(c)[source]

Provide a set of contactors to the body.

Parameters

c (SiconosContactorSet) – A SP::SiconosContactorSet

base_position()[source]

Make the base position of the contactors equal to the DS q vector.

Return type

SiconosVector

Returns

a SP::SiconosVector

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

Bases: siconos.kernel.NewtonEuler5DR

constructor

computeh(time, q0, y)[source]

to compute the output y = h(t,q) of the Relation

Parameters
  • time (float) – current time value

  • q – coordinates of the dynamical systems involved in the relation

  • y (SiconosVector) – the resulting vector

updateContactPoints(pos1, pos2, normal)[source]

Update this contact point information.

Parameters
  • pos1 (SiconosVector) – Position on ds1 in ds1 frame.

  • pos2 (SiconosVector) – Position on ds2 in ds2 frame (or world frame if ds2=null).

  • normal (SiconosVector) – Normal in ds2 frame (or world frame if ds2=null).

class siconos.mechanics.collision.base.RigidBody2dDS(*args)[source]

Bases: siconos.kernel.LagrangianLinearTIDS

Overload 1: default constructor


Overload 2: constructor from initial state and all matrix operators.

Parameters
  • q0 (SiconosVector) – initial coordinates

  • v0 (SiconosVector) – initial velocity

  • M (SiconosMatrix) – mass matrix

  • K (SiconosMatrix) – stiffness matrix

  • C (SiconosMatrix) – damping matrix


Overload 3: constructor from initial state and mass matrix only. Leads to \(M\dot v = F_{ext}(t,z) + p\) .

Parameters
  • q0 (SiconosVector) – initial coordinates

  • v0 (SiconosVector) – initial velocity

  • M (SiconosMatrix) – mass matrix

allowSelfCollide()[source]

Return the value of the _allowSelfCollide flag.

setAllowSelfCollide(x)[source]

Set the value of the _allowSelfCollide flag.

contactors()[source]
Return type

SiconosContactorSet

Returns

the contactor set associated with this body

setContactors(c)[source]

Provide a set of contactors to the body.

Parameters

c (SiconosContactorSet) – A SP::SiconosContactorSet

base_position()[source]

Make the base position of the contactors equal to the DS q vector.

Return type

SiconosVector

Returns

a SP::SiconosVector

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

Bases: object

Holds one result of a line segment intersection query against the graph of body contactors maintained by a SiconosCollisionManager

property distance

Distance from reference point (start of line segment or query center)

property body

Body owning the contactor that was intersected, may be null for static contactors.

property shape

The shape that was intersected.

property contactor

The contactor that was intersected.

property point

Closest point on contactor in world coordinates.