Constraint that restricts body motion to a specified path

Constraints & Drivers

The two Bodies connected by a Point-Curve Constraint can only move relative to one another if a point on one body moves along a curve on the other body. The point on one body is the origin of the Body coordinate system (CS) to which one side of the Point-Curve Constraint is connected. The corresponding curve starting point on the other body is the origin of the Body CS to which the other side of the Point-Curve Constraint is connected. The point is constrained to move along the curve and cannot move perpendicularly to the curve.

and boundary conditions applied at the spline's |

Constraints restrict relative degrees of freedom (DoFs) between a pair of bodies. Locally in a machine, they replace a Joint as the expression of the DoFs. Globally, Constraint blocks must occur topologically in closed loops. Like Bodies connected to a Joint, the two Bodies connected to a Constraint are ordered as base and follower, fixing the direction of relative motion.

For the Point-Curve Constraint, the base (P) is the Body carrying the point, and the follower (C) is the Body carrying the curve. The Point-Curve Constraint is assembled: the Body CS origin on the base (Point) body must be initially collocated with the Body CS origin on the follower (Curve) body, to within assembly tolerance.

You can connect a Constraint & Driver Sensor to any Constraint block, but not a Driver Actuator. The Constraint & Driver Sensor measures the reaction forces/torques between the constrained bodies.

The dialog has two active areas, **Connection
parameters** and **Spline specification**.
It stores the defining information of a single spline for the constraint.

The base (P)-follower (C) Body sequence determines the sense of positive motion. Positive translation is the follower moving in the direction of the translation axis.

**Point location**When you connect the base (P) connector port on the Point-Curve Constraint block to a Body CS Port on a Body, this parameter is automatically reset to the name of this Body CS. See the following figure, Point-Curve Constraint Base and Follower Body Connector Ports.

This Body CS origin is the point of the Point-Curve Constraint.

**Curve location**When you connect the follower (C) connector port on the Point-Curve Constraint block to a Body CS Port on a Body, this parameter is automatically reset to the name of this Body CS. See the following figure, Point-Curve Constraint Base and Follower Body Connector Ports.

This Body CS origin is the starting point of the curve of the Point-Curve Constraint.

**Number of sensor ports**Using this spinner menu, you can set the number of extra connector ports needed for connecting Constraint & Driver Sensor blocks to this Constraint. The default is

`0`

.

**Point-Curve Constraint Base and Follower
Body Connector Ports**

The Point-Curve Constraint dialog gives you two ways to specify the spline curve. The first way is entering in this dialog the coordinates of breakpoints and endpoints on the follower and is valid for defining curves in up to three dimensions.

The second way is graphically displaying and editing the spline in the spline editor (see following), valid only for two-dimensional curves on the follower.

**Breakpoints**List here the

*x*-components,*y*-components, and*z*-components, respectively, of the breakpoints and endpoints that define the spline:**X-components**: enter*(x*_{0}*, x*_{1}*, ..., x*_{N+1}*)*as a vector.**Y-components**: enter*(y*_{0}*, y*_{1}*, ..., y*_{N+1}*)*as a vector.**Z-components**: enter*(z*_{0}*, z*_{1}*, ..., z*_{N+1}*)*as a vector.All three fields require nonnull entries. The number of components in each vector should be the same.

*Exception and shortcut:*if all thecomponents are the same, just enter one number in the*Z*vector. The*Z***Breakpoints**list replicates this number to expand out a full vector.If there are no

and/or*X*components, you must still enter*Y*`[0 ... 0]`

in that/those field(s). If there are nocomponents, you must still enter at least*Z*`[0]`

in thefield (using the replication/expansion shortcut).*Z*The pull-down menu for each spatial dimension lists the history of those previous breakpoints created by the graphical spline editor (see following) within a single dialog session. Closing the dialog destroys this history, and only the current breakpoint list is retained.

**Units**In the pull-down menu, choose the linear units for distances on the constrained bodies. The default is

`m`

(meters).**End conditions**In the pull-down menu, choose the type of end (boundary) condition on the spline curve. The possible conditions are:

End Condition

Definition

Minimum Number of Points

Notes

