The Draw List   

<<< Registering Handlers for Different Filetypes Chapters Interface Functions >>>

Contents

[back to top]


9.1 Specifying which parts to render

By default, PS/Workshop attempts to render all the parts in a document. Sometimes, though, this might not be the best method: for example, you may only be interested in rendering a specific area of the document, or only one part in the document. In such cases you need to use the draw list.

The draw list provides control over which entities to display, and how they should be displayed. There is one draw list associated with each document. Using the draw list also lets you display geometry in wireframe modes.

The following entity classes are supported by the draw list:

The draw list can be obtained from a document through the IPSWDoc::DrawList interface property.

Initially, the draw list for a given document is empty. Whenever this is the case, PS/Workshop draws all the parts in the document. If entities are subsequently added to the draw list, only those entities are displayed.

Entities can be added to the draw list using IPSWDrawList::AddItems (which adds items to the draw list using the default draw options) or IPSWDrawList::AddItems2 (which adds items to the draw list using a specified set of draw options). An entity can only exist in a draw list once - attempting to add it again will cause the AddItems or AddItems2 (whichever was called) to fail.

Entities can be removed from the draw list using IPSWDrawList::RemoveItems or IPSWDrawList::RemoveAll. Once the draw list is empty, PS/Workshop once again displays all parts in the document.

[back to top]


9.2 Setting drawing options

As well as adding entities to a draw list you can control how those entities are displayed using the IPSWDrawOpts interface. This interface is used as an argument for a number of the draw functions.

IPSWDrawOpts lets you control the following properties:

 

Properties

Description

Entities affected

Clip

Clip entity to part box (currently ignored)

curves surfaces

Colour

Colour in which to draw entity

geometry topology

DrawSense

Whether to display sense of entity

edges curves faces surfaces

N_U

Number of U param hatch lines to display

surfaces

N_V

Number of V param hatch lines to display

surfaces

Tolerance

Whether to display tolerance of entity

edges vertices

ToleranceColour

Colour in which to display entity tolerance

edges vertices

Further details of both the IPSWDrawList and IPSWDrawOpts interfaces can be found in Appendix A, "Interface Functions".

 

[back to top]

<<< Registering Handlers for Different Filetypes Chapters Interface Functions >>>