Skip to content

Latest commit

 

History

History
57 lines (31 loc) · 1.6 KB

plane.rst

File metadata and controls

57 lines (31 loc) · 1.6 KB

PointOnPlane - Constraint a point to a plane

trep.constraints

The PointOnPlane constraint constraints a point (defined by the origin of a coordinate frame) to lie in a plane (defined by the origin of another coordinate frame and normal vector).

The constraint equation is:


h(q) = (p1 − p2) ⋅ (g1 ⋅ norm)

where g1 and p1 are the transformation of the frame defining the plane and its origin, p2 is the point being constrained, and norm is the normal vector of the plane expressed in the local coordinates of g1.

By defining two of PointOnPlane constraints with normal plane, you can constrain a point to a line. With three constraints, you can constraint a point to another point.

Examples

pccd.py, pypccd.py, radial.py

Create a new constraint to force the origin of point_frame to lie in a plane. The plane is coincident with the origin of plane_frame and normal to the vector plane_normal. The normal is expresed in the coordinates of plane_frame.

PointOnPlane.plane_frame

This is the coordinate frame the defines the plane.

(read-only)

PointOnPlane.normal

This is the normal of the plane expressed in plane_frame coordinates.

PointOnPlane.point_frame

This is the coordinate frame that defines the point to be constrained.