Previous section-----Next section


Line[point1, point2] is a Mech data object that specifies an axis by endpoints. The axis originates at point1 and terminates at point2. The pointi must be Mech Point objects.
Line[bnum, lpnt1, lpnt2] is interpreted as Line[Point[bnum, lpnt1], Point[bnum, lpnt2]]. The lpnti can be points, {x, y} (2D) or {x, y, z} (3D), in the local coordinate system of body bnum or point numbers (positive integers) referencing coordinates that were defined with SetBodies.

• If a Line object is used in place of a Mech Vector object, the vector from point1 to point2 provides the direction of the vector.
• If a Line object is used in place of a Mech Axis object, the line's origin (point1) provides the origin of the axis and the direction of the line provides the direction of the axis.
• The rotational reference direction of a Line object cannot be explicitly specified.
Mech's overloading of the built-in Line symbol has no effect on its usage in other Mathematica code.
• See also: Line, Plane, ReferenceDirection.

Further Examples

Load the Modeler2D package.

The following are all valid line specifications. The use of Location and Direction serve to show how the lines are interpreted by MechanicalSystems. First, lines in the reference frame of body 1, the global reference frame.

Lines on body 2. Local point number zero is always defined as {0, 0}.

Lines can span multiple bodies.

After using SetBodies to define some local points, they can be referenced by index in a Line object.