Skip to main content
1-Visitor
Oct 26, 2021 9:17 AM UTC
Solved

Get global coordinates of entry-port coordinate system with toolkit

I am using the toolkit to get entry-port parameters from an assembly model. Right now I am able to read the name of the entry-port coordinate systems of an given component. Now I would like to get the global coordinates of these entry-port.

 

Is there a way to read the global coordinates from the name of an entry-ports via toolkit? I didn't even find that information in Creo directly.

 

Thanks a lot

17-Peridot
Nov 1, 2021 6:55 AM UTC

Take a look

Transforming Coordinates of an Assembly Member
• ProAsmcomppathTrfGet()

6 replies

17-Peridot
Nov 1, 2021 6:55 AM UTC

Take a look

Transforming Coordinates of an Assembly Member
• ProAsmcomppathTrfGet()

Translate
Tim_19961-VisitorAuthor
1-Visitor
Nov 4, 2021 7:00 AM UTC

Thanks, that worked out.

Here my example code if anyone needs it:

 

ProMatrix matrix;
ProAsmcomppath comp_path;
ProSelection* p_sel3;
ProPoint3d p3d;
ProPoint3d t_point;
int n_sel3;

ProError status;

status = ProSelect("csys", 1, NULL, NULL, NULL, NULL, &p_sel3, &n_sel3); // select Entry-Port
status = ProSelectionPoint3dGet(p_sel3[0], p3d); // get local coordinates
status = ProSelectionAsmcomppathGet(p_sel3[0], &comp_path); // get ID-Table
status = ProAsmcomppathTrfGet(&comp_path, PRO_B_TRUE, matrix); // get matrix for transformation
status = ProPntTrfEval(p3d, matrix, t_point); // transform to global coordinates

Translate
24-Ruby IV
Nov 4, 2021 7:44 AM UTC

Thanks for the code!

Translate