# Synopsis

PDX_MSGT gdb_MeasureCBSComplexity(long option, MDA_PTR gdx_cbs_ptr, double tolerance, double *score, GDB_CBS_COMPLEXITY *gdb_cbs_scores)

# Purpose

Measures the complexity of a GDX Curve Bounded Surf (CBS)

# Description

Measures the complexity of a GDX CBS. Analyzes CBS and assigns a score based on the geometric, parametric, and data complexity of the CBS.

# Input

## option

### GDB_LEAST_ACCURACY

Use the least accurate but fastest method.

### GDB_MID_ACCURACY

Use middle accuracy method.

### GDB_MOST_ACCURACY

Use most accurate but slowest method.

## gdx_cbs_ptr

The GDX CBS to be analyzed.

## tolerance

Tolerance used to determine curve closure and curve degeneracy.

# Output

## score

The complexity score.

## gdb_cbs_scores

If this pointer is NULL, then it is not used. Otherwise, the individual scores for each category are returned.

# Return

          GDB_NOERR
          Low level error return
          .fi
                            Point Preferrence
                            ~~~~~~~~~~~~~~~~~~
       int   surf_flag      ;   1 point if surf is closed
       int   surf_complex   ;  VAL of Measured surf complexity
       int   io_closed_surf ;   5 points implicit_outer with an open surf
       int   io_fio         ;   5 points IO with First Is Outer
       int   no_bounds      ;  25 points for zero bounds with IO
       int   cec_complex    ;  VAL of Measured CEC Complexity
       int   more_cap_loops ;   5 points if more than 2 CAP Loops
       int   cap_no_pole    ;   5 points if one CAP Loop with no Pole
       int   more_outers    ;   5 points if More than one Outer loops
       Score is calculated by adding up all the points and divided
       with normalizer which is "5". Score heigher than 1.0 is
       considered as complex CBS and heigher than its normalizer is
       considered as FATAL.