SilverScreen Solid Modeler

fence_pgroup

fence_pgroup

Previous topic Next topic  

fence_pgroup

Previous topic Next topic JavaScript is required for the print function  

SilverScreenAPI

 

int fence_pgroup ( char *message, int p_type )

 

char *message;     // prompt message

int   p_type;      // prompt type

 

 




Synopsis

#include "silver.h"

 

The fence_pgroup function displays message , and then permits a p-group of primitives to be interactively selected using a fence. p_type designates the allowable types that are considered for selection. Primitives allowed by p_type that are wholly inside the fence are placed in the p-group list.

 

 

Parameters

message is a null-terminated string containing the message to be used in prompting, p_type is an integer value containing flags indicating which primitive types are to be considered. p_type may be composed of any of the following flags or'ed together (as defined in silver.h):

 

Name

Value

Meaning

BITS_ARC

0X2000

select arcs

BITS_CIRCLE

0X1000

select circles

BITS_LINE

0X0001

select lines

BITS_POLYGON

0X0002

select polygons

BITS_POLYLINE

0X0400

select polylines

BITS_SPLINE

0X0004

select splines

BITS_SPOINT

0X0020

select spline points

BITS_BEZIER

0X0040

select beziers

BITS_BPOINT

0X0080

select bezier points

BITS_POINT

0X0800

select points

BITS_ROUND

0X0010

select arcs and circles

 

 

Return Value

fence_pgroup returns 1 if the user successfully completes the fencing operation, and 0 if not.

 

 

Comments

The paths to the primitives selected by fence_pgroup may be accessed by use of get_group_item.

 

 

See Also

prompt_pgroup , fence_qgroup , get_group_item

 

 

Example

Here is an example of how to use fence_pgroup in conjunction with get_pgroup_item :

 

C / C++ Code

 

 if ( fence_pgroup ( "Select polygons", BITS_POLYGON ) )

    {

    for ( i = 1 ; ; ++i )

       {

       if ( ! get_pgroup_item ( i, path ) )

          break;

       // display i-th path

       ss_command (“note Path = %s”,path);

       }

    }