Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
Is anyone aware of a method to obtain the transform matrix between two CSYS features using built in Creo functions?
The measure transform function generates the transposed matrix of the matrix which transforms coordinates based on the second selected CSYS to that based on the first selected CSYS. I would like to obtain the transform matrix but can not find any internal function available for relations or a direct analysis to generate this matrix.
I would then use the transform matrix values in some relations to drive additional features.
native within Creo -- I don't think so. Unless you set up an analysis feature between your references (or something)?
If you need more detailed access - you might look at CREOSON (Open Source Creo Automation)-- there is a function in there called:
Sample Request:
{
"sessionId": "~sessionId~",
"command": "file",
"function": "get_transform",
"data": {
"asm": "plate_assy.asm",
"path": [
54,
23,
45
],
"csys": "CS0"
}
}
Sample Response:
{
"status": {
"error": false
},
"data": {
"origin": {
"x": 380.0000554810615,
"y": 120,
"z": 1.000000000017174e-20
},
"x_axis": {
"x": 0,
"y": 1,
"z": 0
},
"y_axis": {
"x": 1,
"y": 0,
"z": 0
},
"z_axis": {
"x": 0,
"y": 0,
"z": 1
},
"x_rot": 0,
"y_rot": 0,
"z_rot": 0
}
}
Once you have that... I think it would be pretty easy to compute your transform.
Dave
I don't know of any native commands that can calculate the transform. There is a pretty slick workaround that we use to calculate coordinate system offsets/angles that may be useful to you. Very helpful when designing end of arm tools for robots.
Assuming you have coordinate systems A and B, and you need to know the offset dimensions and angles from A to B.
Here's the steps:
See the attached video clip for more details.
Ty
I found an older thread that is closely related to what I am trying to implement. I think it is a possible solution although I have not verified the Euler angle calculations work for my test case yet. It is worth looking at for anyone needing to use transform matrix elements in relations.
https://community.ptc.com/t5/Assembly-Design/how-to-retrieve-ALL-csys-parameters/td-p/58618