`Natural`

Match each endslope to the slope of the cubic that fits the first four points at that end

Two points

Default `Not-a-knot`

Only the curve and its first derivative are continuous at first and last interior points

Four points

`Periodic`

Match the first and second derivatives of the two endpoints

Two points

(three recommended)This choice closes the spline by connecting the endpoints **Allow the point to fall off the curve**If the check box is selected, the base point continues with unconstrained motion if it reaches an endpoint and leaves the spline on the follower. The direction of motion at the instant the base point leaves the constraint is tangent to the spline.

If the check box is not selected, and the base point attempts to leave the spline on the follower, the simulation stops with an error. The default is not selected.

**Edit spline**Click here to open the optional Edit spline dialog.

The Edit spline dialog provides alternative numerical entry and graphical editing methods for defining the constraint spline. But it can define only two-dimensional curves in the

*x-y*coordinate directions on the follower Body. The spline editor ignores any*z*-components in existing breakpoints.

The numerical entry area lies on the left side of the Edit spline dialog, the graphical editing area on the right side.

**Point-Curve Constraint Spline Editor**

To place a breakpoint in the graphical display, place your cursor at the position where you want the breakpoint. The

**Location**display in the lower right indicates your current cursor coordinates in the curve display.Then click at the desired point. A circle appears where you clicked, and simultaneously, the breakpoint is listed in the

**Breakpoints (x-y)**list.Continuing to add breakpoints generates the spline (red curve).

Use the Graphical toolbar controls to edit the spline graphically in the display:

Remove points by clicking on the Delete breakpoints icon. Your cursor turns into an eraser symbol. With it, select and click the breakpoints you want to delete.

Insert new (interior) breakpoints by clicking on the Insert breakpoints icon. Your cursor acquires a small circle. Click on the positions, near the existing curve, where you want the new breakpoints. The editor modifies the spline to fit the new breakpoints.

Add new endpoints and extend the curve by clicking on the Append breakpoints icon. Your cursor acquires a small circle. Click on the positions, near the existing endpoints, to where you want to extend the curve. The editor modifies the spline to fit the new endpoints.

Move existing endpoints by clicking the Move breakpoints icon. Click and drag the breakpoints you want to move, then drop them where you want them.

The editor modifies both the spline red curve in the graphical
display and the **Breakpoints (x-y)** list
as you make these changes.

Additional graphical toolbar controls:

Zoom In/Zoom Out and Auto Fit: Standard MATLAB

^{®}Graphics zooming and auto resizing of graphics display.Axes properties: Edit properties of graphical display.

Grid On/Off: Turn the graphical display

*x-y*grid on or off.

Use the numerical entry controls, instead of the graphical editing tools, to edit breakpoints by text entry.

**Breakpoints (x-y)**You can also add, delete, and edit the breakpoints via this breakpoints list:

Select an existing breakpoint by highlighting it with your cursor.

Add a breakpoint by moving the highlighted selection to the empty line below the last breakpoint with your cursor control.

In the

**x:**and**y:**fields, enter the*x*- and*y*-coordinates of the currently selected breakpoint.

**Add/Update Breakpoint**After editing an existing breakpoint or entering a new one in the

**x:**–**y:**fields, update the breakpoint list by clicking here.The new or changed breakpoint appears in the graphical display as a circle.

**Delete Point**Click here to delete the currently selected breakpoint.

**Delete All**Click here to delete all the breakpoints in the breakpoint list.

**End conditions**In the pull-down menu, choose the type of end (boundary) condition on the spline curve. The possible conditions are

`natural`

,`not-a-knot`

, and`periodic`

. The default is`natural`

.

Clicking **Apply** or **OK** updates
the breakpoints stored in the main Point-Curve Constraint dialog.

Previous breakpoint lists are stored in the history pull-down
menus of the main Point-Curve Constraint dialog's **Breakpoints** list.
This history is destroyed if you close the main dialog, and only the
current breakpoint list is retained.

See Constraining and Driving Degrees of Freedom for more on restricting DoFs with Constraints.

See Checking Model Topology and How SimMechanics Software Works for more on using constraints in closed loops.

Was this topic helpful?