# Synopsis

PDX_MSGT gdb_MeasureCECComplexity(long option, MDA_PTR gdx_cec_ptr, MDA_PTR gdx_surf_ptr, double tolerance, double *score, GDB_CEC_COMPLEXITY *gdb_cec_scores, int *loop_type)

# Purpose

Measures the complexity of a GDX Composit Edge curve (CEC)

# Description

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

# 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_cec_ptr

The GDX CEC to be analyzed.

## gdx_surf_ptr

The Surf associated with the CBS.

## tolerance

Tolerance used to determine curve closure and curve degeneracy.

# Output

## score

The complexity score.

## gdb_cec_scores

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

## loop_type

Type of the CEC loop, 1 = Outer Loop, 2 = Inner Loop and 0 = Cap Loop

# Return

          GDB_NOERR
          Low level error return
          .fi
                            Point Preferrence
                            ~~~~~~~~~~~~~~~~~~
       int   num_of_ec      ;     FATAL if zero number of EC's
       int   independent    ;      1  point for being an independent CEC
       int   curve_open_flag;      1  point if CEC with Open Flag
       int   not_closed_in_cbs;   FATAL if CEC not closed in model space
       int   comp_mc_no_exit;      1  point if no Model Curve
       int   comp_mc_partial;      2  points for partial model CEC
       int   comp_mc_discont;      5  points for discontinuous model CEC
       int   mc_self_intersect;       Not Tested
       int   comp_parm_no_exist;   1  point if no Parm Curve
       int   comp_parm_partial;    2  points for partial parm CEC
       int   parm_pole_discont;    1  point if parm curve discontinuous at pole
       int   parm_seam_discont;    1  point if parm curve discontinuous at seam
       int   comp_parm_discont;    5  points for discontinuous parm CEC
       int   parm_self_intersect;     Not Tested
       int   ec_complex;          VAL Sum of all EC complexity values
             Score is calculated by adding up all the points and divided
             with normalizer which is "5". Score heigher than its normalizer
             is considered as FATAL and score heigher than 1.0 is considered
             as complex CEC.