588,270 active members*
11,607 visitors online*
Register for free
Login Register
HAINBUCH GMBH - Banner
HAINBUCH GMBH Forum

SPANNENDE TECHNIK

HEIDENHAIN -> TNC > TNC MATH to Convert a PLANE VECTOR to SPATIAL
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2023
    Posts
    3

    TNC MATH to Convert a PLANE VECTOR to SPATIAL

    Hello I would like to know the math to convert a Plane Vector to a Plane Spatial. I know this changes depending on your machine configuration. The Machine I want to do this on is a DMU65 MonoBlock which from the Manual It uses a XYZ tilting sequence for Spatial. For Euler Angles this machine uses a ZXZ Sequence. This machine has an A-axis Which rotates around the X-axis. It also has a C-axis which rotates around the Z-axis.


    I know how to get the rotation Matrix based on the Vectors but that is all. Also there are Singularities that will probably need to get resolved which is another issue. Can anybody help me do this?
    Last edited by No-Sauce1; 08-10-2023 at 05:38 PM.

  2. #2
    Join Date
    Jun 2015
    Posts
    4171

    Re: TNC MATH to Convert a PLANE VECTOR to SPATIAL

    hy no-sauce i can handle plane geometry, create 2d cad software, etc

    recently i stepped to 3d, and made a replica of a 5ax cnc, so to test a custom probing macro

    let's talk i have 0 experience with heidenhian; i know okuma a bit
    Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg

  3. #3
    Join Date
    Aug 2023
    Posts
    3

    Re: TNC MATH to Convert a PLANE VECTOR to SPATIAL

    Here is a rotation matrix. I have attached it to the message. The correct result for this is PLANE SPATIAL SPA-90 SPB0 SPC-51.84. I am just not sure of the Equation/formula to get this answer.
    Attached Thumbnails Attached Thumbnails 1.png  

  4. #4
    Join Date
    Jun 2015
    Posts
    4171

    Re: TNC MATH to Convert a PLANE VECTOR to SPATIAL

    hy, nothing attached but please share:
    ... initial vector coordinates base.xyz, tip.xyz
    ... rotation angles
    ... rotation center xyz
    ... final vector coordinates base.xyz, tip.xyz

    i will try to work from there, check things / kindly
    Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg

  5. #5
    Join Date
    Dec 2008
    Posts
    3138

    Re: TNC MATH to Convert a PLANE VECTOR to SPATIAL

    Quote Originally Posted by deadlykitten View Post
    hy, nothing attached but please share:
    ... initial vector coordinates base.xyz, tip.xyz
    ... rotation angles
    ... rotation center xyz
    ... final vector coordinates base.xyz, tip.xyz

    i will try to work from there, check things / kindly
    He did attach.... it's called PLANE SPATIAL, it has additional parameters that control how/if it moves to the new plane, it also, is nothing like an Okuma.
    It controls the work origin placement in regard to the "swing point" of the rotation axes ( similar to TCPC ), and the programming planes.

    No-sauce.... what is the full line you are using ? You are missing the extra bits for the full command.
    I use the rotation, the new settings is now a new XYZ grid layout...
    not at work, so can't verify my CAM outputs.

  6. #6
    Join Date
    Aug 2023
    Posts
    3

    Re: TNC MATH to Convert a PLANE VECTOR to SPATIAL

    I managed to find the math for this and get it working using C++ and some math formula's I also used Eigen to shorten it up a bit. I have also learned that Spatial is using zyx convention (opposite of what I read in the manual.

    1. First I calculate the rotation matrix from the right vector to normal vector
    2. Find the cross product to finish the matrix
    3. pitch = asin(-rotationMatrix(2, 0));
    yaw = atan2(rotationMatrix(1, 0), rotationMatrix(0, 0));
    roll = atan2(rotationMatrix(2, 1), rotationMatrix(2, 2));

    I have also put a condition in there for singularities when the pitch is at 90deg

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •