Displaying Graphics
All the methods in this section draw graphics in the
Creo+ current window and use the color and linestyle set by calling
pfcBaseSession.SetStdColorFromRGB() and
pfcBaseSession.SetLineStyle(). The methods draw the graphics in the
Creo+ graphics color. The default graphics color is white.
The methods in this section are called using the classpfcDisplay. This class is extended by the pfcBaseSession class . With this architecture you can call all these methods on any pfcSession object.
Methods Introduced:
The method
pfcDisplay.SetPenPosition() sets the point at which you want to start drawing a line. The method
pfcDisplay.DrawLine() draws a line to the given point from the position given in the last call to either of the two functions. Call
pfcDisplay.SetPenPosition() for the start of the polyline, and
pfcDisplay.DrawLine() for each vertex. If you use these methods in two-dimensional modes, use screen coordinates instead of solid coordinates.
The method
pfcDisplay.DrawCircle() uses solid coordinates for the center of the circle and the radius value. The circle will be placed to the XY plane of the model.
The method
pfcDisplay.DrawPolyline() also draws polylines, using an array to define the polyline.
In two-dimensional models the Display Graphics methods draw graphics at the specified screen coordinates.
The method
pfcDisplay.DrawPolygon2D() draws a polygon in screen coordinates. The method
pfcDisplay.DrawArc2D() draws an arc in screen coordinates.