You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fabian-flassig edited this page Aug 25, 2026
·
1 revision
Sets the x axis of a plate, the direction a cnc machine aligns the part by.
Similar to the Workshop -> X axis function in the PYTHA user interface. The x axis defines how the part is placed on the machine table; it is independent of the grain direction.
The part the x axis was set on, or nil if neither an edge nor a plate was found
Notes:
Works exactly like set_grain_direction, including the free line case: if an edge connects the two coordinates it becomes the x axis edge, otherwise the line is taken as a direction line on the plate it lies on.
A plate keeps one x axis. A second call replaces the first.
A plate can carry a grain direction and an x axis at the same time; they are separate attributes on separate edges.
The function requires the Workshop license, test for it with check_license_workshop.
Example:
pytha.set_x_axis_direction({ {0, 0, 19}, {600, 0, 19}, part })