cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Translate the entire conversation x

Creo Parametric Toolkit ProGraphicsPolygonDraw coordinates confusion

LC_12422730
5-Regular Member

Creo Parametric Toolkit ProGraphicsPolygonDraw coordinates confusion

I'm developing for Creo Parametric 7.0.12.0 using Toolkit C++.

In the Toolkit documentation for the ProGraphicsPolygonDraw function (.../protoolkit/protkdoc/api/1549.html), the description says that the points in the array use logical window coordinates.  However, the shape appears to be on the XY-plane and positioned relative to the solid coordinates, i.e.: instead of drawing flat-to-screen, it's drawing at an angle defined by the assembly orientation.

I tried the transforms I usually use to translate between solid and window coordinates, but all that happens then is no shape is drawn at all.  Can anyone explain to me what I'm missing?

 

Thank you,

  --Larry

 

4 REPLIES 4
VIN
12-Amethyst
12-Amethyst
(To:LC_12422730)

Hi,can get the part asmcomppath use API  ProAsmcomppathTrfGet(); ProPntTrtEval(); output the point array to draw polygon in the part.

 

LC_12422730
5-Regular Member
(To:VIN)

Thank you for your reply.  If I understand your solution correctly, this would take my target "screen" coordinates and transform them to an assembly coordinate system.  It's not clear to me which assembly path would be used, as trying to do so with the base coordinate system (via ProWindowCurrentMatrixGet or ProViewMatrixGet) doesn't seem to work.  Can you clarify for someone new to toolkit?

RPN
17-Peridot
17-Peridot
(To:LC_12422730)

Your mentioned function is about to show some lines on the screen, this lines are not part of any model later, and sure this is x&y.

LC_12422730
5-Regular Member
(To:RPN)

Thank you for your reply.  My goal is to draw lines on the screen, independent of any model.  But instead of drawing on the screen XY plane, it is drawing on the base coordinates XY plane.  I've been using other ProGraphics functions and have figured out the necessary transformations to draw flat to the screen, but this one is eluding me.  Have you been able to use ProGraphicsPolygonDraw in this way and if so, can you share what steps you used?

Announcements

Top Tags