Transform points - shift, rotate, align, mirror
The context menu of the point table of a VKRC or Fanuc program has the function Transform points.... It changes the position and orientation of a group of points at once: shifts and rotates them, gives them the orientation of a reference point or mirrors them - for example to move a seam, to correct a fixture or to prepare the points of the twin (left / right) robot. Before anything is written you see a table before / after with a check whether every new point is still reachable and within the axis limits. The change can be undone.

▲ Starting the function

Select the points in the point table (one or more, Ctrl / Shift + click) and choose Transform points... in the context menu. The window shows the selected points; all settings act on exactly these points. Only points that are used in a motion of the program can be transformed, because the TOOL and BASE (Fanuc: UT and UF) of the motion define the frame of the point. The menu also has Undo last points transform (see Undo).

VKRC and Fanuc programs are supported. For KRC, ABB and Yaskawa programs the function answers that it is not available yet.

▲ Move / rotate

Operation: Move / rotate shifts the points by X, Y, Z (mm) and rotates them by the angles Rz, Ry, Rx (degrees; the rotation is Rz · Ry · Rx). The Frame defines the axes of the shift and the rotation: Rotate about: TCP of each point turns every point about its own TCP (the positions only change by the shift), Origin of the frame (whole group) turns the whole group as a rigid body about the origin of the frame.

▲ Align orientation to a point

Operation: Align orientation to a point gives all selected points the orientation of a reference point. The positions stay unchanged. Useful when a group of points should be approached with the same tool attitude.

▲ Mirror

Operation: Mirror mirrors the points about a plane (XZ, YZ or XY of the frame) at the distance Plane offset. The plane can be given in the BASE of the point, in WORLD or in a custom frame (not in TOOL).

Mode Tool axis flip (M) - the tool axis that the mirror turns over: Z of the tool (default, M = diag(1, 1, -1)), Y of the tool (= N · T · N; for tools whose axes are laid out differently this is wrong by 180°) or X of the tool. Check the result with a point whose twin is known.

Configuration after the mirror:
▲ Assumptions of the mirror

The mirror of the twin robot is a calculation with these assumptions: The assumptions were confirmed on a KUKA robot pair in an example cell (process points of a program within a few to some tens of mm and about 1 to 3 degrees of the points taught on the twin; with the tool axis flip Y the result is 180° off; the T value of the twin deviates from the xor rule only near the wrist singularity). They are not confirmed for Fanuc and ABB. Check the result there with a known point pair. The programs of the twin robot are not machine mirrors of each other: approach and home points can differ by more than 200 mm. Mirror therefore the points of the process, not the approach and home points, and check them with the reach check and in the simulation.

▲ Preview, check and write

The table shows for every point: the frame (TOOL / BASE), the values before and after (X Y Z and the angles - KUKA C B A, Fanuc W P R - in the frame of the point), the shift in mm, the configuration before / after, the axes after the transformation and the status:
StatusMeaning
OKreachable by inverse kinematics within the software limits.
over axis limitan axis would be outside the software limits (red; the axes over the limit are listed).
not reachableno inverse kinematics solution (red).
not checkedthe reach is not checked (e.g. configuration kept at the left / right mirror).
errorthe point cannot be calculated (message in the row, e.g. unsupported mounting or missing kinematics).
Nothing is written before Apply. If there are points with a problem, Apply asks what to do with them (write them anyway or only the points that are OK). The exact values (10 significant digits) are written into the point data of the program; the document is changed but not saved - save it as usual. Joint points are written as axes.

▲ Undo

Undo last points transform (context menu of the point table) restores the saved values of the points that the last transformation changed. One transformation is remembered per program; a new transformation replaces it.

▲ API

Every setting of the window is a parameter of the editor command points_transform and vice versa (see VeRa / editor API):
{"cmd":"points_transform","file":"D:/x/UP42.src","mode":"preview","points":["P12","P13"],
 "op":"move","frame":"base","pivot":"tcp","dx":0,"dy":5,"dz":0,"rx":0,"ry":0,"rz":0}
{"cmd":"points_transform","mode":"preview","points":"all","op":"mirror","plane":"xz","offset":191008,
 "mirror":"lr","config":"mirrored","mflip":"z"}
{"cmd":"points_transform","file":"D:/x/UP42.src","mode":"apply","points":["P12"],"op":"align","ref":"P5"}
{"cmd":"points_transform","file":"D:/x/UP42.src","mode":"undo"}
ParameterMeaning
modepreview (default, writes nothing; the program may be open or on the disk), apply, undo (the program must be open in the editor; the change stays unsaved - use save).
file, pointsprogram; point names ("P12") or "all".
opmove, align, mirror.
frame, pivotbase, world, tool, custom; tcp or frame.
dx dy dz rx ry rzshift (mm) and rotation (deg).
custom / customPoints{"x","y","z","rx","ry","rz"} in WORLD, or three points ["P1","P2","P3"].
refreference point of align.
plane, offsetxz, yz, xy; position of the plane (mm).
mirror, config, mflipsame or lr; mirrored or keep; z, y, x.
srcRobot, dstRobot{"x","y","z","a","b","c"} positions of this and the twin robot in the cell.
allowWarningsapply also the points with status limit / unreachable / not_checked (default false).
maxRowsmaximum number of answer rows (default 500).
The answer has a row per point: point, status (ok, limit, unreachable, not_checked, error), frame, before / after (x y z rx ry rz in the frame of the point; KUKA C B A, Fanuc W P R), worldBefore / worldAfter (BASE 0 = robot coordinates), shiftMM, configBefore / configAfter, axes. The agent interface editor_read allows only mode: preview; apply and undo go through editor_command. Recommended order for an agent: preview, read the status of every row, apply (allowWarnings only on purpose), save, undo if needed.

▲ Limits and licence