SilverScreen Solid Modeler

PRIM_NODE        

PRIM_NODE        

Previous topic Next topic  

PRIM_NODE        

Previous topic Next topic JavaScript is required for the print function  

SilverScreenAPI

 

PRIM_NODE

 

Structure

A PRIM_NODE is common to all primitive types in SilverScreen and all primitives contain these fields.

 

 

 struct PRIM_NODE

    {

    USINT32     bits;

    int         id;

    PRIM_NODE   *next_node;

    PRIM_NODE   *prev_node;

    OBJECT_NODE *parent;

    PRIM_NODE   *first_hole;

    };

 

 


Members

Member

Description

bits

Bit flags with the following meanings (temporary and internal flags not shown)

 

Constant

Primitive Type

BITS_LINE

LINE_NODE

  BITS_CHAMFER

LINE_NODE created by the chamfer command

  BITS_LINE_PHONG

LINE_NODE marked by the phong command

BITS_POLYGON

POLYGON_NODE

  BITS_POLY_PHONG

POLYGON_NODE marked by the phong command

BITS_SPLINE

SPLINE_NODE

BITS_ROUND

ROUND_NODE and either a circle or arc

  BITS_CIRCLE

ROUND_NODE that is a circle

  BITS_ARC

ROUND_NODE that is an arc

     BITS_FILLET

ROUND_NODE that is an arc created by the fillet command

BITS_PHANTOM

primitive created from a ROUND_NODE via a sweep command (useful to the annotation system).

BITS_SPOINT

SPOINT_NODE (control point) that belongs to a spline curve

BITS_BEZIER

CURVE_NODE that is a Bezier curve

  BITS_SINGLE

Bezier curve with single precision at the control points

BITS_BPOINT

BPOINT_NODE (control point) that belongs to a Bezier curve

BITS_CLOSED

primitive has a closed path

BITS_MESH

MESH_NODE

BITS_POLYLINE

POLYLINE_NODE

BITS_POINT

POINT_NODE (3D point primitive)

BITS_HOLE

The primitive is a hole in another.

id

The primitive identification number that is used by the command system to locate a primitive within an OBJECT_NODE.

next_node

The next sibling

prev_node

The previous sibling

parent

The OBJECT_NODE that contains the primitive.

first_hole

If this is a closed primitve (BITS_CLOSED is set on bits), then this is a pointer to the first hole that belongs to the primitive. If the BITS_CLOSED flag is not enabled, then this member should not be referenced (see POINT_NODE for more).

 

 

Remarks

Typically a programmer uses the bits field to identify the node's type, and then casts the pointer to more informative form. It is important to understand that a LINE_NODE is a PRIM_NODE and a POLYGON_NODE is a PRIM_NODE, but a LINE_NODE is not a POLYGON_NODE.

 

See Also

get_prim, OBJECT_NODE

 

Header

silver.h, ssnodes.h