siconos.mechanics.joints.NewtonEulerJointR (Python class)

class siconos.mechanics.joints.NewtonEulerJointR[source]

Bases: siconos.kernel.NewtonEulerR

This class implements an abstract Joint relation (articulation) between one or two Newton/Euler dynamical systems.

Generated class (swig), based on C++ header Program listing for file mechanics/src/joints/NewtonEulerJointR.hpp.

Constructors

NewtonEulerJointR()

Empty constructor.

The relation may be initialized later by setPoint, setAbsolute, and setBasePositions.

absolute() → bool[source]

Get whether points and axes are interpreted in absolute or relative frame.

Returns:True for absolute frame, false for relative frame.
allowSelfCollide() → bool[source]

Return the value of the _allowSelfCollide flag.

axes() → VectorOfVectors[source]

Get the vector of axes for this joint.

Returns:The vector of axes.
axis(int index) -> array_like (np.float64, 1D)[source]

Get an axis for this joint.

Parameters:index – The index of the point.
Returns:The requested axis.
computeJachqDoF(double time, Interaction inter, BlockVector q0, array_like (np.float64, 2D) jachq, int axis=0) → None[source]

Compute the jacobian of linear and angular DoF with respect to some q.

computehDoF(double time, BlockVector q0, array_like (np.float64, 1D) y, int axis=0) → None[source]

Compute the vector of linear and angular positions of the free axes.

normalDoF(*args)[source]

Warning - Overloaded function : multiple signatures available, check prototypes below.

normalDoF(array_like (np.float64, 1D) ans, BlockVector q0, int axis, bool absoluteRef=True) → None[source]

Retrieve a normal in the direction of a 0-indexed free axis.

Useful for calculating velocities in the axis, or for calculating axis-aligned forces applied to connected bodies. If axis is of angular type (see typeOfDoF), then the returned normal is the axis of rotation.

Parameters:
  • ans – The vector to receive the projection.
  • q0 – The state q of one or more NewtonEulerDS
  • axis
  • absoluteRef – If true, ans is in the inertial frame, otherwise the q1 frame is assumed.
normalDoF(BlockVector q0, int axis, bool absoluteRef=True) -> array_like (np.float64, 1D)[source]
numberOfConstraints() → unsigned int[source]

numberOfConstraints()=0 -> int

Get the number of constraints defined in the joint.

Returns:the number of constraints
numberOfDoF() → unsigned int[source]

numberOfDoF()=0 -> int

Return the number of degrees of freedom of this joint.

Returns:the number of degrees of freedom (DoF)
point(int index) -> array_like (np.float64, 1D)[source]

Get a point for this joint.

Parameters:index – The index of the point.
Returns:The requested point.
points() → VectorOfVectors[source]

Get the vector of points for this joint.

Returns:The vector of points.
projectVectorDoF(*args)[source]

Warning - Overloaded function : multiple signatures available, check prototypes below.

projectVectorDoF(array_like (np.float64, 1D) v, BlockVector q0, array_like (np.float64, 1D) ans, int axis, bool absoluteRef=True) → None[source]

Project a vector onto the given 0-indexed free axis.

Useful for calculating velocities in the axis, or for calculating axis-aligned forces applied to connected bodies. If axis is of angular type (see typeOfDoF), then the projection is onto the axis of rotation.

Parameters:
  • v – The vector to project
  • q0 – The state q of one or more NewtonEulerDS
  • ans – The vector to receive the projection.
  • absoluteRef – If true, v and ans are in the inertial frame, otherwise the q1 frame is assumed.
projectVectorDoF(array_like (np.float64, 1D) v, BlockVector q0, int axis, bool absoluteRef=True) -> array_like (np.float64, 1D)[source]
setAbsolute(bool absoluteRef) → None[source]

Set whether points and axes should be interpreted in absolute or relative frame.

Won’t take effect until setBasePositions is called.

Parameters:absoluteRef – true for absolute frame, false for relative frame.
setAllowSelfCollide(bool x) → None[source]

Set the value of the _allowSelfCollide flag.

setAxis(int index, array_like (np.float64, 1D) axis) → None[source]

Set an axis for this joint.

The role of each axis is specific to the joint subclass. Won’t take effect until setBasePositions is called.

Parameters:
  • index – The index of the points.
  • axis – A SiconosVector of size 3.
setBasePositions(*args) → void[source]

setBasePositions(array_like (np.float64, 1D) q1, array_like (np.float64, 1D) q2=array_like (np.float64, 1D)())=0 -> None

Initialize the joint constants based on the provided base positions.

Parameters:
  • q1 – A SiconosVector of size 7 indicating translation and orientation in inertial coordinates.
  • q2 – An optional SiconosVector of size 7 indicating translation and orientation; if null, the inertial frame will be considered as the second base.
setPoint(int index, array_like (np.float64, 1D) point) → None[source]

Set a point for this joint.

The role of each point is specific to the joint subclass. Won’t take effect until setBasePositions is called.

Parameters:
  • index – The index of the points.
  • point – A SiconosVector of size 3.
typeOfDoF(axis: unsigned int) → NewtonEulerJointR::DoF_Type[source]

typeOfDoF( int axis)=0 -> DoF_Type

Return the type of a degree of freedom of this joint.

Returns:the type of the degree of freedom (DoF)