What I am attempting to do is set up a relative coordinate system. What it does is take in the XYZ coordinates of point A. Then it should translate that position over point B to get the position of point C, point B can rotate and translate on all three axes, but point A only translates, doesn't rotate.
Basically whats happening is you have 2 rectangles, one with the lower left hand corner being at the origin, and one with the lower left hand corner being point B. If at the top right corner of the first rectangle is Point A, then at the top right corner of the second rectangle is Point C, and no matter how that second rectangle rotates or translates, then point C will always be on the top right corner of the second rectangle. But if point A moved to say the lower right hand corner, then Point C would always be at the lower right corner of the second rectangle.
I have tried multiple times to evaluate the correct expression and what I came up with I thought was close. I had some variations of:
X': Xcos(pitch) - Zcos(pitch) + Xcos(yaw) + Ysin(yaw) + X.pointB
Y': Ycos(yaw) + Xsin(yaw) + Ycos(roll) + Zsin(roll) + Y.pointB
Z': Ysin(roll) + Zcos(roll) + Xsin(pitch) + Zcos(pitch) + Z.pointB
Where the XYZ's in the equation are the coordinates of point A, The Pitch, Yaw, and Rolls are the angles (in degrees) of the second rectangle.