Example 2D symbol for connection points

Copy
/*
** CONNECTION_POINT_SYMBOL(nr_of_ar,nr_of_eq,nr_of_in,nr_of_prun,nr_of_iline,middle_of_line)
**
** This symbol will be drawn on every connection point.
** arguments:
** nr_of_ar = number of armatures in this connection point
** nr_of_eq = number of equipments in this connection point
** nr_of_in = number of instruments in this connection point
** nr_of_prun = number of piperuns in this connection point
** nr_of_iline = number of instrument lines in this connection point
** middle_of_line = 1 if at least one node point is middle of at least one connection line
** 0 if not
**
*/
CONNECTION_POINT_SYMBOL(nr_of_ar,nr_of_eq,nr_of_in,nr_of_prun,nr_of_iline,middle_of_line)
{
    /*
    ** case 1 more than two pipe runs and no other objects
    */
    
    if( nr_of_ar == 0 & nr_of_eq == 0 & nr_of_in == 0 & nr_of_prun > 1 & nr_of_iline == 0 ){
        LINETYPE( 1, 3.3 );
        ARC( -.2, 0, 0, 0, -360);
        ARC( -.4, 0, 0, 0, -360);
        ARC( -.6, 0, 0, 0, -360);
        ARC( -.8, 0, 0, 0, -360);
        ARC( -1., 0, 0, 0, -360);
        return(0);
    }
     
    /*
    ** armatures, pipe runs and no other objects
    */
    
    if( nr_of_ar != 0 & nr_of_eq == 0 & nr_of_in == 0 & nr_of_prun != 0 & nr_of_iline == 0 ){
        LINETYPE( 1, 3.3 );
        ARC( -.1, 0, 0, 0, -360);
        return(0);
    }
     
    /*
    ** equipments, pipe runs and no other objects
    */
    
    if( nr_of_ar == 0 & nr_of_eq != 0 & nr_of_in == 0 & nr_of_prun != 0 & nr_of_iline == 0 ){
        LINETYPE( 1, 3.3 );
        ARC( -.4, 0, 0, 0, -360);
        return(0);
    }
    
    return( 0 );
}