Skip to main content
1-Visitor
January 24, 2014
Solved

how to retrieve ALL csys parameters

  • January 24, 2014
  • 5 replies
  • 16687 views

Every CSYS is mathematically defined in space by 6 parameters.

Is it possible to retrieve these 6 parameters (XYZ-translation + XYZ rotation) in Creo?

The XYZ translation is easy: it's just a measurement feature.

But the rotational parameters are not that simple.

Does anybody knows how to do this?

Some background:

I have a CSYS, somewhere in a complex assembly.

It is defined by a long chain of features and dependencies, interconnected with parameters and relations.

At the end of the road, I would like to know the exact position of this CSYS, with reference to the base CSYS.

With these 6 parameters, I should be able to create a new CSYS, referenced to the base CSYS, and equal to the original CSYS.

Any help would be greatly appreciated.

Jeroen.

Best answer by Jeroen

Ok,

problem 'solved'...

I used the information provided by Antonius, David and Eric, and I mixed them into a solution.

I now have a piece of code/features/measurements where I can make a UDF from to use in my components.

It's a bit more complex as imagined beforehand, but it works like a charm now.

If you are interested, I enclosed the part. All information to create a new CSYS is in the last feature (EULER_ANGLES)

Thank you all!

PS: I got in touch with someone from PTC, but they told me it wasn't possible in any way to get this information in an easy way, unless you should program it with pro/toolkit

5 replies

1-Visitor
January 24, 2014

Have you tried a transform measure? Creo 2.0: Analysis [tab] -->Meausure [down arrow] --> Transform. Pick two coordinate systems using CTRL and it will give you the XYZ distance and rotation matrix. Hopefully that gets you what you want.

17-Peridot
January 24, 2014

You can gather the information on the coordinate system. The info window has the designated dimension values.

More detail and the data is provided in the middle data on the UI if you scroll it.CSINFO.PNG

Remember that the CSYS can have spherical or cylindrical coordinates. Not sure if this affect the stored information.

I did finally resolve another issue I've been having with defining planes... how one can create a plane normal to the screen?

Turns out you can do this with a CSYS from which you can make planes.

I often find the need for this in presentations for saved view orientations.

Now I know I can save a CSYS to that orientation easily

CSscreennormal.PNG

Jeroen1-VisitorAuthor
1-Visitor
January 27, 2014

Thanks both.

The way I first tried it, is based on Antonius' post: Create a new CSYS (1) on top of the one you would like to get the information from, and in the orientation tab, select "orient by selected CSYS axes". Here you select the reference CSYS.

Afterwards, create feature relations (2) for this new CSYS to read the 6 location parameters, and put them in feature parameters.

These parameters I can use to create a new CSYS (3) directly referenced to the base CSYS.

This works, but if I change anything in the chain that alters the position of the measured CSYS, the new CSYS in step (1) would not update. I really need to have this to update.

The method based on Erics' post seems to be better in a way that this solution would update if something would change and the position of the first CSYS alters. But it's not clear to me how to transform the 4x3 transformation matrix into useful parameters to create my new CSYS.

Any thoughts?

17-Peridot
January 27, 2014

I am not sure what the "4" is in the 4x3. I see the stored data as 3x3... XYZ and rotation about XYZ.

Since my original example is based on the default CSYS, this should remain constant. By changing any of the 6 parameters that controls the new CSYS, anything associated to it should likewise change. So therefore, if you reference a third CSYS from the second, that means the third CSYS should reorient maintaining the same values. Technically, you should be able to build and entire part based on the second CSYS and have the entire model follow any change you make in the 6 values. Again, you will never alter the default CSYS, just the second one. And you can base everything else on that second CSYS.

The implications can be significant in at the assembly level where you can apply geometric equations to the 6 values. They can exist anywhere in space in any orientation. Furthermore, the CSYS dialog does allow for Cylindrical and Spherical coordinates from the default CSYS. I just don't think it stores them this way... it is merely an interpolation matrix in the UI that you would have to reverse engineer to use them in relations as a geometric formula.

17-Peridot
January 27, 2014

Okay, happily I am wrong about the interpolation. A CSYS defined by spherical coordinates from the default CSYS will maintain a radius (linear) and 2 angles for location, and 3 angles for orientation at the new location.

D18, 19 and 20 are the location, and 12,13, 14 labeled X, Y, and Z are the orientation angle in relation to the default.

CSYS_Mapping.PNG

Of course, cylindrical will be linear values for radius and Z values and angle for location.

1-Visitor
January 27, 2014

To simplify - you don't want to create a new coordinate system at the end of the mechanism chain, you want to know the cumulative transform from the start of the chain to the end of the chain.

I'd have a try by creating datum points at the (0,0,0), (1,0,0), (0,1,0), and (0,0,1) locations relative to the csys at the end of the chain. You should be able to get the values for each of the X, Y, and Z components in any other Csys.

Obviously, (0,0,0) -> translation. I haven't done it, but finding the Euler angles from the rest is a problem already solved. Search Google for "Calculation of Euler angles.pdf" It's on geom3d.com

One difficulty is the potential for gimbal-lock, which I think is dealt with in the above PDF as an exception.

Jeroen1-VisitorAuthor
1-Visitor
January 28, 2014

This is a very interesting post!

I looked for these Euler formulas, and they should be able to do the trick!

I tried to make this work using the matrix that is generated by the piece of code that was posted by Antonius above. The Euler-calculation works like a charm, but the matrix from Antonius' post contains the data in another format.

At this moment I'm searching for a way to translate the matrix with angles to the correct rotation matrix needed to use in the Euler calculation.

1-Visitor
January 28, 2014

Try these under the matrix composition section:

http://nghiaho.com/?page_id=846

Jeroen1-VisitorAuthorAnswer
1-Visitor
January 28, 2014

Ok,

problem 'solved'...

I used the information provided by Antonius, David and Eric, and I mixed them into a solution.

I now have a piece of code/features/measurements where I can make a UDF from to use in my components.

It's a bit more complex as imagined beforehand, but it works like a charm now.

If you are interested, I enclosed the part. All information to create a new CSYS is in the last feature (EULER_ANGLES)

Thank you all!

PS: I got in touch with someone from PTC, but they told me it wasn't possible in any way to get this information in an easy way, unless you should program it with pro/toolkit

17-Peridot
January 28, 2014

Congratulations Jeroen! This is quite a feat. Thank you for putting all our knowledge together for a fine result.