Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
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
Hi,can get the part asmcomppath use API ProAsmcomppathTrfGet(); ProPntTrtEval(); output the point array to draw polygon in the part.
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?
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.
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?