# Synopsis

PDX_MSGT gdb_MeasureECComplexity(long option, MDA_PTR gdx_ec_ptr, double tolerance, double *score, GDB_EC_COMPLEXITY *gdb_ec_scores)

# Purpose

Measures the complexity of a GDX Edge curve

# Description

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

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

The EC to be analyzed.

## tolerance

Tolerance used to determine curve closure and curve degeneracy.

# Output

## score

The complexity score.

## gdb_ec_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   curve_no_exist ;    25 points if no model and parm curves
       int   surf_no_exist  ;    25 points if no surface
       int   num_faces      ;    25 points if no.of faces is zero
       int   mc_no_exist    ;    1 point if no model curve
       int   mc_discont     ;    1 point for discontinuous model curve
       int   mc_on_surf     ;    1 point for model curve not on the surf
       int   mc_complex     ;    VAL points Measured Curve Complexity Score
       int   mc_cc          ;    10 point for composite model curve
       int   mc_pref        ;    5 points with no model curve when it is pref
       int   not_cbs_surf   ;    Not Tested
       int   parm_no_exist  ;    1 point if no Parm curve
       int   parm_uv_discont;    1 point with discontinuous UV parm curve
       int   parm_no_xy_planar;  1 point if parm curve is not XY_planar
       int   parm_on_surf   ;    2 points if parm curve not on the surf
       int   parm_cc        ;    1 point if parm curve is composite curve
       int   parm_complex   ;    VAL points Measured Curve Complexity Score
       gdb_ec_score is calculated by adding up all the points and divided
       with normalizer which is "5". gdb_ec_score heigher than its normalizer
       is considered as FATAL and score heigher than 1.0 is considered as
       complex Edge Curve.