Joints

Revolute

Modia3D.Composition.RevoluteType
joint = Revolute(;obj1, obj2, axis=3, phi=0, w=0, canCollide=false)

Return a Revolute joint that rotates obj1::Object3D into obj2::Object3D along the axis axis of obj1 (axis = 1,2,3,-1,-2,-3) with angle phi. Optionally, axis can be a vector, such as axis = [1.0, 2.0, 3.0], defining the direction of the axis of rotation in obj1. The initial start angle is phi and the initial angular velocity is w.

If canCollide=false, no collision detection will occur between obj1 and obj2 (and Object3Ds that are directly or indirectly rigidly fixed to obj1 or obj2). Note, if both obj1 and obj2 have solids defined that are overlapping around the axis of rotation, then collision will be permanently occuring and canCollide=false is the only meaningful value.

It is currently not supported that a Revolute joint closes a kinematic loop.

source

Prismatic

Modia3D.Composition.PrismaticType
joint = Prismatic(; obj1, obj2, axis=1, s=0, v=0, canCollide=true)

Return a Prismatic joint that translates obj2::Object3D with respect to obj1::Object3D along coordinate axis axis (axis = 1,2,3,-1,-2,-3) of obj1 with signed distance s. Optionally, axis can be a vector, such as axis = [1.0, 2.0, 3.0], defining the direction of the axis of translation in obj1. The initial position is s and the initial velocity is v.

If canCollide=false, no collision detection will occur between obj1 and obj2 (and Object3Ds that are directly or indirectly rigidly fixed to obj1 or obj2). Note, if both obj1 and obj2 have solids defined that are overlapping along the axis of translation, then canCollide=false is the only meaningful value.

It is currently not supported that a Prismatic joint closes a kinematic loop.

source

FreeMotion (deprecated)

Do no longer use FreeMotion joints, but instead use Object3D with fixedToParent=false.

Modia3D.Composition.FreeMotionType
joint = FreeMotion(; obj1, obj2, r, rot, v, w)

Return a joint that describes the free movement of obj2::Object3D with respect to obj1::Object3D. The initial position is r (resolved in obj1) and the initial orientation is rot in Cardan (Tait–Bryan) angles (rotation sequence x-y-z from obj1 to obj2). v (resolved in obj1) and w (resolved in obj1) are the initial cartesian translational and rotational velocity vectors.

source

Fix

Modia3D.Composition.FixType
obj = Fix(; obj1, obj2, translation=zeros(3), rotation=zeros(3))

Rigidly fix obj2::Object3D relatively to obj1::Object3D via the relative position vector translation from obj1 to obj2 (resolved in obj1) and the relative orientation angles rotation from obj1 to obj2.

Return obj=obj1, if obj2 is directly or indirectly connected to the world Object3D. Otherwise, return obj=obj2.

Arguments

  • obj1::Object3D: Parent object.

  • obj2::Object3D: Object fixed relative to obj1.

  • r::AbstractVector: Relative position vector from obj1 to obj2 resolved in obj1.

  • rot::AbstractVector: Relative orientation from obj1 to obj2 in Cardan (Tait–Bryan) angles (rotation sequence x-y-z).

source